alchemy_cms 2.2.rc11 → 2.2.rc13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/.travis.yml +4 -1
  2. data/Gemfile +10 -9
  3. data/alchemy_cms.gemspec +8 -4
  4. data/app/assets/javascripts/alchemy/alchemy.base.js +0 -13
  5. data/app/assets/javascripts/alchemy/alchemy.dirty.js +6 -4
  6. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +2 -2
  7. data/app/assets/stylesheets/alchemy/elements.css.scss +4 -7
  8. data/app/controllers/alchemy/admin/base_controller.rb +2 -3
  9. data/app/controllers/alchemy/admin/clipboard_controller.rb +10 -10
  10. data/app/controllers/alchemy/admin/elements_controller.rb +4 -4
  11. data/app/controllers/alchemy/admin/pages_controller.rb +1 -2
  12. data/app/controllers/alchemy/base_controller.rb +1 -15
  13. data/app/helpers/alchemy/admin/base_helper.rb +15 -21
  14. data/app/helpers/alchemy/admin/contents_helper.rb +0 -6
  15. data/app/helpers/alchemy/admin/pages_helper.rb +62 -27
  16. data/app/helpers/alchemy/base_helper.rb +0 -9
  17. data/app/models/alchemy/clipboard.rb +74 -0
  18. data/app/models/alchemy/clipboard_spec.rb +0 -0
  19. data/app/models/alchemy/content.rb +19 -0
  20. data/app/views/alchemy/admin/contents/create.js.erb +1 -1
  21. data/app/views/alchemy/admin/elements/_element.html.erb +0 -1
  22. data/app/views/alchemy/admin/elements/_element_head.html.erb +4 -5
  23. data/app/views/alchemy/admin/essence_pictures/assign.js.erb +3 -2
  24. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +3 -4
  25. data/app/views/alchemy/admin/essence_pictures/edit.html.erb +1 -1
  26. data/app/views/alchemy/admin/essence_pictures/update.js.erb +1 -10
  27. data/app/views/alchemy/admin/pages/_contactform_links.html.erb +3 -9
  28. data/app/views/alchemy/admin/pages/_external_link.html.erb +3 -12
  29. data/app/views/alchemy/admin/pages/_file_link.html.erb +3 -12
  30. data/app/views/alchemy/admin/pages/_internal_link.html.erb +5 -14
  31. data/app/views/alchemy/admin/pages/_page_for_links.html.erb +3 -9
  32. data/app/views/alchemy/admin/pages/edit.html.erb +16 -17
  33. data/app/views/alchemy/admin/pictures/_picture.html.erb +3 -2
  34. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -0
  35. data/app/views/alchemy/essences/_essence_picture_tools.html.erb +6 -8
  36. data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +9 -3
  37. data/lib/alchemy/authentication_helpers.rb +26 -0
  38. data/lib/alchemy/engine.rb +4 -0
  39. data/lib/alchemy/tinymce.rb +4 -0
  40. data/lib/alchemy/version.rb +1 -1
  41. data/spec/controllers/admin/clipboard_controller_spec.rb +35 -35
  42. data/spec/controllers/admin/elements_controller_spec.rb +71 -14
  43. data/spec/controllers/admin/pages_controller_spec.rb +79 -33
  44. data/spec/models/clipboard_spec.rb +100 -0
  45. data/spec/models/element_spec.rb +17 -7
  46. metadata +77 -8
@@ -46,10 +46,20 @@ describe Alchemy::Element do
46
46
  definitions.should == []
47
47
  end
48
48
 
49
- it "should raise an error if no descriptions are found" do
50
- FileUtils.mv(File.join(File.dirname(__FILE__), '..', '..', 'config', 'alchemy', 'elements.yml'), File.join(File.dirname(__FILE__), '..', '..', 'config', 'alchemy', 'elements.yml.bak'))
51
- expect { Alchemy::Element.descriptions }.should raise_error
52
- FileUtils.mv(File.join(File.dirname(__FILE__), '..', '..', 'config', 'alchemy', 'elements.yml.bak'), File.join(File.dirname(__FILE__), '..', '..', 'config', 'alchemy', 'elements.yml'))
49
+ context "no description files are found" do
50
+
51
+ before(:each) do
52
+ FileUtils.mv(File.join(File.dirname(__FILE__), '..', '..', 'config', 'alchemy', 'elements.yml'), File.join(File.dirname(__FILE__), '..', '..', 'config', 'alchemy', 'elements.yml.bak'))
53
+ end
54
+
55
+ it "should raise an error" do
56
+ expect { Alchemy::Element.descriptions }.should raise_error(LoadError)
57
+ end
58
+
59
+ after(:each) do
60
+ FileUtils.mv(File.join(File.dirname(__FILE__), '..', '..', 'config', 'alchemy', 'elements.yml.bak'), File.join(File.dirname(__FILE__), '..', '..', 'config', 'alchemy', 'elements.yml'))
61
+ end
62
+
53
63
  end
54
64
 
55
65
  context "retrieving contents, essences and ingredients" do
@@ -114,7 +124,7 @@ describe Alchemy::Element do
114
124
  it "should limit elements" do
115
125
  Alchemy::Element.all_for_page(@page).each { |e| e['name'].should_not == 'column_headline' }
116
126
  end
117
-
127
+
118
128
  it "should be ignored if unique" do
119
129
  Alchemy::Element.all_for_page(@page).each { |e| e['name'].should_not == 'unique_headline' }
120
130
  end
@@ -220,7 +230,7 @@ describe Alchemy::Element do
220
230
  end
221
231
 
222
232
  describe "Finding previous or next element." do
223
-
233
+
224
234
  before(:each) do
225
235
  @page = FactoryGirl.create(:language_root_page)
226
236
  @page.elements.delete_all
@@ -241,7 +251,7 @@ describe Alchemy::Element do
241
251
  end
242
252
  end
243
253
 
244
- end
254
+ end
245
255
 
246
256
  describe '#next' do
247
257
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.rc11
4
+ version: 2.2.rc13
5
5
  prerelease: 4
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-05-29 00:00:00.000000000 Z
15
+ date: 2012-06-03 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails
@@ -21,7 +21,7 @@ dependencies:
21
21
  requirements:
22
22
  - - ~>
23
23
  - !ruby/object:Gem::Version
24
- version: 3.2.1
24
+ version: 3.2.5
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 3.2.1
32
+ version: 3.2.5
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: authlogic
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -223,13 +223,61 @@ dependencies:
223
223
  - !ruby/object:Gem::Version
224
224
  version: 3.2.3
225
225
  - !ruby/object:Gem::Dependency
226
- name: rspec-rails
226
+ name: bumpy
227
+ requirement: !ruby/object:Gem::Requirement
228
+ none: false
229
+ requirements:
230
+ - - ! '>='
231
+ - !ruby/object:Gem::Version
232
+ version: '0'
233
+ type: :development
234
+ prerelease: false
235
+ version_requirements: !ruby/object:Gem::Requirement
236
+ none: false
237
+ requirements:
238
+ - - ! '>='
239
+ - !ruby/object:Gem::Version
240
+ version: '0'
241
+ - !ruby/object:Gem::Dependency
242
+ name: capybara
243
+ requirement: !ruby/object:Gem::Requirement
244
+ none: false
245
+ requirements:
246
+ - - ! '>='
247
+ - !ruby/object:Gem::Version
248
+ version: '0'
249
+ type: :development
250
+ prerelease: false
251
+ version_requirements: !ruby/object:Gem::Requirement
252
+ none: false
253
+ requirements:
254
+ - - ! '>='
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ - !ruby/object:Gem::Dependency
258
+ name: database_cleaner
259
+ requirement: !ruby/object:Gem::Requirement
260
+ none: false
261
+ requirements:
262
+ - - ! '>='
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
265
+ type: :development
266
+ prerelease: false
267
+ version_requirements: !ruby/object:Gem::Requirement
268
+ none: false
269
+ requirements:
270
+ - - ! '>='
271
+ - !ruby/object:Gem::Version
272
+ version: '0'
273
+ - !ruby/object:Gem::Dependency
274
+ name: factory_girl_rails
227
275
  requirement: !ruby/object:Gem::Requirement
228
276
  none: false
229
277
  requirements:
230
278
  - - ~>
231
279
  - !ruby/object:Gem::Version
232
- version: '2.8'
280
+ version: 1.7.0
233
281
  type: :development
234
282
  prerelease: false
235
283
  version_requirements: !ruby/object:Gem::Requirement
@@ -237,7 +285,23 @@ dependencies:
237
285
  requirements:
238
286
  - - ~>
239
287
  - !ruby/object:Gem::Version
240
- version: '2.8'
288
+ version: 1.7.0
289
+ - !ruby/object:Gem::Dependency
290
+ name: rspec-rails
291
+ requirement: !ruby/object:Gem::Requirement
292
+ none: false
293
+ requirements:
294
+ - - ! '>='
295
+ - !ruby/object:Gem::Version
296
+ version: '0'
297
+ type: :development
298
+ prerelease: false
299
+ version_requirements: !ruby/object:Gem::Requirement
300
+ none: false
301
+ requirements:
302
+ - - ! '>='
303
+ - !ruby/object:Gem::Version
304
+ version: '0'
241
305
  - !ruby/object:Gem::Dependency
242
306
  name: sqlite3
243
307
  requirement: !ruby/object:Gem::Requirement
@@ -255,7 +319,7 @@ dependencies:
255
319
  - !ruby/object:Gem::Version
256
320
  version: '0'
257
321
  - !ruby/object:Gem::Dependency
258
- name: jasminerice
322
+ name: yard
259
323
  requirement: !ruby/object:Gem::Requirement
260
324
  none: false
261
325
  requirements:
@@ -399,6 +463,8 @@ files:
399
463
  - app/models/alchemy.rb
400
464
  - app/models/alchemy/attachment.rb
401
465
  - app/models/alchemy/cell.rb
466
+ - app/models/alchemy/clipboard.rb
467
+ - app/models/alchemy/clipboard_spec.rb
402
468
  - app/models/alchemy/content.rb
403
469
  - app/models/alchemy/element.rb
404
470
  - app/models/alchemy/essence_audio.rb
@@ -686,6 +752,7 @@ files:
686
752
  - db/migrate/20111116125112_namespace_alchemy_models.rb
687
753
  - db/migrate/20120216135355_add_country_code_to_languages.rb
688
754
  - lib/alchemy/auth_engine.rb
755
+ - lib/alchemy/authentication_helpers.rb
689
756
  - lib/alchemy/capistrano.rb
690
757
  - lib/alchemy/config.rb
691
758
  - lib/alchemy/engine.rb
@@ -807,6 +874,7 @@ files:
807
874
  - spec/javascripts/spec.js
808
875
  - spec/libraries/resource_spec.rb
809
876
  - spec/libraries/resources_helper_spec.rb
877
+ - spec/models/clipboard_spec.rb
810
878
  - spec/models/content_spec.rb
811
879
  - spec/models/element_spec.rb
812
880
  - spec/models/essence_picture_spec.rb
@@ -1023,6 +1091,7 @@ test_files:
1023
1091
  - spec/javascripts/spec.js
1024
1092
  - spec/libraries/resource_spec.rb
1025
1093
  - spec/libraries/resources_helper_spec.rb
1094
+ - spec/models/clipboard_spec.rb
1026
1095
  - spec/models/content_spec.rb
1027
1096
  - spec/models/element_spec.rb
1028
1097
  - spec/models/essence_picture_spec.rb