has_moderated 1.0.rc8 → 1.0.rc9

Sign up to get free protection for your applications and to get access to all the features.
@@ -730,6 +730,7 @@ describe Task do
730
730
 
731
731
  moderation = Moderation.last
732
732
  preview = Moderation.last.preview
733
+ preview.frozen?.should be_true
733
734
  expect { preview.title = "Task 2" }.should raise_error
734
735
  expect { preview.update_moderation }.should raise_error
735
736
 
@@ -798,6 +799,16 @@ describe Task do
798
799
  conn.title.should eq("Connection 1")
799
800
  conn.renamed_subtask.title.should eq("Subtask 1")
800
801
  conn.renamed_task.title.should eq("Task 1")
802
+
803
+ # everything has to be frozen
804
+ task.frozen?.should be_true
805
+ task.renamed_subtasks.frozen?.should be_true
806
+ task.renamed_connections.frozen?.should be_true
807
+ subtask.frozen?.should be_true
808
+ subtask.renamed_connections.frozen?.should be_true
809
+ conn.frozen?.should be_true
810
+ conn.renamed_task.frozen?.should be_true
811
+ conn.renamed_subtask.frozen?.should be_true
801
812
  end
802
813
  end
803
814
  end
metadata CHANGED
@@ -1,196 +1,177 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: has_moderated
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.rc8
3
+ version: !ruby/object:Gem::Version
4
+ hash: 2410843752946561973
5
5
  prerelease: 4
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - rc
10
+ - 9
11
+ version: 1.0.rc9
6
12
  platform: ruby
7
- authors:
13
+ authors:
8
14
  - Jan Berdajs
9
15
  autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
- date: 2012-06-09 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rails
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: 3.0.0
18
+
19
+ date: 2012-06-09 00:00:00 Z
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
22
  type: :runtime
23
+ name: rails
23
24
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
26
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 2771886031290461382
31
+ segments:
32
+ - 3
33
+ - 0
34
+ - 0
29
35
  version: 3.0.0
30
- - !ruby/object:Gem::Dependency
31
- name: sqlite3
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
36
+ requirement: *id001
37
+ - !ruby/object:Gem::Dependency
38
38
  type: :development
39
+ name: sqlite3
39
40
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: rspec
48
- requirement: !ruby/object:Gem::Requirement
41
+ version_requirements: &id002 !ruby/object:Gem::Requirement
49
42
  none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ hash: 2002549777813010636
47
+ segments:
48
+ - 0
49
+ version: "0"
50
+ requirement: *id002
51
+ - !ruby/object:Gem::Dependency
54
52
  type: :development
53
+ name: rspec
55
54
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: rspec-rails
64
- requirement: !ruby/object:Gem::Requirement
55
+ version_requirements: &id003 !ruby/object:Gem::Requirement
65
56
  none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 2002549777813010636
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ requirement: *id003
65
+ - !ruby/object:Gem::Dependency
70
66
  type: :development
67
+ name: rspec-rails
71
68
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
69
+ version_requirements: &id004 !ruby/object:Gem::Requirement
73
70
  none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: pry
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 2002549777813010636
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ requirement: *id004
79
+ - !ruby/object:Gem::Dependency
86
80
  type: :development
81
+ name: pry
87
82
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- - !ruby/object:Gem::Dependency
95
- name: rmagick
96
- requirement: !ruby/object:Gem::Requirement
83
+ version_requirements: &id005 !ruby/object:Gem::Requirement
97
84
  none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 2002549777813010636
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ requirement: *id005
93
+ - !ruby/object:Gem::Dependency
102
94
  type: :development
95
+ name: rmagick
103
96
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
97
+ version_requirements: &id006 !ruby/object:Gem::Requirement
105
98
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: growl
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 2002549777813010636
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ requirement: *id006
107
+ - !ruby/object:Gem::Dependency
118
108
  type: :development
109
+ name: growl
119
110
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
111
+ version_requirements: &id007 !ruby/object:Gem::Requirement
121
112
  none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: spork
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ hash: 2002549777813010636
117
+ segments:
118
+ - 0
119
+ version: "0"
120
+ requirement: *id007
121
+ - !ruby/object:Gem::Dependency
134
122
  type: :development
123
+ name: spork
135
124
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
125
+ version_requirements: &id008 !ruby/object:Gem::Requirement
137
126
  none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: guard-spork
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ! '>='
148
- - !ruby/object:Gem::Version
149
- version: '0'
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ hash: 2002549777813010636
131
+ segments:
132
+ - 0
133
+ version: "0"
134
+ requirement: *id008
135
+ - !ruby/object:Gem::Dependency
150
136
  type: :development
137
+ name: guard-spork
151
138
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
- - !ruby/object:Gem::Dependency
159
- name: guard-rspec
160
- requirement: !ruby/object:Gem::Requirement
139
+ version_requirements: &id009 !ruby/object:Gem::Requirement
161
140
  none: false
162
- requirements:
163
- - - ! '>='
164
- - !ruby/object:Gem::Version
165
- version: '0'
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ hash: 2002549777813010636
145
+ segments:
146
+ - 0
147
+ version: "0"
148
+ requirement: *id009
149
+ - !ruby/object:Gem::Dependency
166
150
  type: :development
151
+ name: guard-rspec
167
152
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
153
+ version_requirements: &id010 !ruby/object:Gem::Requirement
169
154
  none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- description: Moderated fields or whole model instances are serialized and saved into
175
- a separate moderations table. The moderation can then be accepted and the changes
176
- will be applied to the model. This way, lookups for existing, accepted fields or
177
- entries will be much faster than if using something like Papertrail, since the changes
178
- that have not yet been accepted are stored outside of the model table - in the moderations
179
- table.
180
- email:
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ hash: 2002549777813010636
159
+ segments:
160
+ - 0
161
+ version: "0"
162
+ requirement: *id010
163
+ description: Moderated fields or whole model instances are serialized and saved into a separate moderations table. The moderation can then be accepted and the changes will be applied to the model. This way, lookups for existing, accepted fields or entries will be much faster than if using something like Papertrail, since the changes that have not yet been accepted are stored outside of the model table - in the moderations table.
164
+ email:
181
165
  - mrbrdo@gmail.com
182
166
  executables: []
167
+
183
168
  extensions: []
169
+
184
170
  extra_rdoc_files: []
185
- files:
186
- - lib/generators/has_moderated/install/install_generator.rb
187
- - lib/generators/has_moderated/install/templates/migrations/1_create_moderations.rb
188
- - lib/generators/has_moderated/install/templates/moderation.rb
171
+
172
+ files:
173
+ - lib/has_moderated.rb
189
174
  - lib/generators/USAGE
190
- - lib/has_moderated/active_record/active_record_helpers.rb
191
- - lib/has_moderated/associations/base.rb
192
- - lib/has_moderated/associations/collection.rb
193
- - lib/has_moderated/associations/has_one.rb
194
175
  - lib/has_moderated/carrier_wave.rb
195
176
  - lib/has_moderated/common.rb
196
177
  - lib/has_moderated/moderated_attributes.rb
@@ -201,37 +182,25 @@ files:
201
182
  - lib/has_moderated/railtie.rb
202
183
  - lib/has_moderated/user_hooks.rb
203
184
  - lib/has_moderated/version.rb
204
- - lib/has_moderated.rb
205
185
  - lib/tasks/has_moderated_tasks.rake
186
+ - lib/has_moderated/active_record/active_record_helpers.rb
187
+ - lib/has_moderated/associations/base.rb
188
+ - lib/has_moderated/associations/collection.rb
189
+ - lib/has_moderated/associations/has_one.rb
190
+ - lib/generators/has_moderated/install/install_generator.rb
191
+ - lib/generators/has_moderated/install/templates/moderation.rb
192
+ - lib/generators/has_moderated/install/templates/migrations/1_create_moderations.rb
206
193
  - MIT-LICENSE
207
194
  - Rakefile
208
195
  - README.rdoc
209
- - test/dummy/app/assets/javascripts/application.js
210
- - test/dummy/app/assets/stylesheets/application.css
211
- - test/dummy/app/controllers/application_controller.rb
212
- - test/dummy/app/helpers/application_helper.rb
213
- - test/dummy/app/models/moderation.rb
214
- - test/dummy/app/uploaders/generic_uploader.rb
215
- - test/dummy/app/views/layouts/application.html.erb
196
+ - test/dummy/config.ru
197
+ - test/dummy/Rakefile
216
198
  - test/dummy/config/application.rb
217
199
  - test/dummy/config/boot.rb
218
200
  - test/dummy/config/database.yml
219
201
  - test/dummy/config/environment.rb
220
- - test/dummy/config/environments/development.rb
221
- - test/dummy/config/environments/production.rb
222
- - test/dummy/config/environments/test.rb
223
- - test/dummy/config/initializers/backtrace_silencers.rb
224
- - test/dummy/config/initializers/inflections.rb
225
- - test/dummy/config/initializers/mime_types.rb
226
- - test/dummy/config/initializers/secret_token.rb
227
- - test/dummy/config/initializers/session_store.rb
228
- - test/dummy/config/initializers/wrap_parameters.rb
229
- - test/dummy/config/locales/en.yml
230
202
  - test/dummy/config/routes.rb
231
- - test/dummy/config.ru
232
203
  - test/dummy/db/development.sqlite3
233
- - test/dummy/db/migrate/20120520215008_initial_schema.rb
234
- - test/dummy/db/migrate/20120520215224_create_photos.rb
235
204
  - test/dummy/db/schema.rb
236
205
  - test/dummy/db/test.sqlite3
237
206
  - test/dummy/log/development.log
@@ -241,67 +210,75 @@ files:
241
210
  - test/dummy/public/500.html
242
211
  - test/dummy/public/favicon.ico
243
212
  - test/dummy/public/test.jpg
244
- - test/dummy/Rakefile
245
213
  - test/dummy/script/rails
214
+ - test/dummy/spec/spec_helper.rb
246
215
  - test/dummy/spec/models/photo_spec.rb
247
216
  - test/dummy/spec/models/task_spec.rb
248
- - test/dummy/spec/spec_helper.rb
249
217
  - test/dummy/spec/support/crazy_models.rb
250
218
  - test/dummy/spec/support/photos.rb
219
+ - test/dummy/db/migrate/20120520215008_initial_schema.rb
220
+ - test/dummy/db/migrate/20120520215224_create_photos.rb
221
+ - test/dummy/config/environments/development.rb
222
+ - test/dummy/config/environments/production.rb
223
+ - test/dummy/config/environments/test.rb
224
+ - test/dummy/config/initializers/backtrace_silencers.rb
225
+ - test/dummy/config/initializers/inflections.rb
226
+ - test/dummy/config/initializers/mime_types.rb
227
+ - test/dummy/config/initializers/secret_token.rb
228
+ - test/dummy/config/initializers/session_store.rb
229
+ - test/dummy/config/initializers/wrap_parameters.rb
230
+ - test/dummy/config/locales/en.yml
231
+ - test/dummy/app/controllers/application_controller.rb
232
+ - test/dummy/app/helpers/application_helper.rb
233
+ - test/dummy/app/models/moderation.rb
234
+ - test/dummy/app/uploaders/generic_uploader.rb
235
+ - test/dummy/app/views/layouts/application.html.erb
236
+ - test/dummy/app/assets/javascripts/application.js
237
+ - test/dummy/app/assets/stylesheets/application.css
251
238
  homepage: https://github.com/mrbrdo/has_moderated
252
239
  licenses: []
240
+
253
241
  post_install_message:
254
242
  rdoc_options: []
255
- require_paths:
243
+
244
+ require_paths:
256
245
  - lib
257
- required_ruby_version: !ruby/object:Gem::Requirement
246
+ required_ruby_version: !ruby/object:Gem::Requirement
258
247
  none: false
259
- requirements:
260
- - - ! '>='
261
- - !ruby/object:Gem::Version
262
- version: '0'
263
- segments:
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ hash: 2002549777813010636
252
+ segments:
264
253
  - 0
265
- hash: 971673414067796210
266
- required_rubygems_version: !ruby/object:Gem::Requirement
254
+ version: "0"
255
+ required_rubygems_version: !ruby/object:Gem::Requirement
267
256
  none: false
268
- requirements:
269
- - - ! '>'
270
- - !ruby/object:Gem::Version
257
+ requirements:
258
+ - - ">"
259
+ - !ruby/object:Gem::Version
260
+ hash: 1960248522488440439
261
+ segments:
262
+ - 1
263
+ - 3
264
+ - 1
271
265
  version: 1.3.1
272
266
  requirements: []
267
+
273
268
  rubyforge_project:
274
- rubygems_version: 1.8.24
269
+ rubygems_version: 1.8.12
275
270
  signing_key:
276
271
  specification_version: 3
277
272
  summary: Moderate fields or entire model instances.
278
- test_files:
279
- - test/dummy/app/assets/javascripts/application.js
280
- - test/dummy/app/assets/stylesheets/application.css
281
- - test/dummy/app/controllers/application_controller.rb
282
- - test/dummy/app/helpers/application_helper.rb
283
- - test/dummy/app/models/moderation.rb
284
- - test/dummy/app/uploaders/generic_uploader.rb
285
- - test/dummy/app/views/layouts/application.html.erb
273
+ test_files:
274
+ - test/dummy/config.ru
275
+ - test/dummy/Rakefile
286
276
  - test/dummy/config/application.rb
287
277
  - test/dummy/config/boot.rb
288
278
  - test/dummy/config/database.yml
289
279
  - test/dummy/config/environment.rb
290
- - test/dummy/config/environments/development.rb
291
- - test/dummy/config/environments/production.rb
292
- - test/dummy/config/environments/test.rb
293
- - test/dummy/config/initializers/backtrace_silencers.rb
294
- - test/dummy/config/initializers/inflections.rb
295
- - test/dummy/config/initializers/mime_types.rb
296
- - test/dummy/config/initializers/secret_token.rb
297
- - test/dummy/config/initializers/session_store.rb
298
- - test/dummy/config/initializers/wrap_parameters.rb
299
- - test/dummy/config/locales/en.yml
300
280
  - test/dummy/config/routes.rb
301
- - test/dummy/config.ru
302
281
  - test/dummy/db/development.sqlite3
303
- - test/dummy/db/migrate/20120520215008_initial_schema.rb
304
- - test/dummy/db/migrate/20120520215224_create_photos.rb
305
282
  - test/dummy/db/schema.rb
306
283
  - test/dummy/db/test.sqlite3
307
284
  - test/dummy/log/development.log
@@ -311,10 +288,28 @@ test_files:
311
288
  - test/dummy/public/500.html
312
289
  - test/dummy/public/favicon.ico
313
290
  - test/dummy/public/test.jpg
314
- - test/dummy/Rakefile
315
291
  - test/dummy/script/rails
292
+ - test/dummy/spec/spec_helper.rb
316
293
  - test/dummy/spec/models/photo_spec.rb
317
294
  - test/dummy/spec/models/task_spec.rb
318
- - test/dummy/spec/spec_helper.rb
319
295
  - test/dummy/spec/support/crazy_models.rb
320
296
  - test/dummy/spec/support/photos.rb
297
+ - test/dummy/db/migrate/20120520215008_initial_schema.rb
298
+ - test/dummy/db/migrate/20120520215224_create_photos.rb
299
+ - test/dummy/config/environments/development.rb
300
+ - test/dummy/config/environments/production.rb
301
+ - test/dummy/config/environments/test.rb
302
+ - test/dummy/config/initializers/backtrace_silencers.rb
303
+ - test/dummy/config/initializers/inflections.rb
304
+ - test/dummy/config/initializers/mime_types.rb
305
+ - test/dummy/config/initializers/secret_token.rb
306
+ - test/dummy/config/initializers/session_store.rb
307
+ - test/dummy/config/initializers/wrap_parameters.rb
308
+ - test/dummy/config/locales/en.yml
309
+ - test/dummy/app/controllers/application_controller.rb
310
+ - test/dummy/app/helpers/application_helper.rb
311
+ - test/dummy/app/models/moderation.rb
312
+ - test/dummy/app/uploaders/generic_uploader.rb
313
+ - test/dummy/app/views/layouts/application.html.erb
314
+ - test/dummy/app/assets/javascripts/application.js
315
+ - test/dummy/app/assets/stylesheets/application.css