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

Adds Rubocop Setup and fixes #258

Merged
merged 6 commits into from
Mar 2, 2017
Merged
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
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