rcoli 0.6.1 → 0.6.2

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rcoli (0.6.1)
4
+ rcoli (0.6.2)
5
5
  highline (~> 1.6.11)
6
6
  paint (= 0.8.5)
7
7
 
data/lib/rcoli/model.rb CHANGED
@@ -215,6 +215,11 @@ module RCoLi
215
215
  end
216
216
  end
217
217
 
218
+ # enable dev mode
219
+ if (result.global_options['mode-dev'])
220
+ ApplicationContext.instance.modedev = true
221
+ end
222
+
218
223
  # execution of the pre block
219
224
  context.instance_exec(result.global_options, result.options, result.arguments, &@pre_action) if (@pre_action and !result.command.value_of_skip_pre)
220
225
  # execution of the main block
data/lib/rcoli/utils.rb CHANGED
@@ -9,6 +9,7 @@ module RCoLi
9
9
  include Singleton
10
10
 
11
11
  attr_accessor :debug
12
+ attr_accessor :modedev
12
13
 
13
14
  end
14
15
 
@@ -72,7 +73,7 @@ module RCoLi
72
73
 
73
74
 
74
75
  log.debug("EXEC: #{cmnd}")
75
- system(cmnd)
76
+ system(cmnd) unless ApplicationContext.instance.modedev
76
77
  else
77
78
  raise ApplicationError, "The command #{command} isn't configured. Check the file #{@source}"
78
79
  end
data/lib/rcoli/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module RCoLi
2
2
 
3
- VERSION = '0.6.1'
3
+ VERSION = '0.6.2'
4
4
 
5
5
  end
data/lib/rcoli.rb CHANGED
@@ -14,6 +14,10 @@ def application(id, &block)
14
14
  s.description "Turn on debugging"
15
15
  end
16
16
 
17
+ @program.switch :long => 'mode-dev' do |s|
18
+ s.description "Turn on development mode"
19
+ end
20
+
17
21
  @program.command(:help) do |c|
18
22
  c.description "Display help documentation"
19
23
  c.skip_pre true
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.6.1
4
+ version: 0.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -94,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  segments:
96
96
  - 0
97
- hash: 1456470107741031066
97
+ hash: -4033288001323402229
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: 1456470107741031066
106
+ hash: -4033288001323402229
107
107
  requirements: []
108
108
  rubyforge_project:
109
109
  rubygems_version: 1.8.24