specinfra 2.54.2 → 2.55.0

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
2
  SHA1:
3
- metadata.gz: d66b182675072386903d98f332c5afbe5dc2fee7
4
- data.tar.gz: fce72c7ae91d02b0228dd024f0fd6133db38c6dd
3
+ metadata.gz: 27a6cb0a1834db3e2490be669f77b114fa554290
4
+ data.tar.gz: d3252f59cbcda303c93ad4e1140f2b72567c9546
5
5
  SHA512:
6
- metadata.gz: c327b3096406847382ec7baebd7db309591473de8f13987724a8a65a1fe18c1302fa06c24ce8faf2ce38e8613349e82fc23c1ece7da7b947d054eccb41a156ba
7
- data.tar.gz: 8130e539f881465f825648386273897d7994dceaecc149cffb288fe56b74cc88ef63022b88cad77869c9ab4bbb81187533f06e69bd6d22a79e6d7c3083e42df7
6
+ metadata.gz: 0dd3164357ab821d31c3c4f2e0ace823da9e5c7ab63b5fa849a25f5d0a75872ea44f4cbfea82c32f4c4ea3e89843eb8ed36a916e590abf3c28c86ad7aa5cdbc5
7
+ data.tar.gz: 3feff038349acf7146dbe004c757b84a77eeea819d00040f1b610b54e53859378bd148946b824f7bbaf377a22406fb445292d7d56b38b70472779053a703caf0
@@ -215,6 +215,12 @@ require 'specinfra/command/opensuse'
215
215
  require 'specinfra/command/opensuse/base'
216
216
  require 'specinfra/command/opensuse/base/service'
217
217
 
218
+ # SLES (inherit SuSE)
219
+ require 'specinfra/command/sles'
220
+ require 'specinfra/command/sles/base'
221
+ require 'specinfra/command/sles/v12'
222
+ require 'specinfra/command/sles/v12/service'
223
+
218
224
  # FreeBSD (inherit Base)
219
225
  require 'specinfra/command/freebsd'
220
226
  require 'specinfra/command/freebsd/base'
@@ -0,0 +1 @@
1
+ class Specinfra::Command::Sles; end
@@ -0,0 +1,2 @@
1
+ class Specinfra::Command::Sles::Base < Specinfra::Command::Suse::Base
2
+ end
@@ -0,0 +1,3 @@
1
+ class Specinfra::Command::Sles::V12 < Specinfra::Command::Sles::Base
2
+ end
3
+
@@ -0,0 +1,5 @@
1
+ class Specinfra::Command::Sles::V12::Service < Specinfra::Command::Sles::Base::Service
2
+ class << self
3
+ include Specinfra::Command::Module::Systemd
4
+ end
5
+ end
@@ -4,7 +4,7 @@ class Specinfra::Helper::DetectOs::Suse < Specinfra::Helper::DetectOs
4
4
  line = run_command('cat /etc/SuSE-release').stdout
5
5
  if line =~ /SUSE Linux Enterprise Server (\d+)/
6
6
  release = $1
7
- family = 'suse'
7
+ family = 'sles'
8
8
  elsif line =~ /openSUSE (\d+\.\d+|\d+)/
9
9
  release = $1
10
10
  family = 'opensuse'
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.54.2"
2
+ VERSION = "2.55.0"
3
3
  end
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+ require 'specinfra/helper/detect_os/suse'
3
+
4
+ describe Specinfra::Helper::DetectOs::Suse do
5
+ suse = Specinfra::Helper::DetectOs::Suse.new(:exec)
6
+ it 'Should return opensuse 13 when openSUSE 13.2 is installed.' do
7
+ allow(suse).to receive(:run_command) {
8
+ CommandResult.new(:stdout => 'openSUSE 13.2 (x86_64)', :exit_status => 0)
9
+ }
10
+ expect(suse.detect).to include(
11
+ :family => 'opensuse',
12
+ :release => '13.2'
13
+ )
14
+ end
15
+ it 'Should return sles 12 when SUSE Linux Enterprise Server 12 is installed.' do
16
+ allow(suse).to receive(:run_command) {
17
+ CommandResult.new(:stdout => 'SUSE Linux Enterprise Server 12', :exit_status => 0)
18
+ }
19
+ expect(suse.detect).to include(
20
+ :family => 'sles',
21
+ :release => '12'
22
+ )
23
+ end
24
+ end
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.54.2
4
+ version: 2.55.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
@@ -360,6 +360,10 @@ files:
360
360
  - lib/specinfra/command/redhat/v7/host.rb
361
361
  - lib/specinfra/command/redhat/v7/port.rb
362
362
  - lib/specinfra/command/redhat/v7/service.rb
363
+ - lib/specinfra/command/sles.rb
364
+ - lib/specinfra/command/sles/base.rb
365
+ - lib/specinfra/command/sles/v12.rb
366
+ - lib/specinfra/command/sles/v12/service.rb
363
367
  - lib/specinfra/command/smartos.rb
364
368
  - lib/specinfra/command/smartos/base.rb
365
369
  - lib/specinfra/command/smartos/base/file.rb
@@ -527,6 +531,7 @@ files:
527
531
  - spec/helper/detect_os/esxi_spec.rb
528
532
  - spec/helper/detect_os/freebsd_spec.rb
529
533
  - spec/helper/detect_os/openbsd_spec.rb
534
+ - spec/helper/detect_os/suse_spec.rb
530
535
  - spec/helper/os_spec.rb
531
536
  - spec/helper/properties_spec.rb
532
537
  - spec/helper/set_spec.rb
@@ -635,6 +640,7 @@ test_files:
635
640
  - spec/helper/detect_os/esxi_spec.rb
636
641
  - spec/helper/detect_os/freebsd_spec.rb
637
642
  - spec/helper/detect_os/openbsd_spec.rb
643
+ - spec/helper/detect_os/suse_spec.rb
638
644
  - spec/helper/os_spec.rb
639
645
  - spec/helper/properties_spec.rb
640
646
  - spec/helper/set_spec.rb