tumugi 0.6.2 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e012701afe6c29a35dd59f9c380c7a2e8b350c76
4
- data.tar.gz: 2a2e156e12b4977a3148a8e6d8fd5329d7691083
3
+ metadata.gz: 5377ec144cacd5bddd1555300c31f7794b628dbc
4
+ data.tar.gz: aa97c713302feba8c3735ab4876bc1616953bb3a
5
5
  SHA512:
6
- metadata.gz: 3fa3d8aa768b6a70da18cd765cacbb8dedf2186d9b64d9784dcefe03cd13e422e24021a92a408904385861c29f986a748ecaf8780bd4455427cb584da6f5e531
7
- data.tar.gz: 219ba5614c9726fbd5c06bac22c735ed6056f7d8a0a808519bbd4040056a4736be36506303390b6d3d54667c47c5bfa5e68975298437c81da583941d9c7143cd
6
+ metadata.gz: 09197a49b7d0b0b59a04ef6f038c2f4990dfdd61a54683d578b894203b5f48a34fdb99465359cbd48f10c556190b61e63833f08d2f5ceea69595e028dcd8cc57
7
+ data.tar.gz: 4397186e5d06c7e21531835f0de0d98ecc3f4237ee40cf927155ec1b29dc58fcf0e69c8d5dbee0d2ea61433ce3a26296ef3b8743099867b2223f3086a944c9c3
@@ -1,5 +1,17 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.6.3](https://github.com/tumugi/tumugi/tree/v0.6.3) (2016-08-14)
4
+ [Full Changelog](https://github.com/tumugi/tumugi/compare/v0.6.2...v0.6.3)
5
+
6
+ **Implemented enhancements:**
7
+
8
+ - Log tumugi version [\#113](https://github.com/tumugi/tumugi/pull/113) ([hakobera](https://github.com/hakobera))
9
+
10
+ **Fixed bugs:**
11
+
12
+ - Fix plugin template [\#112](https://github.com/tumugi/tumugi/pull/112) ([hakobera](https://github.com/hakobera))
13
+ - Fix commad failed error message [\#110](https://github.com/tumugi/tumugi/pull/110) ([hakobera](https://github.com/hakobera))
14
+
3
15
  ## [v0.6.2](https://github.com/tumugi/tumugi/tree/v0.6.2) (2016-08-02)
4
16
  [Full Changelog](https://github.com/tumugi/tumugi/compare/v0.6.1...v0.6.2)
5
17
 
@@ -13,6 +25,7 @@
13
25
 
14
26
  **Merged pull requests:**
15
27
 
28
+ - Prepare release for 0.6.2 [\#109](https://github.com/tumugi/tumugi/pull/109) ([hakobera](https://github.com/hakobera))
16
29
  - Improve and change logging [\#107](https://github.com/tumugi/tumugi/pull/107) ([hakobera](https://github.com/hakobera))
17
30
 
18
31
  ## [v0.6.1](https://github.com/tumugi/tumugi/tree/v0.6.1) (2016-07-10)
@@ -53,6 +53,7 @@ module Tumugi
53
53
  private
54
54
 
55
55
  def execute(command, task, options)
56
+ logger.info "tumugi v#{Tumugi::VERSION}"
56
57
  args = { task: task, options: options }
57
58
  success = Tumugi.workflow.execute(command, task, options)
58
59
  unless success
@@ -64,6 +65,7 @@ module Tumugi
64
65
  end
65
66
 
66
67
  def generate_plugin(name, options)
68
+ logger.info "tumugi v#{Tumugi::VERSION}"
67
69
  args = { name: name, options: options }
68
70
  Tumugi::Command::New.new.execute(name, options)
69
71
  logger.info "status: success, command: new, args: #{args}"
@@ -87,7 +89,7 @@ module Tumugi
87
89
  logger.error "If you want to know more detail, run with '--verbose' option"
88
90
  end
89
91
  logger.error "status: failed, command: #{command}, args: #{args}"
90
- raise Thor::Error.new("tumugi new failed, please check log")
92
+ raise Thor::Error.new("tumugi #{command} failed, please check log")
91
93
  end
92
94
 
93
95
  def logger
@@ -24,10 +24,11 @@ module Tumugi
24
24
  @data_dir = "#{File.expand_path(File.dirname(__FILE__))}/../data/new"
25
25
  @dest_dir = "#{(options[:path] || '.')}/#{full_project_name}"
26
26
  if File.exist?(@dest_dir)
27
- logger.error("#{@dest_dir} is already exists. Please delete it first")
27
+ puts "#{@dest_dir} is already exists. Please delete it first"
28
28
  return false
29
29
  end
30
30
 
31
+ puts "Create #{@dest_dir}"
31
32
  FileUtils.mkdir_p(@dest_dir)
32
33
 
33
34
  templates.each do |value|
@@ -39,15 +40,22 @@ module Tumugi
39
40
  name: name,
40
41
  tumugi_version: Tumugi::VERSION,
41
42
  }
42
- logger.info("Create #{dest_path(dest_file)}")
43
+ puts " Create #{dest_path(dest_file)}"
43
44
  FileUtils.mkdir_p(File.dirname(dest_path(dest_file)))
44
45
  File.write(dest_path(dest_file), eruby.result(context))
45
46
  end
46
- return true
47
- end
48
47
 
49
- def logger
50
- @logger ||= Tumugi::ScopedLogger.new("tumugi-new")
48
+ puts ""
49
+ puts "Plugin template is successfully generated."
50
+ puts "Next steps:"
51
+ puts ""
52
+ puts " $ cd #{full_project_name}"
53
+ puts " $ git init"
54
+ puts " $ bundle install"
55
+ puts " $ bundle exec rake"
56
+ puts ""
57
+
58
+ return true
51
59
  end
52
60
 
53
61
  private
@@ -17,13 +17,14 @@ TODO: Write description about `Tumugi::Plugin::<%= name.capitalize %>Task`.
17
17
  #### Parameters
18
18
 
19
19
  - **param1** description (string, required)
20
- - **param2** description (integer, default: 1)
20
+ - **param2** description (integer, optional, default: 1)
21
21
 
22
22
  #### Example
23
23
 
24
24
  ```rb
25
- task :task1, type: :bigquery_dataset do
26
- param_set :dataset_id, 'test'
25
+ task :main, type: :<%= name %> do
26
+ param1 'value1'
27
+ output { target(:<%= name %>, param1) }
27
28
  end
28
29
  ```
29
30
 
@@ -1,4 +1,4 @@
1
- task main, type: :<%= name %> do
1
+ task :main, type: :<%= name %> do
2
2
  param1 'value1'
3
3
  output { target(:<%= name %>, param1) }
4
4
  end
@@ -6,7 +6,8 @@ module Tumugi
6
6
  class <%= name.capitalize %>Task < Tumugi::Task
7
7
  Tumugi::Plugin.register_task('<%= name %>', self)
8
8
 
9
- param :param1, type: :string, default: ""
9
+ param :param1, type: :string, required: true
10
+ param :param2, type: :integer, default: 1
10
11
 
11
12
  def output
12
13
  @output ||= Tumugi::Plugin::<%= name.capitalize %>Target.new(param1)
@@ -1,6 +1,6 @@
1
1
  require_relative './test_helper'
2
2
 
3
- class Tumugi::<%= name.capitalize %>Test < Test::Unit::TestCase
3
+ class Tumugi::<%= name.capitalize %>Test < Tumugi::Test::TumugiTestCase
4
4
  test 'run success' do
5
5
  assert_run_success("examples/example.rb", "main")
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module Tumugi
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tumugi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuyuki Honda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-02 00:00:00.000000000 Z
11
+ date: 2016-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby