mana 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,32 @@ Capistrano::Configuration.instance(:must_exist).load do
50
50
  end
51
51
  end
52
52
 
53
+ namespace :roundsman do
54
+ def install_ruby?
55
+ installed_version = capture("ruby --version || true").strip
56
+ if installed_version.include?("not found")
57
+ logger.info "No version of Ruby could be found."
58
+ return true
59
+ end
60
+
61
+ return false if fetch(:ruby_version) == :brightbox
62
+
63
+ required_version = fetch(:ruby_version).gsub("-", "")
64
+ if installed_version.include?(required_version)
65
+ if fetch(:care_about_ruby_version)
66
+ logger.info "Ruby #{installed_version} matches the required version: #{required_version}."
67
+ return false
68
+ else
69
+ logger.info "Already installed Ruby #{installed_version}, not #{required_version}. Set :care_about_ruby_version if you want to fix this."
70
+ return false
71
+ end
72
+ else
73
+ logger.info "Ruby version mismatch. Installed version: #{installed_version}, required is #{required_version}"
74
+ return true
75
+ end
76
+ end
77
+ end
78
+
53
79
  # Mana
54
80
 
55
81
  namespace :mana do
data/lib/mana/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mana
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-25 00:00:00.000000000 Z
12
+ date: 2013-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano