Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdev8 committed Nov 9, 2011
1 parent 6d5a86e commit 01d20d6
Show file tree
Hide file tree
Showing 28 changed files with 258 additions and 53 deletions.
2 changes: 1 addition & 1 deletion numerals/.rvmrc
@@ -1 +1 @@
rvm use ree@numerals
rvm use ruby-1.9.2-p290@dojo --create
28 changes: 18 additions & 10 deletions numerals/Gemfile
Expand Up @@ -5,9 +5,9 @@ gem 'rails', '3.1.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
#gem 'sqlite3'
gem 'mysql2'

gem 'json'

# Gems used only for assets and not required
# in production environments by default.
Expand All @@ -18,24 +18,32 @@ group :assets do
end

gem 'jquery-rails'
gem 'therubyracer'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'
#gem 'unicorn'
gem 'passenger'

# Deploy with Capistrano
# gem 'capistrano'
gem 'capistrano'

# To use debugger
# gem 'ruby-debug'
gem 'ruby-debug19', :require => 'ruby-debug'

gem 'factory_girl_rails'

gem 'hirb'

group :development, :test do
gem 'rspec', '~> 2.7.0'
gem 'rspec-rails', '~> 2.7.0'
# Pretty printed test output
gem 'turn', '< 0.8.3', :require => false
gem 'cucumber'
gem 'cucumber-rails'
gem 'database_cleaner'
gem 'rspec'
gem 'rspec-rails'
gem 'rspec-expectations'
gem 'rspec-mocks'
end

79 changes: 65 additions & 14 deletions numerals/Gemfile.lock
Expand Up @@ -29,8 +29,17 @@ GEM
activesupport (= 3.1.1)
activesupport (3.1.1)
multi_json (~> 1.0)
ansi (1.3.0)
archive-tar-minitar (0.5.2)
arel (2.2.1)
bcrypt-ruby (3.0.1)
builder (3.0.0)
capistrano (2.9.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capybara (1.1.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
Expand All @@ -47,39 +56,64 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.1.2)
cucumber (1.1.0)
columnize (0.3.4)
cucumber (1.1.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.5.0)
gherkin (~> 2.6.0)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
cucumber-rails (1.1.1)
capybara (>= 1.1.1)
cucumber (>= 1.1.0)
nokogiri (>= 1.5.0)
daemon_controller (0.2.6)
database_cleaner (0.6.7)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.9)
multi_json (~> 1.0)
factory_girl (2.2.0)
activesupport
factory_girl_rails (1.3.0)
factory_girl (~> 2.2.0)
railties (>= 3.0.0)
fastthread (1.0.7)
ffi (1.0.9)
gherkin (2.5.4)
gherkin (2.6.2)
json (>= 1.4.6)
highline (1.6.2)
hike (1.2.1)
hirb (0.5.0)
i18n (0.6.0)
jquery-rails (1.0.16)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.1)
json_pure (1.6.1)
libv8 (3.3.10.2)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.3)
mysql2 (0.3.7)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.2.1)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
nokogiri (1.5.0)
polyglot (0.3.2)
passenger (3.0.9)
daemon_controller (>= 0.2.5)
fastthread (>= 1.0.1)
rack
rake (>= 0.8.1)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack (>= 0.4)
Expand Down Expand Up @@ -120,6 +154,16 @@ GEM
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.7.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.4)
sass (3.1.10)
sass-rails (3.1.4)
Expand All @@ -128,7 +172,7 @@ GEM
sass (>= 3.1.4)
sprockets (~> 2.0.0)
tilt (~> 1.3.2)
selenium-webdriver (2.9.1)
selenium-webdriver (2.10.0)
childprocess (>= 0.2.1)
ffi (= 1.0.9)
json_pure
Expand All @@ -137,15 +181,14 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.4)
term-ansicolor (1.0.7)
therubyracer (0.9.8)
libv8 (~> 3.3.10)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
turn (0.8.2)
ansi (>= 1.2.2)
tzinfo (0.3.30)
uglifier (1.0.4)
execjs (>= 0.3.0)
Expand All @@ -157,15 +200,23 @@ PLATFORMS
ruby

DEPENDENCIES
bcrypt-ruby (~> 3.0.0)
capistrano
coffee-rails (~> 3.1.1)
cucumber
cucumber-rails
database_cleaner
factory_girl_rails
hirb
jquery-rails
json
mysql2
passenger
rails (= 3.1.1)
rspec (~> 2.7.0)
rspec-rails (~> 2.7.0)
rspec
rspec-expectations
rspec-mocks
rspec-rails
ruby-debug19
sass-rails (~> 3.1.4)
sqlite3
therubyracer
turn (< 0.8.3)
uglifier (>= 1.0.3)
2 changes: 1 addition & 1 deletion numerals/Rakefile
Expand Up @@ -4,4 +4,4 @@

require File.expand_path('../config/application', __FILE__)

Numerals::Application.load_tasks
Enumerals::Application.load_tasks
2 changes: 1 addition & 1 deletion numerals/app/views/layouts/application.html.erb
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Numerals</title>
<title>Enumerals</title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
Expand Down
2 changes: 1 addition & 1 deletion numerals/config.ru
@@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
run Numerals::Application
run Enumerals::Application
4 changes: 2 additions & 2 deletions numerals/config/application.rb
Expand Up @@ -9,14 +9,14 @@
# Bundler.require(:default, :assets, Rails.env)
end

module Numerals
module Enumerals
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)
config.autoload_paths += %W(#{config.root}/lib)

# 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.
Expand Down
18 changes: 12 additions & 6 deletions numerals/config/database.yml
Expand Up @@ -4,23 +4,29 @@
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
adapter: mysql2
user: root
password:
database: enumerals_development
pool: 5
timeout: 5000

# 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: sqlite3
database: db/test.sqlite3
adapter: mysql2
user: root
password:
database: enumerals_test
pool: 5
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
adapter: mysql2
user: root
password:
database: enumerals_production
pool: 5
timeout: 5000

Expand Down
2 changes: 1 addition & 1 deletion numerals/config/environment.rb
Expand Up @@ -2,4 +2,4 @@
require File.expand_path('../application', __FILE__)

# Initialize the rails application
Numerals::Application.initialize!
Enumerals::Application.initialize!
2 changes: 1 addition & 1 deletion numerals/config/environments/development.rb
@@ -1,4 +1,4 @@
Numerals::Application.configure do
Enumerals::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
Expand Down
2 changes: 1 addition & 1 deletion numerals/config/environments/production.rb
@@ -1,4 +1,4 @@
Numerals::Application.configure do
Enumerals::Application.configure do
# Settings specified here will take precedence over those in config/application.rb

# Code is not reloaded between requests
Expand Down
2 changes: 1 addition & 1 deletion numerals/config/environments/test.rb
@@ -1,4 +1,4 @@
Numerals::Application.configure do
Enumerals::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
Expand Down
2 changes: 1 addition & 1 deletion numerals/config/initializers/secret_token.rb
Expand Up @@ -4,4 +4,4 @@
# 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.
Numerals::Application.config.secret_token = '39bf05b0e11f1e32749790ef3378cb0aeccde4600081c09f3569e2398a6b0f2786688cd1f869c9ea0efbca024ed3c092f77a8ea66619afde0225aa64c105129e'
Enumerals::Application.config.secret_token = 'e403ce1dfef9f4eb322ace32db93aa034fa019a33b16ba85a788d8dead2aae2212447d12c9822afeb27155ff401eace47001b3b5b67c0f522c5c16563dde600e'
4 changes: 2 additions & 2 deletions numerals/config/initializers/session_store.rb
@@ -1,8 +1,8 @@
# Be sure to restart your server when you modify this file.

Numerals::Application.config.session_store :cookie_store, :key => '_numerals_session'
Enumerals::Application.config.session_store :cookie_store, key: '_enumerals_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")
# Numerals::Application.config.session_store :active_record_store
# Enumerals::Application.config.session_store :active_record_store
2 changes: 1 addition & 1 deletion numerals/config/initializers/wrap_parameters.rb
Expand Up @@ -5,7 +5,7 @@

# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters :format => [:json]
wrap_parameters format: [:json]
end

# Disable root element in JSON by default.
Expand Down
2 changes: 1 addition & 1 deletion numerals/config/routes.rb
@@ -1,4 +1,4 @@
Numerals::Application.routes.draw do
Enumerals::Application.routes.draw do
# The priority is based upon order of creation:
# first created -> highest priority.

Expand Down
16 changes: 16 additions & 0 deletions numerals/db/schema.rb
@@ -0,0 +1,16 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 0) do

end
4 changes: 2 additions & 2 deletions numerals/db/seeds.rb
Expand Up @@ -3,5 +3,5 @@
#
# Examples:
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Mayor.create(:name => 'Emanuel', :city => cities.first)
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
10 changes: 5 additions & 5 deletions numerals/features/support/env.rb
Expand Up @@ -31,11 +31,11 @@

# Remove/comment out the lines below if your app doesn't have a database.
# For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
#begin
# DatabaseCleaner.strategy = :transaction
#rescue NameError
# raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
#end
begin
DatabaseCleaner.strategy = :transaction
rescue NameError
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
end

# You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios.
# See the DatabaseCleaner documentation for details. Example:
Expand Down

0 comments on commit 01d20d6

Please sign in to comment.