Skip to content

Commit e3436b5

Browse files
authored
Merge pull request browsermedia#757 from browsermedia/4.0.0_test
Fixes 4.0.0.rc1 tests
2 parents d654557 + 4a5ab62 commit e3436b5

18 files changed

+105
-95
lines changed

Gemfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ gem 'bluecloth', :groups=>[:development, :test] # For YARD
1212

1313
gem "thin" # To avoid annoying Ruby 1.9.3/Rails/Webrick warnings - See http://stackoverflow.com/questions/7082364/what-does-warn-could-not-determine-content-length-of-response-body-mean-and-h
1414

15+
gem 'sass-rails'
16+
17+
1518
# Uncomment to confirm that older versions work (for compaitiblity with Spree 2.2.4/bcms_spree)
1619
# gem 'paperclip', '~> 3.4.1'
1720
# For testing behavior in production
@@ -23,6 +26,8 @@ group :development do
2326
gem 'rake'
2427
# gem 'debugger'
2528
gem 'quiet_assets'
29+
#gem 'better_errors'
30+
#gem 'binding_of_caller'
2631
end
2732
group :test, :development do
2833
gem 'minitest'
@@ -33,7 +38,6 @@ end
3338
group :test do
3439
gem 'poltergeist'
3540
gem 'm', '~> 1.2'
36-
3741
gem 'single_test'
3842
gem 'factory_girl_rails', '3.3.0'
3943
gem "mocha", :require=>false
@@ -42,7 +46,7 @@ group :test do
4246
# Cucumber and dependencies
4347
gem 'capybara'
4448
gem 'database_cleaner'
45-
gem 'cucumber-rails', :require=> false
49+
gem 'cucumber-rails', '~> 1.4.1', :require=> false
4650
gem 'cucumber'
4751
gem 'launchy'
4852
gem 'ruby-prof'

Gemfile.lock

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PATH
66
ancestry (~> 2.0.0)
77
bootstrap-sass
88
ckeditor_rails (~> 4.3.0)
9-
compass-rails (~> 1.1.3)
9+
compass-rails (~> 1.1.7)
1010
devise (~> 3.0)
1111
jquery-rails (~> 3.1)
1212
jquery-ui-rails (~> 4.1)
@@ -57,7 +57,7 @@ GEM
5757
childprocess (>= 0.3.6)
5858
cucumber (>= 1.1.1)
5959
rspec-expectations (>= 2.7.0)
60-
bcrypt (3.1.7)
60+
bcrypt (3.1.10)
6161
bluecloth (2.2.0)
6262
bootstrap-sass (3.2.0.2)
6363
sass (~> 3.2)
@@ -70,47 +70,55 @@ GEM
7070
xpath (~> 2.0)
7171
childprocess (0.3.9)
7272
ffi (~> 1.0, >= 1.0.11)
73-
chunky_png (1.3.1)
73+
chunky_png (1.3.4)
7474
ckeditor_rails (4.3.4)
7575
railties (>= 3.0)
7676
climate_control (0.0.3)
7777
activesupport (>= 3.0)
78-
cocaine (0.5.4)
78+
cocaine (0.5.7)
7979
climate_control (>= 0.0.3, < 1.0)
80-
compass (1.0.1)
80+
compass (1.0.3)
8181
chunky_png (~> 1.2)
82-
compass-core (~> 1.0.1)
82+
compass-core (~> 1.0.2)
8383
compass-import-once (~> 1.0.5)
8484
rb-fsevent (>= 0.9.3)
8585
rb-inotify (>= 0.9)
8686
sass (>= 3.3.13, < 3.5)
87-
compass-core (1.0.1)
87+
compass-core (1.0.3)
8888
multi_json (~> 1.0)
8989
sass (>= 3.3.0, < 3.5)
9090
compass-import-once (1.0.5)
9191
sass (>= 3.2, < 3.5)
9292
compass-rails (1.1.7)
9393
compass (>= 0.12.2)
9494
sprockets (<= 2.11.0)
95-
cucumber (1.3.6)
95+
cucumber (2.4.0)
9696
builder (>= 2.1.2)
97+
cucumber-core (~> 1.5.0)
98+
cucumber-wire (~> 0.0.1)
9799
diff-lcs (>= 1.1.3)
98-
gherkin (~> 2.12.0)
99-
multi_json (~> 1.7.5)
100-
multi_test (>= 0.0.2)
101-
cucumber-rails (1.3.0)
102-
capybara (>= 1.1.2)
103-
cucumber (>= 1.1.8)
104-
nokogiri (>= 1.5.0)
100+
gherkin (~> 4.0)
101+
multi_json (>= 1.7.5, < 2.0)
102+
multi_test (>= 0.1.2)
103+
cucumber-core (1.5.0)
104+
gherkin (~> 4.0)
105+
cucumber-rails (1.4.5)
106+
capybara (>= 1.1.2, < 3)
107+
cucumber (>= 1.3.8, < 4)
108+
mime-types (>= 1.16, < 4)
109+
nokogiri (~> 1.5)
110+
railties (>= 3, < 5.1)
111+
cucumber-wire (0.0.1)
105112
daemons (1.1.9)
106113
database_cleaner (1.2.0)
107-
devise (3.3.0)
114+
devise (3.5.1)
108115
bcrypt (~> 3.0)
109116
orm_adapter (~> 0.1)
110117
railties (>= 3.2.6, < 5)
118+
responders
111119
thread_safe (~> 0.1)
112120
warden (~> 1.2.3)
113-
diff-lcs (1.2.4)
121+
diff-lcs (1.3)
114122
erubis (2.7.0)
115123
eventmachine (1.0.3)
116124
execjs (1.4.0)
@@ -123,13 +131,12 @@ GEM
123131
faye-websocket (0.4.7)
124132
eventmachine (>= 0.12.0)
125133
ffi (1.9.0)
126-
gherkin (2.12.1)
127-
multi_json (~> 1.3)
134+
gherkin (4.0.0)
128135
hashie (2.0.5)
129136
hike (1.2.3)
130137
http_parser.rb (0.5.3)
131138
i18n (0.6.11)
132-
jquery-rails (3.1.2)
139+
jquery-rails (3.1.3)
133140
railties (>= 3.0, < 5.0)
134141
thor (>= 0.14, < 2.0)
135142
jquery-ui-rails (4.2.1)
@@ -145,7 +152,7 @@ GEM
145152
metaclass (0.0.1)
146153
method_source (0.8.2)
147154
mime-types (1.25.1)
148-
mini_portile (0.5.1)
155+
mini_portile2 (2.1.0)
149156
minitest (4.7.5)
150157
minitest-rails (0.9.2)
151158
minitest (~> 4.7)
@@ -157,11 +164,11 @@ GEM
157164
powerbar
158165
mocha (0.14.0)
159166
metaclass (~> 0.0.1)
160-
multi_json (1.7.9)
161-
multi_test (0.0.2)
167+
multi_json (1.12.1)
168+
multi_test (0.1.2)
162169
mysql2 (0.3.13)
163-
nokogiri (1.6.0)
164-
mini_portile (~> 0.5.0)
170+
nokogiri (1.6.8.1)
171+
mini_portile2 (~> 2.1.0)
165172
orm_adapter (0.5.0)
166173
panoramic (0.0.4)
167174
rails (>= 3.0.7)
@@ -180,8 +187,8 @@ GEM
180187
hashie (>= 1.1.0)
181188
quiet_assets (1.0.2)
182189
railties (>= 3.1, < 5.0)
183-
rack (1.5.2)
184-
rack-test (0.6.2)
190+
rack (1.5.5)
191+
rack-test (0.6.3)
185192
rack (>= 1.0)
186193
rails (4.0.2)
187194
actionmailer (= 4.0.2)
@@ -197,13 +204,15 @@ GEM
197204
rake (>= 0.8.7)
198205
thor (>= 0.18.1, < 2.0)
199206
rake (10.1.1)
200-
rb-fsevent (0.9.4)
207+
rb-fsevent (0.9.5)
201208
rb-inotify (0.9.5)
202209
ffi (>= 0.5.0)
210+
responders (1.1.2)
211+
railties (>= 3.2, < 4.2)
203212
rspec-expectations (2.14.1)
204213
diff-lcs (>= 1.1.3, < 2.0)
205214
ruby-prof (0.13.0)
206-
sass (3.4.5)
215+
sass (3.4.16)
207216
sass-rails (4.0.1)
208217
railties (>= 4.0.0, < 5.0)
209218
sass (>= 3.1.10)
@@ -259,7 +268,7 @@ DEPENDENCIES
259268
browsercms!
260269
capybara
261270
cucumber
262-
cucumber-rails
271+
cucumber-rails (~> 1.4.1)
263272
database_cleaner
264273
factory_girl_rails (= 3.3.0)
265274
launchy
@@ -273,8 +282,15 @@ DEPENDENCIES
273282
quiet_assets
274283
rake
275284
ruby-prof
285+
sass-rails
276286
single_test
277287
sqlite3-ruby
278288
thin
279289
uglifier
280290
yard
291+
292+
RUBY VERSION
293+
ruby 2.0.0p645
294+
295+
BUNDLED WITH
296+
1.14.6

app/helpers/cms/application_helper.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,15 @@ def render_pagination(collection, content_type, options={})
171171
if collection.blank?
172172
content_tag(:div, "No Content", :class => "pagination")
173173
else
174+
content_type_constant = content_type.name.constantize
174175
render :partial => "pagination", :locals => {
175176
:collection => collection,
176-
:first_page_path => engine(content_type).url_for({:page => 1}.merge(options)),
177-
:previous_page_path => engine(content_type).url_for({:page => collection.previous_page ? collection.previous_page : 1}.merge(options)),
178-
:current_page_path => engine(content_type).url_for(options),
179-
:next_page_path => engine(content_type).url_for({:page => collection.next_page ? collection.next_page : collection.current_page}.merge(options)),
180-
:last_page_path => engine(content_type).url_for({:page => collection.total_pages}.merge(options))
177+
:first_page_path => engine(content_type_constant).polymorphic_path(content_type_constant,{:page => 1}.merge(options)),
178+
:previous_page_path => engine(content_type_constant).polymorphic_path(content_type_constant,{:page => collection.previous_page ? collection.previous_page : 1}.merge(options)),
179+
:current_page_path => engine(content_type_constant.name.constantize).polymorphic_path(content_type_constant, options),
180+
:next_page_path => engine(content_type_constant).polymorphic_path(content_type_constant,{:page => collection.next_page ? collection.next_page : collection.current_page}.merge(options)),
181+
:last_page_path => engine(content_type_constant).polymorphic_path(content_type_constant,{:page => collection.total_pages}.merge(options)),
182+
:content_type => content_type
181183
}
182184
end
183185
end

app/inputs/attachments_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class AttachmentsInput < SimpleForm::Inputs::Base
22

3-
def input
3+
def input(wrapper_options)
44
definitions = Cms::Attachment.definitions_for(object.class.name, :multiple)
55
if definitions.empty?
66
template.render(partial: 'cms/attachments/no_attachments_defined', locals: {object: object})

app/inputs/cms_text_area_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class CmsTextAreaInput < SimpleForm::Inputs::TextInput
44

55
include Cms::FormBuilder::DefaultInput
6-
def input
6+
def input(wrapper_options)
77
extract_default
88
@builder.text_area(attribute_name, input_html_options).html_safe
99
end

app/inputs/date_picker_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# 1. Allows for empty dates (i.e. no date)
33
class DatePickerInput < SimpleForm::Inputs::TextInput
44

5-
def input
5+
def input(wrapper_options)
66
@builder.text_field(attribute_name, input_html_options).html_safe
77
end
88
end

app/inputs/file_picker_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# @option options [String] :hint (blank) Helpful tips for the person entering the field, appears blank if nothing is specified.
77
class FilePickerInput < SimpleForm::Inputs::Base
88

9-
def input
9+
def input(wrapper_options)
1010
# New blocks will not have their attachments created yet.
1111
object.ensure_attachment_exists if object.respond_to?(:ensure_attachment_exists)
1212

app/inputs/name_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def initialize(*args)
1414
options[:placeholder] = "Name" if options[:placeholder].nil?
1515
end
1616

17-
def input
17+
def input(wrapper_options)
1818
add_slug_source_for_content_that_needs_it
1919

2020
unless options[:label]

app/inputs/path_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class PathInput < SimpleForm::Inputs::TextInput
22

3-
def input
3+
def input(wrapper_options)
44
if forecasting_a_new_section?
55
options[:hint] = "Forecast: Saving this first #{object.class.display_name} will create a new section at #{object.class.path}."
66
end

app/inputs/template_editor_input.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ class TemplateEditorInput < SimpleForm::Inputs::TextInput
22

33
include Cms::FormBuilder::DefaultInput
44

5-
def label
5+
def label(wrapper_options)
66
super if render_template_input?
77
end
88

9-
def input
9+
def input(wrapper_options)
1010
if render_template_input?
1111
options[:default] = object.class.default_template
1212
options[:default_handler] = "erb" unless options[:default_handler]

0 commit comments

Comments
 (0)