thor-addons 0.1.5 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 57bc529d64b5258fc3371a119e2fb77c09a0a688
4
- data.tar.gz: b8fc11c322e1b4a133d51345671c16050ac36ab1
2
+ SHA256:
3
+ metadata.gz: 0637e70de16cdaca1968148540bc7919e001497e8c60d5212a6a5cc2bc760678
4
+ data.tar.gz: 1f53c76ebc9e27064fb9660c7123a740420ebe4e186884995bb4c694f0dbc66e
5
5
  SHA512:
6
- metadata.gz: a5df9d9d73797fb81bef0688560d6487ca06abc93000acfa38683bfd1f86c7ba619e5f43adbdbf050dca435e893c960518e94b95f2a7d5c9e63c2ba6db03a93e
7
- data.tar.gz: 38b29725e9138527a2b177a800b353827ae4e43628f3e8b27deaeab43b7da7c2f89b842618c69bbc0acefa1352d9d7c037db18c44603768e25f010b09a4376da
6
+ metadata.gz: 0bbd51f8c4ff0a3ca464f3e3f3d6fa45053b20d874f4f094338d9743135749eec3e0fa3fa222cb4d78e7ae8d5a954e23d221caa7c2dd6b326e5c3c97be7f4cfb
7
+ data.tar.gz: 5af2e01103e9fa9b2603303260b873fddf52a3da26a7cb02b59bfbabb0a88d245a153bcbc8b4a0b1c0efe692e34ceea005c0738161030e27589a935b1de74e9f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 0.1.5 (13/03/2018)
2
+
3
+ BUG FIXES:
4
+
5
+ * Fix incorrectly parsing options from config ([#11](https://github.com/eredi93/thor-addons/pull/11))
6
+
1
7
  0.1.5 (22/09/2017)
2
8
 
3
9
  BUG FIXES:
@@ -81,13 +81,19 @@ module ThorAddons
81
81
  return hash_with_indifferent_access(global) if current_command_name.nil?
82
82
 
83
83
  if invoked_via_subcommand
84
- invocations.map { |k,v| v }.flatten.each do |subcommand|
85
- next if data[subcommand].nil? || data[subcommand][current_command_name].nil?
84
+ first_invoked, *remaining_invoked = invocations.values.flatten
85
+ command_options = data[first_invoked] unless data[first_invoked].nil?
86
86
 
87
- command_options.merge!(data[subcommand][current_command_name])
87
+ remaining_invoked.each do |subcommand|
88
+ break if command_options[subcommand].nil?
89
+
90
+ subcommand_data = command_options[subcommand]
91
+
92
+ command_options.delete(subcommand)
93
+ command_options.merge!(subcommand_data)
88
94
  end
89
95
  else
90
- command_options.merge!(data[current_command_name]) unless data[current_command_name].nil?
96
+ command_options = data[current_command_name] unless data[current_command_name].nil?
91
97
  end
92
98
 
93
99
  hash_with_indifferent_access(global.merge(command_options))
@@ -122,7 +128,7 @@ module ThorAddons
122
128
  begin
123
129
  memo[key] = value.default
124
130
  rescue NoMethodError
125
- memo[key] = nil
131
+ memo[key] = nil
126
132
  end
127
133
 
128
134
  memo
@@ -1,3 +1,3 @@
1
1
  module ThorAddons
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-addons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacopo Scrinzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-22 00:00:00.000000000 Z
11
+ date: 2018-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.6.12
123
+ rubygems_version: 2.7.6
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Thor CLI Add-ons