Sha256: a86383e50d82d094a67c17a9f6886b96ade189f163facc82e12671c8ec827849

Contents?: true

Size: 1 KB

Versions: 8

Compression:

Stored size: 1 KB

Contents

######################################################################
#                           RVM DEFAULTS                             #
######################################################################
module ChickenSoup
  RVM_INFO_FORMAT = /^rvm.+\s(([a-zA-Z0-9\-\._]+)(?:@([a-zA-Z0-9\-\._]+))?)/
end

Capistrano::Configuration.instance(:must_exist).load do
  namespace :capabilities do
    namespace :defaults do
      task :rvm do
        _cset :rvmrc_file,                    File.join(rails_root, '.rvmrc')
        set   :ruby_version_update_pending,   false

        _cset(:ruby_version)        do
          contents = File.read(rvmrc_file)
          contents.match(ChickenSoup::RVM_INFO_FORMAT)[2]
        end

        _cset(:ruby_gemset)         do
          contents = File.read(rvmrc_file)
          contents.match(ChickenSoup::RVM_INFO_FORMAT)[3]
        end

        _cset(:full_ruby_environment_string)      {ruby_gemset ? "#{ruby_version}@#{ruby_gemset}" : ruby_version}
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
chicken_soup-0.9.0 lib/chicken_soup/capabilities/rvm/rvm-defaults.rb
chicken_soup-0.8.6 lib/chicken_soup/capabilities/rvm/rvm-defaults.rb
chicken_soup-0.8.5 lib/chicken_soup/capabilities/rvm/rvm-defaults.rb
chicken_soup-0.8.4 lib/chicken_soup/capabilities/rvm/rvm-defaults.rb
chicken_soup-0.8.3 lib/chicken_soup/capabilities/rvm/rvm-defaults.rb
chicken_soup-0.8.2 lib/chicken_soup/capabilities/rvm/rvm-defaults.rb
chicken_soup-0.8.1 lib/chicken_soup/capabilities/rvm/rvm-defaults.rb
chicken_soup-0.8.0 lib/chicken_soup/capabilities/rvm/rvm-defaults.rb