Module: Cuken::Api::Rvm::Gemsets
- Includes:
- Common
- Defined in:
- lib/cuken/api/rvm/gemsets.rb
Instance Method Summary collapse
-
#check_gemset_activation(gemset, expect_active = true) ⇒ Object
include ::Cuken::Api::Aruba::Api.
- #check_gemset_presence(gemsets, expect_presence = true) ⇒ Object
- #gemset_use(gemset, rubie = 'ruby-1.9.2-p290', expect_active = true) ⇒ Object
Instance Method Details
#check_gemset_activation(gemset, expect_active = true) ⇒ Object
include ::Cuken::Api::Aruba::Api
9 10 11 12 13 14 15 |
# File 'lib/cuken/api/rvm/gemsets.rb', line 9 def check_gemset_activation(gemset, expect_active = true) if expect_active rvm.current.environment_name.should match(gemset) else rvm.current.environment_name.should_not match(gemset) end end |
#check_gemset_presence(gemsets, expect_presence = true) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/cuken/api/rvm/gemsets.rb', line 26 def check_gemset_presence(gemsets, expect_presence = true) if expect_presence gemsets.each do |gs| rvm.gemset.list.include?(gs).should be_true end else gemsets.each do |gs| pending "this is failing for some reason" rvm.gemset.list.include?(gs).should be_false end end end |
#gemset_use(gemset, rubie = 'ruby-1.9.2-p290', expect_active = true) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/cuken/api/rvm/gemsets.rb', line 17 def gemset_use(gemset, rubie = 'ruby-1.9.2-p290', expect_active = true) RVM.use!("#{gemset}").inspect if expect_active rvm.current.environment_name.should match(gemset) else rvm.current.environment_name.should_not match(gemset) end end |