rcoli 0.5.9 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rcoli (0.5.9)
4
+ rcoli (0.5.10)
5
5
  highline (~> 1.6.11)
6
6
  paint (= 0.8.5)
7
7
 
data/lib/rcoli/utils.rb CHANGED
@@ -61,8 +61,16 @@ module RCoLi
61
61
  cmnd.scan(/\$\{([^\s]+)\}/).each do |s|
62
62
  context = args[0]
63
63
  (s[0].split('.').each{|key| context = (context.is_a? Hash) ? context[key] : nil})
64
- cmnd = cmnd.sub("${#{s[0]}}", context) if context if context
64
+ cmnd = cmnd.sub("${#{s[0]}}", context.to_s) if context
65
65
  end
66
+
67
+ # ALTERNATIVE SOLUTION
68
+ # cmnd.to_enum(:scan, /\$\{([^\s]+)\}/).map {[Regexp.last_match[0], Regexp.last_match[1].split('.')]}.each do |m|
69
+ # context = (context.nil? ? config : context)[m[1].delete_at(0)] until m[1].size == 0
70
+ # cmnd = cmnd.sub(m[0], context) if context.is_a? String
71
+ # end
72
+
73
+
66
74
  log.debug("EXEC: #{cmnd}")
67
75
  system(cmnd)
68
76
  else
data/lib/rcoli/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module RCoLi
2
2
 
3
- VERSION = '0.5.9'
3
+ VERSION = '0.5.10'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcoli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.5.10
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-04-18 00:00:00.000000000 Z
12
+ date: 2013-04-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -94,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  segments:
96
96
  - 0
97
- hash: -3080644431279771891
97
+ hash: 2985553324231377530
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  segments:
105
105
  - 0
106
- hash: -3080644431279771891
106
+ hash: 2985553324231377530
107
107
  requirements: []
108
108
  rubyforge_project:
109
109
  rubygems_version: 1.8.24