Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first commit

  • Loading branch information...
commit 5aead5770ac40f9f64bba3dc1d09df48b63bb875 0 parents
@jwang authored
Showing with 3,798 additions and 0 deletions.
  1. +24 −0 .gitignore
  2. +1 −0  .rspec
  3. +29 −0 Gemfile
  4. +163 −0 Gemfile.lock
  5. 0  README.md
  6. +7 −0 Rakefile
  7. BIN  app/assets/images/rails.png
  8. +9 −0 app/assets/javascripts/application.js
  9. +7 −0 app/assets/stylesheets/application.css
  10. +3 −0  app/controllers/application_controller.rb
  11. +130 −0 app/controllers/application_controller.rbc
  12. +2 −0  app/helpers/application_helper.rb
  13. +54 −0 app/helpers/application_helper.rbc
  14. 0  app/mailers/.gitkeep
  15. 0  app/models/.gitkeep
  16. +14 −0 app/views/layouts/application.html.erb
  17. +4 −0 config.ru
  18. +47 −0 config/application.rb
  19. +457 −0 config/application.rbc
  20. +6 −0 config/boot.rb
  21. +170 −0 config/boot.rbc
  22. +8 −0 config/cucumber.yml
  23. +58 −0 config/database.yml
  24. +5 −0 config/environment.rb
  25. +96 −0 config/environment.rbc
  26. +27 −0 config/environments/development.rb
  27. +287 −0 config/environments/development.rbc
  28. +54 −0 config/environments/production.rb
  29. +39 −0 config/environments/test.rb
  30. +7 −0 config/initializers/backtrace_silencers.rb
  31. +40 −0 config/initializers/backtrace_silencers.rbc
  32. +3 −0  config/initializers/generators.rb
  33. +133 −0 config/initializers/generators.rbc
  34. +10 −0 config/initializers/inflections.rb
  35. +40 −0 config/initializers/inflections.rbc
  36. +5 −0 config/initializers/mime_types.rb
  37. +40 −0 config/initializers/mime_types.rbc
  38. +7 −0 config/initializers/secret_token.rb
  39. +73 −0 config/initializers/secret_token.rbc
  40. +8 −0 config/initializers/session_store.rb
  41. +100 −0 config/initializers/session_store.rbc
  42. +12 −0 config/initializers/wrap_parameters.rb
  43. +165 −0 config/initializers/wrap_parameters.rbc
  44. +5 −0 config/locales/en.yml
  45. +58 −0 config/routes.rb
  46. +106 −0 config/routes.rbc
  47. +7 −0 db/seeds.rb
  48. +2 −0  doc/README_FOR_APP
  49. +211 −0 features/step_definitions/web_steps.rb
  50. +50 −0 features/support/env.rb
  51. +33 −0 features/support/paths.rb
  52. +39 −0 features/support/selectors.rb
  53. 0  lib/tasks/.gitkeep
  54. +65 −0 lib/tasks/cucumber.rake
  55. 0  log/.gitkeep
  56. +26 −0 public/404.html
  57. +26 −0 public/422.html
  58. +26 −0 public/500.html
  59. 0  public/favicon.ico
  60. +241 −0 public/index.html
  61. +5 −0 public/robots.txt
  62. +10 −0 script/cucumber
  63. +6 −0 script/rails
  64. +123 −0 script/rails.compiled.rbc
  65. +27 −0 spec/spec_helper.rb
  66. +388 −0 spec/spec_helper.rbc
  67. 0  vendor/assets/stylesheets/.gitkeep
  68. 0  vendor/plugins/.gitkeep
24 .gitignore
@@ -0,0 +1,24 @@
+.bundle
+db/*.sqlite3
+log/*.log
+tmp/
+.sass-cache/
+
+.DS_Store
+Icon?
+
+# Thumbnails
+._*
+
+# Files that might appear on external disk
+.Spotlight-V100
+.Trashes
+
+*.tmproj
+*.tmproject
+tmtags
+
+.*.sw[a-z]
+*.un~
+Session.vim
+
1  .rspec
@@ -0,0 +1 @@
+--colour
29 Gemfile
@@ -0,0 +1,29 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.1.0.rc4'
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'pg'
+
+# Asset template engines
+gem 'json'
+gem 'sass-rails', "~> 3.1.0.rc"
+gem 'coffee-script'
+gem 'uglifier'
+
+gem 'jquery-rails'
+
+# Use unicorn as the web server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug'
+
+gem "cucumber-rails", :group => [:development, :test]
+gem "capybara", :group => [:development, :test]
+gem "rspec-rails", ">= 2.0.1", :group => [:development, :test]
163 Gemfile.lock
@@ -0,0 +1,163 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ mail (~> 2.3.0)
+ actionpack (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.0)
+ rack-cache (~> 1.0.1)
+ rack-mount (~> 0.8.1)
+ rack-test (~> 0.6.0)
+ sprockets (~> 2.0.0.beta.10)
+ tzinfo (~> 0.3.27)
+ activemodel (3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ bcrypt-ruby (~> 2.1.4)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ arel (~> 2.1.1)
+ tzinfo (~> 0.3.27)
+ activeresource (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ activesupport (3.1.0.rc4)
+ multi_json (~> 1.0)
+ arel (2.1.3)
+ bcrypt-ruby (2.1.4)
+ builder (3.0.0)
+ capybara (1.0.0)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 0.2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.2.0)
+ ffi (~> 1.0.6)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.1.1)
+ cucumber (1.0.2)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.2)
+ gherkin (~> 2.4.5)
+ json (>= 1.4.6)
+ term-ansicolor (>= 1.0.5)
+ cucumber-rails (1.0.2)
+ capybara (>= 1.0.0)
+ cucumber (~> 1.0.0)
+ nokogiri (>= 1.4.6)
+ diff-lcs (1.1.2)
+ erubis (2.7.0)
+ execjs (1.2.0)
+ multi_json (~> 1.0)
+ ffi (1.0.9)
+ gherkin (2.4.5)
+ json (>= 1.4.6)
+ hike (1.2.0)
+ i18n (0.6.0)
+ jquery-rails (1.0.12)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ json (1.5.3)
+ json_pure (1.5.3)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ multi_json (1.0.3)
+ nokogiri (1.5.0)
+ pg (0.11.0)
+ polyglot (0.3.1)
+ rack (1.3.1)
+ rack-cache (1.0.2)
+ rack (>= 0.4)
+ rack-mount (0.8.1)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.0)
+ rack (>= 1.0)
+ rails (3.1.0.rc4)
+ actionmailer (= 3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ activerecord (= 3.1.0.rc4)
+ activeresource (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ bundler (~> 1.0)
+ railties (= 3.1.0.rc4)
+ railties (3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2)
+ rdoc (3.8)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ rspec-rails (2.6.1)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.6.0)
+ rubyzip (0.9.4)
+ sass (3.1.4)
+ sass-rails (3.1.0.rc.4)
+ actionpack (~> 3.1.0.rc1)
+ railties (~> 3.1.0.rc1)
+ sass (>= 3.1.4)
+ sprockets (>= 2.0.0.beta.9)
+ selenium-webdriver (0.2.2)
+ childprocess (>= 0.1.9)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
+ sprockets (2.0.0.beta.10)
+ hike (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ term-ansicolor (1.0.6)
+ thor (0.14.6)
+ tilt (1.3.2)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.29)
+ uglifier (1.0.0)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ capybara
+ coffee-script
+ cucumber-rails
+ jquery-rails
+ json
+ pg
+ rails (= 3.1.0.rc4)
+ rspec-rails (>= 2.0.1)
+ sass-rails (~> 3.1.0.rc)
+ uglifier
0  README.md
No changes.
7 Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Rbxlotto::Application.load_tasks
BIN  app/assets/images/rails.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 app/assets/javascripts/application.js
@@ -0,0 +1,9 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
7 app/assets/stylesheets/application.css
@@ -0,0 +1,7 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require_tree .
+*/
3  app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
130 app/controllers/application_controller.rbc
@@ -0,0 +1,130 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+33
+99
+7
+0
+45
+1
+2
+43
+3
+65
+49
+4
+3
+13
+99
+12
+7
+5
+12
+7
+6
+12
+65
+12
+49
+7
+4
+15
+49
+5
+0
+15
+2
+11
+I
+6
+I
+0
+I
+0
+I
+0
+n
+p
+8
+x
+21
+ApplicationController
+x
+16
+ActionController
+n
+x
+4
+Base
+x
+10
+open_class
+x
+14
+__class_init__
+M
+1
+n
+n
+x
+21
+ApplicationController
+i
+6
+5
+66
+5
+48
+0
+11
+I
+1
+I
+0
+I
+0
+I
+0
+n
+p
+1
+x
+20
+protect_from_forgery
+p
+3
+I
+2
+I
+2
+I
+6
+x
+145
+/Users/john/.rvm/gems/rbx-head@rails31/gems/railties-3.1.0.rc4/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb
+p
+0
+x
+13
+attach_method
+p
+3
+I
+0
+I
+1
+I
+21
+x
+145
+/Users/john/.rvm/gems/rbx-head@rails31/gems/railties-3.1.0.rc4/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb
+p
+0
2  app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
54 app/helpers/application_helper.rbc
@@ -0,0 +1,54 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+12
+99
+7
+0
+65
+49
+1
+2
+15
+1
+15
+2
+11
+I
+3
+I
+0
+I
+0
+I
+0
+n
+p
+2
+x
+17
+ApplicationHelper
+x
+11
+open_module
+p
+3
+I
+0
+I
+1
+I
+c
+x
+137
+/Users/john/.rvm/gems/rbx-head@rails31/gems/railties-3.1.0.rc4/lib/rails/generators/rails/app/templates/app/helpers/application_helper.rb
+p
+0
0  app/mailers/.gitkeep
No changes.
0  app/models/.gitkeep
No changes.
14 app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Rbxlotto</title>
+ <%= stylesheet_link_tag "application" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
4 config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run Rbxlotto::Application
47 config/application.rb
@@ -0,0 +1,47 @@
+require File.expand_path('../boot', __FILE__)
+
+# Pick the frameworks you want:
+ require "active_record/railtie"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "active_resource/railtie"
+# require "rails/test_unit/railtie"
+
+# If you have a Gemfile, require the gems listed there, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(:default, Rails.env) if defined?(Bundler)
+
+module Rbxlotto
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named.
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running.
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
+
+ # Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password]
+
+ # Enable the asset pipeline
+ config.assets.enabled = true
+ end
+end
457 config/application.rbc
@@ -0,0 +1,457 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+130
+5
+45
+0
+1
+7
+2
+64
+65
+49
+3
+0
+49
+4
+2
+47
+49
+5
+1
+15
+5
+7
+6
+64
+47
+49
+5
+1
+15
+5
+7
+7
+64
+47
+49
+5
+1
+15
+5
+7
+8
+64
+47
+49
+5
+1
+15
+5
+7
+9
+64
+47
+49
+5
+1
+15
+26
+93
+0
+15
+29
+70
+0
+7
+10
+98
+11
+1
+30
+8
+76
+25
+92
+0
+27
+8
+81
+15
+7
+12
+8
+82
+1
+9
+100
+45
+10
+13
+7
+14
+45
+15
+16
+49
+17
+0
+49
+5
+2
+8
+101
+1
+15
+99
+7
+18
+65
+49
+19
+2
+13
+99
+12
+7
+20
+12
+7
+21
+12
+65
+12
+49
+22
+4
+15
+49
+20
+0
+15
+2
+11
+I
+7
+I
+0
+I
+0
+I
+0
+n
+p
+23
+x
+4
+File
+n
+s
+7
+../boot
+x
+11
+active_path
+x
+11
+expand_path
+x
+7
+require
+s
+21
+active_record/railtie
+s
+25
+action_controller/railtie
+s
+21
+action_mailer/railtie
+s
+23
+active_resource/railtie
+x
+7
+Bundler
+x
+16
+vm_const_defined
+s
+8
+constant
+n
+x
+7
+default
+x
+5
+Rails
+n
+x
+3
+env
+x
+8
+Rbxlotto
+x
+11
+open_module
+x
+15
+__module_init__
+M
+1
+n
+n
+x
+8
+Rbxlotto
+i
+33
+5
+66
+99
+7
+0
+45
+1
+2
+43
+0
+65
+49
+3
+3
+13
+99
+12
+7
+4
+12
+7
+5
+12
+65
+12
+49
+6
+4
+15
+49
+4
+0
+11
+I
+6
+I
+0
+I
+0
+I
+0
+n
+p
+7
+x
+11
+Application
+x
+5
+Rails
+n
+x
+10
+open_class
+x
+14
+__class_init__
+M
+1
+n
+n
+x
+11
+Application
+i
+53
+5
+66
+5
+48
+0
+7
+1
+64
+13
+18
+2
+49
+2
+1
+15
+15
+5
+48
+0
+13
+49
+3
+0
+7
+4
+35
+1
+49
+5
+1
+13
+18
+2
+49
+6
+1
+15
+15
+5
+48
+0
+49
+7
+0
+2
+13
+18
+2
+49
+8
+1
+15
+11
+I
+3
+I
+0
+I
+0
+I
+0
+n
+p
+9
+x
+6
+config
+s
+5
+utf-8
+x
+9
+encoding=
+x
+17
+filter_parameters
+x
+8
+password
+x
+1
++
+x
+18
+filter_parameters=
+x
+6
+assets
+x
+8
+enabled=
+p
+7
+I
+2
+I
+27
+I
+10
+I
+2a
+I
+26
+I
+2d
+I
+35
+x
+72
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/application.rb
+p
+0
+x
+13
+attach_method
+p
+3
+I
+2
+I
+f
+I
+21
+x
+72
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/application.rb
+p
+0
+x
+13
+attach_method
+p
+17
+I
+0
+I
+1
+I
+13
+I
+4
+I
+1c
+I
+5
+I
+25
+I
+6
+I
+2e
+I
+7
+I
+37
+I
+c
+I
+65
+I
+0
+I
+66
+I
+e
+I
+82
+x
+72
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/application.rb
+p
+0
6 config/boot.rb
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
170 config/boot.rbc
@@ -0,0 +1,170 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+82
+5
+7
+0
+64
+47
+49
+1
+1
+15
+45
+2
+3
+7
+4
+64
+14
+2
+49
+5
+1
+13
+10
+46
+15
+45
+6
+7
+7
+8
+64
+65
+49
+9
+0
+49
+10
+2
+13
+18
+3
+49
+11
+2
+15
+8
+50
+18
+2
+16
+2
+15
+45
+6
+12
+45
+2
+13
+7
+4
+64
+49
+5
+1
+49
+14
+1
+9
+78
+5
+7
+15
+64
+47
+49
+1
+1
+8
+79
+1
+15
+2
+11
+I
+5
+I
+0
+I
+0
+I
+0
+n
+p
+16
+s
+8
+rubygems
+x
+7
+require
+x
+3
+ENV
+n
+s
+14
+BUNDLE_GEMFILE
+x
+2
+[]
+x
+4
+File
+n
+s
+13
+../../Gemfile
+x
+11
+active_path
+x
+11
+expand_path
+x
+3
+[]=
+n
+n
+x
+7
+exists?
+s
+13
+bundler/setup
+p
+9
+I
+0
+I
+1
+I
+9
+I
+4
+I
+33
+I
+6
+I
+4f
+I
+0
+I
+52
+x
+65
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/boot.rb
+p
+0
8 config/cucumber.yml
@@ -0,0 +1,8 @@
+<%
+rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
+rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
+std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
+%>
+default: <%= std_opts %> features
+wip: --tags @wip:3 --wip features
+rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
58 config/database.yml
@@ -0,0 +1,58 @@
+# PostgreSQL. Versions 7.4 and 8.x are supported.
+#
+# Install the pg driver:
+# gem install pg
+# On Mac OS X with macports:
+# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
+# On Windows:
+# gem install pg
+# Choose the win32 build.
+# Install PostgreSQL and put its /bin directory on your path.
+#
+# Configure Using Gemfile
+# gem 'pg'
+#
+development:
+ adapter: postgresql
+ encoding: unicode
+ database: rbxlotto_development
+ pool: 5
+ username: rbxlotto
+ password:
+
+ # Connect on a TCP socket. Omitted by default since the client uses a
+ # domain socket that doesn't need configuration. Windows does not have
+ # domain sockets, so uncomment these lines.
+ #host: localhost
+ #port: 5432
+
+ # Schema search path. The server defaults to $user,public
+ #schema_search_path: myapp,sharedapp,public
+
+ # Minimum log levels, in increasing order:
+ # debug5, debug4, debug3, debug2, debug1,
+ # log, notice, warning, error, fatal, and panic
+ # The server defaults to notice.
+ #min_messages: warning
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test: &test
+ adapter: postgresql
+ encoding: unicode
+ database: rbxlotto_test
+ pool: 5
+ username: rbxlotto
+ password:
+
+production:
+ adapter: postgresql
+ encoding: unicode
+ database: rbxlotto_production
+ pool: 5
+ username: rbxlotto
+ password:
+
+cucumber:
+ <<: *test
5 config/environment.rb
@@ -0,0 +1,5 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+Rbxlotto::Application.initialize!
96 config/environment.rbc
@@ -0,0 +1,96 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+30
+5
+45
+0
+1
+7
+2
+64
+65
+49
+3
+0
+49
+4
+2
+47
+49
+5
+1
+15
+45
+6
+7
+43
+8
+49
+9
+0
+15
+2
+11
+I
+4
+I
+0
+I
+0
+I
+0
+n
+p
+10
+x
+4
+File
+n
+s
+14
+../application
+x
+11
+active_path
+x
+11
+expand_path
+x
+7
+require
+x
+8
+Rbxlotto
+n
+x
+11
+Application
+x
+11
+initialize!
+p
+5
+I
+0
+I
+2
+I
+13
+I
+5
+I
+1e
+x
+72
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/environment.rb
+p
+0
27 config/environments/development.rb
@@ -0,0 +1,27 @@
+Rbxlotto::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
+ config.cache_classes = false
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger
+ config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
+
+ # Do not compress assets
+ config.assets.compress = false
+end
287 config/environments/development.rbc
@@ -0,0 +1,287 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+13
+45
+0
+1
+43
+2
+56
+3
+50
+4
+0
+15
+2
+11
+I
+2
+I
+0
+I
+0
+I
+0
+n
+p
+5
+x
+8
+Rbxlotto
+n
+x
+11
+Application
+M
+1
+p
+2
+x
+9
+for_block
+t
+n
+x
+9
+__block__
+i
+113
+5
+48
+0
+3
+13
+18
+2
+49
+1
+1
+15
+15
+5
+48
+0
+2
+13
+18
+2
+49
+2
+1
+15
+15
+5
+48
+0
+2
+13
+18
+2
+49
+3
+1
+15
+15
+5
+48
+0
+49
+4
+0
+3
+13
+18
+2
+49
+5
+1
+15
+15
+5
+48
+0
+49
+6
+0
+3
+13
+18
+2
+49
+7
+1
+15
+15
+5
+48
+0
+49
+8
+0
+7
+9
+13
+18
+2
+49
+10
+1
+15
+15
+5
+48
+0
+49
+11
+0
+7
+12
+13
+18
+2
+49
+13
+1
+15
+15
+5
+48
+0
+49
+14
+0
+3
+13
+18
+2
+49
+15
+1
+15
+11
+I
+4
+I
+0
+I
+0
+I
+0
+I
+-2
+p
+16
+x
+6
+config
+x
+14
+cache_classes=
+x
+11
+whiny_nils=
+x
+28
+consider_all_requests_local=
+x
+17
+action_controller
+x
+16
+perform_caching=
+x
+13
+action_mailer
+x
+22
+raise_delivery_errors=
+x
+14
+active_support
+x
+3
+log
+x
+12
+deprecation=
+x
+15
+action_dispatch
+x
+7
+builtin
+x
+23
+best_standards_support=
+x
+6
+assets
+x
+9
+compress=
+p
+17
+I
+0
+I
+7
+I
+c
+I
+a
+I
+18
+I
+d
+I
+24
+I
+e
+I
+33
+I
+11
+I
+42
+I
+14
+I
+52
+I
+17
+I
+62
+I
+1a
+I
+71
+x
+85
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/environments/development.rb
+p
+0
+x
+9
+configure
+p
+3
+I
+0
+I
+1
+I
+d
+x
+85
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/environments/development.rb
+p
+0
54 config/environments/production.rb
@@ -0,0 +1,54 @@
+Rbxlotto::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # Code is not reloaded between requests
+ config.cache_classes = true
+
+ # Full error reports are disabled and caching is turned on
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # Disable Rails's static asset server (Apache or nginx will already do this)
+ config.serve_static_assets = false
+
+ # Compress JavaScripts and CSS
+ config.assets.compress = true
+
+ # Specify the default JavaScript compressor
+ config.assets.js_compressor = :uglifier
+
+ # Specifies the header that your server uses for sending files
+ # (comment out if your front-end server doesn't support this)
+ config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
+
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
+
+ # See everything in the log (default is :info)
+ # config.log_level = :debug
+
+ # Use a different logger for distributed setups
+ # config.logger = SyslogLogger.new
+
+ # Use a different cache store in production
+ # config.cache_store = :mem_cache_store
+
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
+ # config.action_controller.asset_host = "http://assets.example.com"
+
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+ # config.assets.precompile += %w( search.js )
+
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable threaded mode
+ # config.threadsafe!
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found)
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners
+ config.active_support.deprecation = :notify
+end
39 config/environments/test.rb
@@ -0,0 +1,39 @@
+Rbxlotto::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Configure static asset server for tests with Cache-Control for performance
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Log error messages when you accidentally call methods on nil
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
+end
7 config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
40 config/initializers/backtrace_silencers.rbc
@@ -0,0 +1,40 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+4
+1
+15
+2
+11
+I
+1
+I
+0
+I
+0
+I
+0
+n
+p
+0
+p
+3
+I
+0
+I
+1
+I
+4
+x
+146
+/Users/john/.rvm/gems/rbx-head@rails31/gems/railties-3.1.0.rc4/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb
+p
+0
3  config/initializers/generators.rb
@@ -0,0 +1,3 @@
+Rails.application.config.generators do |g|
+ g.test_framework = :rspec
+end
133 config/initializers/generators.rbc
@@ -0,0 +1,133 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+17
+45
+0
+1
+49
+2
+0
+49
+3
+0
+56
+4
+50
+5
+0
+15
+2
+11
+I
+2
+I
+0
+I
+0
+I
+0
+n
+p
+6
+x
+5
+Rails
+n
+x
+11
+application
+x
+6
+config
+M
+1
+p
+2
+x
+9
+for_block
+t
+n
+x
+9
+__block__
+i
+16
+57
+19
+0
+15
+20
+0
+7
+0
+13
+18
+2
+49
+1
+1
+15
+11
+I
+5
+I
+1
+I
+1
+I
+1
+n
+p
+2
+x
+5
+rspec
+x
+15
+test_framework=
+p
+5
+I
+0
+I
+1
+I
+4
+I
+2
+I
+10
+x
+84
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/initializers/generators.rb
+p
+1
+x
+1
+g
+x
+10
+generators
+p
+3
+I
+0
+I
+1
+I
+11
+x
+84
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/initializers/generators.rb
+p
+0
10 config/initializers/inflections.rb
@@ -0,0 +1,10 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
40 config/initializers/inflections.rbc
@@ -0,0 +1,40 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+4
+1
+15
+2
+11
+I
+1
+I
+0
+I
+0
+I
+0
+n
+p
+0
+p
+3
+I
+0
+I
+1
+I
+4
+x
+138
+/Users/john/.rvm/gems/rbx-head@rails31/gems/railties-3.1.0.rc4/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb
+p
+0
5 config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
40 config/initializers/mime_types.rbc
@@ -0,0 +1,40 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+4
+1
+15
+2
+11
+I
+1
+I
+0
+I
+0
+I
+0
+n
+p
+0
+p
+3
+I
+0
+I
+1
+I
+4
+x
+137
+/Users/john/.rvm/gems/rbx-head@rails31/gems/railties-3.1.0.rc4/lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb
+p
+0
7 config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+Rbxlotto::Application.config.secret_token = '0d65fb3200d8f77ccd4c56ecbe3d92f987e95f6b7bb3c3de1eb8d71ae07a0462d77123429f6a124b86817a4a6cb6f2ca44756f1b8dca08c26971cfaee0d0778d'
73 config/initializers/secret_token.rbc
@@ -0,0 +1,73 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+21
+45
+0
+1
+43
+2
+49
+3
+0
+7
+4
+64
+13
+18
+2
+49
+5
+1
+15
+15
+2
+11
+I
+3
+I
+0
+I
+0
+I
+0
+n
+p
+6
+x
+8
+Rbxlotto
+n
+x
+11
+Application
+x
+6
+config
+s
+128
+0d65fb3200d8f77ccd4c56ecbe3d92f987e95f6b7bb3c3de1eb8d71ae07a0462d77123429f6a124b86817a4a6cb6f2ca44756f1b8dca08c26971cfaee0d0778d
+x
+13
+secret_token=
+p
+3
+I
+0
+I
+7
+I
+15
+x
+86
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/initializers/secret_token.rb
+p
+0
8 config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+Rbxlotto::Application.config.session_store :cookie_store, :key => '_rbxlotto_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# Rbxlotto::Application.config.session_store :active_record_store
100 config/initializers/session_store.rbc
@@ -0,0 +1,100 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+33
+45
+0
+1
+43
+2
+49
+3
+0
+7
+4
+44
+43
+5
+79
+49
+6
+1
+13
+7
+7
+7
+8
+64
+49
+9
+2
+15
+49
+10
+2
+15
+2
+11
+I
+6
+I
+0
+I
+0
+I
+0
+n
+p
+11
+x
+8
+Rbxlotto
+n
+x
+11
+Application
+x
+6
+config
+x
+12
+cookie_store
+x
+4
+Hash
+x
+16
+new_from_literal
+x
+3
+key
+s
+17
+_rbxlotto_session
+x
+3
+[]=
+x
+13
+session_store
+p
+3
+I
+0
+I
+3
+I
+21
+x
+87
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/initializers/session_store.rb
+p
+0
12 config/initializers/wrap_parameters.rb
@@ -0,0 +1,12 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActionController::Base.wrap_parameters :format => [:json]
+
+# Disable root element in JSON by default.
+if defined?(ActiveRecord)
+ ActiveRecord::Base.include_root_in_json = false
+end
165 config/initializers/wrap_parameters.rbc
@@ -0,0 +1,165 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+75
+45
+0
+1
+43
+2
+44
+43
+3
+79
+49
+4
+1
+13
+7
+5
+7
+6
+35
+1
+49
+7
+2
+15
+49
+8
+1
+15
+26
+93
+0
+15
+29
+42
+0
+7
+9
+98
+10
+1
+30
+8
+48
+25
+92
+0
+27
+8
+53
+15
+7
+11
+8
+54
+1
+9
+71
+45
+9
+12
+43
+2
+3
+13
+18
+2
+49
+13
+1
+15
+8
+72
+1
+15
+2
+11
+I
+6
+I
+0
+I
+0
+I
+0
+n
+p
+14
+x
+16
+ActionController
+n
+x
+4
+Base
+x
+4
+Hash
+x
+16
+new_from_literal
+x
+6
+format
+x
+4
+json
+x
+3
+[]=
+x
+15
+wrap_parameters
+x
+12
+ActiveRecord
+x
+16
+vm_const_defined
+s
+8
+constant
+n
+x
+21
+include_root_in_json=
+p
+11
+I
+0
+I
+7
+I
+1b
+I
+a
+I
+38
+I
+b
+I
+47
+I
+a
+I
+48
+I
+0
+I
+4b
+x
+89
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/initializers/wrap_parameters.rb
+p
+0
5 config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+ hello: "Hello world"
58 config/routes.rb
@@ -0,0 +1,58 @@
+Rbxlotto::Application.routes.draw do
+ # The priority is based upon order of creation:
+ # first created -> highest priority.
+
+ # Sample of regular route:
+ # match 'products/:id' => 'catalog#view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # resources :products
+
+ # Sample resource route with options:
+ # resources :products do
+ # member do
+ # get 'short'
+ # post 'toggle'
+ # end
+ #
+ # collection do
+ # get 'sold'
+ # end
+ # end
+
+ # Sample resource route with sub-resources:
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
+
+ # Sample resource route with more complex sub-resources
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get 'recent', :on => :collection
+ # end
+ # end
+
+ # Sample resource route within a namespace:
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
+
+ # You can have the root of your site routed with "root"
+ # just remember to delete public/index.html.
+ # root :to => 'welcome#index'
+
+ # See how all your routes lay out with "rake routes"
+
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
+ # Note: This route will make all actions in every controller accessible via GET requests.
+ # match ':controller(/:action(/:id(.:format)))'
+end
106 config/routes.rbc
@@ -0,0 +1,106 @@
+!RBIX
+6235178746665710376
+x
+M
+1
+n
+n
+x
+10
+__script__
+i
+16
+45
+0
+1
+43
+2
+49
+3
+0
+56
+4
+50
+5
+0
+15
+2
+11
+I
+2
+I
+0
+I
+0
+I
+0
+n
+p
+6
+x
+8
+Rbxlotto
+n
+x
+11
+Application
+x
+6
+routes
+M
+1
+p
+2
+x
+9
+for_block
+t
+n
+x
+9
+__block__
+i
+2
+1
+11
+I
+2
+I
+0
+I
+0
+I
+0
+I
+-2
+p
+0
+p
+3
+I
+0
+I
+1
+I
+2
+x
+67
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/routes.rb
+p
+0
+x
+4
+draw
+p
+3
+I
+0
+I
+1
+I
+10
+x
+67
+/Users/john/Dropbox/John/aloharb/projects/rbxlotto/config/routes.rb
+p
+0
7 db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
+# Mayor.create(:name => 'Emanuel', :city => cities.first)
2  doc/README_FOR_APP
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
211 features/step_definitions/web_steps.rb
@@ -0,0 +1,211 @@
+# TL;DR: YOU SHOULD DELETE THIS FILE
+#
+# This file was generated by Cucumber-Rails and is only here to get you a head start
+# These step definitions are thin wrappers around the Capybara/Webrat API that lets you
+# visit pages, interact with widgets and make assertions about page content.
+#
+# If you use these step definitions as basis for your features you will quickly end up
+# with features that are:
+#
+# * Hard to maintain
+# * Verbose to read
+#
+# A much better approach is to write your own higher level step definitions, following
+# the advice in the following blog posts:
+#
+# * http://benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories.html
+# * http://dannorth.net/2011/01/31/whose-domain-is-it-anyway/
+# * http://elabs.se/blog/15-you-re-cuking-it-wrong
+#
+
+
+require 'uri'
+require 'cgi'
+require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))