protected_record 0.1.6 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b4ae03d5523080e206851d03cc76efa67a4d79d
4
- data.tar.gz: 62b148331066c5269c0a374bafd2e014d00e466f
3
+ metadata.gz: 7df8821073837a50e376df9e7d671cfc9ff5258f
4
+ data.tar.gz: 4cdddffb1aa49bcd24999853dc2f24605da32e9c
5
5
  SHA512:
6
- metadata.gz: d11404dfa4b8939a5ed0bb9c3d0e39b99c1a1e02778058b28d05a3217cc8dd85d9c0ed482c6d1f5fa387f97b49852f0000fc54b5e909ca599926de4809a94f7f
7
- data.tar.gz: 87657e47b9af9022c60dd5f3094e5e68932e764fa41b8a9b9ecf2153719278c9c892fc09efac1b9d65a8f27687a3cedad79c4af5949623bd1956ee3948719efb
6
+ metadata.gz: 55ce83999758fe5a26355dcfe8e128ca226dc12c1ea616412ced8eee0e279574624a5bb2ac35114f9909af242398a3a5d20c0c84512cb6194c1c40cd95ef6270
7
+ data.tar.gz: c2dadf295a50e5646deaa6d6d65d3bc7af1869d0a577afccccff7982e27008e78e9594a791fe03b5cad9e7b85da6ace54650f6c40c6ba37a6f2dadf4265ade10
data/README.md CHANGED
@@ -47,13 +47,13 @@ class SomeRecord < ActiveRecord::Base
47
47
  end
48
48
  ```
49
49
 
50
- Your third option is to omit `:protected_keys` entirely.
50
+ 3. Your third option is to omit `:protected_keys` entirely.
51
51
  If they are not specified using either method, ProtectedRecord will use an empty array.
52
52
 
53
53
  ## Usage & Function
54
54
 
55
55
  1. protected_record will prevent changes to attributes you specify as protected.
56
- 2. Any attempted change will be logged as a
56
+ 2. Any attempted but prevented change will be logged as a
57
57
  `ProtectedRecord::ChangeRequest::Record`.
58
58
  3. If any changes are allowed through the filter, protected_record
59
59
  will create a `ProtectedRecord::ChangeLog::Record` to log who changed what,
@@ -92,6 +92,12 @@ and
92
92
  @some_record.change_request_records
93
93
  ```
94
94
 
95
+ ## Recent Changes
96
+ Okay, so not so recent. Rails 4 removed attr_accessible, which this gem was using.
97
+ The only change to the end user should be the need to whitelist any params using
98
+ [strong_parameters](https://github.com/rails/strong_parameters). Since this is technically
99
+ a breaking change, it's time to bump protected_record to v1.0.0.
100
+
95
101
  ## Contributing
96
102
 
97
103
  Please do. There's plenty that could be done to round out both the interface
@@ -3,7 +3,6 @@ module ProtectedRecord
3
3
  module ChangeLog
4
4
  class Record < ActiveRecord::Base
5
5
  self.table_name = "protected_record_change_log_records"
6
- attr_accessible :recordable, :user
7
6
  belongs_to :recordable, polymorphic: true
8
7
  belongs_to :user, class_name: "User", foreign_key: :user_id
9
8
  end
@@ -3,7 +3,6 @@ module ProtectedRecord
3
3
  module ChangeRequest
4
4
  class Record < ActiveRecord::Base
5
5
  self.table_name = "protected_record_change_request_records"
6
- attr_accessible :recordable, :user
7
6
 
8
7
  belongs_to :recordable, polymorphic: true
9
8
  belongs_to :user, class_name: "User",
@@ -1,3 +1,3 @@
1
1
  module ProtectedRecord
2
- VERSION = "0.1.6"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.require_paths = ["lib"]
27
27
 
28
28
  s.add_runtime_dependency "pay_dirt", "~> 1.0.0"
29
- s.add_runtime_dependency "activerecord", "<= 3.2.22"
29
+ s.add_runtime_dependency "activerecord", "~> 4.0"
30
30
 
31
31
  s.add_development_dependency "coveralls"
32
32
  s.add_development_dependency "minitest"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protected_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tad Hosford
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "<="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.22
33
+ version: '4.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "<="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.2.22
40
+ version: '4.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coveralls
43
43
  requirement: !ruby/object:Gem::Requirement