specinfra 2.72.1 → 2.73.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -2
- data/lib/specinfra/command.rb +8 -0
- data/lib/specinfra/command/amazon/v2.rb +2 -0
- data/lib/specinfra/command/amazon/v2/service.rb +5 -0
- data/lib/specinfra/command/devuan.rb +1 -0
- data/lib/specinfra/command/devuan/base.rb +2 -0
- data/lib/specinfra/command/devuan/base/package.rb +2 -0
- data/lib/specinfra/command/ubuntu.rb +0 -10
- data/lib/specinfra/helper/detect_os/devuan.rb +21 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/amazon2/service_spec.rb +32 -0
- data/spec/helper/detect_os/debian_spec.rb +0 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87b3e6b7f3780bf6cc6c1e74f64b309b99ddb1ed
|
4
|
+
data.tar.gz: 8b9447ed8d85da09ded51323c221d0647f66f290
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c72be291f42a7ab2ac572c3d5520e13e2ae0dbabe2569420104017f4ac85bc30b9ed7a88ec415f649932232e0e31d5500ac1f334be776927d400a4e0169c2e1
|
7
|
+
data.tar.gz: 84f032afd18b8c34fff7753d8486b4cfae60a6cda9c90234351bfd74a405c2580a6b8e8bf333c281926022b0e10060aba2236f47ab27f5353e9fb60a471bb56e
|
data/Gemfile
CHANGED
@@ -9,10 +9,11 @@ if ruby_version < Gem::Version.new('2.0.0')
|
|
9
9
|
gem 'net-ssh', '~> 2.7'
|
10
10
|
end
|
11
11
|
if ruby_version < Gem::Version.new('1.9.3')
|
12
|
+
# pry 0.11 dropped Ruby 1.8 support
|
13
|
+
gem 'pry', '0.10.4'
|
14
|
+
|
12
15
|
# listen 2.0 dropped Ruby 1.8 support
|
13
16
|
gem 'listen', '< 2.0'
|
14
|
-
gem 'guard-rspec', '< 4.0'
|
15
|
-
gem 'guard', '< 2.0'
|
16
17
|
# hitimes 1.2.3 dropped Ruby 1.8 support
|
17
18
|
gem 'hitimes', '< 1.2.3'
|
18
19
|
elsif ruby_version < Gem::Version.new('2.0.0')
|
data/lib/specinfra/command.rb
CHANGED
@@ -114,6 +114,10 @@ require 'specinfra/command/eos/base'
|
|
114
114
|
require 'specinfra/command/amazon'
|
115
115
|
require 'specinfra/command/amazon/base'
|
116
116
|
|
117
|
+
# Amazon Linux V2 (inherit RedHat)
|
118
|
+
require 'specinfra/command/amazon/v2'
|
119
|
+
require 'specinfra/command/amazon/v2/service'
|
120
|
+
|
117
121
|
# AIX (inherit Base)
|
118
122
|
require 'specinfra/command/aix'
|
119
123
|
require 'specinfra/command/aix/base'
|
@@ -172,6 +176,10 @@ require 'specinfra/command/debian/v8'
|
|
172
176
|
require 'specinfra/command/debian/v8/service'
|
173
177
|
require 'specinfra/command/debian/v8/port'
|
174
178
|
|
179
|
+
# Devuan (inherit Debian)
|
180
|
+
require 'specinfra/command/devuan'
|
181
|
+
require 'specinfra/command/devuan/base'
|
182
|
+
|
175
183
|
# Raspbian (inherit Debian)
|
176
184
|
require 'specinfra/command/raspbian'
|
177
185
|
|
@@ -0,0 +1 @@
|
|
1
|
+
class Specinfra::Command::Devuan; end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class Specinfra::Helper::DetectOs::Devuan < Specinfra::Helper::DetectOs
|
2
|
+
def detect
|
3
|
+
if (devuan_version = run_command('cat /etc/devuan_version')) && devuan_version.success?
|
4
|
+
distro = nil
|
5
|
+
release = nil
|
6
|
+
if (lsb_release = run_command("lsb_release -ir")) && lsb_release.success?
|
7
|
+
lsb_release.stdout.each_line do |line|
|
8
|
+
distro = line.split(':').last.strip if line =~ /^Distributor ID:/
|
9
|
+
release = line.split(':').last.strip if line =~ /^Release:/
|
10
|
+
end
|
11
|
+
else
|
12
|
+
if devuan_version.stdout.chomp =~ /^[[:digit:]]+\.[[:digit:]]+$/
|
13
|
+
release = devuan_version.stdout.chomp
|
14
|
+
end
|
15
|
+
end
|
16
|
+
distro ||= 'devuan'
|
17
|
+
release ||= nil
|
18
|
+
{ :family => distro.gsub(/[^[:alnum:]]/, '').downcase, :release => release }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/specinfra/version.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
property[:os] = nil
|
4
|
+
set :os, :family => 'amazon', :release => '2'
|
5
|
+
|
6
|
+
describe get_command(:enable_service, 'httpd') do
|
7
|
+
it { should eq 'systemctl enable httpd' }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe get_command(:disable_service, 'httpd') do
|
11
|
+
it { should eq 'systemctl disable httpd' }
|
12
|
+
end
|
13
|
+
|
14
|
+
describe get_command(:start_service, 'httpd') do
|
15
|
+
it { should eq 'systemctl start httpd' }
|
16
|
+
end
|
17
|
+
|
18
|
+
describe get_command(:stop_service, 'httpd') do
|
19
|
+
it { should eq 'systemctl stop httpd' }
|
20
|
+
end
|
21
|
+
|
22
|
+
describe get_command(:restart_service, 'httpd') do
|
23
|
+
it { should eq 'systemctl restart httpd' }
|
24
|
+
end
|
25
|
+
|
26
|
+
describe get_command(:reload_service, 'httpd') do
|
27
|
+
it { should eq 'systemctl reload httpd' }
|
28
|
+
end
|
29
|
+
|
30
|
+
describe get_command(:enable_service, 'sshd.socket') do
|
31
|
+
it { should eq 'systemctl enable sshd.socket' }
|
32
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.73.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-scp
|
@@ -220,6 +220,8 @@ files:
|
|
220
220
|
- lib/specinfra/command/alpine/base/service.rb
|
221
221
|
- lib/specinfra/command/amazon.rb
|
222
222
|
- lib/specinfra/command/amazon/base.rb
|
223
|
+
- lib/specinfra/command/amazon/v2.rb
|
224
|
+
- lib/specinfra/command/amazon/v2/service.rb
|
223
225
|
- lib/specinfra/command/arch.rb
|
224
226
|
- lib/specinfra/command/arch/base.rb
|
225
227
|
- lib/specinfra/command/arch/base/file.rb
|
@@ -282,6 +284,9 @@ files:
|
|
282
284
|
- lib/specinfra/command/debian/v8.rb
|
283
285
|
- lib/specinfra/command/debian/v8/port.rb
|
284
286
|
- lib/specinfra/command/debian/v8/service.rb
|
287
|
+
- lib/specinfra/command/devuan.rb
|
288
|
+
- lib/specinfra/command/devuan/base.rb
|
289
|
+
- lib/specinfra/command/devuan/base/package.rb
|
285
290
|
- lib/specinfra/command/elementary.rb
|
286
291
|
- lib/specinfra/command/elementary/base.rb
|
287
292
|
- lib/specinfra/command/eos.rb
|
@@ -483,6 +488,7 @@ files:
|
|
483
488
|
- lib/specinfra/helper/detect_os/coreos.rb
|
484
489
|
- lib/specinfra/helper/detect_os/darwin.rb
|
485
490
|
- lib/specinfra/helper/detect_os/debian.rb
|
491
|
+
- lib/specinfra/helper/detect_os/devuan.rb
|
486
492
|
- lib/specinfra/helper/detect_os/eos.rb
|
487
493
|
- lib/specinfra/helper/detect_os/esxi.rb
|
488
494
|
- lib/specinfra/helper/detect_os/freebsd.rb
|
@@ -533,6 +539,7 @@ files:
|
|
533
539
|
- spec/command/amazon/interface_spec.rb
|
534
540
|
- spec/command/amazon/package_spec.rb
|
535
541
|
- spec/command/amazon/service_spec.rb
|
542
|
+
- spec/command/amazon2/service_spec.rb
|
536
543
|
- spec/command/base/file_spec.rb
|
537
544
|
- spec/command/base/group_spec.rb
|
538
545
|
- spec/command/base/host_spec.rb
|
@@ -657,6 +664,7 @@ test_files:
|
|
657
664
|
- spec/command/amazon/interface_spec.rb
|
658
665
|
- spec/command/amazon/package_spec.rb
|
659
666
|
- spec/command/amazon/service_spec.rb
|
667
|
+
- spec/command/amazon2/service_spec.rb
|
660
668
|
- spec/command/base/file_spec.rb
|
661
669
|
- spec/command/base/group_spec.rb
|
662
670
|
- spec/command/base/host_spec.rb
|