diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8c734ac --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: ruby +rvm: + - "1.9.3" +before_script: rake db:migrate diff --git a/Gemfile b/Gemfile index c79f2f8..72031de 100755 --- a/Gemfile +++ b/Gemfile @@ -12,11 +12,13 @@ gem 'foreman' group :development do gem 'brakeman' gem 'guard-brakeman' + gem 'guard-rspec' gem 'rb-fsevent' gem 'guard-shell' gem 'bundler-audit' gem 'guard-livereload' gem 'rack-livereload' + gem 'travis-lint' end gem 'gauntlt' @@ -25,7 +27,6 @@ group :development, :test do gem 'rspec-rails' end - # Gems used only for assets and not required # in production environments by default. group :assets do @@ -56,6 +57,8 @@ gem 'powder' gem 'aruba' gem 'minitest', '~> 4.0', :require=> "minitest/autorun" +#gem 'minitest' + # Deploy with Capistrano # gem 'capistrano' diff --git a/Gemfile.lock b/Gemfile.lock index 698a0df..e82bd83 100755 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -95,10 +95,14 @@ GEM em-websocket (>= 0.2.0) guard (>= 1.5.0) multi_json (~> 1.0) + guard-rspec (2.5.4) + guard (>= 1.1) + rspec (~> 2.11) guard-shell (0.5.1) guard (>= 1.1.0) haml (4.0.2) tilt + hashr (0.0.22) highline (1.6.16) hike (1.2.2) http_parser.rb (0.5.3) @@ -159,10 +163,14 @@ GEM rb-fsevent (0.9.3) rdoc (3.12.2) json (~> 1.4) - rspec-core (2.14.4) + rspec (2.14.1) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rspec-core (2.14.2) rspec-expectations (2.14.0) diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.2) + rspec-mocks (2.14.1) rspec-rails (2.14.0) actionpack (>= 3.0) activesupport (>= 3.0) @@ -195,6 +203,8 @@ GEM terminal-table (1.4.5) thor (0.18.1) tilt (1.3.7) + travis-lint (1.7.0) + hashr (~> 0.0.22) treetop (1.4.12) polyglot polyglot (>= 0.3.1) @@ -221,6 +231,7 @@ DEPENDENCIES gauntlt guard-brakeman guard-livereload + guard-rspec guard-shell jquery-fileupload-rails jquery-rails @@ -232,5 +243,6 @@ DEPENDENCIES rspec-rails sass-rails (~> 3.2.3) sqlite3 + travis-lint uglifier (>= 1.0.3) unicorn diff --git a/Guardfile b/Guardfile index b3ae7e6..af80ae3 100755 --- a/Guardfile +++ b/Guardfile @@ -20,3 +20,26 @@ guard 'livereload', host: "railsgoat.dev", port: '35727' do # Rails Assets Pipeline watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" } end + + +guard 'rspec' do + watch(%r{^spec/.+_spec\.rb$}) + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } + watch('spec/spec_helper.rb') { "spec" } + + # Rails example + watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } + watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } + watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } + watch(%r{^spec/support/(.+)\.rb$}) { "spec" } + watch('config/routes.rb') { "spec/routing" } + watch('app/controllers/application_controller.rb') { "spec/controllers" } + + # Capybara features specs + watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" } + + # Turnip features and steps + watch(%r{^spec/acceptance/(.+)\.feature$}) + watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } +end + diff --git a/README.md b/README.md index 8e5f57b..0740350 100755 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ +## Getting Started ## +#### With Ruby, Rubygems, Git, and Bundler installed #### + + git clone https://github.com/OWASP/railsgoat.git + + cd railsgoat + + rvm use 1.9.3@railsgoat --create + + bundle + + rake db:create + + rake db:migrate + + rails s + + open http://0.0.0.0:3000 + + Start hacking!!! + ### Developer Note ###
Conversion to the OWASP Top 10, 2013 is under way. @@ -9,6 +30,10 @@ You can view progress within the top-10-2013 branch. Then proceed with browsing the site as normal :thumbsup: