requires_approval 1.0.9 → 1.0.10

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: bc0b450979e6d9de191cb2270dfa3d801c80e26f
4
- data.tar.gz: 7dc7728efb662b70d535266097d61e41fb62493c
3
+ metadata.gz: bf14c70bb54cde5833123b1e61a7d8dca8a46aea
4
+ data.tar.gz: 6f3ba4e5095202b54cc75a0b8e6d81b6e0c107fe
5
5
  SHA512:
6
- metadata.gz: 93eae370ca66ccba9be60db77c36602f44886115f6fa23a9dc32153107a3a455aabb94f5685d66b60155c7523c962d3fba216964d901f73bce457b1c072b0caa
7
- data.tar.gz: a9997c25e454d04ce273e4ed3303be707a74155cce438c1fbd35795dc393ea102266923f6bb35ea58f561c2934a71db233c6aa2d750b9a0528726404976b0479
6
+ metadata.gz: 03175e859ee3f1bf4333fab8507d66f53eaffe573b220d0a189ac69670cc6df71001439f1cfda7fa506cf1035586f68a58a601b899fa3e04300c6c56ee506dec
7
+ data.tar.gz: 96fbc0f9d05b22be2479ebd7e3558e08e0f120d7dcc7010fc77803f85132837365e86ae99d62f1a3bf6b9ba7540bf05a7e6cd008ae7a6611dd69989820510293
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # RequiresApproval
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'requires_approval'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install requires_approval
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( http://github.com/<my-github-username>/requires_approval/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.9
1
+ 1.0.10
@@ -1,3 +1,3 @@
1
1
  module RequiresApproval
2
- VERSION = "1.0.9"
2
+ VERSION = "1.0.10"
3
3
  end
@@ -51,7 +51,9 @@ module RequiresApproval
51
51
  self.create_approval_version_record
52
52
  end
53
53
 
54
- self.update_attributes(:is_frozen => false)
54
+ self.is_frozen = false
55
+ self.save
56
+
55
57
  self.reload
56
58
  return true
57
59
  else
@@ -219,6 +221,7 @@ module RequiresApproval
219
221
 
220
222
  # adds our versions table
221
223
  self.drop_versions_table
224
+
222
225
  self.create_versions_table
223
226
 
224
227
  end
@@ -273,12 +276,16 @@ module RequiresApproval
273
276
  self.connection.add_column(
274
277
  self.table_name, :is_frozen, :boolean, :default => true
275
278
  )
279
+
280
+ self.attr_accessible(:is_frozen)
276
281
  end
277
282
  # add is_deleted
278
283
  unless self.column_names.include?("is_deleted")
279
284
  self.connection.add_column(
280
285
  self.table_name, :is_deleted, :boolean, :default => false
281
286
  )
287
+
288
+ self.attr_accessible(:is_deleted)
282
289
  end
283
290
  true
284
291
  end
@@ -291,6 +298,11 @@ module RequiresApproval
291
298
 
292
299
  self.versions_class.class_eval do
293
300
  self.table_name = versions_table_name
301
+
302
+ # Whitelist public attributes
303
+ # Everything since this class is for internal use only
304
+ public_attributes = self.column_names.reject{|attr| self.protected_attributes.deny?(attr)}
305
+ self.attr_accessible(*public_attributes)
294
306
  end
295
307
  end
296
308
 
Binary file
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "requires_approval"
8
- s.version = "1.0.9"
8
+ s.version = "1.0.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Langevin"]
@@ -14,6 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.email = "dan.langevin@lifebooker.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
+ "README.md",
17
18
  "README.rdoc"
18
19
  ]
19
20
  s.files = [
@@ -23,6 +24,7 @@ Gem::Specification.new do |s|
23
24
  "Gemfile.lock",
24
25
  "Guardfile",
25
26
  "LICENSE.txt",
27
+ "README.md",
26
28
  "README.rdoc",
27
29
  "Rakefile",
28
30
  "VERSION",
@@ -31,6 +33,7 @@ Gem::Specification.new do |s|
31
33
  "lib/requires_approval/version.rb",
32
34
  "lib/tasks/requires_approval.rake",
33
35
  "lib/tasks/test.rake",
36
+ "requires_approval-1.0.9.gem",
34
37
  "requires_approval.gemspec",
35
38
  "requires_approval_rails_2.gemspec",
36
39
  "spec/lib/requires_approval_spec.rb",
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "requires_approval_rails_2"
8
- s.version = "1.0.9"
8
+ s.version = "1.0.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Langevin"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: requires_approval
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Langevin
@@ -170,6 +170,7 @@ executables: []
170
170
  extensions: []
171
171
  extra_rdoc_files:
172
172
  - LICENSE.txt
173
+ - README.md
173
174
  - README.rdoc
174
175
  files:
175
176
  - .document
@@ -178,6 +179,7 @@ files:
178
179
  - Gemfile.lock
179
180
  - Guardfile
180
181
  - LICENSE.txt
182
+ - README.md
181
183
  - README.rdoc
182
184
  - Rakefile
183
185
  - VERSION
@@ -186,6 +188,7 @@ files:
186
188
  - lib/requires_approval/version.rb
187
189
  - lib/tasks/requires_approval.rake
188
190
  - lib/tasks/test.rake
191
+ - requires_approval-1.0.9.gem
189
192
  - requires_approval.gemspec
190
193
  - requires_approval_rails_2.gemspec
191
194
  - spec/lib/requires_approval_spec.rb