1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00

Merge remote-tracking branch 'dwbutler/jruby' into jruby

Conflicts:
	lib/paper_trail/has_paper_trail.rb
	paper_trail.gemspec
	test/unit/serializer_test.rb
This commit is contained in:
Ben Atkins 2013-03-26 10:54:33 -04:00
commit abd633f5a9
6 changed files with 32 additions and 3 deletions

View file

@ -4,3 +4,5 @@ rvm:
- 1.9.2
- 1.8.7
- ree
- jruby-18mode
- jruby-19mode

View file

@ -15,6 +15,14 @@
- [#189](https://github.com/airblade/paper_trail/pull/189) - Provided support for a `configure` block initializer.
- Added `setter` method for the `serializer` config option.
- [#192](https://github.com/airblade/paper_trail/pull/192) - `object_changes` should store serialized representation of serialized
attributes for `create` actions (in addition to `update` actions, which had already been patched by
[#180](https://github.com/airblade/paper_trail/pull/180)).
- [#190](https://github.com/airblade/paper_trail/pull/190) - Fix compatibility with
[SerializedAttributes](https://github.com/technoweenie/serialized_attributes) gem.
- [#189](https://github.com/airblade/paper_trail/pull/189) - Provided support for a `configure` block initializer.
- Added `setter` method for the `serializer` config option.
## 2.7.0
- [#183](https://github.com/airblade/paper_trail/pull/183) - Fully qualify the `Version` class to help prevent

10
Gemfile
View file

@ -1,2 +1,12 @@
source 'https://rubygems.org'
gemspec
platform :ruby do
gem "sqlite3"
end
platform :jruby do
gem "jdbc-sqlite3"
gem "activerecord-jdbcsqlite3-adapter"
end

View file

@ -746,7 +746,7 @@ end
By default, PaperTrail stores your changes as a YAML dump. You can override this with the serializer config option:
```ruby
>> PaperTrail.serializer = MyCustomSerializer
>> PaperTrail.config.serializer = MyCustomSerializer
```
A valid serializer is a `module` (or `class`) that defines a `load` and `dump` method. These serializers are included in the gem for your convenience:

View file

@ -20,6 +20,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rake'
s.add_development_dependency 'shoulda', '~> 3.3'
s.add_development_dependency 'sqlite3', '~> 1.2'
s.add_development_dependency 'ffaker', '>= 1.15'
s.add_development_dependency 'sqlite3', '~> 1.2' unless defined?(JRUBY_VERSION)
s.add_development_dependency 'ffaker', '~> 2.0'
end

View file

@ -1,5 +1,14 @@
# Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"
require 'bundler/setup'
if defined?(JRUBY_VERSION)
require 'jdbc/sqlite3'
require 'active_record'
require 'active_record/connection_adapters/jdbcsqlite3_adapter'
else
require 'sqlite3'
end
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require "rails/test_help"