flow-lite 1.0.2 → 1.0.3

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: 8af53ae94d759087b598975a3228f8243f2ac3e8
4
- data.tar.gz: 98474c25143943b759864a7dc5e9e31925e0e692
3
+ metadata.gz: bec58eb7b17f61cd186fa21cf7b57bf3b93a8ee0
4
+ data.tar.gz: b2c6da0f1440e70133c79b4ab2bdac478c08e8a0
5
5
  SHA512:
6
- metadata.gz: 77a5ef9970b4bfa189caf93ff22f80232a192392848518e05e22638df4701ad73ae60c3ec28d7d7ddc0932aef009dcfb7a56a3aaffd0f5568a8f67f8272ee02c
7
- data.tar.gz: f4284f4f791a083c920c7bb3e1d232eb8957f91c7ebf7040542b6ae2bbde4525ec3c79236b41748433ed363d7e74b3c761bf20f795b7875710d9e660a3a762ed
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/git](https://github.com/rubycoco/git)
7
- * bugs :: [github.com/rubycoco/git/issues](https://github.com/rubycoco/git/issues)
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/git/blob/master/flow-lite/lib/flow-lite.rb) source for the definite always up-to-date list.
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/git' }
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'
@@ -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
- FLOWFILES = ['flowfile', 'Flowfile',
116
- 'flowfile.rb', 'Flowfile.rb']
115
+ NAMES = ['flowfile', 'Flowfile',
116
+ 'flowfile.rb', 'Flowfile.rb']
117
117
  def self.find_file
118
- FLOWFILES.each do |name|
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=find_file )
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] (auto-)require >#{name}<..."
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 = options[:flowfile] || Flowfile.find_file
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 )
@@ -2,7 +2,7 @@ module FlowLite
2
2
 
3
3
  MAJOR = 1 ## todo: namespace inside version or something - why? why not??
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 3
6
6
  VERSION = [MAJOR,MINOR,PATCH].join('.')
7
7
 
8
8
  def self.version
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.2
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-10-28 00:00:00.000000000 Z
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/git
65
+ homepage: https://github.com/rubycoco/flow
66
66
  licenses:
67
67
  - Public Domain
68
68
  metadata: {}