puppet-blacksmith 6.0.0 → 6.0.1
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 +4 -4
- data/lib/puppet_blacksmith/modulefile.rb +4 -1
- data/lib/puppet_blacksmith/rake_tasks.rb +2 -2
- data/lib/puppet_blacksmith/version.rb +1 -1
- data/spec/data/metadata-different-author.json +36 -0
- data/spec/data/metadata-no-author.json +35 -0
- data/spec/puppet_blacksmith/modulefile_spec.rb +26 -0
- metadata +7 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 68eaa41801d5768e1205b5c3042b02c067dcc94359327fb0bed02ab8bcb1d52f
         | 
| 4 | 
            +
              data.tar.gz: d705be7631ceaed8ec81cf6f81942bc629d8d1200ff0cf986c6e186e5f56dc17
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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'] ||  | 
| 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. | 
| 142 | 
            -
                      forge.push!(m.name, nil, m. | 
| 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"
         | 
| @@ -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. | 
| 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- | 
| 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 | 
            -
             | 
| 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
         |