poise-service-solaris 0.1.3 → 0.1.5
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 +4 -4
- data/.rubocop.yml +37 -0
- data/lib/poise_service/solaris/provider.rb +7 -5
- data/lib/poise_service/solaris/version.rb +1 -1
- data/poise-service-solaris.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a55d2507b0820764759c5e032be354f550e016d5
|
4
|
+
data.tar.gz: c7e3ca2eaa7afef8a83c11372a48501c0d54ef73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6024d87091a759777246ccd181a33c9f8c57ca9bdb3e165a71f72cce857bac212a31617b5f459292c1c77cad5f0e58067d3908e5b8edcacf068a1ecaba35bfab
|
7
|
+
data.tar.gz: f093e791d9203aa5123b55a324f2b3b6d2e9542b9f766f6bcbb7e5a8444f38007d38f40b355767f81d670738253a3111db8dbc371d7acd846cfabef110822555
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
AllCops:
|
3
|
+
Exclude:
|
4
|
+
- 'Guardfile'
|
5
|
+
- 'test/**/*'
|
6
|
+
- 'bin/**'
|
7
|
+
- 'vendor/**/*'
|
8
|
+
AlignParameters:
|
9
|
+
Enabled: false
|
10
|
+
ClassLength:
|
11
|
+
Enabled: false
|
12
|
+
CyclomaticComplexity:
|
13
|
+
Enabled: false
|
14
|
+
Documentation:
|
15
|
+
Enabled: false
|
16
|
+
Encoding:
|
17
|
+
Enabled: false
|
18
|
+
Style/FileName:
|
19
|
+
Enabled: false
|
20
|
+
LineLength:
|
21
|
+
Enabled: false
|
22
|
+
MethodLength:
|
23
|
+
Enabled: false
|
24
|
+
Metrics/AbcSize:
|
25
|
+
Enabled: false
|
26
|
+
PerceivedComplexity:
|
27
|
+
Enabled: false
|
28
|
+
SingleSpaceBeforeFirstArg:
|
29
|
+
Enabled: false
|
30
|
+
Style/ClassAndModuleChildren:
|
31
|
+
Enabled: false
|
32
|
+
Style/FileName:
|
33
|
+
Enabled: false
|
34
|
+
Style/GuardClause:
|
35
|
+
Enabled: false
|
36
|
+
Style/PercentLiteralDelimiters:
|
37
|
+
Enabled: false
|
@@ -19,6 +19,8 @@ module PoiseService
|
|
19
19
|
include Chef::Mixin::ShellOut
|
20
20
|
provides(:solaris_service)
|
21
21
|
|
22
|
+
# proritize this provider on solaris
|
23
|
+
Chef::Platform::ProviderPriorityMap.instance.priority(:poise_service, [self])
|
22
24
|
|
23
25
|
def self.provides_auto?(node, _)
|
24
26
|
node['platform_family'] == 'solaris2'
|
@@ -42,7 +44,7 @@ module PoiseService
|
|
42
44
|
|
43
45
|
template manifest_file do
|
44
46
|
source 'manifest.xml.erb'
|
45
|
-
cookbook 'poise-service-solaris' #poise needs cookbook name for template
|
47
|
+
cookbook 'poise-service-solaris' # poise needs cookbook name for template
|
46
48
|
verify 'svccfg validate %{file}'
|
47
49
|
variables(
|
48
50
|
name: new_resource.service_name,
|
@@ -51,14 +53,14 @@ module PoiseService
|
|
51
53
|
environment: new_resource.environment,
|
52
54
|
directory: new_resource.directory
|
53
55
|
)
|
54
|
-
notifies :run, 'execute[load service manifest]', :immediately
|
55
56
|
end
|
56
57
|
|
57
58
|
execute 'load service manifest' do
|
58
|
-
action :nothing
|
59
59
|
# we synchrously disable and enable instead of
|
60
60
|
# calling restart to avoid timing problem
|
61
61
|
command 'svcadm disable -s manifest-import && svcadm enable -s manifest-import'
|
62
|
+
# svcs <service_name> returns 0 if service exists
|
63
|
+
not_if "svcs #{new_resource.service_name}"
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
@@ -66,14 +68,14 @@ module PoiseService
|
|
66
68
|
Chef::Log.debug("Destroying solaris service #{new_resource.service_name}")
|
67
69
|
file manifest_file do
|
68
70
|
action :delete
|
69
|
-
notifies :run, 'execute[load service manifest]', :immediately
|
70
71
|
end
|
71
72
|
|
72
73
|
execute 'load service manifest' do
|
73
|
-
action :nothing
|
74
74
|
# we synchrously disable and enable instead of
|
75
75
|
# calling restart to avoid timing problem
|
76
76
|
command 'svcadm disable -s manifest-import && svcadm enable -s manifest-import'
|
77
|
+
# svcs <service_name> returns 0 if service exists
|
78
|
+
only_if "svcs #{new_resource.service_name}"
|
77
79
|
end
|
78
80
|
end
|
79
81
|
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.name = 'poise-service-solaris'
|
15
15
|
spec.version = PoiseService::Solaris::VERSION
|
16
16
|
spec.authors = ['Shahul Khajamohideen']
|
17
|
-
spec.email = %w
|
17
|
+
spec.email = %w(skhajamohid1@bloomberg.net)
|
18
18
|
spec.description = 'A Solaris provider for poise-service.'
|
19
19
|
spec.summary = spec.description
|
20
20
|
spec.homepage = 'https://github.com/sh9189/poise-service-solaris'
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.files = `git ls-files`.split($RS)
|
24
24
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
25
25
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
26
|
-
spec.require_paths = %w
|
26
|
+
spec.require_paths = %w(lib)
|
27
27
|
|
28
28
|
spec.add_dependency 'halite', '~> 1.0'
|
29
29
|
spec.add_dependency 'poise', '~> 2.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poise-service-solaris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shahul Khajamohideen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: halite
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
77
|
- ".rspec"
|
78
|
+
- ".rubocop.yml"
|
78
79
|
- ".travis.yml"
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE
|
@@ -108,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
109
|
version: '0'
|
109
110
|
requirements: []
|
110
111
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.5.1
|
112
113
|
signing_key:
|
113
114
|
specification_version: 4
|
114
115
|
summary: A Solaris provider for poise-service.
|