Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated to use bundler. Preparing for upgrade to Rails 3

  • Loading branch information...
commit 7035ee0daa9458fbcd85eee13bbdc5af7febeec6 1 parent 010387d
Timothy Imhof authored
View
19 Gemfile
@@ -0,0 +1,19 @@
+source :gemcutter
+gem "rails", "~> 2.3.5"
+gem "sqlite3-ruby", :require => "sqlite3"
+
+# bundler requires these gems in all environments
+# gem "nokogiri", "1.4.2"
+# gem "geokit"
+
+group :development do
+ # bundler requires these gems in development
+ # gem "rails-footnotes"
+end
+
+group :test do
+ # bundler requires these gems while running tests
+ # gem "rspec"
+ # gem "faker"
+end
+
View
32 Gemfile.lock
@@ -0,0 +1,32 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (2.3.14)
+ actionpack (= 2.3.14)
+ actionpack (2.3.14)
+ activesupport (= 2.3.14)
+ rack (~> 1.1.0)
+ activerecord (2.3.14)
+ activesupport (= 2.3.14)
+ activeresource (2.3.14)
+ activesupport (= 2.3.14)
+ activesupport (2.3.14)
+ rack (1.1.3)
+ rails (2.3.14)
+ actionmailer (= 2.3.14)
+ actionpack (= 2.3.14)
+ activerecord (= 2.3.14)
+ activeresource (= 2.3.14)
+ activesupport (= 2.3.14)
+ rake (>= 0.8.3)
+ rake (0.9.2.2)
+ sqlite3 (1.3.5)
+ sqlite3-ruby (1.3.3)
+ sqlite3 (>= 1.3.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rails (~> 2.3.5)
+ sqlite3-ruby
View
2  app/models/user.rb
@@ -36,7 +36,7 @@ class User < ActiveRecord::Base
def self.authenticate(login, password)
return nil if login.blank? || password.blank?
u = find_by_login(login.downcase) # need to get the salt
- u && u.authenticated?(password) ? u : nil
+ #u && u.authenticated?(password) ? u : nil
end
def login=(value)
View
13 config/boot.rb
@@ -106,5 +106,18 @@ def read_environment_rb
end
end
+class Rails::Boot
+ def run
+ load_initializer
+
+ Rails::Initializer.class_eval do
+ def load_gems
+ @bundler_loaded ||= Bundler.require :default, Rails.env
+ end
+ end
+
+ Rails::Initializer.run(:set_load_path)
+ end
+end
# All that for this:
Rails.boot!
View
4 config/environment.rb
@@ -1,7 +1,7 @@
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
+#RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
@@ -48,4 +48,4 @@
end
-require 'lost_handler'
+require 'lost_handler'
View
20 config/preinitializer.rb
@@ -0,0 +1,20 @@
+begin
+ require "rubygems"
+ require "bundler"
+rescue LoadError
+ raise "Could not load the bundler gem. Install it with `gem install bundler`."
+end
+
+if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
+ raise RuntimeError, "Your bundler version is too old for Rails 2.3." +
+ "Run `gem install bundler` to upgrade."
+end
+
+begin
+ # Set up load paths for all bundled gems
+ ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
+ Bundler.setup
+rescue Bundler::GemNotFound
+ raise RuntimeError, "Bundler couldn't find some gems." +
+ "Did you run `bundle install`?"
+end
View
240 log/development.log
@@ -65816,3 +65816,243 @@ Rendered accounts/_pocket_filters (28.0ms)
Rendered transactions/_transactions_div (434.0ms)
Account Load (1.0ms) SELECT * FROM "accounts" WHERE (("accounts"."active" = 't' AND "accounts"."user_id" = 10)) 
Completed in 3568ms (View: 805, DB: 474) | 200 OK [http://127.0.0.1/account/79/month_pocket_journal/15/201008]
+
+
+Processing StateliController#index (for 127.0.0.1 at 2012-02-03 16:56:18) [GET]
+ Pocket Load (65.5ms) SELECT * FROM "pockets" 
+ Pocket Load (0.7ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = -100) 
+Rendering template within layouts/application
+Rendering stateli/index
+Completed in 467ms (View: 192, DB: 66) | 200 OK [http://localhost/]
+
+
+Processing SessionsController#create (for 127.0.0.1 at 2012-02-03 16:56:31) [POST]
+ Parameters: {"password"=>"asfasfa", "authenticity_token"=>"bKWDsS8An9Vns4WqQNrh+8jH3S9OgLTtSKEWJiTlmNo=", "commit"=>"Log in", "login"=>"timhof"}
+ User Load (1.5ms) SELECT * FROM "users" WHERE ("users"."login" = 'timhof') LIMIT 1
+Failed login for 'timhof' from 127.0.0.1 at Fri Feb 03 21:56:32 UTC 2012
+Redirected to http://localhost:3000/
+Completed in 68ms (DB: 2) | 302 Found [http://localhost/session]
+
+
+Processing StateliController#index (for 127.0.0.1 at 2012-02-03 16:56:32) [GET]
+Rendering template within layouts/application
+Rendering stateli/index
+Completed in 68ms (View: 46, DB: 0) | 200 OK [http://localhost/]
+
+
+Processing StateliController#index (for 127.0.0.1 at 2012-02-03 17:00:17) [GET]
+Rendering template within layouts/application
+Rendering stateli/index
+Completed in 159ms (View: 124, DB: 0) | 200 OK [http://localhost/]
+
+
+Processing SessionsController#create (for 127.0.0.1 at 2012-02-03 17:00:23) [POST]
+ Parameters: {"login"=>"timhof", "password"=>"", "authenticity_token"=>"bKWDsS8An9Vns4WqQNrh+8jH3S9OgLTtSKEWJiTlmNo=", "commit"=>"Log in"}
+Failed login for 'timhof' from 127.0.0.1 at Fri Feb 03 22:00:23 UTC 2012
+Redirected to http://localhost:3000/
+Completed in 32ms (DB: 0) | 302 Found [http://localhost/session]
+
+
+Processing StateliController#index (for 127.0.0.1 at 2012-02-03 17:00:23) [GET]
+Rendering template within layouts/application
+Rendering stateli/index
+Completed in 59ms (View: 41, DB: 0) | 200 OK [http://localhost/]
+
+
+Processing StateliController#index (for 127.0.0.1 at 2012-02-03 17:31:24) [GET]
+Rendering template within layouts/application
+Rendering stateli/index
+Completed in 129ms (View: 111, DB: 0) | 200 OK [http://localhost/]
+
+
+Processing SessionsController#create (for 127.0.0.1 at 2012-02-03 17:31:32) [POST]
+ Parameters: {"authenticity_token"=>"bKWDsS8An9Vns4WqQNrh+8jH3S9OgLTtSKEWJiTlmNo=", "password"=>"", "login"=>"4sapphire", "commit"=>"Log in"}
+Failed login for '4sapphire' from 127.0.0.1 at Fri Feb 03 22:31:32 UTC 2012
+Redirected to http://localhost:3000/
+Completed in 34ms (DB: 0) | 302 Found [http://localhost/session]
+
+
+Processing StateliController#index (for 127.0.0.1 at 2012-02-03 17:31:32) [GET]
+Rendering template within layouts/application
+Rendering stateli/index
+Completed in 53ms (View: 37, DB: 0) | 200 OK [http://localhost/]
+
+
+Processing SessionsController#create (for 127.0.0.1 at 2012-02-03 17:32:02) [POST]
+ Parameters: {"authenticity_token"=>"bKWDsS8An9Vns4WqQNrh+8jH3S9OgLTtSKEWJiTlmNo=", "password"=>"4sapphire", "login"=>"4sapphire", "commit"=>"Log in"}
+ User Load (2.0ms) SELECT * FROM "users" WHERE ("users"."login" = '4sapphire') LIMIT 1
+Redirected to http://localhost:3000/
+Completed in 137ms (DB: 2) | 302 Found [http://localhost/session]
+
+
+Processing StateliController#index (for 127.0.0.1 at 2012-02-03 17:32:02) [GET]
+Rendering template within layouts/application
+Rendering stateli/index
+ User Load (1.2ms) SELECT * FROM "users" WHERE ("users"."id" = 10) LIMIT 1
+ Account Load (24.3ms) SELECT * FROM "accounts" WHERE (("accounts"."active" = 't' AND "accounts"."user_id" = 10)) 
+Completed in 176ms (View: 132, DB: 25) | 200 OK [http://localhost/]
+
+
+Processing AccountsController#month_pocket_totals (for 127.0.0.1 at 2012-02-03 17:32:07) [GET]
+ Parameters: {"id"=>"79"}
+ User Load (1.0ms) SELECT * FROM "users" WHERE ("users"."id" = 10) LIMIT 1
+ Account Load (0.8ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+ CACHE (0.0ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+ Transaction Load (422.1ms) SELECT * FROM "transactions" WHERE ("transactions".account_id = 79 AND ("transactions"."active" = 't')) ORDER BY completed, trans_date desc
+Rendering template within layouts/application
+Rendering accounts/month_pocket_totals
+Rendered stateli/_checkbox_group (68.0ms)
+Rendered accounts/_pocket_filters (105.6ms)
+Rendered accounts/_month_pocket_totals_table (46.2ms)
+Rendered accounts/_month_pocket_totals_chart (4.3ms)
+Rendered accounts/_month_pocket_totals_chart (0.3ms)
+ Account Load (1.0ms) SELECT * FROM "accounts" WHERE (("accounts"."active" = 't' AND "accounts"."user_id" = 10)) 
+Completed in 2671ms (View: 301, DB: 425) | 200 OK [http://localhost/account/79/month_pocket_totals]
+
+
+Processing AccountsController#month_pocket_totals (for 127.0.0.1 at 2012-02-03 17:32:16) [GET]
+ Parameters: {"id"=>"79"}
+ User Load (1.8ms) SELECT * FROM "users" WHERE ("users"."id" = 10) LIMIT 1
+ Account Load (1.1ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+ CACHE (0.0ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+ Transaction Load (368.7ms) SELECT * FROM "transactions" WHERE ("transactions".account_id = 79 AND ("transactions"."active" = 't')) ORDER BY completed, trans_date desc
+Rendering template within layouts/application
+Rendering accounts/month_pocket_totals
+Rendered stateli/_checkbox_group (54.3ms)
+Rendered accounts/_pocket_filters (70.0ms)
+Rendered accounts/_month_pocket_totals_table (7.9ms)
+Rendered accounts/_month_pocket_totals_chart (0.3ms)
+Rendered accounts/_month_pocket_totals_chart (0.3ms)
+ Account Load (1.6ms) SELECT * FROM "accounts" WHERE (("accounts"."active" = 't' AND "accounts"."user_id" = 10)) 
+Completed in 1760ms (View: 131, DB: 373) | 200 OK [http://localhost/account/79/month_pocket_totals]
+
+
+Processing AccountsController#month_pocket_totals (for 127.0.0.1 at 2012-02-03 17:32:29) [GET]
+ Parameters: {"id"=>"79"}
+ User Load (1.3ms) SELECT * FROM "users" WHERE ("users"."id" = 10) LIMIT 1
+ Account Load (0.9ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+ CACHE (0.0ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+ Transaction Load (367.5ms) SELECT * FROM "transactions" WHERE ("transactions".account_id = 79 AND ("transactions"."active" = 't')) ORDER BY completed, trans_date desc
+Rendering template within layouts/application
+Rendering accounts/month_pocket_totals
+Rendered stateli/_checkbox_group (68.5ms)
+Rendered accounts/_pocket_filters (81.8ms)
+Rendered accounts/_month_pocket_totals_table (9.4ms)
+Rendered accounts/_month_pocket_totals_chart (0.3ms)
+Rendered accounts/_month_pocket_totals_chart (0.3ms)
+ Account Load (1.0ms) SELECT * FROM "accounts" WHERE (("accounts"."active" = 't' AND "accounts"."user_id" = 10)) 
+Completed in 2114ms (View: 145, DB: 371) | 200 OK [http://localhost/account/79/month_pocket_totals]
+
+
+Processing ContractsController#index (for 127.0.0.1 at 2012-02-03 17:33:22) [GET]
+ Parameters: {"account_id"=>"79"}
+ User Load (0.8ms) SELECT * FROM "users" WHERE ("users"."id" = 10) LIMIT 1
+ Contract Load (1.2ms) SELECT * FROM "contracts" WHERE ("contracts"."user_id" = 10) 
+ Account Load (1.1ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+Rendering template within layouts/application
+Rendering contracts/index
+Rendered contracts/_listing_header (12.2ms)
+ Account Load (1.1ms) SELECT * FROM "accounts" WHERE (("accounts"."active" = 't' AND "accounts"."user_id" = 10)) 
+Completed in 406ms (View: 275, DB: 4) | 200 OK [http://localhost/accounts/79/contracts]
+
+
+Processing RulesController#index (for 127.0.0.1 at 2012-02-03 17:34:05) [GET]
+ Parameters: {"account_id"=>"79"}
+ User Load (0.9ms) SELECT * FROM "users" WHERE ("users"."id" = 10) LIMIT 1
+ Account Load (0.9ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+Rendering template within layouts/application
+Rendering rules/index
+ Rule Load (22.1ms) SELECT * FROM "rules" WHERE ("rules".account_id = 79) ORDER BY rank asc
+Rendered rules/_options (17.1ms)
+ Pocket Load (0.7ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 5) 
+Rendered rules/_options (15.4ms)
+ Pocket Load (0.9ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 2) 
+Rendered rules/_options (180.6ms)
+ Pocket Load (0.7ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 3) 
+Rendered rules/_options (11.3ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 3) 
+Rendered rules/_options (12.2ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 3) 
+Rendered rules/_options (12.5ms)
+ Pocket Load (0.8ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 4) 
+Rendered rules/_options (14.2ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 3) 
+Rendered rules/_options (13.8ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 5) 
+Rendered rules/_options (12.2ms)
+ Pocket Load (0.7ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 6) 
+Rendered rules/_options (10.8ms)
+ Pocket Load (0.8ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 7) 
+Rendered rules/_options (9.8ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 3) 
+Rendered rules/_options (11.9ms)
+ Pocket Load (1.1ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 10) 
+Rendered rules/_options (11.0ms)
+ Pocket Load (1.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 11) 
+Rendered rules/_options (12.2ms)
+Rendered rules/_options (11.0ms)
+ Pocket Load (0.6ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 12) 
+Rendered rules/_options (17.7ms)
+ Pocket Load (0.8ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 13) 
+Rendered rules/_options (13.3ms)
+ Pocket Load (0.8ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 14) 
+Rendered rules/_options (10.5ms)
+ Pocket Load (0.8ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 8) 
+Rendered rules/_options (10.7ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 8) 
+Rendered rules/_options (16.7ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 8) 
+Rendered rules/_options (12.5ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 8) 
+Rendered rules/_options (11.2ms)
+ Pocket Load (0.7ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 15) 
+Rendered rules/_options (10.8ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 15) 
+Rendered rules/_options (15.4ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 15) 
+Rendered rules/_options (14.7ms)
+ Pocket Load (0.6ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 16) 
+Rendered rules/_options (11.3ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 11) 
+Rendered rules/_options (10.4ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 16) 
+Rendered rules/_options (15.5ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 11) 
+Rendered rules/_options (11.2ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 16) 
+Rendered rules/_options (10.6ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 3) 
+Rendered rules/_options (10.4ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 7) 
+Rendered rules/_options (15.0ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 15) 
+Rendered rules/_options (12.8ms)
+ Pocket Load (0.6ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 17) 
+Rendered rules/_options (11.5ms)
+ Pocket Load (0.7ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 18) 
+Rendered rules/_options (10.5ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 3) 
+Rendered rules/_options (13.9ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 7) 
+Rendered rules/_options (13.8ms)
+ CACHE (0.0ms) SELECT * FROM "pockets" WHERE ("pockets"."id" = 15) 
+Rendered rules/_options (10.6ms)
+ Account Load (1.4ms) SELECT * FROM "accounts" WHERE (("accounts"."active" = 't' AND "accounts"."user_id" = 10)) 
+Completed in 1082ms (View: 933, DB: 38) | 200 OK [http://localhost/accounts/79/rules]
+
+
+Processing AccountsController#month_pocket_totals (for 127.0.0.1 at 2012-02-03 17:34:15) [GET]
+ Parameters: {"id"=>"79"}
+ User Load (1.3ms) SELECT * FROM "users" WHERE ("users"."id" = 10) LIMIT 1
+ Account Load (0.8ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+ CACHE (0.0ms) SELECT * FROM "accounts" WHERE ("accounts"."id" = 79) 
+ Transaction Load (384.6ms) SELECT * FROM "transactions" WHERE ("transactions".account_id = 79 AND ("transactions"."active" = 't')) ORDER BY completed, trans_date desc
+Rendering template within layouts/application
+Rendering accounts/month_pocket_totals
+Rendered stateli/_checkbox_group (62.5ms)
+Rendered accounts/_pocket_filters (76.0ms)
+Rendered accounts/_month_pocket_totals_table (10.0ms)
+Rendered accounts/_month_pocket_totals_chart (0.4ms)
+Rendered accounts/_month_pocket_totals_chart (0.3ms)
+ Account Load (1.4ms) SELECT * FROM "accounts" WHERE (("accounts"."active" = 't' AND "accounts"."user_id" = 10)) 
+Completed in 1824ms (View: 135, DB: 388) | 200 OK [http://localhost/account/79/month_pocket_totals]
Please sign in to comment.
Something went wrong with that request. Please try again.