Skip to content

Commit

Permalink
Rename sensitive attribute to confidential to be Chef 13 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Hoer committed Mar 25, 2017
1 parent 690359a commit 1271cdf
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ provisioner:
name: chef_solo
require_chef_omnibus: 12

platforms:
`platforms:
- name: windows-2012r2
driver:
box: dhoer/windows-2012r2

`
suites:
- name: nssm_test
run_list:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# NSSM CHANGELOG

## 3.0.0 2017-03-24

- Rename sensitive attribute to confidential to be Chef 13 compatible

## 2.0.0 2016-10-03

- Drop support for Chef 11
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ So, for example, the following sets the Startup directory, I/O redirection, and
nssm 'service name' do
program 'C:\Windows\System32\java.exe'
args '-jar C:/path/to/my-executable.jar'
params(
parameters(
AppDirectory: 'C:/path/to',
AppStdout: 'C:/path/to/log/service.log',
AppStderr: 'C:/path/to/log/error.log',
Expand All @@ -62,7 +62,7 @@ end

### Arguments with Spaces

Having spaces in `servicename`, `program` and `params` attributes is not a problem, but spaces in an argument is a
Having spaces in `servicename`, `program` and `parameters` attributes is not a problem, but spaces in an argument is a
different matter.

When dealing with an argument containing spaces, surround it
Expand Down Expand Up @@ -108,7 +108,7 @@ checksum.
- `servicename` - Name attribute. The name of the Windows service.
- `program` - The program to be run as a service.
- `args` - String of arguments for the program. Optional
- `params` - Hash of key value pairs where key represents associated registry entry. Optional
- `parameters` - Hash of key value pairs where key represents associated registry entry. Optional
- `start` - Start service after installing. Default` - true

## ChefSpec Matchers
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url 'https://github.com/dhoer/chef-nssm'
issues_url 'https://github.com/dhoer/chef-nssm/issues'
version '2.0.0'
version '3.0.0'

chef_version '>= 12.6'

Expand Down
2 changes: 1 addition & 1 deletion providers/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def nssm_exe
end

unless service_installed
new_resource.params.map do |k, v|
new_resource.parameters.map do |k, v|
batch "Set parameter #{k} #{v}" do
code "#{nssm_exe} set \"#{new_resource.servicename}\" #{k} #{v}"
end
Expand Down
2 changes: 1 addition & 1 deletion resources/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
attribute :servicename, name_attribute: true
attribute :program, kind_of: String, required: true
attribute :args, kind_of: String
attribute :params, kind_of: Hash, default: {}
attribute :parameters, kind_of: Hash, default: {}
attribute :start, kind_of: [TrueClass, FalseClass], default: true
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
nssm 'service name' do
program "#{node['java_se']['win_javalink']}\\java.exe"
args "-jar #{path}"
params(
parameters(
AppDirectory: Chef::Config[:file_cache_path],
AppStdout: "#{Chef::Config[:file_cache_path]}\\service.log",
AppStderr: "#{Chef::Config[:file_cache_path]}\\error.log",
Expand Down

0 comments on commit 1271cdf

Please sign in to comment.