concourse-resource-rubygems 0.3.4 → 0.4.5

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
- SHA1:
3
- metadata.gz: 87f6de3769882fc4ef54b53bc6d1ad7a2ccdad4a
4
- data.tar.gz: 5a8b40b22a6eaa36f75e1eb87bebe405ad2d7fac
2
+ SHA256:
3
+ metadata.gz: d96591d59851e1b914175222af77ab7e4d71f9671750081f7815f5d9d3e5d657
4
+ data.tar.gz: 9abb91dfe12e100f2f731f5cbf2ad3c91c30a5d77f1a5fde94c9f7268ce3e7f3
5
5
  SHA512:
6
- metadata.gz: 40766b5af6a149573c2af8a1d2349dab76dd01f29ab320be674f82a1f7e7f973aa523ccee44c137ebacb18a3bad9db87e2219de96c9e08d8bf2023e23d2374be
7
- data.tar.gz: 3c7a0f98b1f05aaab5691a6d1d4ca3e760218c2f756b0eb34ba82ec70cfbf817311472bd6cc06421c7fb432ca9b98231fe8272e2abdca25344a76b4c2fcdbaf2
6
+ metadata.gz: 791cc16be72c8421d04ceb3ce0dfe9ca0368e4f5eca2eea94e5c1d7c95a51d938cc5b89aec1f2fed35c9fa37f260c22f9c4919db1ab08f9435c3ba1be1fc6f63
7
+ data.tar.gz: 25bbdc059daa4ee895942c9a4873fea02eb4790209dbea8632c663b56a89bd12267c3c63a9fe5e0e375d26e37b61c010992dea9c297ad546093a94b312808c35
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
Binary file
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 0
3
- :minor: 3
4
- :patch: 4
3
+ :minor: 4
4
+ :patch: 0
5
5
  :special: ''
6
6
  :metadata: ''
data/LICENSE.txt CHANGED
@@ -1,13 +1,22 @@
1
- Copyright 2016 Chris Olstrom <chris@olstrom.com>
2
1
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
2
+ The MIT License (MIT)
3
+ Copyright © 2016-2018 Chris Olstrom <chris@olstrom.com>
4
+ Copyright © 2016-2018 SUSE LLC
6
5
 
7
- http://www.apache.org/licenses/LICENSE-2.0
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the “Software”), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
8
12
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
data/README.org CHANGED
@@ -20,12 +20,13 @@ Add the resource to your pipeline's ~resource_types~ (requires Concourse 0.74.0+
20
20
 
21
21
  * Source Configuration
22
22
 
23
- |------+----------+--------------+---------------------|
24
- | Name | Required | Default | Description |
25
- |------+----------+--------------+---------------------|
26
- | gem | Yes | | The name of the gem |
27
- | host | No | rubygems.org | The RubyGems host |
28
- |------+----------+--------------+---------------------|
23
+ |---------+----------+--------------+----------------------|
24
+ | Name | Required | Default | Description |
25
+ |---------+----------+--------------+----------------------|
26
+ | gem | Yes | | The name of the gem |
27
+ | host | No | rubygems.org | The RubyGems host |
28
+ | api_key | Yes | | Key for RubyGems API |
29
+ |---------+----------+--------------+----------------------|
29
30
 
30
31
  * Behaviour
31
32
 
@@ -35,19 +36,29 @@ Add the resource to your pipeline's ~resource_types~ (requires Concourse 0.74.0+
35
36
 
36
37
  - None
37
38
 
38
- ** ~out~ Not Implemented
39
-
40
39
  ** ~in~ Fetch a gem
41
40
 
42
- Fetches a gem and places it in ~#workdir~
41
+ Fetch a gem.
43
42
 
44
43
  *** Parameters
45
44
 
46
45
  - None
47
46
 
47
+ ** ~out~ Publish a gem
48
+
49
+ *** Parameters
50
+
51
+ |------+----------+------------------+--------------------------------------|
52
+ | Name | Required | Default | Description |
53
+ |------+----------+------------------+--------------------------------------|
54
+ | glob | no | pkg/#{gem}-*.gem | Globbing pattern for files to upload |
55
+ |------+----------+------------------+--------------------------------------|
56
+
48
57
  * License
49
58
 
50
- Apache 2.0 License, see ~LICENSE.txt~ for details.
59
+
60
+ ~concourse-resource-rubygems~ is available under the [[https://tldrlegal.com/license/mit-license][MIT License]]. See
61
+ ~LICENSE.txt~ for the full text.
51
62
 
52
63
  * Contributors
53
64
 
@@ -1,23 +1,25 @@
1
- require_relative 'lib/concourse-resource/rubygems/version'
2
-
3
1
  Gem::Specification.new do |gem|
2
+ tag = `git describe --tags --abbrev=0`.chomp
3
+
4
4
  gem.name = 'concourse-resource-rubygems'
5
- gem.version = ConcourseResource::RubyGems::VERSION
6
- gem.license = 'Apache-2.0'
5
+ gem.homepage = 'https://github.com/colstrom/concourse-resource-rubygems'
7
6
  gem.summary = 'Concourse Resource for RubyGems'
8
7
 
9
- gem.author = 'Chris Olstrom'
8
+ gem.version = "#{tag}"
9
+ gem.licenses = ['MIT']
10
+ gem.authors = ['Chris Olstrom']
10
11
  gem.email = 'chris@olstrom.com'
11
- gem.homepage = 'https://github.com/colstrom/concourse-resource-rubygems'
12
12
 
13
- gem.files = `git ls-files`.split("\n")
14
- gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
15
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
- gem.require_paths = ['lib']
13
+ gem.cert_chain = ['trust/certificates/colstrom.pem']
14
+ gem.signing_key = File.expand_path ENV.fetch 'GEM_SIGNING_KEY'
15
+
16
+ gem.files = `git ls-files -z`.split("\x0")
17
+ gem.executables = `git ls-files -z -- bin/*`.split("\x0").map { |f| File.basename(f) }
18
+ gem.test_files = `git ls-files -z -- {test,spec,features}/*`.split("\x0")
17
19
 
18
- gem.add_runtime_dependency 'concourse-fuselage', '~> 0.3', '>= 0.3.0'
19
- gem.add_runtime_dependency 'gems', '~> 0.8', '>= 0.8.3'
20
- gem.add_runtime_dependency 'httparty', '~> 0.13', '>= 0.13.7'
20
+ gem.require_paths = ['lib']
21
21
 
22
- gem.add_development_dependency 'semver2', '~> 3.4', '>= 3.4.2'
22
+ gem.add_runtime_dependency 'concourse-fuselage', '~> 0.3', '>= 0.3.0'
23
+ gem.add_runtime_dependency 'gems', '~> 0.8', '>= 0.8.3'
24
+ gem.add_runtime_dependency 'httparty', '~> 0.13', '>= 0.13.7'
23
25
  end
@@ -1,4 +1,5 @@
1
1
  require_relative 'rubygems/check'
2
2
  require_relative 'rubygems/gem_not_found'
3
3
  require_relative 'rubygems/in'
4
+ require_relative 'rubygems/out'
4
5
  require_relative 'rubygems/version'
@@ -0,0 +1,9 @@
1
+ require_relative 'error'
2
+
3
+ module ConcourseResource
4
+ module RubyGems
5
+ # Exception for ambiguous globbing
6
+ class AmbiguousGlob < Error
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  require 'contracts'
2
- require 'support/source'
2
+ require_relative 'support/source'
3
3
 
4
4
  module ConcourseResource
5
5
  module RubyGems
@@ -0,0 +1,6 @@
1
+ module ConcourseResource
2
+ module RubyGems
3
+ class Error < StandardError
4
+ end
5
+ end
6
+ end
@@ -1,7 +1,9 @@
1
+ require_relative 'error'
2
+
1
3
  module ConcourseResource
2
4
  module RubyGems
3
5
  # Exception for when a Gem is not found
4
- class GemNotFound < StandardError
6
+ class GemNotFound < Error
5
7
  end
6
8
  end
7
9
  end
@@ -0,0 +1,42 @@
1
+ require 'concourse-fuselage'
2
+ require 'contracts'
3
+ require 'gems'
4
+ require_relative 'ambiguous_glob'
5
+ require_relative 'core'
6
+ require_relative 'support/source'
7
+
8
+ module ConcourseResource
9
+ module RubyGems
10
+ class Out < Fuselage::Out
11
+ include Core
12
+ include Support::Source
13
+
14
+ Contract None => String
15
+ def glob
16
+ @glob ||= params.fetch('glob') { "pkg/#{gem}-*.gem" }
17
+ end
18
+
19
+ Contract None => ArrayOf[String]
20
+ def files
21
+ @files ||= Dir.glob(glob).tap do |matches|
22
+ raise AmbiguousGlob, matches if matches.size > 1
23
+ end
24
+ rescue AmbiguousGlob => error
25
+ STDERR.puts "Glob #{glob} matches too many files", error.message
26
+ abort
27
+ end
28
+
29
+ Contract None => Any
30
+ def configure!
31
+ Gems.configure do |api|
32
+ api.key = api_key
33
+ end
34
+ end
35
+
36
+ def update!
37
+ configure!
38
+ files.each { |file| Gems.push file }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -20,6 +20,14 @@ module ConcourseResource
20
20
  def host
21
21
  @host ||= source.fetch('host') { 'rubygems.org' }
22
22
  end
23
+
24
+ Contract None => String
25
+ def api_key
26
+ @api_key ||= source.fetch 'api_key'
27
+ rescue KeyError
28
+ STDERR.puts 'Source is missing api_key'
29
+ abort
30
+ end
23
31
  end
24
32
  end
25
33
  end
@@ -1,5 +1,10 @@
1
1
  module ConcourseResource
2
2
  module RubyGems
3
- VERSION = '0.3.4'.freeze
3
+ VERSION = $LOADED_FEATURES
4
+ .map { |f| f.match %r{/concourse-resource-rubygems-(?<version>[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(\.pre)?)} }
5
+ .compact
6
+ .map { |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OCAYEALritM5RkGNZ7cs8hlljSEyuwJrbJYOSX
17
+ 6p1S0D83GlfGZ/5XABy1p4EGQjxiAYuDrnnIw6GLHpgxFEtUNvyNYVfAa6u6yz4Y
18
+ nEjbEF76zAAxoRfivDApGJ3G9wuZ14cHZswFJppf2N4RG14F8bfLtU1OMYDLw8eK
19
+ QJOpynqHtrSj+FfsyNb6d93K8rlNCEd4UHkdRH1m7VnG6M18HvkbQCRMJtOFg/3j
20
+ c66TgdClDMJJXXiktVinfsmpTwxe2IzjGvwo2CZ/S53WPU/jb4uQMUzY0tMw48rl
21
+ S07/1DQNogstTnLYueqkUS1PYEwtavKVnpAtnaOdf0rJ/Rk4hA36BRgAVyQrp0uu
22
+ mSbo3NCvepJNYsTOUM+Df421VuPq713JV0aJDqltyfPptTM7fmNMcukbRh0aRuMT
23
+ EIKh6yDoB+oCRuiTV0uw/lKE2PtbONhJb7uN1qhZqla/iBpmUjiEu8+skI+ygv9n
24
+ 7Krw8FJrV3+VRCiZTPKHeshAfL9yeIZh
25
+ -----END CERTIFICATE-----
metadata CHANGED
@@ -1,14 +1,40 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concourse-resource-rubygems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Olstrom
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2016-03-14 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIENDCCApygAwIBAgIBATANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdjaHJp
14
+ cy9EQz1vbHN0cm9tL0RDPWNvbTAeFw0xODAzMTUxODMxMTdaFw0xOTAzMTUxODMx
15
+ MTdaMCIxIDAeBgNVBAMMF2NocmlzL0RDPW9sc3Ryb20vREM9Y29tMIIBojANBgkq
16
+ hkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA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DQNogstTnLYueqkUS1PYEwtavKVnpAtnaOdf0rJ/Rk4hA36BRgAVyQrp0uu
33
+ mSbo3NCvepJNYsTOUM+Df421VuPq713JV0aJDqltyfPptTM7fmNMcukbRh0aRuMT
34
+ EIKh6yDoB+oCRuiTV0uw/lKE2PtbONhJb7uN1qhZqla/iBpmUjiEu8+skI+ygv9n
35
+ 7Krw8FJrV3+VRCiZTPKHeshAfL9yeIZh
36
+ -----END CERTIFICATE-----
37
+ date: 2018-03-15 00:00:00.000000000 Z
12
38
  dependencies:
13
39
  - !ruby/object:Gem::Dependency
14
40
  name: concourse-fuselage
@@ -70,26 +96,6 @@ dependencies:
70
96
  - - ">="
71
97
  - !ruby/object:Gem::Version
72
98
  version: 0.13.7
73
- - !ruby/object:Gem::Dependency
74
- name: semver2
75
- requirement: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - "~>"
78
- - !ruby/object:Gem::Version
79
- version: '3.4'
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: 3.4.2
83
- type: :development
84
- prerelease: false
85
- version_requirements: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '3.4'
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: 3.4.2
93
99
  description:
94
100
  email: chris@olstrom.com
95
101
  executables:
@@ -109,15 +115,19 @@ files:
109
115
  - bin/out
110
116
  - concourse-resource-rubygems.gemspec
111
117
  - lib/concourse-resource/rubygems.rb
118
+ - lib/concourse-resource/rubygems/ambiguous_glob.rb
112
119
  - lib/concourse-resource/rubygems/check.rb
113
120
  - lib/concourse-resource/rubygems/core.rb
121
+ - lib/concourse-resource/rubygems/error.rb
114
122
  - lib/concourse-resource/rubygems/gem_not_found.rb
115
123
  - lib/concourse-resource/rubygems/in.rb
124
+ - lib/concourse-resource/rubygems/out.rb
116
125
  - lib/concourse-resource/rubygems/support/source.rb
117
126
  - lib/concourse-resource/rubygems/version.rb
127
+ - trust/certificates/colstrom.pem
118
128
  homepage: https://github.com/colstrom/concourse-resource-rubygems
119
129
  licenses:
120
- - Apache-2.0
130
+ - MIT
121
131
  metadata: {}
122
132
  post_install_message:
123
133
  rdoc_options: []
@@ -135,9 +145,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
145
  version: '0'
136
146
  requirements: []
137
147
  rubyforge_project:
138
- rubygems_version: 2.5.1
148
+ rubygems_version: 2.7.6
139
149
  signing_key:
140
150
  specification_version: 4
141
151
  summary: Concourse Resource for RubyGems
142
152
  test_files: []
143
- has_rdoc:
metadata.gz.sig ADDED
Binary file