Skip to content

Commit

Permalink
WIP: fixing ruby warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed May 22, 2015
1 parent 609a6e8 commit 58539fe
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: false
language: ruby
bundler_args: --path vendor/bundle --jobs=3 --retry=3
script: bundle exec rspec
script: bundle exec rake
cache: bundler

before_install:
Expand Down
2 changes: 1 addition & 1 deletion lib/metric_fu/io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def create_directories(*dirs)

# Add the 'app' directory if we're running within rails.
def set_code_dirs
@directories["code_dirs"] = %w(app lib).select { |dir| Dir.exists?(dir) }
@directories["code_dirs"] = %w(app lib).select { |dir| Dir.exist?(dir) }
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/metric_fu/metrics/saikuro/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def erb_file?(filename)
end

def file_not_exists?(filename)
!File.exists?(filename)
!File.exist?(filename)
end

def sort_methods(methods)
Expand Down
2 changes: 2 additions & 0 deletions spec/capture_warnings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@

if app_warnings.any?
puts <<-WARNINGS
#{'-' * 30} app warnings: #{'-' * 30}
#{app_warnings.join("\n")}
#{'-' * 75}
WARNINGS

abort "Failing build due to app warnings: #{app_warnings.inspect}"
Expand Down
4 changes: 2 additions & 2 deletions spec/metric_fu/metrics/rcov/simplecov_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
describe SimpleCov::Formatter::MetricFu do
before do
@rcov_file = subject.coverage_file_path
File.delete(@rcov_file) if File.exists?(@rcov_file)
File.delete(@rcov_file) if File.exist?(@rcov_file)

@result = SimpleCov::Result.new(

Expand All @@ -19,7 +19,7 @@
it "test_format" do
SimpleCov::Formatter::MetricFu.new.format(@result)

expect(File.exists?(@rcov_file)).to be_truthy
expect(File.exist?(@rcov_file)).to be_truthy
end

if SimpleCov.running
Expand Down

0 comments on commit 58539fe

Please sign in to comment.