Permalink
Browse files

Merge pull request #1970 from Daxter/bugfix/1927-travis-ci

[1927] Get Travis CI working
  • Loading branch information...
2 parents bee0e12 + 1ef0a38 commit 166bc46afe19c084cf06523d51b4d6b432b421ae @seanlinsley seanlinsley committed Mar 15, 2013
View
@@ -1,12 +1,15 @@
script: bundle exec rake test
rvm:
- - ree
- - 1.9.2
- 1.9.3
+ - 2.0.0
before_install:
- gem update --system
- gem --version
+ - gem install bundler
env:
- - RAILS=3.0.12
- - RAILS=3.1.4
- - RAILS=3.2.3
+ - RAILS=3.0.20
+ - RAILS=3.1.11
+ - RAILS=3.2.12
+matrix:
+ allow_failures:
+ - rvm: 2.0.0
View
33 Gemfile
@@ -7,7 +7,7 @@ ACTIVE_ADMIN_PATH = File.dirname(__FILE__) unless defined?(ACTIVE_ADMIN_PATH)
require File.expand_path('spec/support/detect_rails_version', ACTIVE_ADMIN_PATH)
rails_version = detect_rails_version
-gem 'rails', rails_version
+gem 'rails', rails_version
gem 'bourbon'
case rails_version
@@ -22,27 +22,26 @@ else
end
group :development, :test do
- gem 'sqlite3'
-
- gem 'rake', '~> 10.0.2', :require => false
- gem 'haml', '~> 3.1.7', :require => false
+ gem 'haml', '~> 3.1.7', :require => false
+ gem 'rake', '~> 10.0.2', :require => false
+ gem 'rails-i18n' # Provides default i18n for many languages
+ gem 'rdiscount' # Markdown implementation (for yard)
+ gem 'sprockets'
gem 'yard'
- gem 'rdiscount' # For yard
- gem "sprockets"
- gem 'rails-i18n' # Gives us default i18n for many languages
- gem 'parallel_tests'
end
group :test do
- gem 'rspec-rails', '~> 2.9.0'
- gem 'cucumber-rails', '1.3.0', :require => false
- gem 'capybara', '1.1.2'
+ gem 'cancan'
+ gem 'capybara', '1.1.2'
+ gem 'cucumber-rails', '1.3.0', :require => false
gem 'database_cleaner'
- gem 'shoulda-matchers'
- gem 'launchy'
- gem 'jslint_on_rails', '~> 1.1.1'
+ gem 'guard-coffeescript'
gem 'guard-rspec'
- gem "guard-coffeescript"
gem 'jasmine'
- gem 'cancan'
+ gem 'jslint_on_rails', '~> 1.1.1'
+ gem 'launchy'
+ gem 'parallel_tests'
+ gem 'rspec-rails', '~> 2.9.0'
+ gem 'shoulda-matchers'
+ gem 'sqlite3'
end
@@ -26,11 +26,11 @@
Then /^I should see (\d+) ([\w]*) in the table$/ do |count, resource_type|
begin
- page.should have_css("table##{resource_type} tr > td:first", :count => count.to_i)
+ page.should have_css("table#index_table_#{resource_type} tr > td:first", :count => count.to_i)
rescue
current_count = 0
-
- all("table##{resource_type} tr > td:first").each { current_count += 1 }
+
+ all("table#index_table_#{resource_type} tr > td:first").each { current_count += 1 }
raise "There were #{current_count} rows in the table not #{count}"
end
@@ -146,11 +146,12 @@ def build_menu(name = DEFAULT_MENU, &block)
def add_logout_button_to_menu(menu, priority=100, html_options={})
if logout_link_path
logout_method = logout_link_method || :get
- menu.add :priority => priority,
- :label => I18n.t('active_admin.logout'),
- :html_options => html_options.reverse_merge(:method => logout_method),
- :url => proc{ render_or_call_method_or_proc_on self, active_admin_namespace.logout_link_path },
- :if => proc{ current_active_admin_user? }
+ menu.add :id => 'logout',
+ :priority => priority,
+ :label => proc{ I18n.t('active_admin.logout') },
+ :html_options => html_options.reverse_merge(:method => logout_method),
+ :url => proc{ render_or_call_method_or_proc_on self, active_admin_namespace.logout_link_path },
+ :if => proc{ current_active_admin_user? }
end
end
@@ -288,7 +288,7 @@ def max_per_page
def apply_decorator(chain)
if decorator?
- decorator_class.decorate(chain)
+ decorator_class.decorate_collection(chain)
else
chain
end
@@ -16,7 +16,7 @@
copy_file File.expand_path('../templates/post_decorator.rb', __FILE__), "app/models/post_decorator.rb"
# Rails 3.2.3 model generator declare attr_accessible
-inject_into_file 'app/models/post.rb', " attr_accessible :author\n", :before => "end" if Rails::VERSION::STRING >= '3.2.3'
+inject_into_file 'app/models/post.rb', " attr_accessible :author\n", :before => "end" if Rails::VERSION::STRING >= '3.2'
generate :model, "user type:string first_name:string last_name:string username:string age:integer"
inject_into_file 'app/models/user.rb', " has_many :posts, :foreign_key => 'author_id'\n", :after => "class User < ActiveRecord::Base\n"
generate :model, "publisher --migration=false --parent=User"
@@ -38,7 +38,7 @@ module ActiveAdmin
end
it "should accept an options hash for link_to" do
- item = MenuItem.new html_options: { :target => :blank }
+ item = MenuItem.new :html_options => { :target => :blank }
item.html_options.should include(:target => :blank)
end

0 comments on commit 166bc46

Please sign in to comment.