configspec 0.0.7 → 0.0.8
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.
- data/configspec.gemspec +1 -1
- data/lib/configspec.rb +0 -6
- data/lib/configspec/version.rb +1 -1
- data/spec/redhat/package_spec.rb +1 -1
- data/spec/spec_helper.rb +8 -6
- metadata +108 -86
- checksums.yaml +0 -7
- data/lib/configspec/commands/base.rb +0 -24
- data/lib/configspec/commands/linux.rb +0 -8
- data/lib/configspec/commands/redhat.rb +0 -9
    
        data/configspec.gemspec
    CHANGED
    
    | @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| | |
| 20 20 |  | 
| 21 21 | 
             
              spec.add_runtime_dependency "net-ssh"
         | 
| 22 22 | 
             
              spec.add_runtime_dependency "rspec", ">= 2.13.0"
         | 
| 23 | 
            -
              spec.add_runtime_dependency "specinfra", ">= 0.0. | 
| 23 | 
            +
              spec.add_runtime_dependency "specinfra", ">= 0.0.6"
         | 
| 24 24 | 
             
              spec.add_development_dependency "bundler", "~> 1.3"
         | 
| 25 25 | 
             
              spec.add_development_dependency "rake"
         | 
| 26 26 | 
             
            end
         | 
    
        data/lib/configspec.rb
    CHANGED
    
    | @@ -5,9 +5,3 @@ require "configspec/version" | |
| 5 5 | 
             
            require "configspec/setup"
         | 
| 6 6 | 
             
            require "configspec/helper"
         | 
| 7 7 | 
             
            require "configspec/backend"
         | 
| 8 | 
            -
             | 
| 9 | 
            -
            require "configspec/commands/base"
         | 
| 10 | 
            -
            require "configspec/commands/linux"
         | 
| 11 | 
            -
            require "configspec/commands/redhat"
         | 
| 12 | 
            -
             | 
| 13 | 
            -
            SPEC_TYPE = 'Configspec'
         | 
    
        data/lib/configspec/version.rb
    CHANGED
    
    
    
        data/spec/redhat/package_spec.rb
    CHANGED
    
    
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -2,14 +2,14 @@ require 'configspec' | |
| 2 2 | 
             
            require 'pathname'
         | 
| 3 3 | 
             
            require 'rspec/mocks/standalone'
         | 
| 4 4 |  | 
| 5 | 
            -
            include  | 
| 5 | 
            +
            include SpecInfra::Helper::Exec
         | 
| 6 6 |  | 
| 7 7 | 
             
            PROJECT_ROOT = (Pathname.new(File.dirname(__FILE__)) + '..').expand_path
         | 
| 8 8 |  | 
| 9 9 | 
             
            Dir[PROJECT_ROOT.join("spec/support/**/*.rb")].each { |file| require(file) }
         | 
| 10 10 |  | 
| 11 11 |  | 
| 12 | 
            -
            module  | 
| 12 | 
            +
            module SpecInfra
         | 
| 13 13 | 
             
              module Backend
         | 
| 14 14 | 
             
                module TestCommandRunner
         | 
| 15 15 | 
             
                  def do_run cmd
         | 
| @@ -19,15 +19,15 @@ module Configspec | |
| 19 19 |  | 
| 20 20 | 
             
                    if cmd =~ /invalid/
         | 
| 21 21 | 
             
                      {
         | 
| 22 | 
            -
                        :stdout      => :: | 
| 23 | 
            -
                        :stderr      => :: | 
| 22 | 
            +
                        :stdout      => ::SpecInfra.configuration.stdout,
         | 
| 23 | 
            +
                        :stderr      => ::SpecInfra.configuration.stderr,
         | 
| 24 24 | 
             
                        :exit_status => 1,
         | 
| 25 25 | 
             
                        :exit_signal => nil
         | 
| 26 26 | 
             
                      }
         | 
| 27 27 | 
             
                    else
         | 
| 28 28 | 
             
                      {
         | 
| 29 | 
            -
                        :stdout      => :: | 
| 30 | 
            -
                        :stderr      => :: | 
| 29 | 
            +
                        :stdout      => ::SpecInfra.configuration.stdout,
         | 
| 30 | 
            +
                        :stderr      => ::SpecInfra.configuration.stderr,
         | 
| 31 31 | 
             
                        :exit_status => 0,
         | 
| 32 32 | 
             
                        :exit_signal => nil
         | 
| 33 33 | 
             
                      }
         | 
| @@ -45,7 +45,9 @@ module Configspec | |
| 45 45 | 
             
                  end
         | 
| 46 46 | 
             
                end
         | 
| 47 47 | 
             
              end
         | 
| 48 | 
            +
            end
         | 
| 48 49 |  | 
| 50 | 
            +
            module Configspec
         | 
| 49 51 | 
             
              module Type
         | 
| 50 52 | 
             
                class Base
         | 
| 51 53 | 
             
                  def set_command(command)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,93 +1,108 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification
         | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: configspec
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
               | 
| 3 | 
            +
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              hash: 15
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 0
         | 
| 9 | 
            +
              - 8
         | 
| 10 | 
            +
              version: 0.0.8
         | 
| 5 11 | 
             
            platform: ruby
         | 
| 6 | 
            -
            authors:
         | 
| 12 | 
            +
            authors: 
         | 
| 7 13 | 
             
            - Gosuke Miyashita
         | 
| 8 14 | 
             
            autorequire: 
         | 
| 9 15 | 
             
            bindir: bin
         | 
| 10 16 | 
             
            cert_chain: []
         | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 17 | 
            +
             | 
| 18 | 
            +
            date: 2013-12-04 00:00:00 +09:00
         | 
| 19 | 
            +
            default_executable: 
         | 
| 20 | 
            +
            dependencies: 
         | 
| 21 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 14 22 | 
             
              name: net-ssh
         | 
| 15 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            -
                requirements:
         | 
| 17 | 
            -
                - - '>='
         | 
| 18 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: '0'
         | 
| 20 | 
            -
              type: :runtime
         | 
| 21 23 | 
             
              prerelease: false
         | 
| 22 | 
            -
               | 
| 23 | 
            -
                 | 
| 24 | 
            -
                 | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
                - - '>='
         | 
| 32 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: 2.13.0
         | 
| 24 | 
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 25 | 
            +
                none: false
         | 
| 26 | 
            +
                requirements: 
         | 
| 27 | 
            +
                - - ">="
         | 
| 28 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 29 | 
            +
                    hash: 3
         | 
| 30 | 
            +
                    segments: 
         | 
| 31 | 
            +
                    - 0
         | 
| 32 | 
            +
                    version: "0"
         | 
| 34 33 | 
             
              type: :runtime
         | 
| 34 | 
            +
              version_requirements: *id001
         | 
| 35 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 36 | 
            +
              name: rspec
         | 
| 35 37 | 
             
              prerelease: false
         | 
| 36 | 
            -
               | 
| 37 | 
            -
                 | 
| 38 | 
            -
                 | 
| 39 | 
            -
             | 
| 38 | 
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 39 | 
            +
                none: false
         | 
| 40 | 
            +
                requirements: 
         | 
| 41 | 
            +
                - - ">="
         | 
| 42 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 43 | 
            +
                    hash: 59
         | 
| 44 | 
            +
                    segments: 
         | 
| 45 | 
            +
                    - 2
         | 
| 46 | 
            +
                    - 13
         | 
| 47 | 
            +
                    - 0
         | 
| 40 48 | 
             
                    version: 2.13.0
         | 
| 41 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            -
              name: specinfra
         | 
| 43 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            -
                requirements:
         | 
| 45 | 
            -
                - - '>='
         | 
| 46 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            -
                    version: 0.0.2
         | 
| 48 49 | 
             
              type: :runtime
         | 
| 50 | 
            +
              version_requirements: *id002
         | 
| 51 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 52 | 
            +
              name: specinfra
         | 
| 49 53 | 
             
              prerelease: false
         | 
| 50 | 
            -
               | 
| 51 | 
            -
                 | 
| 52 | 
            -
                 | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 54 | 
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 55 | 
            +
                none: false
         | 
| 56 | 
            +
                requirements: 
         | 
| 57 | 
            +
                - - ">="
         | 
| 58 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 59 | 
            +
                    hash: 19
         | 
| 60 | 
            +
                    segments: 
         | 
| 61 | 
            +
                    - 0
         | 
| 62 | 
            +
                    - 0
         | 
| 63 | 
            +
                    - 6
         | 
| 64 | 
            +
                    version: 0.0.6
         | 
| 65 | 
            +
              type: :runtime
         | 
| 66 | 
            +
              version_requirements: *id003
         | 
| 67 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 56 68 | 
             
              name: bundler
         | 
| 57 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 | 
            -
                requirements:
         | 
| 59 | 
            -
                - - ~>
         | 
| 60 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                    version: '1.3'
         | 
| 62 | 
            -
              type: :development
         | 
| 63 69 | 
             
              prerelease: false
         | 
| 64 | 
            -
               | 
| 65 | 
            -
                 | 
| 70 | 
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         | 
| 71 | 
            +
                none: false
         | 
| 72 | 
            +
                requirements: 
         | 
| 66 73 | 
             
                - - ~>
         | 
| 67 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            -
                     | 
| 69 | 
            -
             | 
| 70 | 
            -
             | 
| 71 | 
            -
             | 
| 72 | 
            -
             | 
| 73 | 
            -
                - - '>='
         | 
| 74 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 75 | 
            -
                    version: '0'
         | 
| 74 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 75 | 
            +
                    hash: 9
         | 
| 76 | 
            +
                    segments: 
         | 
| 77 | 
            +
                    - 1
         | 
| 78 | 
            +
                    - 3
         | 
| 79 | 
            +
                    version: "1.3"
         | 
| 76 80 | 
             
              type: :development
         | 
| 81 | 
            +
              version_requirements: *id004
         | 
| 82 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 83 | 
            +
              name: rake
         | 
| 77 84 | 
             
              prerelease: false
         | 
| 78 | 
            -
               | 
| 79 | 
            -
                 | 
| 80 | 
            -
                 | 
| 81 | 
            -
             | 
| 82 | 
            -
             | 
| 85 | 
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         | 
| 86 | 
            +
                none: false
         | 
| 87 | 
            +
                requirements: 
         | 
| 88 | 
            +
                - - ">="
         | 
| 89 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 90 | 
            +
                    hash: 3
         | 
| 91 | 
            +
                    segments: 
         | 
| 92 | 
            +
                    - 0
         | 
| 93 | 
            +
                    version: "0"
         | 
| 94 | 
            +
              type: :development
         | 
| 95 | 
            +
              version_requirements: *id005
         | 
| 83 96 | 
             
            description: A simple configuration management tool powered by RSpec
         | 
| 84 | 
            -
            email:
         | 
| 97 | 
            +
            email: 
         | 
| 85 98 | 
             
            - gosukenator@gmail.com
         | 
| 86 | 
            -
            executables:
         | 
| 99 | 
            +
            executables: 
         | 
| 87 100 | 
             
            - configspec-init
         | 
| 88 101 | 
             
            extensions: []
         | 
| 102 | 
            +
             | 
| 89 103 | 
             
            extra_rdoc_files: []
         | 
| 90 | 
            -
             | 
| 104 | 
            +
             | 
| 105 | 
            +
            files: 
         | 
| 91 106 | 
             
            - .gitignore
         | 
| 92 107 | 
             
            - Gemfile
         | 
| 93 108 | 
             
            - LICENSE.txt
         | 
| @@ -98,9 +113,6 @@ files: | |
| 98 113 | 
             
            - lib/configspec.rb
         | 
| 99 114 | 
             
            - lib/configspec/backend.rb
         | 
| 100 115 | 
             
            - lib/configspec/backend/dockerfile.rb
         | 
| 101 | 
            -
            - lib/configspec/commands/base.rb
         | 
| 102 | 
            -
            - lib/configspec/commands/linux.rb
         | 
| 103 | 
            -
            - lib/configspec/commands/redhat.rb
         | 
| 104 116 | 
             
            - lib/configspec/helper.rb
         | 
| 105 117 | 
             
            - lib/configspec/helper/dockerfile.rb
         | 
| 106 118 | 
             
            - lib/configspec/helper/type.rb
         | 
| @@ -111,30 +123,40 @@ files: | |
| 111 123 | 
             
            - lib/configspec/version.rb
         | 
| 112 124 | 
             
            - spec/redhat/package_spec.rb
         | 
| 113 125 | 
             
            - spec/spec_helper.rb
         | 
| 126 | 
            +
            has_rdoc: true
         | 
| 114 127 | 
             
            homepage: https://github.com/mizzy/configspec
         | 
| 115 | 
            -
            licenses:
         | 
| 128 | 
            +
            licenses: 
         | 
| 116 129 | 
             
            - MIT
         | 
| 117 | 
            -
            metadata: {}
         | 
| 118 130 | 
             
            post_install_message: 
         | 
| 119 131 | 
             
            rdoc_options: []
         | 
| 120 | 
            -
             | 
| 132 | 
            +
             | 
| 133 | 
            +
            require_paths: 
         | 
| 121 134 | 
             
            - lib
         | 
| 122 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 123 | 
            -
               | 
| 124 | 
            -
               | 
| 125 | 
            -
             | 
| 126 | 
            -
             | 
| 127 | 
            -
             | 
| 128 | 
            -
             | 
| 129 | 
            -
             | 
| 130 | 
            -
             | 
| 131 | 
            -
             | 
| 135 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 136 | 
            +
              none: false
         | 
| 137 | 
            +
              requirements: 
         | 
| 138 | 
            +
              - - ">="
         | 
| 139 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 140 | 
            +
                  hash: 3
         | 
| 141 | 
            +
                  segments: 
         | 
| 142 | 
            +
                  - 0
         | 
| 143 | 
            +
                  version: "0"
         | 
| 144 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 145 | 
            +
              none: false
         | 
| 146 | 
            +
              requirements: 
         | 
| 147 | 
            +
              - - ">="
         | 
| 148 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 149 | 
            +
                  hash: 3
         | 
| 150 | 
            +
                  segments: 
         | 
| 151 | 
            +
                  - 0
         | 
| 152 | 
            +
                  version: "0"
         | 
| 132 153 | 
             
            requirements: []
         | 
| 154 | 
            +
             | 
| 133 155 | 
             
            rubyforge_project: 
         | 
| 134 | 
            -
            rubygems_version:  | 
| 156 | 
            +
            rubygems_version: 1.6.2
         | 
| 135 157 | 
             
            signing_key: 
         | 
| 136 | 
            -
            specification_version:  | 
| 158 | 
            +
            specification_version: 3
         | 
| 137 159 | 
             
            summary: A simple configuration management tool powered by RSpec
         | 
| 138 | 
            -
            test_files:
         | 
| 160 | 
            +
            test_files: 
         | 
| 139 161 | 
             
            - spec/redhat/package_spec.rb
         | 
| 140 162 | 
             
            - spec/spec_helper.rb
         | 
    
        checksums.yaml
    DELETED
    
    | @@ -1,7 +0,0 @@ | |
| 1 | 
            -
            ---
         | 
| 2 | 
            -
            SHA1:
         | 
| 3 | 
            -
              metadata.gz: 2ae21ecb5090d03fdf8cc1e05653c86521667172
         | 
| 4 | 
            -
              data.tar.gz: d335193c60ff8ef49218763750de5d4aa7f95bec
         | 
| 5 | 
            -
            SHA512:
         | 
| 6 | 
            -
              metadata.gz: 689429262333790c3031a5eea1da6d9953c1f8dbb01a9c137647820582f22dc7a6d615c7ca463aef20df24fc3294b1f8af6bff8b07d93b3093511ca885db3629
         | 
| 7 | 
            -
              data.tar.gz: f2297594b7ca00f9946c57af3cb8dc54fc8f6742d255157a5d2e6fbefc449e86ab440cb6447da246ca77d71c5852f5141829db37e9ad8f4830de45f11c5385a0
         | 
| @@ -1,24 +0,0 @@ | |
| 1 | 
            -
            require 'shellwords'
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            module Configspec
         | 
| 4 | 
            -
              module Commands
         | 
| 5 | 
            -
                class Base
         | 
| 6 | 
            -
                  class NotImplementedError < Exception; end
         | 
| 7 | 
            -
             | 
| 8 | 
            -
                  def escape(target)
         | 
| 9 | 
            -
                    str = case target
         | 
| 10 | 
            -
                          when Regexp
         | 
| 11 | 
            -
                            target.source
         | 
| 12 | 
            -
                          else
         | 
| 13 | 
            -
                            target.to_s
         | 
| 14 | 
            -
                          end
         | 
| 15 | 
            -
             | 
| 16 | 
            -
                    Shellwords.shellescape(str)
         | 
| 17 | 
            -
                  end
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                  def install(package, version=nil)
         | 
| 20 | 
            -
                    raise NotImplementedError.new
         | 
| 21 | 
            -
                  end
         | 
| 22 | 
            -
                end
         | 
| 23 | 
            -
              end
         | 
| 24 | 
            -
            end
         |