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 +4 -4
- data/lib/carry_out.rb +5 -19
- data/lib/carry_out/cloaker.rb +1 -1
- data/lib/carry_out/configured_instance.rb +16 -0
- data/lib/carry_out/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7442bc663257647a15d193b9691d50e0f785b9f
|
4
|
+
data.tar.gz: 94056b9ad31d4231f088bbaa1c0a96247d64d54d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/carry_out/cloaker.rb
CHANGED
@@ -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
|
data/lib/carry_out/version.rb
CHANGED
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.
|
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-
|
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
|