puppet-blacksmith 6.0.0 → 6.0.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
  SHA256:
3
- metadata.gz: c9a6f0b030d273a95e8e0c4c9aa6a2064627e81a8de340568374ababcd78b725
4
- data.tar.gz: 65aa44875428323c3863e2fa144eb8bc568018659880494446da84c486062de2
3
+ metadata.gz: 68eaa41801d5768e1205b5c3042b02c067dcc94359327fb0bed02ab8bcb1d52f
4
+ data.tar.gz: d705be7631ceaed8ec81cf6f81942bc629d8d1200ff0cf986c6e186e5f56dc17
5
5
  SHA512:
6
- metadata.gz: 78d1b672f742c6ea6512c80f48fea18565fdce5cb261faa5290544327ef5edea57b24072ac845203f21096fa1fb8ed04f2579a0f5c3775083a47f7a611d83517
7
- data.tar.gz: 210e663c53a3bded6079c4056b17c9ce470284444b0ef22ae1e0912ae40bbfdd70a7455a5fb6d9f7d7fdcc22a08e04d52dc00d047cab292448934513edd4d878
6
+ metadata.gz: 189b01578212e80231f83705d18757bbb600d08765545b43011fb1057b055fc5142cfed5733469eb4f449c14f42a3a2fa1e1c5978a2d8184d4e63215a0f1c2e9
7
+ data.tar.gz: 5121db4aa26fcef8c6b70c60b44eaadd7a85a985bcaa7e67b55a129694346def44743150866d7287528d002164ba9b9c02b4c0922e1c04e3a8a847d7d889a9e4
@@ -21,8 +21,11 @@ module Blacksmith
21
21
  def name
22
22
  metadata['name'].split('-',2)[1]
23
23
  end
24
+ def namespace
25
+ metadata['name'].split('-',2)[0]
26
+ end
24
27
  def author
25
- metadata['author'] || metadata['name'].split('-',2)[0]
28
+ metadata['author'] || namespace
26
29
  end
27
30
  def version
28
31
  metadata['version']
@@ -138,8 +138,8 @@ module Blacksmith
138
138
  task :push => :'module:build' do
139
139
  m = Blacksmith::Modulefile.new
140
140
  forge = Blacksmith::Forge.new
141
- puts "Uploading to Puppet Forge #{m.author}/#{m.name}"
142
- forge.push!(m.name, nil, m.author, m.version)
141
+ puts "Uploading to Puppet Forge #{m.namespace}/#{m.name}"
142
+ forge.push!(m.name, nil, m.namespace, m.version)
143
143
  end
144
144
 
145
145
  desc "Runs clean again"
@@ -1,3 +1,3 @@
1
1
  module Blacksmith
2
- VERSION = '6.0.0'
2
+ VERSION = '6.0.1'
3
3
  end
@@ -0,0 +1,36 @@
1
+ {
2
+ "operatingsystem_support": [
3
+ {
4
+ "operatingsystem": "CentOS",
5
+ "operatingsystemrelease": [
6
+ "4",
7
+ "5",
8
+ "6"
9
+ ]
10
+ }
11
+ ],
12
+ "requirements": [
13
+ {
14
+ "name": "pe",
15
+ "version_requirement": "3.2.x"
16
+ },
17
+ {
18
+ "name": "puppet",
19
+ "version_requirement": ">=2.7.20 <7.0.0"
20
+ }
21
+ ],
22
+ "name": "maestrodev-test",
23
+ "version": "1.0.0",
24
+ "source": "git://github.com/puppetlabs/puppetlabs-stdlib",
25
+ "author": "MaestroDev",
26
+ "license": "Apache 2.0",
27
+ "summary": "Puppet Module Standard Library",
28
+ "description": "Standard Library for Puppet Modules",
29
+ "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib",
30
+ "dependencies": [
31
+ {
32
+ "name": "puppetlabs-stdlib",
33
+ "version_requirement": ">= 3.0.0"
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "operatingsystem_support": [
3
+ {
4
+ "operatingsystem": "CentOS",
5
+ "operatingsystemrelease": [
6
+ "4",
7
+ "5",
8
+ "6"
9
+ ]
10
+ }
11
+ ],
12
+ "requirements": [
13
+ {
14
+ "name": "pe",
15
+ "version_requirement": "3.2.x"
16
+ },
17
+ {
18
+ "name": "puppet",
19
+ "version_requirement": ">=2.7.20 <7.0.0"
20
+ }
21
+ ],
22
+ "name": "maestrodev-test",
23
+ "version": "1.0.0",
24
+ "source": "git://github.com/puppetlabs/puppetlabs-stdlib",
25
+ "license": "Apache 2.0",
26
+ "summary": "Puppet Module Standard Library",
27
+ "description": "Standard Library for Puppet Modules",
28
+ "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib",
29
+ "dependencies": [
30
+ {
31
+ "name": "puppetlabs-stdlib",
32
+ "version_requirement": ">= 3.0.0"
33
+ }
34
+ ]
35
+ }
@@ -11,6 +11,32 @@ describe 'Blacksmith::Modulefile' do
11
11
  it { expect(subject.name).to eql("test") }
12
12
  end
13
13
 
14
+ context "using different author" do
15
+ let(:path) { "spec/data/metadata-different-author.json" }
16
+
17
+ subject { Blacksmith::Modulefile.new(path) }
18
+
19
+ it_behaves_like :metadata
20
+
21
+ describe "author and namespace" do
22
+ it { expect(subject.author).to eql("MaestroDev") }
23
+ it { expect(subject.namespace).to eql("maestrodev") }
24
+ end
25
+ end
26
+
27
+ context "using no author" do
28
+ let(:path) { "spec/data/metadata-no-author.json" }
29
+
30
+ subject { Blacksmith::Modulefile.new(path) }
31
+
32
+ it_behaves_like :metadata
33
+
34
+ describe "author and namespace" do
35
+ it { expect(subject.author).to eql("maestrodev") }
36
+ it { expect(subject.namespace).to eql("maestrodev") }
37
+ end
38
+ end
39
+
14
40
  context "using metadata.json" do
15
41
 
16
42
  it_behaves_like :metadata
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-blacksmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MaestroDev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-24 00:00:00.000000000 Z
12
+ date: 2020-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: puppet-modulebuilder
@@ -155,6 +155,8 @@ files:
155
155
  - lib/puppet_blacksmith/version.rb
156
156
  - lib/puppet_blacksmith/version_helper.rb
157
157
  - spec/data/maestrodev-test/metadata.json
158
+ - spec/data/metadata-different-author.json
159
+ - spec/data/metadata-no-author.json
158
160
  - spec/data/metadata.json
159
161
  - spec/data/response.json
160
162
  - spec/puppet_blacksmith/forge_live_spec.rb
@@ -181,8 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
183
  - !ruby/object:Gem::Version
182
184
  version: '0'
183
185
  requirements: []
184
- rubyforge_project:
185
- rubygems_version: 2.7.7
186
+ rubygems_version: 3.0.8
186
187
  signing_key:
187
188
  specification_version: 4
188
189
  summary: Tasks to manage Puppet module builds
@@ -193,6 +194,8 @@ test_files:
193
194
  - spec/puppet_blacksmith/modulefile_spec.rb
194
195
  - spec/puppet_blacksmith/forge_spec.rb
195
196
  - spec/spec_helper.rb
197
+ - spec/data/metadata-different-author.json
198
+ - spec/data/metadata-no-author.json
196
199
  - spec/data/maestrodev-test/metadata.json
197
200
  - spec/data/response.json
198
201
  - spec/data/metadata.json