rake_fly 0.2.0 → 0.3.0

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: e4bf1bbc17b24980ccc471561a0a0cdbaf673f16
4
- data.tar.gz: c1e12d933c348eb99d6b9d1be6cedaa40cb6d31c
3
+ metadata.gz: 50d19f1df4abffc31c165d08aa7a1b65ae83734c
4
+ data.tar.gz: 3a007d3575bf31831efc4670ebf6683b11d07f15
5
5
  SHA512:
6
- metadata.gz: 2139a4ac56dd00a912f727812d55c6ec8575d51f0b394d4786deadc32896d4f13d62736d57d7da7da4b85e6f0f0df3052f9ce6914bcc2d41615ba573c8826cfb
7
- data.tar.gz: 5105099b44f29d541e35986eb9e790aad54d13333a307e9d1a8345e8473e7c697c0c159e3c76ecda908efa0d09850771a0014859f3da440614347a951c6a47bb
6
+ metadata.gz: 7edee1d1a35281b4dcc2a9fec3fa0c9da2fa8a7166aba01579a5c9e0b24a0d03f9b6be037d4f6c71b06aa66608bd851f90f311a75be791eae05ec01c5b485814
7
+ data.tar.gz: d37d2693233ce952939f14f3ae5f14e21b361e538b007b8c5a5e17799be9031120d1e00ee8cc9f2d4f6298d92b989b5566539391a876356788d48ecf554d5e70
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_fly (0.2.0)
4
+ rake_fly (0.3.0)
5
5
  rake_dependencies (~> 0.15)
6
6
  ruby_fly (~> 0.4)
7
7
 
@@ -18,6 +18,7 @@ module RakeFly
18
18
  def define
19
19
  desc "Get pipeline #{pipeline} for target #{target}"
20
20
  task name => [ensure_task] do
21
+ puts "Getting pipeline #{pipeline} for target #{target}..."
21
22
  RubyFly.get_pipeline(
22
23
  target: target,
23
24
  pipeline: pipeline)
@@ -0,0 +1,59 @@
1
+
2
+ require 'ruby_fly'
3
+ require_relative '../tasklib'
4
+
5
+ module RakeFly
6
+ module Tasks
7
+ class PushPipeline < TaskLib
8
+ parameter :name, :default => :push_pipeline
9
+
10
+ parameter :target, :required => true
11
+ parameter :pipeline, :required => true
12
+ parameter :config, :required => true
13
+
14
+ parameter :vars
15
+ parameter :var_files
16
+ parameter :non_interactive
17
+
18
+ parameter :get_pipeline_task_name, :default => :get_pipeline
19
+ parameter :set_pipeline_task_name, :default => :set_pipeline
20
+ parameter :unpause_pipeline_task_name, :default => :unpause_pipeline
21
+
22
+ def process_arguments(args)
23
+ self.name = args[0] if args[0]
24
+ end
25
+
26
+ def define
27
+ GetPipeline.new(get_pipeline_task_name) do |t|
28
+ t.target = target
29
+ t.pipeline = pipeline
30
+ end
31
+ SetPipeline.new(set_pipeline_task_name) do |t|
32
+ t.target = target
33
+ t.pipeline = pipeline
34
+ t.config = config
35
+ t.vars = vars
36
+ t.var_files = var_files
37
+ t.non_interactive = non_interactive
38
+ end
39
+ UnpausePipeline.new(unpause_pipeline_task_name) do |t|
40
+ t.target = target
41
+ t.pipeline = pipeline
42
+ end
43
+
44
+ desc "Push pipeline #{pipeline} to target #{target}"
45
+ task name => [
46
+ scoped_task_name(set_pipeline_task_name),
47
+ scoped_task_name(get_pipeline_task_name),
48
+ scoped_task_name(unpause_pipeline_task_name)
49
+ ]
50
+ end
51
+
52
+ private
53
+
54
+ def scoped_task_name(task_name)
55
+ Rake.application.current_scope.path_with_task_name(task_name)
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,38 @@
1
+ require 'ruby_fly'
2
+ require_relative '../tasklib'
3
+
4
+ module RakeFly
5
+ module Tasks
6
+ class SetPipeline < TaskLib
7
+ parameter :name, :default => :set_pipeline
8
+
9
+ parameter :target, :required => true
10
+ parameter :pipeline, :required => true
11
+ parameter :config, :required => true
12
+
13
+ parameter :vars
14
+ parameter :var_files
15
+ parameter :non_interactive
16
+
17
+ parameter :ensure_task, :default => :'fly:ensure'
18
+
19
+ def process_arguments(args)
20
+ self.name = args[0] if args[0]
21
+ end
22
+
23
+ def define
24
+ desc "Set pipeline #{pipeline} for target #{target}"
25
+ task name => [ensure_task] do
26
+ puts "Setting pipeline #{pipeline} for target #{target}..."
27
+ RubyFly.set_pipeline(
28
+ target: target,
29
+ pipeline: pipeline,
30
+ config: config,
31
+ vars: vars,
32
+ var_files: var_files,
33
+ non_interactive: non_interactive)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -18,6 +18,7 @@ module RakeFly
18
18
  def define
19
19
  desc "Unpause pipeline #{pipeline} for target #{target}"
20
20
  task name => [ensure_task] do
21
+ puts "Unpausing pipeline #{pipeline} for target #{target}..."
21
22
  RubyFly.unpause_pipeline(
22
23
  target: target,
23
24
  pipeline: pipeline)
@@ -1,2 +1,4 @@
1
1
  require_relative 'tasks/get_pipeline'
2
+ require_relative 'tasks/set_pipeline'
2
3
  require_relative 'tasks/unpause_pipeline'
4
+ require_relative 'tasks/push_pipeline'
@@ -1,3 +1,3 @@
1
1
  module RakeFly
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_fly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-02 00:00:00.000000000 Z
11
+ date: 2017-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake_dependencies
@@ -160,6 +160,8 @@ files:
160
160
  - lib/rake_fly/tasklib.rb
161
161
  - lib/rake_fly/tasks.rb
162
162
  - lib/rake_fly/tasks/get_pipeline.rb
163
+ - lib/rake_fly/tasks/push_pipeline.rb
164
+ - lib/rake_fly/tasks/set_pipeline.rb
163
165
  - lib/rake_fly/tasks/unpause_pipeline.rb
164
166
  - lib/rake_fly/version.rb
165
167
  - rake_fly.gemspec