specinfra 2.0.0.beta1 → 2.0.0.beta2

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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/specinfra.rb +5 -5
  3. data/lib/specinfra/backend/base.rb +1 -1
  4. data/lib/specinfra/backend/cmd.rb +2 -2
  5. data/lib/specinfra/backend/docker.rb +3 -3
  6. data/lib/specinfra/backend/dockerfile.rb +2 -2
  7. data/lib/specinfra/backend/exec.rb +6 -6
  8. data/lib/specinfra/backend/lxc.rb +1 -1
  9. data/lib/specinfra/backend/powershell/command.rb +1 -1
  10. data/lib/specinfra/backend/powershell/script_helper.rb +5 -5
  11. data/lib/specinfra/backend/shellscript.rb +1 -1
  12. data/lib/specinfra/backend/ssh.rb +11 -11
  13. data/lib/specinfra/backend/winrm.rb +2 -2
  14. data/lib/specinfra/command/aix.rb +1 -1
  15. data/lib/specinfra/command/arch.rb +1 -1
  16. data/lib/specinfra/command/base.rb +1 -1
  17. data/lib/specinfra/command/darwin.rb +1 -1
  18. data/lib/specinfra/command/debian.rb +1 -1
  19. data/lib/specinfra/command/freebsd.rb +1 -1
  20. data/lib/specinfra/command/freebsd10.rb +1 -1
  21. data/lib/specinfra/command/gentoo.rb +1 -1
  22. data/lib/specinfra/command/linux.rb +1 -1
  23. data/lib/specinfra/command/openbsd.rb +1 -1
  24. data/lib/specinfra/command/plamo.rb +1 -1
  25. data/lib/specinfra/command/redhat.rb +1 -1
  26. data/lib/specinfra/command/smartos.rb +1 -1
  27. data/lib/specinfra/command/solaris.rb +1 -1
  28. data/lib/specinfra/command/solaris10.rb +1 -1
  29. data/lib/specinfra/command/solaris11.rb +1 -1
  30. data/lib/specinfra/command/suse.rb +1 -1
  31. data/lib/specinfra/command/ubuntu.rb +1 -1
  32. data/lib/specinfra/command/windows.rb +1 -1
  33. data/lib/specinfra/command_result.rb +1 -1
  34. data/lib/specinfra/configuration.rb +1 -1
  35. data/lib/specinfra/helper.rb +2 -2
  36. data/lib/specinfra/helper/backend.rb +5 -5
  37. data/lib/specinfra/helper/configuration.rb +3 -3
  38. data/lib/specinfra/helper/detect_os.rb +4 -4
  39. data/lib/specinfra/helper/docker.rb +1 -1
  40. data/lib/specinfra/helper/lxc.rb +1 -1
  41. data/lib/specinfra/helper/os.rb +2 -2
  42. data/lib/specinfra/helper/properties.rb +3 -3
  43. data/lib/specinfra/properties.rb +1 -1
  44. data/lib/specinfra/version.rb +2 -2
  45. data/spec/backend/exec/build_command_spec.rb +2 -2
  46. data/spec/backend/ssh/build_command_spec.rb +2 -2
  47. data/spec/configuration_spec.rb +1 -1
  48. data/spec/helper/backend_spec.rb +4 -4
  49. data/spec/helper/properties_spec.rb +1 -1
  50. data/spec/spec_helper.rb +2 -2
  51. data/specinfra.gemspec +1 -1
  52. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ebda9e1a8980f9cd098f5831d06e0a7cdce6d62
4
- data.tar.gz: 9bf241f31f25c1f8e5ab0260f2a3461c8e45dd0a
3
+ metadata.gz: affb586181cbed5a5df08b7051e34fe1b825862b
4
+ data.tar.gz: 38a773ddead03328e9f581ff9ba2bae517f7968d
5
5
  SHA512:
6
- metadata.gz: 63aa54e8bd0578ed770798036e1f97b12868d37aefea6b163c28ee235435113d01b40d225eb03cac389d002ea4982d8e43531b292e7f1e34740a4c1574362d65
7
- data.tar.gz: 7763ef61cc1fe078e44b0c4e879e2f0831ec8a67a16ab77e79ade0f57fef9fd7a4b2020811aca30260a247f2fdd4b65956256736acce0e7a267172c40384e35c
6
+ metadata.gz: 76f82c0a871297f8b98ee2bad8fa982bdae82d06515200fe9ac5ccc8ea896d1194f6354dddeb49d896ebb5da10df1e906a6f8e5a398cbda9f6ccb624e06a80e0
7
+ data.tar.gz: d5f364ea6e222a2d8ac6d82e7a4b4759ae6f126b5a0f14cb1d1dbe2ff3af8778b78e3792ee6212948e38a6cfbc24cb5cc03ce436c951557be3e1f37ba54669c8
data/lib/specinfra.rb CHANGED
@@ -5,19 +5,19 @@ require "specinfra/command"
5
5
  require "specinfra/command_result"
6
6
  require "specinfra/configuration"
7
7
 
8
- include SpecInfra
8
+ include Specinfra
9
9
 
10
- module SpecInfra
10
+ module Specinfra
11
11
  class << self
12
12
  def configuration
13
- SpecInfra::Configuration
13
+ Specinfra::Configuration
14
14
  end
15
15
  end
16
16
  end
17
17
 
18
18
  if defined?(RSpec)
19
19
  RSpec.configure do |c|
20
- c.include(SpecInfra::Helper::Configuration)
20
+ c.include(Specinfra::Helper::Configuration)
21
21
  c.add_setting :os, :default => nil
22
22
  c.add_setting :host, :default => nil
23
23
  c.add_setting :ssh, :default => nil
@@ -25,7 +25,7 @@ if defined?(RSpec)
25
25
  c.add_setting :sudo_password, :default => nil
26
26
  c.add_setting :winrm, :default => nil
27
27
  c.add_setting :architecture, :default => :x86_64
28
- SpecInfra.configuration.defaults.each { |k, v| c.add_setting k, :default => v }
28
+ Specinfra.configuration.defaults.each { |k, v| c.add_setting k, :default => v }
29
29
  c.before :each do
30
30
  if respond_to?(:backend) && backend.respond_to?(:set_example)
31
31
  example = RSpec.respond_to?(:current_example) ? RSpec.current_example : self.example
@@ -1,7 +1,7 @@
1
1
  require 'singleton'
2
2
  require 'specinfra/command_result'
3
3
 
4
- module SpecInfra
4
+ module Specinfra
5
5
  module Backend
6
6
  class Base
7
7
  include Singleton
@@ -1,6 +1,6 @@
1
1
  require 'open3'
2
2
 
3
- module SpecInfra
3
+ module Specinfra
4
4
  module Backend
5
5
  class Cmd < Base
6
6
  include PowerShell::ScriptHelper
@@ -38,7 +38,7 @@ module SpecInfra
38
38
  private
39
39
 
40
40
  def powershell
41
- architecture = @example.metadata[:architecture] || SpecInfra.configuration.architecture
41
+ architecture = @example.metadata[:architecture] || Specinfra.configuration.architecture
42
42
 
43
43
  case architecture
44
44
  when :i386 then x86_powershell
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Backend
3
3
  class Docker < Exec
4
4
  def initialize
@@ -31,7 +31,7 @@ module SpecInfra
31
31
  private
32
32
 
33
33
  def base_image
34
- @base_image ||= ::Docker::Image.get(SpecInfra.configuration.docker_image)
34
+ @base_image ||= ::Docker::Image.get(Specinfra.configuration.docker_image)
35
35
  end
36
36
 
37
37
  def current_image
@@ -44,7 +44,7 @@ module SpecInfra
44
44
  'Cmd' => %W{/bin/sh -c #{cmd}},
45
45
  }.merge(opts)
46
46
 
47
- if path = SpecInfra::configuration::path
47
+ if path = Specinfra::configuration::path
48
48
  (opts['Env'] ||= {})['PATH'] = path
49
49
  end
50
50
 
@@ -1,6 +1,6 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Backend
3
- class Dockerfile < SpecInfra::Backend::Base
3
+ class Dockerfile < Specinfra::Backend::Base
4
4
  def initialize
5
5
  @lines = []
6
6
  ObjectSpace.define_finalizer(self) {
@@ -2,7 +2,7 @@ require 'singleton'
2
2
  require 'fileutils'
3
3
  require 'shellwords'
4
4
 
5
- module SpecInfra
5
+ module Specinfra
6
6
  module Backend
7
7
  class Exec < Base
8
8
 
@@ -34,11 +34,11 @@ module SpecInfra
34
34
  end
35
35
 
36
36
  def build_command(cmd)
37
- shell = SpecInfra.configuration.shell || '/bin/sh'
37
+ shell = Specinfra.configuration.shell || '/bin/sh'
38
38
  cmd = cmd.shelljoin if cmd.is_a?(Array)
39
39
  cmd = "#{shell.shellescape} -c #{cmd.shellescape}"
40
40
 
41
- path = SpecInfra.configuration.path
41
+ path = Specinfra.configuration.path
42
42
  if path
43
43
  cmd = "env PATH=#{path.shellescape}:\"$PATH\" #{cmd}"
44
44
  end
@@ -47,8 +47,8 @@ module SpecInfra
47
47
  end
48
48
 
49
49
  def add_pre_command(cmd)
50
- if SpecInfra.configuration.pre_command
51
- pre_cmd = build_command(SpecInfra.configuration.pre_command)
50
+ if Specinfra.configuration.pre_command
51
+ pre_cmd = build_command(Specinfra.configuration.pre_command)
52
52
  "#{pre_cmd} && #{cmd}"
53
53
  else
54
54
  cmd
@@ -184,7 +184,7 @@ module SpecInfra
184
184
  end
185
185
 
186
186
  def check_os
187
- return SpecInfra.configuration.os if SpecInfra.configuration.os
187
+ return Specinfra.configuration.os if Specinfra.configuration.os
188
188
  if run_command('ls /etc/redhat-release').success?
189
189
  line = run_command('cat /etc/redhat-release').stdout
190
190
  if line =~ /release (\d[\d.]*)/
@@ -1,5 +1,5 @@
1
1
 
2
- module SpecInfra
2
+ module Specinfra
3
3
  module Backend
4
4
  class Lxc < Exec
5
5
  def run_command(cmd, opts={})
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Backend
3
3
  module PowerShell
4
4
  class Command
@@ -1,11 +1,11 @@
1
1
  require 'base64'
2
2
 
3
- module SpecInfra
3
+ module Specinfra
4
4
  module Backend
5
5
  module PowerShell
6
6
  module ScriptHelper
7
7
  def build_command(cmd)
8
- path = SpecInfra.configuration.path
8
+ path = Specinfra.configuration.path
9
9
  if path
10
10
  cmd.strip!
11
11
  cmd =
@@ -18,12 +18,12 @@ EOF
18
18
  end
19
19
 
20
20
  def add_pre_command(cmd)
21
- path = SpecInfra.configuration.path
22
- if SpecInfra.configuration.pre_command
21
+ path = Specinfra.configuration.path
22
+ if Specinfra.configuration.pre_command
23
23
  cmd.strip!
24
24
  cmd =
25
25
  <<-EOF
26
- if (#{SpecInfra.configuration.pre_command})
26
+ if (#{Specinfra.configuration.pre_command})
27
27
  {
28
28
  #{cmd}
29
29
  }
@@ -1,6 +1,6 @@
1
1
  require 'singleton'
2
2
 
3
- module SpecInfra
3
+ module Specinfra
4
4
  module Backend
5
5
  class ShellScript < Base
6
6
  def initialize
@@ -1,6 +1,6 @@
1
1
  require 'specinfra/backend/exec'
2
2
 
3
- module SpecInfra
3
+ module Specinfra
4
4
  module Backend
5
5
  class Ssh < Exec
6
6
  def run_command(cmd, opt={})
@@ -20,8 +20,8 @@ module SpecInfra
20
20
 
21
21
  def build_command(cmd)
22
22
  cmd = super(cmd)
23
- user = SpecInfra.configuration.ssh.options[:user]
24
- disable_sudo = SpecInfra.configuration.disable_sudo
23
+ user = Specinfra.configuration.ssh.options[:user]
24
+ disable_sudo = Specinfra.configuration.disable_sudo
25
25
  if user != 'root' && !disable_sudo
26
26
  cmd = "#{sudo} #{cmd}"
27
27
  end
@@ -29,7 +29,7 @@ module SpecInfra
29
29
  end
30
30
 
31
31
  def copy_file(from, to)
32
- scp = SpecInfra.configuration.scp
32
+ scp = Specinfra.configuration.scp
33
33
  begin
34
34
  scp.upload!(from, to)
35
35
  rescue => e
@@ -44,11 +44,11 @@ module SpecInfra
44
44
  stderr_data = ''
45
45
  exit_status = nil
46
46
  exit_signal = nil
47
- pass_prompt = SpecInfra.configuration.pass_prompt || /^\[sudo\] password for/
47
+ pass_prompt = Specinfra.configuration.pass_prompt || /^\[sudo\] password for/
48
48
 
49
- ssh = SpecInfra.configuration.ssh
49
+ ssh = Specinfra.configuration.ssh
50
50
  ssh.open_channel do |channel|
51
- if SpecInfra.configuration.sudo_password or SpecInfra.configuration.request_pty
51
+ if Specinfra.configuration.sudo_password or Specinfra.configuration.request_pty
52
52
  channel.request_pty do |ch, success|
53
53
  abort "Could not obtain pty " if !success
54
54
  end
@@ -57,7 +57,7 @@ module SpecInfra
57
57
  abort "FAILED: couldn't execute command (ssh.channel.exec)" if !success
58
58
  channel.on_data do |ch, data|
59
59
  if data.match pass_prompt
60
- channel.send_data "#{SpecInfra.configuration.sudo_password}\n"
60
+ channel.send_data "#{Specinfra.configuration.sudo_password}\n"
61
61
  else
62
62
  stdout_data += data
63
63
  end
@@ -65,7 +65,7 @@ module SpecInfra
65
65
 
66
66
  channel.on_extended_data do |ch, type, data|
67
67
  if data.match /you must have a tty to run sudo/
68
- abort 'Please set "SpecInfra.configuration.request_pty = true" or "c.request_pty = true" in your spec_helper.rb or other appropreate file.'
68
+ abort 'Please set "Specinfra.configuration.request_pty = true" or "c.request_pty = true" in your spec_helper.rb or other appropreate file.'
69
69
  end
70
70
 
71
71
  if data.match /^sudo: no tty present and no askpass program specified/
@@ -89,13 +89,13 @@ module SpecInfra
89
89
  end
90
90
 
91
91
  def sudo
92
- if sudo_path = SpecInfra.configuration.sudo_path
92
+ if sudo_path = Specinfra.configuration.sudo_path
93
93
  sudo_path += '/sudo'
94
94
  else
95
95
  sudo_path = 'sudo'
96
96
  end
97
97
 
98
- sudo_options = SpecInfra.configuration.sudo_options
98
+ sudo_options = Specinfra.configuration.sudo_options
99
99
  if sudo_options
100
100
  sudo_options = sudo_options.shelljoin if sudo_options.is_a?(Array)
101
101
  sudo_options = ' ' + sudo_options
@@ -1,11 +1,11 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Backend
3
3
  class WinRM < Base
4
4
  include PowerShell::ScriptHelper
5
5
 
6
6
  def run_command(cmd, opts={})
7
7
  script = create_script(cmd)
8
- winrm = SpecInfra.configuration.winrm
8
+ winrm = Specinfra.configuration.winrm
9
9
 
10
10
  result = winrm.powershell(script)
11
11
  stdout, stderr = [:stdout, :stderr].map do |s|
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class AIX < Base
4
4
  class NotImplementedError < Exception; end
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Arch < Linux
4
4
  def check_access_by_user(file, user, access)
@@ -1,6 +1,6 @@
1
1
  require 'shellwords'
2
2
 
3
- module SpecInfra
3
+ module Specinfra
4
4
  module Command
5
5
  class Base
6
6
  class NotImplementedError < Exception; end
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Darwin < Base
4
4
  def check_file_md5checksum(file, expected)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Debian < Linux
4
4
  def check_enabled(service, level=3)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class FreeBSD < Base
4
4
  def check_enabled(service, level=3)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class FreeBSD10 < FreeBSD
4
4
  def check_installed(package, version=nil)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Gentoo < Linux
4
4
  def check_enabled(service, level=3)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Linux < Base
4
4
  def check_access_by_user(file, user, access)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class OpenBSD < Base
4
4
  def check_enabled(service, level=3)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Plamo < Linux
4
4
 
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class RedHat < Linux
4
4
  def check_access_by_user(file, user, access)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class SmartOS < Solaris
4
4
  def check_installed(package, version=nil)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Solaris < Base
4
4
  def check_enabled(service, level=3)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Solaris10 < Solaris
4
4
  # Please implement Solaris 10 specific commands
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Solaris11 < Solaris
4
4
  # Please implement Solaris 11 specific commands
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class SuSE < Linux
4
4
  def check_enabled(service, level=3)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Ubuntu < Debian
4
4
  def check_running(service)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Command
3
3
  class Windows
4
4
  class NotSupportedError < Exception; end
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  class CommandResult
3
3
  attr_reader :stdout, :stderr, :exit_status, :exit_signal
4
4
 
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Configuration
3
3
  class << self
4
4
  VALID_OPTIONS_KEYS = [
@@ -2,7 +2,7 @@ require 'specinfra/helper/os'
2
2
  require 'specinfra/helper/detect_os'
3
3
 
4
4
  require 'specinfra/helper/backend'
5
- include SpecInfra::Helper::Backend
5
+ include Specinfra::Helper::Backend
6
6
 
7
7
  require 'specinfra/helper/docker'
8
8
  require 'specinfra/helper/lxc'
@@ -10,4 +10,4 @@ require 'specinfra/helper/lxc'
10
10
  require 'specinfra/helper/configuration'
11
11
 
12
12
  require 'specinfra/helper/properties'
13
- include SpecInfra::Helper::Properties
13
+ include Specinfra::Helper::Properties
@@ -1,13 +1,13 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Helper
3
3
  ['Exec', 'Ssh', 'Cmd', 'Docker', 'WinRM', 'ShellScript', 'Dockerfile', 'Lxc'].each do |type|
4
4
  eval <<-EOF
5
5
  module #{type}
6
6
  def backend(commands_object=nil)
7
7
  if ! respond_to?(:commands)
8
- commands_object = SpecInfra::Command::Base.new
8
+ commands_object = Specinfra::Command::Base.new
9
9
  end
10
- instance = SpecInfra::Backend::#{type}.instance
10
+ instance = Specinfra::Backend::#{type}.instance
11
11
  instance.set_commands(commands_object || commands)
12
12
  instance
13
13
  end
@@ -17,8 +17,8 @@ module SpecInfra
17
17
 
18
18
  module Backend
19
19
  def backend_for(type)
20
- instance = self.class.const_get('SpecInfra').const_get('Backend').const_get(type.to_s.capitalize).instance
21
- commands = self.class.const_get('SpecInfra').const_get('Command').const_get(instance.check_os[:family]).new
20
+ instance = self.class.const_get('Specinfra').const_get('Backend').const_get(type.to_s.capitalize).instance
21
+ commands = self.class.const_get('Specinfra').const_get('Command').const_get(instance.check_os[:family]).new
22
22
  instance.set_commands(commands)
23
23
  instance
24
24
  end
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Helper
3
3
  module Configuration
4
4
  def subject
@@ -27,13 +27,13 @@ module SpecInfra
27
27
  # end
28
28
  # end
29
29
  def build_configurations
30
- SpecInfra::Configuration.defaults.keys.each do |c|
30
+ Specinfra::Configuration.defaults.keys.each do |c|
31
31
  if self.respond_to?(c.to_sym)
32
32
  value = self.send(c)
33
33
  else
34
34
  value = RSpec.configuration.send(c) if defined?(RSpec)
35
35
  end
36
- SpecInfra::Configuration.instance_variable_set("@#{c}", value)
36
+ Specinfra::Configuration.instance_variable_set("@#{c}", value)
37
37
  end
38
38
  end
39
39
  end
@@ -1,18 +1,18 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Helper
3
3
  module DetectOS
4
4
  def commands
5
5
  property[:os_by_host] = {} if ! property[:os_by_host]
6
- host = SpecInfra.configuration.ssh ? SpecInfra.configuration.ssh.host : 'localhost'
6
+ host = Specinfra.configuration.ssh ? Specinfra.configuration.ssh.host : 'localhost'
7
7
 
8
8
  if property[:os_by_host][host]
9
9
  os = property[:os_by_host][host]
10
10
  else
11
11
  # Set command object explicitly to avoid `stack too deep`
12
- os = backend(SpecInfra::Command::Base.new).check_os
12
+ os = backend(Specinfra::Command::Base.new).check_os
13
13
  property[:os_by_host][host] = os
14
14
  end
15
- self.class.const_get('SpecInfra').const_get('Command').const_get(os[:family]).new
15
+ self.class.const_get('Specinfra').const_get('Command').const_get(os[:family]).new
16
16
  end
17
17
  end
18
18
  end
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Helper
3
3
  module Docker
4
4
  def self.included(klass)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Helper
3
3
  module Lxc
4
4
  def self.included(klass)
@@ -1,4 +1,4 @@
1
- module SpecInfra
1
+ module Specinfra
2
2
  module Helper
3
3
  [
4
4
  'Base',
@@ -23,7 +23,7 @@ module SpecInfra
23
23
  eval <<-EOF
24
24
  module #{os}
25
25
  def commands
26
- SpecInfra::Command::#{os}.new
26
+ Specinfra::Command::#{os}.new
27
27
  end
28
28
  end
29
29
  EOF
@@ -1,13 +1,13 @@
1
1
  require 'specinfra/properties'
2
2
 
3
- module SpecInfra
3
+ module Specinfra
4
4
  module Helper
5
5
  module Properties
6
6
  def property
7
- SpecInfra::Properties.instance.properties
7
+ Specinfra::Properties.instance.properties
8
8
  end
9
9
  def set_property(prop)
10
- SpecInfra::Properties.instance.properties(prop)
10
+ Specinfra::Properties.instance.properties(prop)
11
11
  end
12
12
  end
13
13
  end
@@ -1,6 +1,6 @@
1
1
  require 'singleton'
2
2
 
3
- module SpecInfra
3
+ module Specinfra
4
4
  class Properties
5
5
  include Singleton
6
6
  def initialize
@@ -1,3 +1,3 @@
1
- module SpecInfra
2
- VERSION = "2.0.0.beta1"
1
+ module Specinfra
2
+ VERSION = "2.0.0.beta2"
3
3
  end
@@ -1,8 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
- include SpecInfra::Helper::Exec
3
+ include Specinfra::Helper::Exec
4
4
 
5
- describe SpecInfra::Backend::Exec do
5
+ describe Specinfra::Backend::Exec do
6
6
  describe '#build_command' do
7
7
  context 'with simple command' do
8
8
  it 'should escape spaces' do
@@ -1,8 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
- include SpecInfra::Helper::Ssh
3
+ include Specinfra::Helper::Ssh
4
4
 
5
- describe SpecInfra::Backend::Ssh do
5
+ describe Specinfra::Backend::Ssh do
6
6
  describe '#build_command' do
7
7
  context 'with root user' do
8
8
  before do
@@ -5,5 +5,5 @@ RSpec.configure do |c|
5
5
  end
6
6
 
7
7
  describe RSpec.configuration.path do
8
- it { should eq SpecInfra.configuration.path }
8
+ it { should eq Specinfra.configuration.path }
9
9
  end
@@ -1,11 +1,11 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe 'backend_for(:type) returns correct backend object' do
4
- it 'backend_for(:exec) returns SpecInfra::Backend::Exec' do
5
- expect(backend_for(:exec)).to be_an_instance_of SpecInfra::Backend::Exec
4
+ it 'backend_for(:exec) returns Specinfra::Backend::Exec' do
5
+ expect(backend_for(:exec)).to be_an_instance_of Specinfra::Backend::Exec
6
6
  end
7
7
 
8
- it 'backend_for(:ssh) returns SpecInfra::Backend::Ssh' do
9
- expect(backend_for(:ssh)).to be_an_instance_of SpecInfra::Backend::Ssh
8
+ it 'backend_for(:ssh) returns Specinfra::Backend::Ssh' do
9
+ expect(backend_for(:ssh)).to be_an_instance_of Specinfra::Backend::Ssh
10
10
  end
11
11
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include SpecInfra::Helper::Properties
3
+ include Specinfra::Helper::Properties
4
4
 
5
5
  describe 'Properties Helper' do
6
6
  before :all do
data/spec/spec_helper.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  require 'specinfra'
2
2
  require 'rspec/mocks/standalone'
3
3
 
4
- include SpecInfra::Helper::Exec
4
+ include Specinfra::Helper::Exec
5
5
 
6
- module SpecInfra
6
+ module Specinfra
7
7
  module Backend
8
8
  class Ssh
9
9
  def run_command(cmd, opts={})
data/specinfra.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'specinfra/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "specinfra"
8
- spec.version = SpecInfra::VERSION
8
+ spec.version = Specinfra::VERSION
9
9
  spec.authors = ["Gosuke Miyashita"]
10
10
  spec.email = ["gosukenator@gmail.com"]
11
11
  spec.description = %q{Common layer for serverspec and configspec}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta1
4
+ version: 2.0.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita