masamune 0.18.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78cc6a05c7d3d967eb2f5f66a89c9b2eb4d22bca
4
- data.tar.gz: 7c2ae67465453c5064819aa16338ed2b1b73a656
3
+ metadata.gz: 00d8f2eadd5197f9d6bc29ea6ad781184a0e6cc0
4
+ data.tar.gz: 2916c960c93dba409c0f8cf5f9dc0aab40362c93
5
5
  SHA512:
6
- metadata.gz: 1b4b73612c75ca6e73f4ecc49b68d034cae34acbfa4359f5588ab51dcfea2878e7890988fa5abca21d515b90d048005ec4a5282c6f306117c2e430e44b2061a8
7
- data.tar.gz: a5d0c3525357265e77f5fdc09bcf6a0f2af9e9c81262d4bfed1bb1d809c7fb407704c7f68db2ad9ccb281d5c58ba075aa38c2c4f31fc45f3c6ed4def9cdf63e7
6
+ metadata.gz: 1f214ac8bc7f480c60308ca49c856df221f344b77231cff5b0983ad9b55079c4c3c1ccf8bc2179355b87c2c1626641a76a6138e95489cd858f7e7eb6b919f187
7
+ data.tar.gz: b63e53edf5bcd55c059ad38f302baec66c6f0ab7595e216a978888d31c4532cf694e1595f752b55a5d224264cb25d7e507d4f46c1db204a0373d447e70d10883
@@ -50,6 +50,13 @@ module Masamune::Actions
50
50
  sources.first
51
51
  end
52
52
 
53
+ def reset_module!
54
+ ClassMethods.reset_module!
55
+ end
56
+ module_function :reset_module!
57
+
58
+ private
59
+
53
60
  # TODO: sources from file or input array
54
61
  def parse_file_type(key)
55
62
  return Set.new unless key
@@ -58,7 +65,7 @@ module Masamune::Actions
58
65
  Set.new File.read(value).split(/\s+/)
59
66
  end
60
67
 
61
- def execute(options = {})
68
+ def prepare_and_execute(options = {})
62
69
  raise Thor::RequiredArgumentMissingError, "No value provided for required options '--start' or '--at'" unless options[:start] || options[:at] || options[:sources] || options[:targets]
63
70
  raise Thor::MalformattedArgumentError, "Cannot specify both option '--sources' and option '--targets'" if options[:sources] && options[:targets]
64
71
 
@@ -73,11 +80,6 @@ module Masamune::Actions
73
80
  engine.execute(current_command_name, options)
74
81
  end
75
82
 
76
- def reset_module!
77
- ClassMethods.reset_module!
78
- end
79
- module_function :reset_module!
80
-
81
83
  included do |base|
82
84
  base.extend ClassMethods
83
85
  base.class_eval do
@@ -90,7 +92,7 @@ module Masamune::Actions
90
92
  thor.engine.environment = thor.environment
91
93
  thor.engine.filesystem.environment = thor.environment
92
94
  thor.environment.with_process_lock(:data_flow_after_initialize) do
93
- thor.execute(options)
95
+ thor.send(:prepare_and_execute, options)
94
96
  end
95
97
  exit 0 if thor.top_level?
96
98
  end if defined?(base.after_initialize)
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module Masamune
24
- VERSION = '0.18.0'.freeze
24
+ VERSION = '0.18.1'.freeze
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: masamune
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Andrews
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-01 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor