Skip to content

Commit bb48552

Browse files
author
did
committed
Ruby MRI 1.9.3 Compatability Fixes
1 parent aa5c5f0 commit bb48552

39 files changed

+330
-339
lines changed

Gemfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ gem 'mimetype-fu'
3333
gem 'actionmailer-with-request', :require => 'actionmailer_with_request'
3434
gem 'heroku', '1.19.1'
3535
gem 'httparty', '>= 0.6.1'
36-
gem 'RedCloth', '4.2.7'
36+
gem 'RedCloth', '4.2.8'
3737
gem 'delayed_job', '2.1.4'
3838
gem 'delayed_job_mongoid', '1.0.2'
3939
gem 'rubyzip'
@@ -68,15 +68,15 @@ group :test do
6868
gem 'ZenTest'
6969
gem 'growl-glue'
7070
gem 'rspec-rails', '2.6.1'
71-
gem 'factory_girl_rails'
71+
gem 'factory_girl_rails', '~> 1.1'
7272
gem 'pickle'
7373
gem 'xpath', '~> 0.1.4'
7474
gem 'capybara'
7575
gem 'database_cleaner'
7676

7777
gem 'spork', '~> 0.9.0.rc'
7878
gem 'launchy'
79-
gem 'mocha', :git => 'git://github.com/floehopper/mocha.git'
79+
gem 'mocha', '0.9.12' # :git => 'git://github.com/floehopper/mocha.git'
8080
end
8181

8282
group :production do

Gemfile.lock

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
GIT
2-
remote: git://github.com/floehopper/mocha.git
3-
revision: afa87804ca2124ff5e77f007a84a26ee0667eec8
4-
specs:
5-
mocha (0.9.12)
6-
metaclass (~> 0.0.1)
7-
81
GEM
92
remote: http://rubygems.org/
103
specs:
114
POpen4 (0.1.4)
125
Platform (>= 0.4.0)
136
open4
147
Platform (0.4.0)
15-
RedCloth (4.2.7)
8+
RedCloth (4.2.8)
169
SystemTimer (1.2.3)
1710
ZenTest (4.6.1)
1811
abstract (1.0.0)
@@ -170,10 +163,10 @@ GEM
170163
i18n (>= 0.4.0)
171164
mime-types (~> 1.16)
172165
treetop (~> 1.4.8)
173-
metaclass (0.0.1)
174166
mime-types (1.16)
175167
mimemagic (0.1.8)
176168
mimetype-fu (0.1.2)
169+
mocha (0.9.12)
177170
mongo (1.3.1)
178171
bson (>= 1.3.1)
179172
mongoid (2.0.2)
@@ -286,7 +279,7 @@ PLATFORMS
286279
ruby
287280

288281
DEPENDENCIES
289-
RedCloth (= 4.2.7)
282+
RedCloth (= 4.2.8)
290283
SystemTimer
291284
ZenTest
292285
actionmailer-with-request
@@ -306,7 +299,7 @@ DEPENDENCIES
306299
devise (= 1.3.4)
307300
devise_bushido_authenticatable (= 1.0.0.alpha10)
308301
dragonfly (~> 0.9.1)
309-
factory_girl_rails
302+
factory_girl_rails (~> 1.1)
310303
fog (= 0.8.2)
311304
formtastic (~> 1.2.3)
312305
growl-glue
@@ -321,7 +314,7 @@ DEPENDENCIES
321314
locomotive_liquid (= 2.2.2)
322315
locomotive_mongoid_acts_as_tree (= 0.1.5.7)
323316
mimetype-fu
324-
mocha!
317+
mocha (= 0.9.12)
325318
mongoid (~> 2.0.2)
326319
pickle
327320
rack-cache

config/cucumber.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<%
22
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
33
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4-
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
4+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --require features --strict --tags ~@wip"
55
%>
66
default: <%= std_opts %> features
77
wip: --tags @wip:3 --wip features

features/step_definitions/admin_steps.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
end
66

77
Given /^I am an authenticated "([^"]*)"$/ do |role|
8-
@member = Site.first.memberships.where(:role => role.downcase).first || Factory(role.downcase.to_sym, :site => Site.first)
8+
@member = Site.first.memberships.where(:role => role.downcase).first || FactoryGirl.create(role.downcase.to_sym, :site => Site.first)
99

1010
Given %{I go to login}
1111
And %{I fill in "Email" with "#{@member.account.email}"}

features/step_definitions/content_types_steps.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Given %r{^I have a custom model named "([^"]*)" with$} do |name, fields|
22
site = Site.first
3-
content_type = Factory.build(:content_type, :site => site, :name => name)
3+
content_type = FactoryGirl.build(:content_type, :site => site, :name => name)
44
fields.hashes.each do |field|
55
if (target_name = field.delete('target')).present?
66
target_content_type = site.content_types.where(:name => target_name).first

features/step_definitions/page_steps.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# helps create a simple content page (parent: "index") with a slug, contents, and template
44
def create_content_page(page_slug, page_contents, template = nil)
5-
@home = @site.pages.where(:slug => "index").first || Factory(:page)
5+
@home = @site.pages.where(:slug => "index").first || FactoryGirl.create(:page)
66
page = @site.pages.create(:slug => page_slug, :body => page_contents, :parent => @home, :title => "some title", :published => true, :raw_template => template)
77
page.should be_valid
88
page

features/step_definitions/site_steps.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
# - I have the site: "some site" set up with name: "Something", domain: "test2"
66
#
77
Given /^I have the site: "([^"]*)" set up(?: with #{capture_fields})?$/ do |site_factory, fields|
8-
@site = Factory(site_factory, parse_fields(fields))
8+
@site = FactoryGirl.create(site_factory, parse_fields(fields))
99
@site.should_not be_nil
1010

1111
@admin = @site.memberships.first.account
1212
@admin.should_not be_nil
1313
end
1414

1515
Given /^I have a designer and an author$/ do
16-
Factory(:designer, :site => Site.first)
17-
Factory(:author, :site => Site.first)
16+
FactoryGirl.create(:designer, :site => Site.first)
17+
FactoryGirl.create(:author, :site => Site.first)
1818
end
1919

2020
Then /^I should be a administrator of the "([^"]*)" site$/ do |name|

features/step_definitions/theme_asset_steps.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# helps create a theme asset
44
def create_plain_text_asset(name, type)
5-
asset = Factory.build(:theme_asset, {
5+
asset = FactoryGirl.build(:theme_asset, {
66
:site => @site,
77
:plain_text_name => name,
88
:plain_text => 'Lorem ipsum',

locomotive_cms.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Gem::Specification.new do |s|
5050
s.add_dependency 'mimetype-fu'
5151
s.add_dependency 'actionmailer-with-request'
5252
s.add_dependency 'httparty', '>= 0.6.1'
53-
s.add_dependency 'RedCloth', '4.2.7'
53+
s.add_dependency 'RedCloth', '4.2.8'
5454
s.add_dependency 'delayed_job', '2.1.4'
5555
s.add_dependency 'delayed_job_mongoid', '1.0.2'
5656
s.add_dependency 'rubyzip'

spec/cells/admin/global_actions_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
render_views
66

7-
let(:menu) { render_cell('admin/global_actions', :show, :current_admin => Factory.build('admin user'), :current_site_url => 'http://www.yahoo.fr') }
7+
let(:menu) { render_cell('admin/global_actions', :show, :current_admin => FactoryGirl.build('admin user'), :current_site_url => 'http://www.yahoo.fr') }
88

99
describe 'show menu' do
1010

spec/controllers/admin/api_contents_controller_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
describe Admin::ApiContentsController do
44

55
before(:each) do
6-
@site = Factory('existing site')
6+
@site = FactoryGirl.create('existing site')
77
@site.content_types.first.tap do |content_type|
88
content_type.content_custom_fields.build :label => 'Name', :kind => 'string', :required => true
99
content_type.content_custom_fields.build :label => 'Description', :kind => 'text'

0 commit comments

Comments
 (0)