Skip to content

Commit

Permalink
Merge pull request #258 from petems/all_rubocop_fixes
Browse files Browse the repository at this point in the history
Adds Rubocop Setup and fixes
  • Loading branch information
petems authored Mar 2, 2017
2 parents 23a65eb + 62631d8 commit c51b090
Show file tree
Hide file tree
Showing 84 changed files with 2,796 additions and 2,483 deletions.
520 changes: 520 additions & 0 deletions .rubocop.yml

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ Bundler.require(:development)
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
require 'rubocop/rake_task'

RSpec::Core::RakeTask.new(:spec)

Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = %w(--format pretty --order random)
end

task :default => [:spec, :features]
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['--display-cop-names']
end

task default: [:spec, :features]
4 changes: 2 additions & 2 deletions bin/tugboat
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# https://github.com/mitchellh/vagrant/blob/8cc4910fa9ca6059697459d0cdee1557af8d0507/bin/vagrant#L3-L6
# Catch any ctrl+c's to avoid stack traces. Thanks Mitchell. ^^

Signal.trap("INT") { exit 1 }
Signal.trap('INT') { exit 1 }

require "tugboat"
require 'tugboat'

Tugboat::CLI.start(ARGV)
2 changes: 1 addition & 1 deletion features/step_definitions/steps.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'erb'

Given(/^a '\.tugboat' config with data:$/) do |data_str|
Given(%r{^a '\.tugboat' config with data:$}) do |data_str|
data = ERB.new(data_str).result(binding)
File.write("#{Dir.pwd}/tmp/aruba/.tugboat", data)
end
10 changes: 7 additions & 3 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@
VCR.configure do |c|
c.hook_into :webmock
c.cassette_library_dir = 'features/cassettes'
c.default_cassette_options = { :record => :new_episodes }
c.default_cassette_options = { record: :new_episodes }
end

VCR.cucumber_tags do |t|
t.tag '@vcr', :use_scenario_name => true
t.tag '@vcr', use_scenario_name: true
end

class VcrFriendlyMain
def initialize(argv, stdin, stdout, stderr, kernel)
@argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
@argv = argv
@stdin = stdin
@stdout = stdout
@stderr = stderr
@kernel = kernel
end

def execute!
Expand Down
4 changes: 2 additions & 2 deletions lib/tugboat.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'tugboat/cli'
require "tugboat/config"
require "tugboat/version"
require 'tugboat/config'
require 'tugboat/version'
require 'json'

module Tugboat
Expand Down
Loading

0 comments on commit c51b090

Please sign in to comment.