-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fixes, lint, rubocop, spec tests etc. #53
Conversation
Update variables to match parameters. Not just a lint error, an actual bug! Signed-off-by: Alexander Fisher <[email protected]>
`::include splunk::platform::solaris` had the `::`s in the wrong place. Signed-off-by: Alexander Fisher <[email protected]>
These were just lint errors as opposed to actual bugs. Signed-off-by: Alexander Fisher <[email protected]>
* Add `fixtures.yml`. * Add `default_module_facts.yml` with `staging_http_get` fact. * Rubocop fixes in `spec/classes/example_spec.rb`. * Remove completely broken tests. Looks like there aren't really any tests and `spec/classes/example_spec.rb` is just boilerplate/skeleton. For instance there is no `config.pp` manifest, so ```ruby it { is_expected.to contain_class('splunk::config') } ``` was never going to pass! Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
For consistency with other Vox Pupuli maintained modules. Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
Signed-off-by: Alexander Fisher <[email protected]>
@@ -13,7 +13,7 @@ def self.file_path | |||
File.join(@file_path, file_name) | |||
end | |||
|
|||
def self.set_file_path(path) | |||
def self.set_file_path(path) # rubocop:disable Style/AccessorMethodName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wimped out here. Somebody with more knowledge of the module and how the inifile providers work could have a go if they really wanted to. Probably not worth it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the rubocop docs we should rename this to
def self.file_path=(path)
And then change the references to this method in splunk_config
eg;
Puppet::Type.type(res_type).provider(:ini_setting).file_path=(self[:server_confdir])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def self.file_path=(path)
leads to Style/TrivialAccessors: Use attr_writer to define trivial writer methods.
which can be fixed by replacing the whole thing with
attr_writer :file_path
I think?
Puppet::Type.type(res_type).provider(:ini_setting).file_path=(self[:server_confdir])leads to
Style/SpaceAroundOperators: Surrounding space missing for operator =
at which point it was late and I got scared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll need....
class << self
attr_writer :file_path
end
@crayfishx Would you like to review this one? |
Changed set_file_path to be a simple attr_writer.
A couple of bug fixes. Lots of lint fixes. Tests (hardly any) now at least run. See individual commits for details.