Permalink
Browse files

Use country_select gem instead of the plugin

Rails 3.2 deprecated the Rails plugins. So we have to use gems.
  • Loading branch information...
1 parent 4dd0604 commit fca99746d21acda0e72995896d2f0a4c0ea1925e @rafaelfranca rafaelfranca committed Jan 30, 2012
Showing with 14 additions and 21 deletions.
  1. +0 −3 .gitmodules
  2. +1 −2 .travis.yml
  3. +1 −0 Gemfile
  4. +2 −0 Gemfile.lock
  5. +7 −7 README.md
  6. +1 −0 gemfiles/Gemfile-rails.3.0.x
  7. +1 −0 gemfiles/Gemfile-rails.3.1.x
  8. +0 −1 test/support/country_select
  9. +1 −8 test/test_helper.rb
View
@@ -1,3 +0,0 @@
-[submodule "test/support/country_select"]
- path = test/support/country_select
- url = git://github.com/rails/country_select
View
@@ -1,5 +1,4 @@
-script: "git submodule update --init && bundle exec rake test"
-before_install: gem update --system
+script: "bundle exec rake test"
rvm:
- 1.9.3
- ree
View
@@ -2,6 +2,7 @@ source :rubygems
gemspec
+gem 'country_select'
gem 'railties', '~> 3.2.0'
gem 'activemodel', '~> 3.2.0'
gem 'actionpack', '~> 3.2.0'
View
@@ -26,6 +26,7 @@ GEM
multi_json (~> 1.0)
builder (3.0.0)
columnize (0.3.6)
+ country_select (0.0.1)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.0)
@@ -74,6 +75,7 @@ PLATFORMS
DEPENDENCIES
actionpack (~> 3.2.0)
activemodel (~> 3.2.0)
+ country_select
mocha
railties (~> 3.2.0)
rake
View
@@ -8,22 +8,22 @@ which we are thankful for and should make you feel right at home.
## Installation
-Install the gem:
+Add it to your Gemfile:
-`gem install simple_form`
+`gem 'simple_form'`
-Add it to your Gemfile:
+Run the following command to install it:
-`gem "simple_form"`
+`bundle install`
Run the generator:
`rails generate simple_form:install`
-Also, if you want to use the country select, you will need the *country_select* plugin, install
-with following command:
+Also, if you want to use the country select, you will need the
+[country_select gem](https://rubygems.org/gems/country_select), add it to your Gemfile:
-`rails plugin install git://github.com/rails/country_select.git`
+`gem 'country_select'`
And you are ready to go. Since this branch aims Rails 3 support, if you want to use it with
Rails 2.3 you should check this branch:
@@ -2,6 +2,7 @@ source :rubygems
gem 'simple_form', :path => '..'
+gem 'country_select'
gem 'railties', '~> 3.0.0'
gem 'activemodel', '~> 3.0.0'
gem 'actionpack', '~> 3.0.0'
@@ -2,6 +2,7 @@ source :rubygems
gem 'simple_form', :path => '..'
+gem 'country_select'
gem 'railties', '~> 3.1.0'
gem 'activemodel', '~> 3.1.0'
gem 'actionpack', '~> 3.1.0'
Submodule country_select deleted from d3b5d8
View
@@ -28,14 +28,7 @@ def self.env
Dir["#{File.dirname(__FILE__)}/support/*.rb"].each { |f| require f }
I18n.default_locale = :en
-country_select = "#{File.dirname(__FILE__)}/support/country_select/lib"
-
-if File.exists?(country_select)
- $:.unshift country_select
- require 'country_select'
-else
- raise "Could not find country_select plugin in test/support. Please execute git submodule update --init."
-end
+require 'country_select'
class ActionView::TestCase
include MiscHelpers

0 comments on commit fca9974

Please sign in to comment.