Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Commit

Permalink
Upgraded to Rails 3.0.3. The developer controller doesn't inherit fro…
Browse files Browse the repository at this point in the history
…m ApplicationController anymore.
  • Loading branch information
fnando committed Jan 10, 2011
1 parent b4cf850 commit d9b3adf
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 65 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
source :rubygems

gem "rails", "3.0.1"
gem "rails", "3.0.3"
gem "fakeweb"
gem "rspec-rails", "2.0.1"
gem "rspec-rails", "2.4.1"
gem "faker"
gem "nokogiri"
gem "sqlite3-ruby"
Expand Down
113 changes: 57 additions & 56 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,85 @@ GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.1)
actionpack (= 3.0.1)
mail (~> 2.2.5)
actionpack (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
actionmailer (3.0.3)
actionpack (= 3.0.3)
mail (~> 2.2.9)
actionpack (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4.1)
i18n (~> 0.4)
rack (~> 1.2.1)
rack-mount (~> 0.6.12)
rack-test (~> 0.5.4)
rack-mount (~> 0.6.13)
rack-test (~> 0.5.6)
tzinfo (~> 0.3.23)
activemodel (3.0.1)
activesupport (= 3.0.1)
activemodel (3.0.3)
activesupport (= 3.0.3)
builder (~> 2.1.2)
i18n (~> 0.4.1)
activerecord (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
arel (~> 1.0.0)
i18n (~> 0.4)
activerecord (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activeresource (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
activesupport (3.0.1)
activeresource (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
activesupport (3.0.3)
archive-tar-minitar (0.5.2)
arel (1.0.1)
activesupport (~> 3.0.0)
arel (2.0.6)
builder (2.1.2)
columnize (0.3.1)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
faker (0.3.1)
fakeweb (1.3.0)
i18n (0.4.1)
i18n (0.5.0)
linecache (0.43)
linecache19 (0.5.11)
ruby_core_source (>= 0.1.4)
mail (2.2.7)
mail (2.2.14)
activesupport (>= 2.3.6)
mime-types
treetop (>= 1.4.5)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
nokogiri (1.4.3.1)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack (>= 1.0.0)
rack-test (0.5.6)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.1)
actionmailer (= 3.0.1)
actionpack (= 3.0.1)
activerecord (= 3.0.1)
activeresource (= 3.0.1)
activesupport (= 3.0.1)
bundler (~> 1.0.0)
railties (= 3.0.1)
railties (3.0.1)
actionpack (= 3.0.1)
activesupport (= 3.0.1)
rake (>= 0.8.4)
thor (~> 0.14.0)
rails (3.0.3)
actionmailer (= 3.0.3)
actionpack (= 3.0.3)
activerecord (= 3.0.3)
activeresource (= 3.0.3)
activesupport (= 3.0.3)
bundler (~> 1.0)
railties (= 3.0.3)
railties (3.0.3)
actionpack (= 3.0.3)
activesupport (= 3.0.3)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rspec (2.0.0)
rspec-core (= 2.0.0)
rspec-expectations (= 2.0.0)
rspec-mocks (= 2.0.0)
rspec-core (2.0.0)
rspec-expectations (2.0.0)
diff-lcs (>= 1.1.2)
rspec-mocks (2.0.0)
rspec-core (= 2.0.0)
rspec-expectations (= 2.0.0)
rspec-rails (2.0.1)
rspec (~> 2.0.0)
rspec (2.4.0)
rspec-core (~> 2.4.0)
rspec-expectations (~> 2.4.0)
rspec-mocks (~> 2.4.0)
rspec-core (2.4.0)
rspec-expectations (2.4.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.4.0)
rspec-rails (2.4.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.4.0)
ruby-debug (0.10.3)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.3.0)
Expand All @@ -96,8 +97,8 @@ GEM
ruby_core_source (0.1.4)
archive-tar-minitar (>= 0.5.2)
sqlite3-ruby (1.3.1)
thor (0.14.3)
treetop (1.4.8)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.23)

Expand All @@ -108,8 +109,8 @@ DEPENDENCIES
faker
fakeweb
nokogiri
rails (= 3.0.1)
rspec-rails (= 2.0.1)
rails (= 3.0.3)
rspec-rails (= 2.4.1)
ruby-debug
ruby-debug19
sqlite3-ruby
2 changes: 1 addition & 1 deletion lib/pagseguro/developer_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module PagSeguro
class DeveloperController < ApplicationController
class DeveloperController < ::ActionController::Base
skip_before_filter :verify_authenticity_token
PAGSEGURO_ORDERS_FILE = File.join(Rails.root, "tmp", "pagseguro-#{Rails.env}.yml")

Expand Down
8 changes: 4 additions & 4 deletions lib/pagseguro/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def add(options)
end

private
def convert_unit(number, unit)
number = (number * unit).to_i unless number.nil? || number.kind_of?(Integer)
number
end
def convert_unit(number, unit)
number = (number * unit).to_i unless number.nil? || number.kind_of?(Integer)
number
end
end
end
5 changes: 4 additions & 1 deletion lib/pagseguro/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class Railtie < Rails::Railtie

initializer :add_routing_paths do |app|
if PagSeguro.developer?
require "pagseguro/developer_controller"
app.routes_reloader.paths.unshift(File.dirname(__FILE__) + "/routes.rb")
end
end
Expand All @@ -19,5 +18,9 @@ class Railtie < Rails::Railtie
::ActionView::Base.send(:include, PagSeguro::Helper)
::ActionController::Base.send(:include, PagSeguro::ActionController)
end

::ActiveSupport.on_load(:action_controller) do
require "pagseguro/developer_controller" if PagSeguro.developer?
end
end
end
2 changes: 1 addition & 1 deletion templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ test:
production:
authenticity_token: 9CA8D46AF0C6177CB4C23D76CAF5E4B0
email: user@example.com
return_to: "/pedido/efetuado"
return_to: "http://exemplo.com.br/pedido/efetuado"

0 comments on commit d9b3adf

Please sign in to comment.