specinfra 2.40.2 → 2.41.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: 3b2740cf9a1c2a94f43b9c50f62bcec25348ced8
4
- data.tar.gz: a4b1f4c361ce1e1a3f9caf08786398371ac04019
3
+ metadata.gz: 351ba5ebfeaf1a5501fd8064442a125c6e568ee2
4
+ data.tar.gz: 8978612b3188ea343f48e13876e537a8082f50ea
5
5
  SHA512:
6
- metadata.gz: 3ac0073358d0d3750fae121a36f02eb05555b79bc25f9d7d8afb72ad81ecf260d3c3a52218911d8be4d37a99195ff7ec6e61450da88eb4b6d0dcf64eba66f15c
7
- data.tar.gz: 9e948d11e4e09f3a4e96bd4e860740ed831e2a9195c97c173ce9470e1e7c6e1ff9c325c8620c11a5a6f179a24469c11fd40968bcd760ddfd0178f29d3b842b87
6
+ metadata.gz: c40ce4d8e6a883599b8f73c04c2b04ef9b6eafcf6ff332483a7fd08b94c8808a20b58d91d89bf53846bf66e130ce8debf5fdd634ab8fa355cf2ffc7b09e49893
7
+ data.tar.gz: 98aa66a0c0e68a6a5f5d7b30df23bf686ec3effe49c7c41098166f6211e59c396b857bd6456e81f85f9bb352256da4f18023bf62b9a5cc9877e9e5b591760900
@@ -291,3 +291,11 @@ require 'specinfra/command/windows/base/service'
291
291
  require 'specinfra/command/windows/base/user'
292
292
  require 'specinfra/command/windows/base/registry_key'
293
293
  require 'specinfra/command/windows/base/scheduled_task'
294
+
295
+ # Poky (inherit Linux)
296
+ require 'specinfra/command/poky'
297
+ require 'specinfra/command/poky/base'
298
+ require 'specinfra/command/poky/base/interface'
299
+ require 'specinfra/command/poky/base/inventory'
300
+ require 'specinfra/command/poky/base/package'
301
+ require 'specinfra/command/poky/base/service'
@@ -0,0 +1 @@
1
+ class Specinfra::Command::Poky; end
@@ -0,0 +1,2 @@
1
+ class Specinfra::Command::Poky::Base < Specinfra::Command::Linux::Base
2
+ end
@@ -0,0 +1,2 @@
1
+ class Specinfra::Command::Poky::Base::Interface < Specinfra::Command::Linux::Base::Interface
2
+ end
@@ -0,0 +1,2 @@
1
+ class Specinfra::Command::Poky::Base::Inventory < Specinfra::Command::Linux::Base::Inventory
2
+ end
@@ -0,0 +1,26 @@
1
+ class Specinfra::Command::Poky::Base::Package < Specinfra::Command::Linux::Base::Package
2
+ class << self
3
+ def check_is_installed(package, version=nil)
4
+ package_escaped = escape(package)
5
+ cmd = "opkg status #{package_escaped} | grep -E '^Version|(user|ok) installed$'"
6
+ cmd = "#{cmd} | grep -E #{escape(version)}" if version
7
+ cmd
8
+ end
9
+
10
+ alias :check_is_installed_by_opkg :check_is_installed
11
+
12
+ def install(package, version=nil, option='')
13
+ # opkg doesn't support to install specific version.
14
+ "opkg install #{option} #{package}"
15
+ end
16
+
17
+ def get_version(package, opts=nil)
18
+ "opkg list-installed #{package} | cut -d ' ' -f 3"
19
+ end
20
+
21
+ def remove(package, option='')
22
+ "opkg remove #{option} #{package}"
23
+ end
24
+ end
25
+ end
26
+
@@ -0,0 +1,5 @@
1
+ class Specinfra::Command::Poky::Base::Service < Specinfra::Command::Linux::Base::Service
2
+ class << self
3
+ include Specinfra::Command::Module::Systemd
4
+ end
5
+ end
@@ -32,6 +32,7 @@ require 'specinfra/helper/detect_os/gentoo'
32
32
  require 'specinfra/helper/detect_os/nixos'
33
33
  require 'specinfra/helper/detect_os/openbsd'
34
34
  require 'specinfra/helper/detect_os/plamo'
35
+ require 'specinfra/helper/detect_os/poky'
35
36
  require 'specinfra/helper/detect_os/redhat'
36
37
  require 'specinfra/helper/detect_os/solaris'
37
38
  require 'specinfra/helper/detect_os/suse'
@@ -0,0 +1,7 @@
1
+ class Specinfra::Helper::DetectOs::Poky < Specinfra::Helper::DetectOs
2
+ def detect
3
+ if ( uname = run_command('uname -r').stdout ) && uname =~ /poky/i
4
+ { :family => 'poky', :release => run_command('cat /etc/version').stdout }
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.40.2"
2
+ VERSION = "2.41.0"
3
3
  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.40.2
4
+ version: 2.41.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: 2015-08-12 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp
@@ -325,6 +325,12 @@ files:
325
325
  - lib/specinfra/command/plamo/base.rb
326
326
  - lib/specinfra/command/plamo/base/package.rb
327
327
  - lib/specinfra/command/plamo/base/service.rb
328
+ - lib/specinfra/command/poky.rb
329
+ - lib/specinfra/command/poky/base.rb
330
+ - lib/specinfra/command/poky/base/interface.rb
331
+ - lib/specinfra/command/poky/base/inventory.rb
332
+ - lib/specinfra/command/poky/base/package.rb
333
+ - lib/specinfra/command/poky/base/service.rb
328
334
  - lib/specinfra/command/redhat.rb
329
335
  - lib/specinfra/command/redhat/base.rb
330
336
  - lib/specinfra/command/redhat/base/file.rb
@@ -414,6 +420,7 @@ files:
414
420
  - lib/specinfra/helper/detect_os/nixos.rb
415
421
  - lib/specinfra/helper/detect_os/openbsd.rb
416
422
  - lib/specinfra/helper/detect_os/plamo.rb
423
+ - lib/specinfra/helper/detect_os/poky.rb
417
424
  - lib/specinfra/helper/detect_os/redhat.rb
418
425
  - lib/specinfra/helper/detect_os/solaris.rb
419
426
  - lib/specinfra/helper/detect_os/suse.rb