flows 0.2.0 → 0.3.0

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
2
  SHA256:
3
- metadata.gz: eed3e3ba742be2b25c1ae3ca7b52d2db3418183e0950616409ef8d05232365de
4
- data.tar.gz: c2f340f63e6e55178426c28fcfe29aa6d6c9af7d9a4b539d43461f068f4a6082
3
+ metadata.gz: be39f457170b0b70b8c54073f5ae4c75c19ee90fdfa0a5d4e8e8bd6762d910ae
4
+ data.tar.gz: e3bb541f406ae2c935273a9a915cd19ef6f680b165c01ed9acd59d3cc5665100
5
5
  SHA512:
6
- metadata.gz: 44a6ac9cdcedb674aab92373647582e038602c9459361d1ccbc6502cd78556835042fb81004c2329f1c1a95108371040dddb829fbd11a8eaa20bf310817163f3
7
- data.tar.gz: 333ff1f85e39a794c5e4073e7deeca887562a0568497cd480d75b26338aff242dc8c5d1a8f67ce822083e894beecfe033b7abcffe25e931490de53db7e52cf29
6
+ metadata.gz: 4c4a2444bb62c7f4e1f40d9a7c45e060154fdfb434a1fa80557b322bead0a6b1e890f2cca6643b0d07b6ecb337a888839dee05838d096b9024073a39fb3871b1
7
+ data.tar.gz: fc9c68ec2cf6b7c507db598fdd6615b07f12b618cedcba5a86012966d26d5f7829908c98fbc4c7dfbfe3265d83f13d7b9f3c2cce4b4e0141cf969955a3931fec
data/.gitignore CHANGED
@@ -12,4 +12,7 @@
12
12
 
13
13
  # profile results folder
14
14
  /profile/
15
- !/profile/.keep
15
+ !/profile/.keep
16
+
17
+ # OS specific stuff
18
+ .DS_Store
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- flows (0.2.0)
15
+ flows (0.3.0)
16
16
 
17
17
  GEM
18
18
  remote: https://rubygems.org/
@@ -0,0 +1,16 @@
1
+ module Flows
2
+ # Module to extend Operation and Railway. Adds implicit building feature.
3
+ module ImplicitBuild
4
+ attr_reader :default_build
5
+
6
+ def self.extended(mod)
7
+ mod.instance_variable_set(:@default_build, nil)
8
+ end
9
+
10
+ def call(**params)
11
+ @default_build ||= new
12
+
13
+ default_build.call(**params)
14
+ end
15
+ end
16
+ end
@@ -4,11 +4,14 @@ require_relative 'operation/dsl'
4
4
  require_relative 'operation/builder'
5
5
  require_relative 'operation/executor'
6
6
 
7
+ require_relative 'implicit_build'
8
+
7
9
  module Flows
8
10
  # Operation DSL
9
11
  module Operation
10
12
  def self.included(mod)
11
13
  mod.extend ::Flows::Operation::DSL
14
+ mod.extend ::Flows::ImplicitBuild
12
15
  end
13
16
 
14
17
  include ::Flows::Result::Helpers
@@ -4,11 +4,14 @@ require_relative './railway/dsl'
4
4
  require_relative './railway/builder'
5
5
  require_relative './railway/executor'
6
6
 
7
+ require_relative './implicit_build'
8
+
7
9
  module Flows
8
10
  # Railway DSL
9
11
  module Railway
10
12
  def self.included(mod)
11
13
  mod.extend ::Flows::Railway::DSL
14
+ mod.extend ::Flows::ImplicitBuild
12
15
  end
13
16
 
14
17
  include ::Flows::Result::Helpers
@@ -1,3 +1,3 @@
1
1
  module Flows
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flows
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kolesnev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-02 00:00:00.000000000 Z
11
+ date: 2019-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -284,6 +284,7 @@ files:
284
284
  - lefthook.yml
285
285
  - lib/flows.rb
286
286
  - lib/flows/flow.rb
287
+ - lib/flows/implicit_build.rb
287
288
  - lib/flows/node.rb
288
289
  - lib/flows/operation.rb
289
290
  - lib/flows/operation/builder.rb