Permalink
Browse files

remove all references to manage_gems

  • Loading branch information...
1 parent 5ae5e83 commit c480f150ae32ec7fcfbaec547ae5673bd7d3d99f @noel committed Feb 16, 2012
Showing with 81 additions and 179 deletions.
  1. +31 −27 Gemfile
  2. +40 −3 Gemfile.lock
  3. +0 −53 config/required_software.yml
  4. +2 −2 lib/recipes/gems.rb
  5. +4 −82 lib/tasks/manage_gems.rake
  6. +1 −9 lib/tasks/prep_app.rake
  7. +1 −1 test/common_test_methods.rb
  8. +2 −2 test/integration/README
View
58 Gemfile
@@ -2,45 +2,49 @@ source :gemcutter
gem "rails", "2.3.5"
gem 'rake', '0.8.7'
-# Walter McGinnis, 2008-07-02
-# we currently use a hacked version of oai gem
-# and place it under vendor/gems
-# specifying it here allows this to work
-gem "oai", :path => 'vendor/gems/oai-0.0.12'
-
-# Walter McGinnis, 2011-02-15
-# because this is a Rails engine gem
-# it needs to be declared here as well as config/required_software.rb
-gem "oembed_provider"
-
-gem "tiny_mce"
-gem "tiny_mce_plugin_imageselector"
-
-gem "gmaps4rails"
-
gem "passenger"
gem "mysql", "2.8.1"
gem "rmagick", "2.12.2", :require => false
-
gem "mini_exiftool"
-gem "avatar"
-gem "zoom"
gem "nokogiri"
-gem "packet"
-gem "RedCloth"
+gem "packet",'>= 0.1.14'
+gem "chronic"
gem "hpricot"
-gem "xml-simple"
-gem "http_url_validation_improved"
-
gem "unicode"
-gem "htmlentities"
-gem "chronic"
+gem "RedCloth"
+gem "mime-types"
+gem "memcache-client"
+gem "zoom"
gem "libxml-ruby"
+gem "avatar"
+gem "htmlentities"
+gem "xml-simple"
gem "feedzirra"
-gem "mime-types"
+gem "tiny_mce"
+gem "tiny_mce_plugin_imageselector", '>= 0.0.7'
+gem "http_url_validation_improved"
+
+# Walter McGinnis, 2011-02-15
+# because this is a Rails engine gem
+# it needs to be declared here as well as config/required_software.rb
+gem "oembed_provider"
gem "ya2yaml"
+gem "gmaps4rails",'>= 1.1.7'
+
+# Walter McGinnis, 2008-07-02
+# we currently use a hacked version of oai gem
+# and place it under vendor/gems
+# specifying it here allows this to work
+gem "oai", :path => 'vendor/gems/oai-0.0.12'
+
+group :development do
+ gem 'capistrano'
+ gem 'capistrano-ext'
+ gem 'capistrano-configuration'
+ gem 'piston'
+end
group :test do
gem "shoulda", '2.11.3'
View
@@ -18,13 +18,25 @@ GEM
activesupport (= 2.3.5)
activesupport (2.3.5)
addressable (2.2.6)
+ arrayfields (4.7.4)
avatar (0.2.0)
builder (3.0.0)
+ capistrano (2.9.0)
+ highline
+ net-scp (>= 1.0.0)
+ net-sftp (>= 2.0.0)
+ net-ssh (>= 2.0.14)
+ net-ssh-gateway (>= 1.1.0)
+ capistrano-configuration (0.2.1)
+ capistrano (>= 2.0.0)
+ capistrano-ext (1.2.1)
+ capistrano (>= 1.0.0)
chronic (0.6.6)
curb (0.8.0)
daemon_controller (0.2.6)
factory_girl (1.2.3)
fastthread (1.0.7)
+ fattr (2.2.1)
feedzirra (0.0.23)
activesupport (>= 2.0.0)
builder (>= 2.1.2)
@@ -34,17 +46,33 @@ GEM
sax-machine (>= 0.0.12)
gmaps4rails (1.4.3)
json
+ highline (1.6.11)
hpricot (0.8.6)
htmlentities (4.3.1)
http_url_validation_improved (1.3.0)
addressable
json (1.6.5)
libxml-ruby (2.2.2)
+ log4r (1.1.10)
loofah (1.2.0)
nokogiri (>= 1.4.4)
+ main (5.0.0)
+ arrayfields (>= 4.7.4)
+ chronic (>= 0.6.2)
+ fattr (>= 2.2.0)
+ map (>= 5.1.0)
+ map (5.2.0)
+ memcache-client (1.8.5)
mime-types (1.17.2)
mini_exiftool (1.3.1)
mysql (2.8.1)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-sftp (2.0.5)
+ net-ssh (>= 2.0.9)
+ net-ssh (2.3.0)
+ net-ssh-gateway (1.1.0)
+ net-ssh (>= 1.99.1)
nokogiri (1.5.0)
oembed_provider (0.1.1)
addressable
@@ -54,6 +82,10 @@ GEM
fastthread (>= 1.0.1)
rack
rake (>= 0.8.1)
+ piston (2.0.10)
+ activesupport (>= 2.0.0, < 3.0.0)
+ log4r (>= 1.0.5)
+ main (>= 2.8.3)
rack (1.0.1)
rack-test (0.6.1)
rack (>= 1.0)
@@ -86,28 +118,33 @@ PLATFORMS
DEPENDENCIES
RedCloth
avatar
+ capistrano
+ capistrano-configuration
+ capistrano-ext
chronic
factory_girl (= 1.2.3)
feedzirra
- gmaps4rails
+ gmaps4rails (>= 1.1.7)
hpricot
htmlentities
http_url_validation_improved
libxml-ruby
+ memcache-client
mime-types
mini_exiftool
mysql (= 2.8.1)
nokogiri
oai!
oembed_provider
- packet
+ packet (>= 0.1.14)
passenger
+ piston
rails (= 2.3.5)
rake (= 0.8.7)
rmagick (= 2.12.2)
shoulda (= 2.11.3)
tiny_mce
- tiny_mce_plugin_imageselector
+ tiny_mce_plugin_imageselector (>= 0.0.7)
unicode
webrat (= 0.7.3)
xml-simple
@@ -8,59 +8,6 @@
# source: http://gems.rubyforge.org
# version: '= 0.7.0'
-management_gems:
- capistrano:
- capistrano-ext:
- capistrano-configuration:
- piston:
-
-testing_gems:
- webrat:
- shoulda:
- lib_name: shoulda/rails
- factory_girl:
- lib_name: factory_girl
-
-gems:
- nokogiri:
- packet:
- version: '>= 0.1.14'
- chronic:
- hpricot:
- unicode:
- RedCloth:
- gem_name: RedCloth
- lib_name: redcloth
- mime-types:
- gem_name: mime-types
- lib_name: mime/types
- memcache-client:
- gem_deps: ['system_timer']
- gem_name: memcache-client
- lib_name: memcache
- zoom:
- libxml-ruby:
- lib_name: libxml
- avatar:
- htmlentities:
- xml-simple:
- gem_name: xml-simple
- lib_name: xmlsimple
- feedzirra:
- gem_name: kete-feedzirra
- lib_name: feedzirra
- tiny_mce:
- tiny_mce_plugin_imageselector:
- version: '>= 0.0.7'
- http_url_validation_improved:
- oembed_provider:
- ya2yaml:
- gmaps4rails:
- version: '>= 1.1.7'
-
-# we use a hacked version of oai gem for the timebeing
-# included under vendor/gems
-# oai: oai
# these are problematic as gems depending on platform
# at the moment we want version 2.12.2 for RMagick
View
@@ -6,12 +6,12 @@
desc 'Install Required Gems'
task :install, :role => :app do
- sudo "rake -f #{current_path}/Rakefile manage_gems:required:install"
+ bundle install
end
desc 'Update Required Gems'
task :update, :role => :app do
- sudo "rake -f #{current_path}/Rakefile manage_gems:required:update"
+ bundle update
end
end
View
@@ -17,125 +17,47 @@ include RequiredSoftware
desc "Tasks related to gems for Kete. See config/required_software.yml for list."
namespace :manage_gems do
task :exec_action do
- # default
- ENV['GEMS_ACTION'] ||= 'update'
-
- if `echo $USER`.strip.downcase != 'root'
- puts "\n/!\\ IMPORTANT /!\\\n\n"
- puts "This script has detected you are trying to run this as either a non root account or using sudo."
- puts "Please make sure you are installing these gems as a root user or as a user that will install gems in the system wide location."
- puts "Installing them as anyone without permission to the gem paths will install to your user account, not system wide."
- puts "This will cause issues later on with the web server being unable to locate gems."
- puts "Some operating systems, such as Debian Lenny, also have issues installing to the right place when using sudo."
- puts ""
- puts "If you are sure that you have permission to write to the correct location, please continue."
- puts "Otherwise press CTRL+C to abort, login as root, and run this task again. "
- STDIN.gets
- end
-
- no_rdoc_or_ri = '--no-rdoc --no-ri'
-
- required = load_required_software
- required[ENV['GEMS_TO_GRAB']].each do |key,value|
- if !value.blank? && value.kind_of?(Hash)
-
- # Pre install command (like clearing old gem versions)
- unless value['pre_command'].blank?
- p value['pre_command']
- `#{value['pre_command']}`
- end
-
- # If this gem relies on dependancies it doesn't properly take care of, manually install them
- unless value['gem_deps'].blank?
- value['gem_deps'].each do |dependancy_key,dependancy_value|
- p "gem #{ENV['GEMS_ACTION']} #{no_rdoc_or_ri} #{dependancy_key}"
- `gem #{ENV['GEMS_ACTION']} #{no_rdoc_or_ri} #{dependancy_key}`
- end
- end
-
- if !value['gem_repo'].blank?
- # we don't have a gem available for what we need, build it
- raise "rake_build_gem command not present" if value['rake_build_gem'].blank?
- raise "rake_install_gem command not present" if value['rake_install_gem'].blank?
- p "cd tmp && git clone #{value['gem_repo']} #{key} && cd #{key} && #{value['rake_build_gem']} && #{value['rake_install_gem']}"
- `cd tmp && git clone #{value['gem_repo']} #{key} && cd #{key} && #{value['rake_build_gem']} && #{value['rake_install_gem']}`
- p "Cleaning up #{key}"
- `cd tmp && rm -rf #{key}`
- else
- # we are installing a prebuilt gem
- gem_name = value['gem_name'] || key
- version = " --version='#{value['version']}'" unless value['version'].blank?
- source = " --source=#{value['source']}" unless value['source'].blank?
- p "gem #{ENV['GEMS_ACTION']} #{no_rdoc_or_ri} #{gem_name}#{version}#{source}"
- `gem #{ENV['GEMS_ACTION']} #{no_rdoc_or_ri} #{gem_name}#{version}#{source}`
- end
-
- else
- p "gem #{ENV['GEMS_ACTION']} #{no_rdoc_or_ri} #{key}"
- `gem #{ENV['GEMS_ACTION']} #{no_rdoc_or_ri} #{key}`
- end
- end
+ # All this replaced by Bundler
+ p "This rake task has been replaced by Bundler, please use 'bundle install' or 'bundle update' instead."
end
namespace :required do
desc "Install required gems"
task :install do
- ENV['GEMS_TO_GRAB'] = 'gems'
- ENV['GEMS_ACTION'] = 'install'
Rake::Task['manage_gems:exec_action'].execute(ENV)
end
desc "Update required gems"
task :update do
- ENV['GEMS_TO_GRAB'] = 'gems'
Rake::Task['manage_gems:exec_action'].execute(ENV)
end
desc "Check that you have required gems"
task :check => :environment do
- required_software = load_required_software
- missing_lib_count = 0
- puts "Missing Gems or Libs:\n-----"
- missing_libs(required_software).each do |lib|
- puts lib
- missing_lib_count += 1
- end
- puts "-----"
- if missing_lib_count > 0
- puts "You have to install the above for Kete to work."
- puts "Usually \"sudo gem install gem_name\", but double check documentation.For example Rmagick is usually best installed via a port or package."
- else
- p "None. Feel free to proceed."
- end
+ Rake::Task['manage_gems:exec_action'].execute(ENV)
end
end
namespace :management do
desc "Install management gems"
task :install do
- ENV['GEMS_TO_GRAB'] = 'management_gems'
- ENV['GEMS_ACTION'] = 'install'
Rake::Task['manage_gems:exec_action'].execute(ENV)
end
desc "Update management gems"
task :update do
- ENV['GEMS_TO_GRAB'] = 'management_gems'
Rake::Task['manage_gems:exec_action'].execute(ENV)
end
end
namespace :testing do
desc "Install testing gems"
task :install do
- ENV['GEMS_TO_GRAB'] = 'testing_gems'
- ENV['GEMS_ACTION'] = 'install'
- Rake::Task['manage_gems:exec_action'].execute(ENV)
+ Rake::Task['manage_gems:exec_action'].execute(ENV)
end
desc "Update testing gems"
task :update do
- ENV['GEMS_TO_GRAB'] = 'testing_gems'
Rake::Task['manage_gems:exec_action'].execute(ENV)
end
end
Oops, something went wrong.

0 comments on commit c480f15

Please sign in to comment.