carry_out 1.3.1 → 1.3.2

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: c9a566c008472e7b69aa21de4ce6c6948a272281
4
- data.tar.gz: 854adbd99187223c1570e1a3413d1078188ba424
3
+ metadata.gz: c7442bc663257647a15d193b9691d50e0f785b9f
4
+ data.tar.gz: 94056b9ad31d4231f088bbaa1c0a96247d64d54d
5
5
  SHA512:
6
- metadata.gz: 021eabede07162f55d58da20cd46026c1c1a0bc13b8a9b01c299144a6707b4b1176c3745ed9bf9b20873979a4a3abe30183b01dbd25fc7cf3217fe957ef112ef
7
- data.tar.gz: d5737328744baa7c38dc633a93586c204ddce4d88ff7e68e84eaa805456c8e47a9c6c8cbcef773ce5d9922119fe743328b7f8c3050e9c92893d049bb94492626
6
+ metadata.gz: ffb61a74d007cacd4c5744141f701625ea50e49b6920eb1fa460f46b4e7d851e5ff3cc408c5195ff9141310def3dfc26a5a5009e420ef7392a8cf4b4d5fef834
7
+ data.tar.gz: dd74aec5b4d9677f85e50f4aef7ddc7c31a8a57a6088d5fd2155b3ee8e4e249ae94b9ddb2587d3a107b7d08d81ac82e13b4aa0c1ecad7b3ffcbe2f517bbe9048
data/lib/carry_out.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'carry_out/version'
2
2
 
3
3
  require 'carry_out/configurator'
4
+ require 'carry_out/configured_instance'
4
5
  require 'carry_out/error'
5
6
  require 'carry_out/result'
6
7
  require 'carry_out/unit'
@@ -9,25 +10,14 @@ require 'carry_out/plan_builder'
9
10
  require 'carry_out/plan_runner'
10
11
 
11
12
  module CarryOut
12
- class ConfiguredInstance
13
- def initialize(options = {})
14
- @options = Hash.new
15
- @options[:search] = options[:search] if options.has_key?(:search)
16
- end
17
-
18
- def plan(options = {}, &block)
19
- CarryOut.plan(Hash.new.merge(@options).merge(options), &block)
20
- end
21
-
22
- def call_unit(*args, &block)
23
- CarryOut.call_unit(*args)
24
- end
25
- end
26
-
27
13
  def self.call_unit(*args, &block)
28
14
  PlanRunner.call_unit(*args, &block)
29
15
  end
30
16
 
17
+ def self.configuration
18
+ @configuration ||= {}
19
+ end
20
+
31
21
  def self.configure(&block)
32
22
  Configurator.new(configuration).instance_eval(&block)
33
23
  end
@@ -43,10 +33,6 @@ module CarryOut
43
33
  end
44
34
  end
45
35
 
46
- def self.configuration
47
- @configuration ||= {}
48
- end
49
-
50
36
  def self.with_configuration(options = {})
51
37
  ConfiguredInstance.new(options)
52
38
  end
@@ -22,7 +22,7 @@ module CarryOut
22
22
  end
23
23
 
24
24
  def method_missing(method, *args, &block)
25
- if @previous_context && @previous_context.respond_to?(method)
25
+ if @previous_context
26
26
  @previous_context.send(method, *args, &block)
27
27
  else
28
28
  super
@@ -0,0 +1,16 @@
1
+ module CarryOut
2
+ class ConfiguredInstance
3
+ def initialize(options = {})
4
+ @options = Hash.new
5
+ @options[:search] = options[:search] if options.has_key?(:search)
6
+ end
7
+
8
+ def plan(options = {}, &block)
9
+ CarryOut.plan(Hash.new.merge(@options).merge(options), &block)
10
+ end
11
+
12
+ def call_unit(*args, &block)
13
+ CarryOut.call_unit(*args)
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module CarryOut
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carry_out
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Fields
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-15 00:00:00.000000000 Z
11
+ date: 2017-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,6 +104,7 @@ files:
104
104
  - lib/carry_out.rb
105
105
  - lib/carry_out/cloaker.rb
106
106
  - lib/carry_out/configurator.rb
107
+ - lib/carry_out/configured_instance.rb
107
108
  - lib/carry_out/error.rb
108
109
  - lib/carry_out/plan/guard.rb
109
110
  - lib/carry_out/plan/guard_context.rb