flow-lite 1.0.2 → 1.0.3
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 +4 -4
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/lib/flow-lite.rb +22 -9
- data/lib/flow-lite/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bec58eb7b17f61cd186fa21cf7b57bf3b93a8ee0
|
4
|
+
data.tar.gz: b2c6da0f1440e70133c79b4ab2bdac478c08e8a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eb5a662ed0393f8a77df8077a7df4c9da69038529fa53ef235d299298e33724aaf764cb4fd3fcbcf9cf53606f5bd22143a1f98d89758ff7905a22b9dd9559ea
|
7
|
+
data.tar.gz: d68c1d0439b921ca86a36e850ecb6837b1e3e5dfbfb1cd411c30466d69d30de6909d8315895b69f8d0db9a4fc1d34578bce789d8d1f36a00137384f697116a2b
|
data/README.md
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
flow-lite gem - (yet) another (lite) workflow engine; let's you define your workflow steps in Flowfiles; incl. the flow command line tool
|
4
4
|
|
5
5
|
|
6
|
-
* home :: [github.com/rubycoco/
|
7
|
-
* bugs :: [github.com/rubycoco/
|
6
|
+
* home :: [github.com/rubycoco/flow](https://github.com/rubycoco/flow)
|
7
|
+
* bugs :: [github.com/rubycoco/flow/issues](https://github.com/rubycoco/flow/issues)
|
8
8
|
* gem :: [rubygems.org/gems/flow-lite](https://rubygems.org/gems/flow-lite)
|
9
9
|
* rdoc :: [rubydoc.info/gems/flow-lite](http://rubydoc.info/gems/flow-lite)
|
10
10
|
|
@@ -66,7 +66,7 @@ require 'net/http'
|
|
66
66
|
require 'net/https'
|
67
67
|
```
|
68
68
|
|
69
|
-
Tip: See the [`flow-lite.rb`](https://github.com/rubycoco/
|
69
|
+
Tip: See the [`flow-lite.rb`](https://github.com/rubycoco/flow/blob/master/flow-lite/lib/flow-lite.rb) source for the definite always up-to-date list.
|
70
70
|
|
71
71
|
|
72
72
|
That's it for now.
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ Hoe.spec 'flow-lite' do
|
|
8
8
|
self.summary = "flow-lite gem - (yet) another (lite) workflow engine; let's you define your workflow steps in Flowfiles; incl. the flow command line tool"
|
9
9
|
self.description = summary
|
10
10
|
|
11
|
-
self.urls = { home: 'https://github.com/rubycoco/
|
11
|
+
self.urls = { home: 'https://github.com/rubycoco/flow' }
|
12
12
|
|
13
13
|
self.author = 'Gerald Bauer'
|
14
14
|
self.email = 'ruby-talk@ruby-lang.org'
|
data/lib/flow-lite.rb
CHANGED
@@ -112,20 +112,18 @@ class Flowfile
|
|
112
112
|
|
113
113
|
## find flowfile path by convention
|
114
114
|
## check for name by convention in this order:
|
115
|
-
|
116
|
-
|
115
|
+
NAMES = ['flowfile', 'Flowfile',
|
116
|
+
'flowfile.rb', 'Flowfile.rb']
|
117
117
|
def self.find_file
|
118
|
-
|
118
|
+
NAMES.each do |name|
|
119
119
|
return "./#{name}" if File.exist?( "./#{name}" )
|
120
120
|
end
|
121
|
-
|
122
|
-
STDERR.puts "!! ERROR - no flowfile found, sorry - looking for: #{FLOWFILES.join(', ')} in (#{Dir.pwd})"
|
123
|
-
exit 1
|
121
|
+
nil
|
124
122
|
end # method self.find_file
|
125
123
|
|
126
124
|
|
127
125
|
## convenience method - use like Flowfile.load_file()
|
128
|
-
def self.load_file( path
|
126
|
+
def self.load_file( path )
|
129
127
|
code = File.open( path, 'r:utf-8' ) { |f| f.read }
|
130
128
|
load( code )
|
131
129
|
end
|
@@ -205,14 +203,29 @@ class Tool
|
|
205
203
|
names = options[:requires]
|
206
204
|
names.each do |name|
|
207
205
|
## todo/check: add some error/exception handling here - why? why not?
|
208
|
-
puts "[flow]
|
206
|
+
puts "[flow] auto-require >#{name}<..."
|
209
207
|
require( name )
|
210
208
|
end
|
209
|
+
else ## use/try defaults
|
210
|
+
config_path = "./config.rb"
|
211
|
+
if File.exist?( config_path )
|
212
|
+
puts "[flow] auto-require (default) >#{config_path}<..."
|
213
|
+
require( config_path )
|
214
|
+
end
|
211
215
|
end
|
212
216
|
|
213
217
|
|
214
|
-
path =
|
218
|
+
path = nil
|
219
|
+
if options[:flowfile]
|
220
|
+
path = options[:flowfile]
|
221
|
+
else
|
222
|
+
path = Flowfile.find_file
|
215
223
|
|
224
|
+
if path.nil?
|
225
|
+
STDERR.puts "!! ERROR - no flowfile found, sorry - looking for: #{Flowfile::NAMES.join(', ')} in (#{Dir.pwd})"
|
226
|
+
exit 1
|
227
|
+
end
|
228
|
+
end
|
216
229
|
|
217
230
|
puts "[flow] loading >#{path}<..."
|
218
231
|
flowfile = Flowfile.load_file( path )
|
data/lib/flow-lite/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flow-lite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -62,7 +62,7 @@ files:
|
|
62
62
|
- bin/flow
|
63
63
|
- lib/flow-lite.rb
|
64
64
|
- lib/flow-lite/version.rb
|
65
|
-
homepage: https://github.com/rubycoco/
|
65
|
+
homepage: https://github.com/rubycoco/flow
|
66
66
|
licenses:
|
67
67
|
- Public Domain
|
68
68
|
metadata: {}
|