refinerycms-core 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/app/assets/javascripts/refinery/admin.js.erb +25 -20
  2. data/app/assets/javascripts/refinery/site_bar.js +12 -14
  3. data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +2 -1
  4. data/app/assets/stylesheets/refinery/{refinery.css.scss → layout.css.scss} +1 -7
  5. data/app/assets/stylesheets/refinery/refinery.css +15 -0
  6. data/app/controllers/refinery/admin/{refinery_core_controller.rb → core_controller.rb} +2 -2
  7. data/app/controllers/refinery/admin_controller.rb +4 -1
  8. data/app/helpers/refinery/admin/core_helper.rb +6 -0
  9. data/app/helpers/refinery/admin/dialogs_helper.rb +6 -0
  10. data/app/helpers/refinery/admin_helper.rb +4 -0
  11. data/app/helpers/refinery/fast_helper.rb +4 -0
  12. data/app/helpers/refinery/sitemap_helper.rb +4 -0
  13. data/app/models/refinery/core/base_model.rb +0 -2
  14. data/config/routes.rb +1 -1
  15. data/lib/generators/refinery/cms/cms_generator.rb +24 -10
  16. data/lib/generators/refinery/cms/templates/.gitignore +3 -0
  17. data/lib/generators/refinery/dummy/dummy_generator.rb +21 -21
  18. data/lib/generators/refinery/engine/templates/.gitignore +2 -0
  19. data/lib/generators/refinery/engine/templates/Gemfile +1 -1
  20. data/lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb +1 -0
  21. data/lib/generators/refinery/engine/templates/script/rails +10 -0
  22. data/lib/generators/refinery/form/templates/.gitignore +2 -0
  23. data/lib/generators/refinery/form/templates/lib/refinery/plural_name.rb +1 -0
  24. data/lib/generators/refinery/form/templates/script/rails +10 -0
  25. data/lib/refinery/application_controller.rb +9 -2
  26. data/lib/refinery/core/engine.rb +9 -18
  27. data/lib/refinery/core.rb +5 -6
  28. data/lib/refinery/menu.rb +2 -18
  29. data/lib/refinery/menu_item.rb +1 -5
  30. data/lib/refinery/version.rb +1 -1
  31. data/spec/controllers/refinery/admin/refinery_core_controller_spec.rb +4 -4
  32. data/spec/controllers/refinery/fast_controller_spec.rb +1 -1
  33. data/spec/lib/generators/refinery/cms/cms_generator_spec.rb +0 -3
  34. data/spec/lib/refinery/application_controller_spec.rb +15 -0
  35. data/spec/support/database_cleaner.rb +1 -1
  36. metadata +170 -171
  37. data/lib/generators/refinery/cms/templates/config/initializers/devise.rb +0 -229
@@ -24,5 +24,20 @@ describe "Refinery::ApplicationController" do
24
24
  expect { controller.home_page? }.to_not raise_error(RegexpError)
25
25
  end
26
26
  end
27
+
28
+ describe "#presenter_for" do
29
+ it "returns BasePresenter for nil" do
30
+ controller.send(:presenter_for, nil).should eq(BasePresenter)
31
+ end
32
+
33
+ it "returns BasePresenter when the instance's class does not have a presenter" do
34
+ controller.send(:presenter_for, Object.new).should eq(BasePresenter)
35
+ end
36
+
37
+ it "returns the class's presenter when the instance's class has a presenter" do
38
+ model = Refinery::Page.new
39
+ controller.send(:presenter_for, model).should eq(Refinery::PagePresenter)
40
+ end
41
+ end
27
42
  end
28
43
  end
@@ -2,7 +2,7 @@ require 'database_cleaner'
2
2
 
3
3
  RSpec.configure do |config|
4
4
  config.before(:suite) do
5
- DatabaseCleaner.strategy = :truncation
5
+ DatabaseCleaner.strategy = (ENV['JS'] == 'false' ? :transaction : :truncation)
6
6
  end
7
7
 
8
8
  config.before(:each) do
metadata CHANGED
@@ -1,216 +1,208 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-core
3
- version: !ruby/object:Gem::Version
4
- hash: 11
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.3
5
5
  prerelease:
6
- segments:
7
- - 2
8
- - 0
9
- - 2
10
- version: 2.0.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Philip Arndt
14
- - "U\xC4\xA3is Ozols"
9
+ - Uģis Ozols
15
10
  - David Jones
16
11
  - Steven Heidel
17
12
  autorequire:
18
13
  bindir: bin
19
14
  cert_chain: []
20
-
21
- date: 2012-03-15 00:00:00 Z
22
- dependencies:
23
- - !ruby/object:Gem::Dependency
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
15
+ date: 2012-04-02 00:00:00.000000000 Z
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: acts_as_indexed
19
+ requirement: !ruby/object:Gem::Requirement
26
20
  none: false
27
- requirements:
21
+ requirements:
28
22
  - - ~>
29
- - !ruby/object:Gem::Version
30
- hash: 13
31
- segments:
32
- - 0
33
- - 7
34
- - 7
23
+ - !ruby/object:Gem::Version
35
24
  version: 0.7.7
36
- version_requirements: *id001
37
- name: acts_as_indexed
38
25
  type: :runtime
39
- - !ruby/object:Gem::Dependency
40
26
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ version_requirements: !ruby/object:Gem::Requirement
42
28
  none: false
43
- requirements:
29
+ requirements:
44
30
  - - ~>
45
- - !ruby/object:Gem::Version
46
- hash: 61
47
- segments:
48
- - 4
49
- - 0
50
- - 1
51
- version: 4.0.1
52
- version_requirements: *id002
31
+ - !ruby/object:Gem::Version
32
+ version: 0.7.7
33
+ - !ruby/object:Gem::Dependency
53
34
  name: friendly_id
35
+ requirement: !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 4.0.1
54
41
  type: :runtime
55
- - !ruby/object:Gem::Dependency
56
42
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
43
+ version_requirements: !ruby/object:Gem::Requirement
58
44
  none: false
59
- requirements:
45
+ requirements:
60
46
  - - ~>
61
- - !ruby/object:Gem::Version
62
- hash: 23
63
- segments:
64
- - 0
65
- - 2
66
- - 0
67
- version: 0.2.0
68
- version_requirements: *id003
47
+ - !ruby/object:Gem::Version
48
+ version: 4.0.1
49
+ - !ruby/object:Gem::Dependency
69
50
  name: globalize3
51
+ requirement: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ~>
55
+ - !ruby/object:Gem::Version
56
+ version: 0.2.0
70
57
  type: :runtime
71
- - !ruby/object:Gem::Dependency
72
58
  prerelease: false
73
- requirement: &id004 !ruby/object:Gem::Requirement
59
+ version_requirements: !ruby/object:Gem::Requirement
74
60
  none: false
75
- requirements:
61
+ requirements:
76
62
  - - ~>
77
- - !ruby/object:Gem::Version
78
- hash: 11
79
- segments:
80
- - 2
81
- - 1
82
- - 0
83
- version: 2.1.0
84
- version_requirements: *id004
63
+ - !ruby/object:Gem::Version
64
+ version: 0.2.0
65
+ - !ruby/object:Gem::Dependency
85
66
  name: awesome_nested_set
67
+ requirement: !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ~>
71
+ - !ruby/object:Gem::Version
72
+ version: 2.1.0
86
73
  type: :runtime
87
- - !ruby/object:Gem::Dependency
88
74
  prerelease: false
89
- requirement: &id005 !ruby/object:Gem::Requirement
75
+ version_requirements: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ~>
79
+ - !ruby/object:Gem::Version
80
+ version: 2.1.0
81
+ - !ruby/object:Gem::Dependency
82
+ name: rails
83
+ requirement: !ruby/object:Gem::Requirement
90
84
  none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- hash: 5
95
- segments:
96
- - 3
97
- - 1
98
- - 3
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
99
88
  version: 3.1.3
100
89
  - - <
101
- - !ruby/object:Gem::Version
102
- hash: 1
103
- segments:
104
- - 3
105
- - 3
106
- version: "3.3"
107
- version_requirements: *id005
108
- name: rails
90
+ - !ruby/object:Gem::Version
91
+ version: '3.3'
109
92
  type: :runtime
110
- - !ruby/object:Gem::Dependency
111
93
  prerelease: false
112
- requirement: &id006 !ruby/object:Gem::Requirement
94
+ version_requirements: !ruby/object:Gem::Requirement
113
95
  none: false
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- hash: 1
118
- segments:
119
- - 0
120
- - 5
121
- version: "0.5"
122
- version_requirements: *id006
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: 3.1.3
100
+ - - <
101
+ - !ruby/object:Gem::Version
102
+ version: '3.3'
103
+ - !ruby/object:Gem::Dependency
123
104
  name: truncate_html
105
+ requirement: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: '0.5'
124
111
  type: :runtime
125
- - !ruby/object:Gem::Dependency
126
112
  prerelease: false
127
- requirement: &id007 !ruby/object:Gem::Requirement
113
+ version_requirements: !ruby/object:Gem::Requirement
128
114
  none: false
129
- requirements:
115
+ requirements:
130
116
  - - ~>
131
- - !ruby/object:Gem::Version
132
- hash: 3
133
- segments:
134
- - 3
135
- - 0
136
- - 2
137
- version: 3.0.2
138
- version_requirements: *id007
117
+ - !ruby/object:Gem::Version
118
+ version: '0.5'
119
+ - !ruby/object:Gem::Dependency
139
120
  name: will_paginate
121
+ requirement: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ~>
125
+ - !ruby/object:Gem::Version
126
+ version: 3.0.2
140
127
  type: :runtime
141
- - !ruby/object:Gem::Dependency
142
128
  prerelease: false
143
- requirement: &id008 !ruby/object:Gem::Requirement
129
+ version_requirements: !ruby/object:Gem::Requirement
144
130
  none: false
145
- requirements:
131
+ requirements:
146
132
  - - ~>
147
- - !ruby/object:Gem::Version
148
- hash: 9
149
- segments:
150
- - 3
151
- - 2
152
- - 3
153
- version: 3.2.3
154
- version_requirements: *id008
133
+ - !ruby/object:Gem::Version
134
+ version: 3.0.2
135
+ - !ruby/object:Gem::Dependency
155
136
  name: sass-rails
137
+ requirement: !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ~>
141
+ - !ruby/object:Gem::Version
142
+ version: 3.2.3
156
143
  type: :runtime
157
- - !ruby/object:Gem::Dependency
158
144
  prerelease: false
159
- requirement: &id009 !ruby/object:Gem::Requirement
145
+ version_requirements: !ruby/object:Gem::Requirement
160
146
  none: false
161
- requirements:
147
+ requirements:
162
148
  - - ~>
163
- - !ruby/object:Gem::Version
164
- hash: 13
165
- segments:
166
- - 3
167
- - 2
168
- - 1
169
- version: 3.2.1
170
- version_requirements: *id009
149
+ - !ruby/object:Gem::Version
150
+ version: 3.2.3
151
+ - !ruby/object:Gem::Dependency
171
152
  name: coffee-rails
153
+ requirement: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ~>
157
+ - !ruby/object:Gem::Version
158
+ version: 3.2.1
172
159
  type: :runtime
173
- - !ruby/object:Gem::Dependency
174
160
  prerelease: false
175
- requirement: &id010 !ruby/object:Gem::Requirement
161
+ version_requirements: !ruby/object:Gem::Requirement
176
162
  none: false
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- hash: 17
181
- segments:
182
- - 1
183
- - 0
184
- - 3
185
- version: 1.0.3
186
- version_requirements: *id010
163
+ requirements:
164
+ - - ~>
165
+ - !ruby/object:Gem::Version
166
+ version: 3.2.1
167
+ - !ruby/object:Gem::Dependency
187
168
  name: uglifier
169
+ requirement: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: 1.0.3
188
175
  type: :runtime
189
- - !ruby/object:Gem::Dependency
190
176
  prerelease: false
191
- requirement: &id011 !ruby/object:Gem::Requirement
177
+ version_requirements: !ruby/object:Gem::Requirement
192
178
  none: false
193
- requirements:
179
+ requirements:
180
+ - - ! '>='
181
+ - !ruby/object:Gem::Version
182
+ version: 1.0.3
183
+ - !ruby/object:Gem::Dependency
184
+ name: jquery-rails
185
+ requirement: !ruby/object:Gem::Requirement
186
+ none: false
187
+ requirements:
194
188
  - - ~>
195
- - !ruby/object:Gem::Version
196
- hash: 15
197
- segments:
198
- - 2
199
- - 0
200
- - 0
189
+ - !ruby/object:Gem::Version
201
190
  version: 2.0.0
202
- version_requirements: *id011
203
- name: jquery-rails
204
191
  type: :runtime
205
- description: The core of Refinery CMS. This handles the common functionality and is required by most extensions
192
+ prerelease: false
193
+ version_requirements: !ruby/object:Gem::Requirement
194
+ none: false
195
+ requirements:
196
+ - - ~>
197
+ - !ruby/object:Gem::Version
198
+ version: 2.0.0
199
+ description: The core of Refinery CMS. This handles the common functionality and is
200
+ required by most extensions
206
201
  email: info@refinerycms.com
207
202
  executables: []
208
-
209
203
  extensions: []
210
-
211
204
  extra_rdoc_files: []
212
-
213
- files:
205
+ files:
214
206
  - app/assets/images/favicon.ico
215
207
  - app/assets/images/refinery/add.png
216
208
  - app/assets/images/refinery/admin_bg.png
@@ -429,7 +421,8 @@ files:
429
421
  - app/assets/stylesheets/application.css.scss
430
422
  - app/assets/stylesheets/formatting.css.scss
431
423
  - app/assets/stylesheets/home.css.scss
432
- - app/assets/stylesheets/refinery/refinery.css.scss
424
+ - app/assets/stylesheets/refinery/layout.css.scss
425
+ - app/assets/stylesheets/refinery/refinery.css
433
426
  - app/assets/stylesheets/refinery/site_bar.css.scss
434
427
  - app/assets/stylesheets/refinery/submenu.css.scss
435
428
  - app/assets/stylesheets/refinery/tooltips.css.scss
@@ -438,19 +431,24 @@ files:
438
431
  - app/assets/stylesheets/wymeditor/skins/refinery/skin.css.scss
439
432
  - app/assets/stylesheets/wymeditor/skins/refinery/wymiframe.css.scss
440
433
  - app/controllers/application_controller.rb
434
+ - app/controllers/refinery/admin/core_controller.rb
441
435
  - app/controllers/refinery/admin/dialogs_controller.rb
442
- - app/controllers/refinery/admin/refinery_core_controller.rb
443
436
  - app/controllers/refinery/admin_controller.rb
444
437
  - app/controllers/refinery/fast_controller.rb
445
438
  - app/controllers/refinery/sitemap_controller.rb
446
439
  - app/helpers/application_helper.rb
440
+ - app/helpers/refinery/admin/core_helper.rb
441
+ - app/helpers/refinery/admin/dialogs_helper.rb
442
+ - app/helpers/refinery/admin_helper.rb
447
443
  - app/helpers/refinery/custom_assets_helper.rb
444
+ - app/helpers/refinery/fast_helper.rb
448
445
  - app/helpers/refinery/html_truncation_helper.rb
449
446
  - app/helpers/refinery/image_helper.rb
450
447
  - app/helpers/refinery/menu_helper.rb
451
448
  - app/helpers/refinery/meta_helper.rb
452
449
  - app/helpers/refinery/pagination_helper.rb
453
450
  - app/helpers/refinery/site_bar_helper.rb
451
+ - app/helpers/refinery/sitemap_helper.rb
454
452
  - app/helpers/refinery/tag_helper.rb
455
453
  - app/helpers/refinery/translation_helper.rb
456
454
  - app/models/refinery/core/base_model.rb
@@ -525,7 +523,6 @@ files:
525
523
  - lib/generators/refinery/cms/templates/config/database.yml.mysql
526
524
  - lib/generators/refinery/cms/templates/config/database.yml.postgresql
527
525
  - lib/generators/refinery/cms/templates/config/database.yml.sqlite3
528
- - lib/generators/refinery/cms/templates/config/initializers/devise.rb
529
526
  - lib/generators/refinery/core/core_generator.rb
530
527
  - lib/generators/refinery/core/templates/config/initializers/refinery/core.rb.erb
531
528
  - lib/generators/refinery/dummy/dummy_generator.rb
@@ -536,6 +533,7 @@ files:
536
533
  - lib/generators/refinery/dummy/templates/rails/routes.rb
537
534
  - lib/generators/refinery/engine/USAGE
538
535
  - lib/generators/refinery/engine/engine_generator.rb
536
+ - lib/generators/refinery/engine/templates/.gitignore
539
537
  - lib/generators/refinery/engine/templates/Gemfile
540
538
  - lib/generators/refinery/engine/templates/Guardfile
541
539
  - lib/generators/refinery/engine/templates/Rakefile
@@ -569,6 +567,7 @@ files:
569
567
  - lib/generators/refinery/engine/templates/lib/tasks/refinery/extension_plural_name.rake
570
568
  - lib/generators/refinery/engine/templates/readme.md
571
569
  - lib/generators/refinery/engine/templates/refinerycms-extension_plural_name.gemspec
570
+ - lib/generators/refinery/engine/templates/script/rails
572
571
  - lib/generators/refinery/engine/templates/spec/models/refinery/namespace/singular_name_spec.rb
573
572
  - lib/generators/refinery/engine/templates/spec/requests/refinery/namespace/admin/plural_name_spec.rb
574
573
  - lib/generators/refinery/engine/templates/spec/spec_helper.rb
@@ -577,6 +576,7 @@ files:
577
576
  - lib/generators/refinery/engine/templates/tasks/testing.rake
578
577
  - lib/generators/refinery/form/USAGE
579
578
  - lib/generators/refinery/form/form_generator.rb
579
+ - lib/generators/refinery/form/templates/.gitignore
580
580
  - lib/generators/refinery/form/templates/.gitkeep
581
581
  - lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb
582
582
  - lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/settings_controller.rb
@@ -618,6 +618,7 @@ files:
618
618
  - lib/generators/refinery/form/templates/lib/refinery/plural_name/engine.rb
619
619
  - lib/generators/refinery/form/templates/lib/refinerycms-plural_name.rb
620
620
  - lib/generators/refinery/form/templates/refinerycms-plural_name.gemspec
621
+ - lib/generators/refinery/form/templates/script/rails
621
622
  - lib/refinery/activity.rb
622
623
  - lib/refinery/admin/base_controller.rb
623
624
  - lib/refinery/application_controller.rb
@@ -680,39 +681,37 @@ files:
680
681
  - spec/support/fixtures/valid_engine.rb
681
682
  - spec/support/refinery.rb
682
683
  homepage: http://refinerycms.com
683
- licenses:
684
+ licenses:
684
685
  - MIT
685
686
  post_install_message:
686
687
  rdoc_options: []
687
-
688
- require_paths:
688
+ require_paths:
689
689
  - lib
690
- required_ruby_version: !ruby/object:Gem::Requirement
690
+ required_ruby_version: !ruby/object:Gem::Requirement
691
691
  none: false
692
- requirements:
693
- - - ">="
694
- - !ruby/object:Gem::Version
695
- hash: 3
696
- segments:
692
+ requirements:
693
+ - - ! '>='
694
+ - !ruby/object:Gem::Version
695
+ version: '0'
696
+ segments:
697
697
  - 0
698
- version: "0"
699
- required_rubygems_version: !ruby/object:Gem::Requirement
698
+ hash: -1981756038234182476
699
+ required_rubygems_version: !ruby/object:Gem::Requirement
700
700
  none: false
701
- requirements:
702
- - - ">="
703
- - !ruby/object:Gem::Version
704
- hash: 3
705
- segments:
701
+ requirements:
702
+ - - ! '>='
703
+ - !ruby/object:Gem::Version
704
+ version: '0'
705
+ segments:
706
706
  - 0
707
- version: "0"
707
+ hash: -1981756038234182476
708
708
  requirements: []
709
-
710
709
  rubyforge_project: refinerycms
711
- rubygems_version: 1.8.17
710
+ rubygems_version: 1.8.19
712
711
  signing_key:
713
712
  specification_version: 3
714
713
  summary: Core extension for Refinery CMS
715
- test_files:
714
+ test_files:
716
715
  - spec/controllers/refinery/admin/refinery_core_controller_spec.rb
717
716
  - spec/controllers/refinery/fast_controller_spec.rb
718
717
  - spec/controllers/refinery/sitemap_controller_spec.rb