lib/potassium/recipes/ruby.rb in potassium-2.0.0 vs lib/potassium/recipes/ruby.rb in potassium-2.1.0
- old
+ new
@@ -1,23 +1,19 @@
require 'net/http'
require 'semantic'
class Recipes::Ruby < Rails::AppBuilder
def create
- info 'Getting platanus latest ruby version...'
info "Using ruby version #{version_alias}"
create_file '.ruby-version', version_alias
end
private
- def latest
- Net::HTTP.get(URI.parse('http://ruby.platan.us/latest'))
- rescue
- RUBY_VERSION
+ def version
+ Potassium::RUBY_VERSION
end
def version_alias
- version = latest
Semantic::Version.new(version).instance_eval { "#{major}.#{minor}" }
end
end