specinfra 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/backend/exec.rb +2 -0
- data/lib/specinfra/command/base.rb +4 -0
- data/lib/specinfra/command/nixos.rb +28 -0
- data/lib/specinfra/command.rb +1 -0
- data/lib/specinfra/helper/os.rb +1 -0
- data/lib/specinfra/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 503cb07ff9fcc9ed440393c188c5d2fa2b450ea5
|
4
|
+
data.tar.gz: 698244c3d5ee408384a9ef267b85fedf5ae0d9b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01aa282f36ffff21bd1dced28763206f9e2700a704119d392e394131ad64e283b9af5151cf216f0cd6d03f8383189b087fce1da97fb28c5fb90904535aa78ab1
|
7
|
+
data.tar.gz: 335d080054ee2a04987a5a21a35c03dbdee988b415403fb00d10e8a2f34c6d7232219cd1c29bcfdadc03591d1a1a07510f9d938a0d0464e4087a65ea856c8cd6
|
@@ -236,6 +236,8 @@ module SpecInfra
|
|
236
236
|
{ :family => 'Gentoo', :release => nil, :arch => arch }
|
237
237
|
elsif run_command('ls /usr/lib/setup/Plamo-*').success?
|
238
238
|
{ :family => 'Plamo', :release => nil, :arch => arch }
|
239
|
+
elsif run_command('ls /var/run/current-system/sw').success?
|
240
|
+
{ :family => 'NixOS', :release => nil, :arch => arch }
|
239
241
|
elsif run_command('uname -s').stdout =~ /AIX/i
|
240
242
|
{ :family => 'AIX', :release => nil, :arch => arch }
|
241
243
|
elsif ( uname = run_command('uname -sr').stdout) && uname =~ /SunOS/i
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module SpecInfra
|
2
|
+
module Command
|
3
|
+
class NixOS < Linux
|
4
|
+
def check_enabled(service,level=3)
|
5
|
+
level = "multi-user.target" if level == 3
|
6
|
+
"systemctl --plain list-dependencies #{escape(level)} | grep '#{escape(service)}.service$'"
|
7
|
+
end
|
8
|
+
|
9
|
+
def check_installed(package, version=nil)
|
10
|
+
if version
|
11
|
+
"nix-store -q --references /var/run/current-system/sw | grep #{escape(package)}-#{escape(version)}"
|
12
|
+
else
|
13
|
+
"nix-store -q --references /var/run/current-system/sw | grep #{escape(package)}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
alias :check_installed_by_nix :check_installed
|
18
|
+
|
19
|
+
def check_running(service)
|
20
|
+
"systemctl is-active #{escape(service)}.service"
|
21
|
+
end
|
22
|
+
|
23
|
+
def install(package)
|
24
|
+
"nix-env -i #{package}"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/specinfra/command.rb
CHANGED
data/lib/specinfra/helper/os.rb
CHANGED
data/lib/specinfra/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.17.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: 2014-06-
|
11
|
+
date: 2014-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/specinfra/command/freebsd10.rb
|
104
104
|
- lib/specinfra/command/gentoo.rb
|
105
105
|
- lib/specinfra/command/linux.rb
|
106
|
+
- lib/specinfra/command/nixos.rb
|
106
107
|
- lib/specinfra/command/openbsd.rb
|
107
108
|
- lib/specinfra/command/opensuse.rb
|
108
109
|
- lib/specinfra/command/plamo.rb
|