active_versioning 0.3.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 146e6fa2d8f9c5f9b126fb4e6964427c49f69eeb
4
- data.tar.gz: 841e66a6b8814e9496d2a8942c03d2bae9925532
3
+ metadata.gz: 74cb0cc681ea6885b236e96b7446ba7503793bcd
4
+ data.tar.gz: 36bca111f3f356f131ffe0076502f99ed0398bd0
5
5
  SHA512:
6
- metadata.gz: dd07835f744fb3cc54bf7e749d254de7048e98d30744813ea98744032c71e034b1c0c808f54306821656f58af96f470ff3ce4c4599ee2168f258cf0ea9db26fb
7
- data.tar.gz: e25e47970058e79744107bcda2ab45db9b248f0e77e25a044533b9513ffb74099001d9fd5eeb0943618ede5ba9f15940d8586a6957b67910d39d7441e8700dc6
6
+ metadata.gz: 9fe9b9e3c3481ac5f7a43efe2a92ae059438de915428a8ce57094b679091e1eb6bdc780b1552d88971a86fdd849aa66f1f7df2cc50b3e8914658eb4e1eda37f5
7
+ data.tar.gz: 240c6d673ab24f83507ae46627a880439fca4755d453586cced1cb34793b458b7ce04d5662b718ef3e3d78fb42ca7134d4f4d108b27febef144f27a338c4f0b4
data/README.md CHANGED
@@ -102,6 +102,15 @@ If you want to see the attributes the are versioned, use...
102
102
  post.versioned_attributes # => { 'id' => 1, 'title' => 'Default Title' }
103
103
  ```
104
104
 
105
+ By default, ActiveVersioning blacklists the following attributes:
106
+ ```ruby
107
+ ActiveVersioning::VersionManager::BLACKLISTED_ATTRIBUTES = %w(
108
+ created_at
109
+ updated_at
110
+ published
111
+ )
112
+ ```
113
+
105
114
  If you require additional versioned attributes, overwrite the `versioned_attribute_names` method in your model:
106
115
  ```ruby
107
116
  class Post < ActiveRecord::Base
@@ -138,3 +147,11 @@ rescue ActiveVersioning::Errors::IncompatibleVersion => error
138
147
  error.version # => our `incompatible_version`
139
148
  end
140
149
  ```
150
+
151
+ ***
152
+
153
+ <a href="http://code.viget.com">
154
+ <img src="http://code.viget.com/github-banner.png" alt="Code At Viget">
155
+ </a>
156
+
157
+ Visit [code.viget.com](http://code.viget.com) to see more projects from [Viget.](https://viget.com)
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "bundler", ">= 1.10"
26
26
  spec.add_development_dependency "rake", ">= 10.0"
27
27
  spec.add_development_dependency "rspec"
28
- spec.add_development_dependency "shoulda-matchers"
28
+ spec.add_development_dependency "shoulda-matchers", '2.8.0'
29
29
  spec.add_development_dependency "database_cleaner"
30
30
  spec.add_development_dependency "generator_spec"
31
31
  spec.add_development_dependency "pry"
@@ -1,3 +1,3 @@
1
1
  module ActiveVersioning
2
- VERSION = "0.3.1"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -25,7 +25,7 @@ module ActiveVersioning
25
25
  end
26
26
 
27
27
  def incompatible_attributes(version)
28
- version.object.keys - record.attributes.keys
28
+ version.object.keys - record.versioned_attributes.keys
29
29
  end
30
30
  end
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stenberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-24 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: shoulda-matchers
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 2.8.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 2.8.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: database_cleaner
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  version: '0'
201
201
  requirements: []
202
202
  rubyforge_project:
203
- rubygems_version: 2.4.5
203
+ rubygems_version: 2.4.5.1
204
204
  signing_key:
205
205
  specification_version: 4
206
206
  summary: Plug-and-Play Versioning for Rails