-
Notifications
You must be signed in to change notification settings - Fork 838
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from ryanb/syntax-tree-format
Format with Syntax Tree
- Loading branch information
Showing
92 changed files
with
657 additions
and
679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--print-width=100 | ||
--plugins=plugin/trailing_comma | ||
--ignore-files='rubywarrior/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
source "https://rubygems.org" | ||
|
||
gem 'base64' | ||
gem "base64" | ||
gem "syntax_tree" | ||
|
||
group :test do | ||
gem 'rake' | ||
gem 'rspec', '~> 3.13.0' | ||
gem 'cucumber' | ||
gem "rake" | ||
gem "rspec", "~> 3.13.0" | ||
gem "cucumber" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
require 'rake' | ||
require 'rspec' | ||
require 'rspec/core/rake_task' | ||
require 'cucumber' | ||
require 'cucumber/rake/task' | ||
require "rake" | ||
require "rspec" | ||
require "rspec/core/rake_task" | ||
require "cucumber" | ||
require "cucumber/rake/task" | ||
|
||
desc "Run specs" | ||
RSpec::Core::RakeTask.new(:spec) do |t| | ||
t.pattern = "spec/**/*_spec.rb" | ||
end | ||
RSpec::Core::RakeTask.new(:spec) { |t| t.pattern = "spec/**/*_spec.rb" } | ||
|
||
Cucumber::Rake::Task.new(:features) do |t| | ||
t.cucumber_opts = %w[features --format progress] | ||
end | ||
Cucumber::Rake::Task.new(:features) { |t| t.cucumber_opts = %w[features] } | ||
|
||
task :default => [:spec, :features] | ||
task default: %i[spec features] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# loading the spec_helper file even though this isn't necessarily for specs | ||
# it's just a convenient, quick way to load all the requirements. | ||
puts "Loading console" | ||
exec "irb -r #{File.dirname(__FILE__) + '/../lib/ruby_warrior.rb'} -r #{File.dirname(__FILE__) + '/../features/support/mockio.rb'} --simple-prompt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
bundle exec stree write '**/*.rb' bin/rubywarrior Gemfile Rakefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env ruby | ||
require_relative '../lib/ruby_warrior' | ||
require_relative "../lib/ruby_warrior" | ||
|
||
runner = RubyWarrior::Runner.new(ARGV, STDIN, STDOUT) | ||
runner.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default: --publish-quiet --format progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
require 'cucumber' | ||
require 'rspec' | ||
require "cucumber" | ||
require "rspec" | ||
|
||
require File.dirname(__FILE__) + '/../../lib/ruby_warrior' | ||
require File.dirname(__FILE__) + "/../../lib/ruby_warrior" | ||
|
||
Before do | ||
RubyWarrior::Config.reset | ||
end | ||
Before { RubyWarrior::Config.reset } | ||
|
||
After do | ||
FileUtils.rm_rf "towers/short" | ||
end | ||
After { FileUtils.rm_rf "towers/short" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
$: << File.dirname(__FILE__) | ||
|
||
require 'set' | ||
require "set" | ||
|
||
require 'ruby_warrior/core_additions' | ||
require "ruby_warrior/core_additions" | ||
|
||
require 'ruby_warrior/runner' | ||
require 'ruby_warrior/game' | ||
require 'ruby_warrior/profile' | ||
require 'ruby_warrior/ui' | ||
require 'ruby_warrior/config' | ||
require 'ruby_warrior/player_generator' | ||
require 'ruby_warrior/level_loader' | ||
require 'ruby_warrior/tower' | ||
require 'ruby_warrior/level' | ||
require 'ruby_warrior/turn' | ||
require 'ruby_warrior/floor' | ||
require 'ruby_warrior/space' | ||
require 'ruby_warrior/position' | ||
require "ruby_warrior/runner" | ||
require "ruby_warrior/game" | ||
require "ruby_warrior/profile" | ||
require "ruby_warrior/ui" | ||
require "ruby_warrior/config" | ||
require "ruby_warrior/player_generator" | ||
require "ruby_warrior/level_loader" | ||
require "ruby_warrior/tower" | ||
require "ruby_warrior/level" | ||
require "ruby_warrior/turn" | ||
require "ruby_warrior/floor" | ||
require "ruby_warrior/space" | ||
require "ruby_warrior/position" | ||
|
||
require 'ruby_warrior/units/base' | ||
require 'ruby_warrior/units/warrior' | ||
require 'ruby_warrior/units/sludge' | ||
require 'ruby_warrior/units/archer' | ||
require 'ruby_warrior/units/thick_sludge' | ||
require 'ruby_warrior/units/captive' | ||
require 'ruby_warrior/units/wizard' | ||
require 'ruby_warrior/units/golem' | ||
require "ruby_warrior/units/base" | ||
require "ruby_warrior/units/warrior" | ||
require "ruby_warrior/units/sludge" | ||
require "ruby_warrior/units/archer" | ||
require "ruby_warrior/units/thick_sludge" | ||
require "ruby_warrior/units/captive" | ||
require "ruby_warrior/units/wizard" | ||
require "ruby_warrior/units/golem" | ||
|
||
require 'ruby_warrior/abilities/base' | ||
require 'ruby_warrior/abilities/walk' | ||
require 'ruby_warrior/abilities/attack' | ||
require 'ruby_warrior/abilities/feel' | ||
require 'ruby_warrior/abilities/rest' | ||
require 'ruby_warrior/abilities/health' | ||
require 'ruby_warrior/abilities/look' | ||
require 'ruby_warrior/abilities/shoot' | ||
require 'ruby_warrior/abilities/rescue' | ||
require 'ruby_warrior/abilities/pivot' | ||
require 'ruby_warrior/abilities/distance_of' | ||
require 'ruby_warrior/abilities/bind' | ||
require 'ruby_warrior/abilities/listen' | ||
require 'ruby_warrior/abilities/direction_of_stairs' | ||
require 'ruby_warrior/abilities/direction_of' | ||
require 'ruby_warrior/abilities/explode' | ||
require 'ruby_warrior/abilities/detonate' | ||
require 'ruby_warrior/abilities/form' | ||
require "ruby_warrior/abilities/base" | ||
require "ruby_warrior/abilities/walk" | ||
require "ruby_warrior/abilities/attack" | ||
require "ruby_warrior/abilities/feel" | ||
require "ruby_warrior/abilities/rest" | ||
require "ruby_warrior/abilities/health" | ||
require "ruby_warrior/abilities/look" | ||
require "ruby_warrior/abilities/shoot" | ||
require "ruby_warrior/abilities/rescue" | ||
require "ruby_warrior/abilities/pivot" | ||
require "ruby_warrior/abilities/distance_of" | ||
require "ruby_warrior/abilities/bind" | ||
require "ruby_warrior/abilities/listen" | ||
require "ruby_warrior/abilities/direction_of_stairs" | ||
require "ruby_warrior/abilities/direction_of" | ||
require "ruby_warrior/abilities/explode" | ||
require "ruby_warrior/abilities/detonate" | ||
require "ruby_warrior/abilities/form" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.