easy_app_helper 1.0.5 → 1.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.
- checksums.yaml +4 -4
- data/lib/easy_app_helper/core/base.rb +8 -1
- data/lib/easy_app_helper/version.rb +1 -1
- data/spec/config_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0584c63fd15bf478ad92e3ef47a46bbd1fa1605f
|
4
|
+
data.tar.gz: 3831a40b67f1e89390180a82310cf0bc0e414849
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5adc276768419c22019d6efa06b3a6f904d3371fcf00a0d8f27b59577b9695249540255eebbf7975e48ab31447dffc2cdd8844755024c386dc3ebdc8150bf606
|
7
|
+
data.tar.gz: f154759d2d1a54d9d58157c17930af7284a9ef4a0aacc4322fa6817c499629dffe5ba2b52d7f5008e0f93ecfac7c9299085289fa6d9dc62d398f514b137f4f64
|
@@ -81,11 +81,13 @@ class EasyAppHelper::Core::Base
|
|
81
81
|
raise "Incorrect usage" unless block_given?
|
82
82
|
@slop_definition.separator build_separator(title)
|
83
83
|
yield @slop_definition
|
84
|
+
ensure
|
85
|
+
sync!
|
84
86
|
end
|
85
87
|
|
86
88
|
# Sets the :command_line layer of internal_configs to the computed {#command_line_config}
|
87
89
|
def load_config
|
88
|
-
|
90
|
+
sync!
|
89
91
|
self
|
90
92
|
end
|
91
93
|
|
@@ -131,6 +133,11 @@ class EasyAppHelper::Core::Base
|
|
131
133
|
|
132
134
|
private
|
133
135
|
|
136
|
+
def sync!
|
137
|
+
internal_configs[:command_line] = {content: command_line_config, source: 'Command line'}
|
138
|
+
end
|
139
|
+
|
140
|
+
|
134
141
|
# Performs actions related the very specific config parameters
|
135
142
|
# @param [String] key The parameter to check
|
136
143
|
# @param [Object] value The value it expects to be set to
|
data/spec/config_spec.rb
CHANGED
@@ -143,4 +143,16 @@ describe EasyAppHelper.config do
|
|
143
143
|
|
144
144
|
end
|
145
145
|
|
146
|
+
|
147
|
+
context "When dealing with command line" do
|
148
|
+
|
149
|
+
it 'should have the same content using #command_line_config and #internal_configs[:command_line][:content]' do
|
150
|
+
subject.add_command_line_section('Scripts analysis') do |slop|
|
151
|
+
slop.on :p, :pipo, 'Directory path where SQL files are located.', argument: false
|
152
|
+
end
|
153
|
+
expect(subject.command_line_config).to eq subject.internal_configs[:command_line][:content]
|
154
|
+
end
|
155
|
+
|
156
|
+
end
|
157
|
+
|
146
158
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_app_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L.Briais
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|