Skip to content
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

lint #234

Merged
merged 2 commits into from
Nov 13, 2015
Merged

lint #234

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions inspec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/chef/inspec'
spec.license = 'Apache 2.0'

spec.files = %w(README.md Rakefile MAINTAINERS.toml MAINTAINERS.md LICENSE inspec.gemspec Gemfile CHANGELOG.md .rubocop.yml) +
Dir.glob("{bin,docs,examples,lib,tasks,test}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
spec.executables = %w( inspec )
spec.files = %w{
README.md Rakefile MAINTAINERS.toml MAINTAINERS.md LICENSE inspec.gemspec
Gemfile CHANGELOG.md .rubocop.yml
} + Dir.glob(
'{bin,docs,examples,lib,tasks,test}/**/*', File::FNM_DOTMATCH
).reject { |f| File.directory?(f) }

spec.executables = %w{ inspec }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

Expand Down
4 changes: 2 additions & 2 deletions lib/inspec/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def initialize(runner)

def start
# store context to run commands in this context
@runner.add_content({
content: 'binding.pry', ref: __FILE__, line: __LINE__}, [])
c = { content: 'binding.pry', ref: __FILE__, line: __LINE__ }
@runner.add_content(c, [])
@runner.run
end

Expand Down
2 changes: 1 addition & 1 deletion lib/resources/registry_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def method_missing(meth)
val = registry_value(@reg_key, meth)

# verify data
if (val[:exit_code] == 0)
if val[:exit_code] == 0
return convert_value(val[:data])
else
return nil
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def load

def method_missing(method)
# load data if needed
if (@loaded == false)
if @loaded == false
load
end

Expand Down
2 changes: 1 addition & 1 deletion lib/utils/simpleconfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def parse_values(match, values)
start_idx = 2
i = 0
count = values - 1
return match[start_idx] if (values == 1)
return match[start_idx] if values == 1

# iterate over expected parameters
values = []
Expand Down