tumugi 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -2
- data/lib/tumugi/application.rb +11 -5
- data/lib/tumugi/cli.rb +2 -2
- data/lib/tumugi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38f17f768785d9ea585f6efcee8c01fd9005ea55
|
4
|
+
data.tar.gz: 173d77f036b6b9c0f793f6d421624c253b8e10f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cacaf638d4beadbff56ee6e011ca59e07dbff897d5a31f657802cddf3a7a3d4e5eefdc10a01929e5e5053e3775ed343735672113851110963cf8106015601407
|
7
|
+
data.tar.gz: 0312b97d9de8d85be505fc8630dd6e996a982ac959e557b32ed49554ea5057dbb38c6585f908b72605f16719db760efdba75efe8ed374296980d6244556f9d39
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.4.
|
4
|
-
[Full Changelog](https://github.com/tumugi/tumugi/compare/v0.
|
3
|
+
## [0.4.1](https://github.com/tumugi/tumugi/tree/0.4.1) (2016-05-09)
|
4
|
+
[Full Changelog](https://github.com/tumugi/tumugi/compare/v0.4.0...0.4.1)
|
5
|
+
|
6
|
+
**Fixed bugs:**
|
7
|
+
|
8
|
+
- Check workflow file existance before load [\#39](https://github.com/tumugi/tumugi/pull/39) ([hakobera](https://github.com/hakobera))
|
9
|
+
|
10
|
+
## [v0.4.0](https://github.com/tumugi/tumugi/tree/v0.4.0) (2016-05-09)
|
11
|
+
[Full Changelog](https://github.com/tumugi/tumugi/compare/v0.3.0...v0.4.0)
|
5
12
|
|
6
13
|
**Implemented enhancements:**
|
7
14
|
|
@@ -10,6 +17,7 @@
|
|
10
17
|
|
11
18
|
**Merged pull requests:**
|
12
19
|
|
20
|
+
- Prepare release for v0.4.0 [\#38](https://github.com/tumugi/tumugi/pull/38) ([hakobera](https://github.com/hakobera))
|
13
21
|
- Refactoring error handling [\#37](https://github.com/tumugi/tumugi/pull/37) ([hakobera](https://github.com/hakobera))
|
14
22
|
- Change config section spec [\#35](https://github.com/tumugi/tumugi/pull/35) ([hakobera](https://github.com/hakobera))
|
15
23
|
- Remove support Ruby 2.0 [\#34](https://github.com/tumugi/tumugi/pull/34) ([hakobera](https://github.com/hakobera))
|
data/lib/tumugi/application.rb
CHANGED
@@ -30,16 +30,22 @@ module Tumugi
|
|
30
30
|
|
31
31
|
def find_task(id)
|
32
32
|
task = @tasks[id.to_s]
|
33
|
-
raise Tumugi::
|
33
|
+
raise Tumugi::TumugiError, "Task not found: #{id}" if task.nil?
|
34
34
|
task
|
35
35
|
end
|
36
36
|
|
37
37
|
private
|
38
38
|
|
39
39
|
def load_workflow_file(file)
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
unless File.exist?(file)
|
41
|
+
raise Tumugi::TumugiError, "Workflow file '#{file}' not exist."
|
42
|
+
end
|
43
|
+
|
44
|
+
begin
|
45
|
+
load(file, true)
|
46
|
+
rescue LoadError => e
|
47
|
+
raise Tumugi::TumugiError, e.message
|
48
|
+
end
|
43
49
|
end
|
44
50
|
|
45
51
|
def create_dag(id)
|
@@ -71,7 +77,7 @@ module Tumugi
|
|
71
77
|
load(config_file)
|
72
78
|
end
|
73
79
|
rescue LoadError => e
|
74
|
-
raise Tumugi::
|
80
|
+
raise Tumugi::TumugiError, e.message
|
75
81
|
end
|
76
82
|
|
77
83
|
def set_params(options)
|
data/lib/tumugi/cli.rb
CHANGED
@@ -7,7 +7,7 @@ module Tumugi
|
|
7
7
|
|
8
8
|
class << self
|
9
9
|
def common_options
|
10
|
-
option :file, aliases: '-f', desc: '
|
10
|
+
option :file, aliases: '-f', desc: 'Workflow file name', required: true
|
11
11
|
option :config, aliases: '-c', desc: 'Configuration file name', default: 'tumugi_config.rb'
|
12
12
|
option :params, aliases: '-p', type: :hash, desc: 'Task parameters'
|
13
13
|
option :quiet, type: :boolean, desc: 'Suppress log', default: false
|
@@ -50,7 +50,7 @@ module Tumugi
|
|
50
50
|
end
|
51
51
|
rescue => e
|
52
52
|
Tumugi.logger.error "#{command} command failed"
|
53
|
-
Tumugi.logger.error
|
53
|
+
Tumugi.logger.error e.message
|
54
54
|
e.backtrace.each { |line| Tumugi.logger.error line }
|
55
55
|
raise Thor::Error, 'failed'
|
56
56
|
end
|
data/lib/tumugi/version.rb
CHANGED