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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c59de7fccebbe6c040ae40cbf9c50acb0efd0e9
4
- data.tar.gz: 92a74c2333d2b346c85c4536d93fd96faa502cb6
3
+ metadata.gz: 38f17f768785d9ea585f6efcee8c01fd9005ea55
4
+ data.tar.gz: 173d77f036b6b9c0f793f6d421624c253b8e10f0
5
5
  SHA512:
6
- metadata.gz: b49c7ab0b98ad42c33bddeee8ee2653a66d4679874170a368cac814b2a96f5deb68fe6373234e3b615da8c17fc93fa2d41b9b1543b621c5014e6ab201753333f
7
- data.tar.gz: 5736bd6b520a2b42a959bcf75fe3a198a34458899ec1b6b5dc4abaf8987e62d34ff574c59e94fee365b7aff6a90d65c2afb3b42e403f36a05c28ca7b977e44c5
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.0](https://github.com/tumugi/tumugi/tree/0.4.0) (2016-05-09)
4
- [Full Changelog](https://github.com/tumugi/tumugi/compare/v0.3.0...0.4.0)
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))
@@ -30,16 +30,22 @@ module Tumugi
30
30
 
31
31
  def find_task(id)
32
32
  task = @tasks[id.to_s]
33
- raise Tumugi::Error, "Task not found: #{id}" if task.nil?
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
- load(file, true)
41
- rescue LoadError => e
42
- raise Tumugi::Error, e
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::Error, e
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: 'Task definition file name', required: true
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 "Stacktrace:"
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
@@ -1,3 +1,3 @@
1
1
  module Tumugi
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tumugi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuyuki Honda