Commit graph

373 commits

Author SHA1 Message Date
Dominik Richter
bb18ce52e2 update function+test calls from exists? -> exist? 2015-09-22 02:27:03 +02:00
Dominik Richter
366bc44d0d rename command().exists? -> command().exist?
This is in line with Ruby 2.1 changes in renaming File and Dir exists? to exist?
See previous commit

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:03 +02:00
Dominik Richter
0b7eb60028 File.exists? is deprecated in ruby 2.1
See:
http://ruby-doc.org/core-2.1.0/File.html#method-c-exists-3F

Same for Dir:
http://ruby-doc.org/core-2.1.0/Dir.html#method-c-exists-3F

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:03 +02:00
Christoph Hartmann
78fea3d3a2 support package for windows 2015-09-22 02:27:03 +02:00
Christoph Hartmann
f9501577e4 improve code style 2015-09-22 02:27:03 +02:00
Christoph Hartmann
5019664d4d bugfix: catch cases, where no service is available 2015-09-22 02:27:03 +02:00
Dominik Richter
7fb41cdbee remove conditional or on release for detect util
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:03 +02:00
Dominik Richter
13f7429509 remove commented fedora code
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:03 +02:00
Dominik Richter
e78fbf1b96 move windows OS detection to backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Dominik Richter
94d748efd1 add os name to detect util
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Dominik Richter
f0215a4380 specinfra backwards compatibility for darwin/osX
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Dominik Richter
0ed2f1b535 fix inverted darwin detection
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Dominik Richter
ca753cdb83 feature: add os resource 2015-09-22 02:27:02 +02:00
Dominik Richter
50dd82e150 feature: OS detection 2015-09-22 02:27:02 +02:00
Christoph Hartmann
34889913b4 bugfix: fix simplified runner configuration 2015-09-22 02:27:02 +02:00
Dominik Richter
9de015ae2d improvement: simplify runner configuration
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Christoph Hartmann
37783385d4 implement service for FreeBSD 2015-09-22 02:27:02 +02:00
Christoph Hartmann
e06eed2178 Merge pull request #19 from chef/improvements
Improvements
2015-09-22 02:27:01 +02:00
Dominik Richter
4965bfd36d make installed? always return true/false
Dont return nil als a falsy result.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
38a77efb4a fix failing tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
535bddd944 move out local file user/group name
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
bef9cbf3e7 prevent yum repo shortname matching to nil
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
4d7c11b980 lazy eval ssh config params
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
dcc790b8a9 simplify nested params retrieval
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
55a26cfba7 align pip resource with info handling
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
10926935e2 align oneget resource with info handling
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
f395ebf6df lazy eval ntp conf
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
508a6889d1 align npm resource with info handling
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
fc9764aa36 lazy eval login.defs
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
3508219428 lazy eval limits.conf
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
6a6c1fd7c8 lazy eval inetd conf
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
075313b10e cache gem package results
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
bfad1e1509 lazy eval auditd conf
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Christoph Hartmann
341a4ba98d improvement: simplify readability of nil checks 2015-09-22 02:27:01 +02:00
Christoph Hartmann
db81929dd7 minor style improvement 2015-09-22 02:27:01 +02:00
Christoph Hartmann
c081cfac82 improve reliability of method_missing 2015-09-22 02:27:01 +02:00
Christoph Hartmann
05dd53b5b4 improvement: skip package resource if not supported on OS 2015-09-22 02:27:00 +02:00
Dominik Richter
9608e2e29b bugfix: specinfra selinux label handling
as specinfra doesnt work with respond_to?, just call the method and catch the error.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Christoph Hartmann
a88304d030 remove method missing for yum resource 2015-09-22 02:27:00 +02:00
Dominik Richter
6c29580de0 enforce file content encoding to utf8
this is also in line with specinfra compatibility

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Christoph Hartmann
046f3fe9e4 fix robocop issues 2015-09-22 02:27:00 +02:00
Dominik Richter
c06fe38981 bugfix: dont strip specinfra file content output
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Christoph Hartmann
8113df6d44 bugfix: fix sysv implementation 2015-09-22 02:27:00 +02:00
Dominik Richter
61e7559489 fix bsd stat detection
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Christoph Hartmann
2e46e0781a bugfix: fix initctl matcher to detect enabled services 2015-09-22 02:27:00 +02:00
Dominik Richter
13ce808a90 bugfix: specinfra is missing methods for freebsd
Add getter for user/group/mode for freebsd, as specinfra will execute these calls but not return anything.
2015-09-22 02:27:00 +02:00
Christoph Hartmann
7806951051 add fedora support 2015-09-22 02:27:00 +02:00
Dominik Richter
a1a0e10c5a extend linux file with bsd stat
TODO: we must start separating between the different UNIXes and maybe call this something better than LinuxFile, but for now: since most of the things will stay the same, add the bsd stat command as an alternative to the linux stat command and parse its output.
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Dominik Richter
82f89aa1db bugfix: dont fail on specinfra selinux_label on freebsd
the call shouldnt be made, but in case it is, dont just fail mit NoMethodError

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Christoph Hartmann
2484623220 add comments 2015-09-22 02:26:59 +02:00