rake_circle_ci 0.8.0.pre.3 → 0.8.0.pre.4

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
  SHA256:
3
- metadata.gz: d1595ba13c3817f5913099d8a144da9e4353ca4eb822d3de130c44580be21c41
4
- data.tar.gz: 41d4eafae97184eb8ba25ba0a64974e5461b69ee1277e5db900f3935d388a2bb
3
+ metadata.gz: f8affc56e7f8be50388ed385c6f1f121d48281c55a10b766dee6ed003120e0b9
4
+ data.tar.gz: 1a64e5ab9b771cb417205fbebc64224fcb5010ba5d851a60ade006fd24d6c0a5
5
5
  SHA512:
6
- metadata.gz: 4d3c27ddbe3896dd379cfe06d514bdc4cbab4123513e3ca45f4490eca4979cd92a371dbcca6b0fda7f47629b538352e03c273810a95aad18de96ffc2c2aaa419
7
- data.tar.gz: 23aa7b246d16daebb9578c6cf11cace268c1a57acf71f7b0bacd4541c282a33d96a49ead98fe60ad2167aad06010f7d7e28f53acb544d4f5811b593968664da8
6
+ metadata.gz: 8adb6da201bb6eccc8ecf2f5dcd9440a9c4ee97074ecbcc769b8746ef7a700f3429b4ae15005bdf3796cf86ff0be05c8d3c5a4cbbb0efd71d5e41527f3a192f6
7
+ data.tar.gz: 44e811ddb90462a11b02123a0504d362194a3533c2342c664b696facde075ae56fda9628998626a51126fdf2560128f362ee525566cdacbc8cd663cbaf6f4a11
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_circle_ci (0.8.0.pre.3)
4
+ rake_circle_ci (0.8.0.pre.4)
5
5
  colored2 (~> 3.1)
6
6
  excon (~> 0.72)
7
7
  rake_factory (~> 0.23)
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (5.2.4.3)
13
+ activesupport (5.2.4.4)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
15
  i18n (>= 0.7, < 2)
16
16
  minitest (~> 5.1)
@@ -18,29 +18,32 @@ GEM
18
18
  addressable (2.7.0)
19
19
  public_suffix (>= 2.0.2, < 5.0)
20
20
  colored2 (3.1.2)
21
- concurrent-ruby (1.1.6)
22
- diff-lcs (1.3)
23
- docile (1.3.2)
24
- excon (0.73.0)
25
- faraday (1.0.1)
21
+ concurrent-ruby (1.1.7)
22
+ diff-lcs (1.4.4)
23
+ docile (1.3.4)
24
+ excon (0.78.1)
25
+ faraday (1.3.0)
26
+ faraday-net_http (~> 1.0)
26
27
  multipart-post (>= 1.2, < 3)
27
- gem-release (2.1.1)
28
+ ruby2_keywords
29
+ faraday-net_http (1.0.0)
30
+ gem-release (2.2.0)
28
31
  hamster (3.0.0)
29
32
  concurrent-ruby (~> 1.0)
30
- i18n (1.8.2)
33
+ i18n (1.8.6)
31
34
  concurrent-ruby (~> 1.0)
32
35
  lino (1.5.0)
33
36
  hamster (~> 3.0)
34
37
  open4 (~> 1.3)
35
38
  memfs (1.0.0)
36
- minitest (5.14.1)
39
+ minitest (5.14.2)
37
40
  multipart-post (2.1.1)
38
- octokit (4.18.0)
41
+ octokit (4.20.0)
39
42
  faraday (>= 0.9)
40
43
  sawyer (~> 0.8.0, >= 0.5.3)
41
44
  open4 (1.3.4)
42
- public_suffix (4.0.5)
43
- rake (13.0.1)
45
+ public_suffix (4.0.6)
46
+ rake (13.0.3)
44
47
  rake_factory (0.27.0)
45
48
  activesupport (>= 4)
46
49
  rake (~> 13.0)
@@ -56,31 +59,34 @@ GEM
56
59
  colored2 (~> 3.1)
57
60
  rake_factory (~> 0.23)
58
61
  sshkey (~> 2.0)
59
- rspec (3.9.0)
60
- rspec-core (~> 3.9.0)
61
- rspec-expectations (~> 3.9.0)
62
- rspec-mocks (~> 3.9.0)
63
- rspec-core (3.9.2)
64
- rspec-support (~> 3.9.3)
65
- rspec-expectations (3.9.2)
62
+ rspec (3.10.0)
63
+ rspec-core (~> 3.10.0)
64
+ rspec-expectations (~> 3.10.0)
65
+ rspec-mocks (~> 3.10.0)
66
+ rspec-core (3.10.1)
67
+ rspec-support (~> 3.10.0)
68
+ rspec-expectations (3.10.1)
66
69
  diff-lcs (>= 1.2.0, < 2.0)
67
- rspec-support (~> 3.9.0)
68
- rspec-mocks (3.9.1)
70
+ rspec-support (~> 3.10.0)
71
+ rspec-mocks (3.10.1)
69
72
  diff-lcs (>= 1.2.0, < 2.0)
70
- rspec-support (~> 3.9.0)
71
- rspec-support (3.9.3)
73
+ rspec-support (~> 3.10.0)
74
+ rspec-support (3.10.1)
75
+ ruby2_keywords (0.0.2)
72
76
  ruby_gpg2 (0.6.0)
73
77
  lino (>= 1.5)
74
78
  sawyer (0.8.2)
75
79
  addressable (>= 2.3.5)
76
80
  faraday (> 0.8, < 2.0)
77
- simplecov (0.18.5)
81
+ simplecov (0.20.0)
78
82
  docile (~> 1.1)
79
83
  simplecov-html (~> 0.11)
80
- simplecov-html (0.12.2)
84
+ simplecov_json_formatter (~> 0.1)
85
+ simplecov-html (0.12.3)
86
+ simplecov_json_formatter (0.1.2)
81
87
  sshkey (2.0.0)
82
88
  thread_safe (0.3.6)
83
- tzinfo (1.2.7)
89
+ tzinfo (1.2.9)
84
90
  thread_safe (~> 0.1)
85
91
 
86
92
  PLATFORMS
@@ -93,9 +99,9 @@ DEPENDENCIES
93
99
  memfs (~> 1.0)
94
100
  rake (~> 13.0)
95
101
  rake_circle_ci!
96
- rake_github (~> 0.3)
102
+ rake_github (~> 0.5)
97
103
  rake_gpg (~> 0.12)
98
- rake_ssh (~> 0.2)
104
+ rake_ssh (~> 0.4)
99
105
  rspec (~> 3.9)
100
106
  simplecov (~> 0.16)
101
107
 
data/Rakefile CHANGED
@@ -50,6 +50,7 @@ RakeCircleCI.define_project_tasks(
50
50
  File.read('config/secrets/ci/encryption.passphrase')
51
51
  .chomp
52
52
  }
53
+ t.checkout_keys = []
53
54
  t.ssh_keys = [
54
55
  {
55
56
  hostname: "github.com",
@@ -78,6 +79,7 @@ namespace :pipeline do
78
79
  task :prepare => [
79
80
  :'circle_ci:project:follow',
80
81
  :'circle_ci:env_vars:ensure',
82
+ :'circle_ci:checkout_keys:ensure',
81
83
  :'circle_ci:ssh_keys:ensure',
82
84
  :'github:deploy_keys:ensure'
83
85
  ]
@@ -1,4 +1,5 @@
1
1
  require_relative 'task_sets/environment_variables'
2
+ require_relative 'task_sets/checkout_keys'
2
3
  require_relative 'task_sets/ssh_keys'
3
4
  require_relative 'task_sets/project'
4
5
 
@@ -0,0 +1,33 @@
1
+ require 'rake_factory'
2
+
3
+ require_relative '../tasks'
4
+
5
+ module RakeCircleCI
6
+ module TaskSets
7
+ class CheckoutKeys < RakeFactory::TaskSet
8
+ prepend RakeFactory::Namespaceable
9
+
10
+ parameter :project_slug, required: true
11
+ parameter :api_token, required: true
12
+ parameter :base_url, default: 'https://circleci.com/api'
13
+ parameter :checkout_keys, default: []
14
+
15
+ parameter :destroy_task_name, default: :destroy
16
+ parameter :provision_task_name, default: :provision
17
+ parameter :ensure_task_name, default: :ensure
18
+
19
+ task Tasks::CheckoutKeys::Provision,
20
+ name: RakeFactory::DynamicValue.new { |ts|
21
+ ts.provision_task_name
22
+ }
23
+ task Tasks::CheckoutKeys::Destroy,
24
+ name: RakeFactory::DynamicValue.new { |ts|
25
+ ts.destroy_task_name
26
+ }
27
+ task Tasks::CheckoutKeys::Ensure,
28
+ name: RakeFactory::DynamicValue.new { |ts|
29
+ ts.ensure_task_name
30
+ }
31
+ end
32
+ end
33
+ end
@@ -12,6 +12,7 @@ module RakeCircleCI
12
12
  parameter :base_url, default: 'https://circleci.com/api'
13
13
  parameter :environment_variables, default: {}
14
14
  parameter :ssh_keys, default: {}
15
+ parameter :checkout_keys, default: []
15
16
 
16
17
  parameter :env_vars_namespace, default: :env_vars
17
18
  parameter :env_vars_destroy_task_name, default: :destroy
@@ -23,6 +24,11 @@ module RakeCircleCI
23
24
  parameter :ssh_keys_provision_task_name, default: :provision
24
25
  parameter :ssh_keys_ensure_task_name, default: :ensure
25
26
 
27
+ parameter :checkout_keys_namespace, default: :checkout_keys
28
+ parameter :checkout_keys_destroy_task_name, default: :destroy
29
+ parameter :checkout_keys_provision_task_name, default: :provision
30
+ parameter :checkout_keys_ensure_task_name, default: :ensure
31
+
26
32
  parameter :project_namespace, default: :project
27
33
  parameter :project_follow_task_name, default: :follow
28
34
 
@@ -62,6 +68,24 @@ module RakeCircleCI
62
68
  provision_task_name: RakeFactory::DynamicValue.new { |ts|
63
69
  ts.ssh_keys_provision_task_name
64
70
  }
71
+ task Tasks::CheckoutKeys::Provision,
72
+ name: RakeFactory::DynamicValue.new { |ts|
73
+ ts.checkout_keys_provision_task_name
74
+ }
75
+ task Tasks::CheckoutKeys::Destroy,
76
+ name: RakeFactory::DynamicValue.new { |ts|
77
+ ts.checkout_keys_destroy_task_name
78
+ }
79
+ task Tasks::CheckoutKeys::Ensure,
80
+ name: RakeFactory::DynamicValue.new { |ts|
81
+ ts.checkout_keys_ensure_task_name
82
+ },
83
+ destroy_task_name: RakeFactory::DynamicValue.new { |ts|
84
+ ts.checkout_keys_destroy_task_name
85
+ },
86
+ provision_task_name: RakeFactory::DynamicValue.new { |ts|
87
+ ts.checkout_keys_provision_task_name
88
+ }
65
89
  task Tasks::Projects::Follow,
66
90
  name: RakeFactory::DynamicValue.new { |ts|
67
91
  ts.project_follow_task_name
@@ -75,6 +99,8 @@ module RakeCircleCI
75
99
  env_vars_namespace
76
100
  when /SSHKeys/
77
101
  ssh_keys_namespace
102
+ when /CheckoutKeys/
103
+ checkout_keys_namespace
78
104
  else
79
105
  project_namespace
80
106
  end
@@ -1,5 +1,6 @@
1
1
  require_relative 'checkout_keys/provision'
2
2
  require_relative 'checkout_keys/destroy'
3
+ require_relative 'checkout_keys/ensure'
3
4
 
4
5
  module RakeCircleCI
5
6
  module Tasks
@@ -0,0 +1,25 @@
1
+ require 'rake_factory'
2
+
3
+ module RakeCircleCI
4
+ module Tasks
5
+ module CheckoutKeys
6
+ class Ensure < RakeFactory::Task
7
+ default_name :ensure
8
+ default_description RakeFactory::DynamicValue.new { |t|
9
+ 'Ensure checkout keys are configured on the ' +
10
+ "#{t.project_slug} project"
11
+ }
12
+
13
+ parameter :project_slug, required: true
14
+
15
+ parameter :provision_task_name, default: :provision
16
+ parameter :destroy_task_name, default: :destroy
17
+
18
+ action do |t, args|
19
+ t.application[t.destroy_task_name, t.scope].invoke(*args)
20
+ t.application[t.provision_task_name, t.scope].invoke(*args)
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module RakeCircleCI
2
- VERSION = '0.8.0.pre.3'
2
+ VERSION = '0.8.0.pre.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_circle_ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.pre.3
4
+ version: 0.8.0.pre.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
@@ -94,48 +94,34 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '13.0'
97
- - !ruby/object:Gem::Dependency
98
- name: rake_circle_ci
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '0.3'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '0.3'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: rake_github
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
101
  - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: '0.3'
103
+ version: '0.5'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
108
  - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: '0.3'
110
+ version: '0.5'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: rake_ssh
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: '0.2'
117
+ version: '0.4'
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: '0.2'
124
+ version: '0.4'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: rake_gpg
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -238,12 +224,14 @@ files:
238
224
  - lib/rake_circle_ci.rb
239
225
  - lib/rake_circle_ci/client.rb
240
226
  - lib/rake_circle_ci/task_sets.rb
227
+ - lib/rake_circle_ci/task_sets/checkout_keys.rb
241
228
  - lib/rake_circle_ci/task_sets/environment_variables.rb
242
229
  - lib/rake_circle_ci/task_sets/project.rb
243
230
  - lib/rake_circle_ci/task_sets/ssh_keys.rb
244
231
  - lib/rake_circle_ci/tasks.rb
245
232
  - lib/rake_circle_ci/tasks/checkout_keys.rb
246
233
  - lib/rake_circle_ci/tasks/checkout_keys/destroy.rb
234
+ - lib/rake_circle_ci/tasks/checkout_keys/ensure.rb
247
235
  - lib/rake_circle_ci/tasks/checkout_keys/provision.rb
248
236
  - lib/rake_circle_ci/tasks/environment_variables.rb
249
237
  - lib/rake_circle_ci/tasks/environment_variables/destroy.rb