pipe_fitter 0.1.0 → 0.1.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: 8b23b1fe9578e816dd779dc1a5cb44995d1290c1
4
- data.tar.gz: b5035699203388bfc31654839cf84d2d44cb3644
3
+ metadata.gz: bf1f908b084ab77ac9e1b297cd0b254539f6e642
4
+ data.tar.gz: 25228d6591480f3b482024c0760c07dccf7bea1b
5
5
  SHA512:
6
- metadata.gz: bfb1784675d8dfa25567adcc5ace6f5828387c2aaef3d107daa5d7055978bf19332ab2adbf128b42f9d9871b069c10c7f12a1abc4e6e0ed878e76b445cbfa546
7
- data.tar.gz: 44fa120401769db6b94bf3b59c5ef1ca0c537462aa9cf2ecd0f65d76cd55d9df1c84a669229de78da7fc68716cf4683bd548692a73ea83580ec9bf7331f83a15
6
+ metadata.gz: 8a26cfa5004fcb334954bf0acd57765e8053f9c6ad143e7fa73b16776c64e4f143f72a4981e7ac799fcccdd1cbb42bf993437ac39f1f0173357c18dfdd19f981
7
+ data.tar.gz: f2fb055bb8e97d5233cdd6b191b02161e4b8a4170465d0eb63b2cb731b9c10fef95a9ccf5b752ddbf40db2b2c784eb99cdf5e0029d3cf6990ca4cc3d2cfaf3b4
data/.travis.yml CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/bin/console CHANGED
File without changes
data/bin/setup CHANGED
File without changes
data/exe/pipe_filter CHANGED
@@ -1,4 +1,54 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "pipe_fitter/cli"
3
+ require "pipe_fitter"
4
+ require "thor"
5
+
6
+ module PipeFitter
7
+ class Cli < Thor
8
+ class_option :region, type: :string
9
+ class_option :profile, type: :string
10
+
11
+ desc "export", "Export pipeline definition"
12
+ option :pipeline_id, type: :string, required: true, aliases: "i"
13
+ def export
14
+ puts client.definition(options[:pipeline_id]).to_yaml
15
+ end
16
+
17
+ desc "register DEFINITION_FILE", "Register pipeline"
18
+ def register(definition_file)
19
+ id, res = client.register(definition_file)
20
+ puts id, JSON.pretty_generate(res)
21
+ end
22
+
23
+ desc "diff DEFINITION_FILE", "Show pipeline difference"
24
+ option :pipeline_id, type: :string, required: true, aliases: "i"
25
+ option :format, type: :string, default: "color", aliases: "f"
26
+ def diff(definition_file)
27
+ puts client.diff(options[:pipeline_id], definition_file, options[:format])
28
+ end
29
+
30
+ desc "update DEFINITION_FILE", "Update pipeline definition"
31
+ option :pipeline_id, type: :string, required: true, aliases: "i"
32
+ def update(definition_file)
33
+ res = client.update(options[:pipeline_id], definition_file)
34
+ puts JSON.pretty_generate(res)
35
+ end
36
+
37
+ desc "activate", "Activate pipeline"
38
+ option :pipeline_id, type: :string, required: true, aliases: "i"
39
+ option :parameter_values, type: :hash, required: false, aliases: "p"
40
+ option :start_timestamp, type: :string, required: false, aliases: "t"
41
+ def activate
42
+ t = options[:start_timestamp] ? Time.parse(options[:start_timestamp]) : nil
43
+ puts client.activate(options[:pipeline_id], options[:parameter_values], t)
44
+ end
45
+
46
+ private
47
+
48
+ def client
49
+ @client ||= DataPipelineClient.new(options)
50
+ end
51
+ end
52
+ end
53
+
4
54
  PipeFitter::Cli.start
data/lib/pipe_fitter.rb CHANGED
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module PipeFitter
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
File without changes
data/pipe_fitter.gemspec CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipe_fitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - masa21kik
@@ -168,7 +168,6 @@ files:
168
168
  - bin/setup
169
169
  - exe/pipe_filter
170
170
  - lib/pipe_fitter.rb
171
- - lib/pipe_fitter/cli.rb
172
171
  - lib/pipe_fitter/data_pipeline_client.rb
173
172
  - lib/pipe_fitter/pipeline.rb
174
173
  - lib/pipe_fitter/version.rb
@@ -1,50 +0,0 @@
1
- require "pipe_fitter"
2
- require "thor"
3
-
4
- module PipeFitter
5
- class Cli < Thor
6
- class_option :region, type: :string
7
- class_option :profile, type: :string
8
-
9
- desc "export", "Export pipeline definition"
10
- option :pipeline_id, type: :string, required: true, aliases: "i"
11
- def export
12
- puts client.definition(options[:pipeline_id]).to_yaml
13
- end
14
-
15
- desc "register DEFINITION_FILE", "Register pipeline"
16
- def register(definition_file)
17
- id, res = client.register(definition_file)
18
- puts id, JSON.pretty_generate(res)
19
- end
20
-
21
- desc "diff DEFINITION_FILE", "Show pipeline difference"
22
- option :pipeline_id, type: :string, required: true, aliases: "i"
23
- option :format, type: :string, default: "color", aliases: "f"
24
- def diff(definition_file)
25
- puts client.diff(options[:pipeline_id], definition_file, options[:format])
26
- end
27
-
28
- desc "update DEFINITION_FILE", "Update pipeline definition"
29
- option :pipeline_id, type: :string, required: true, aliases: "i"
30
- def update(definition_file)
31
- res = client.update(options[:pipeline_id], definition_file)
32
- puts JSON.pretty_generate(res)
33
- end
34
-
35
- desc "activate pipeline", "Activate pipeline"
36
- option :pipeline_id, type: :string, required: true, aliases: "i"
37
- option :parameter_values, type: :hash, required: false, aliases: "p"
38
- option :start_timestamp, type: :string, required: false, aliases: "t"
39
- def activate
40
- t = options[:start_timestamp] ? Time.parse(options[:start_timestamp]) : nil
41
- puts client.activate(options[:pipeline_id], options[:parameter_values], t)
42
- end
43
-
44
- private
45
-
46
- def client
47
- @client ||= DataPipelineClient.new(options)
48
- end
49
- end
50
- end