Skip to content

Commit

Permalink
Now require json pure, but use json if available
Browse files Browse the repository at this point in the history
  • Loading branch information
mmangino committed Feb 5, 2010
1 parent 69640f9 commit c5b3ecb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ HOE = Hoe.spec('facebooker') do
self.history_file = 'CHANGELOG.rdoc'
self.remote_rdoc_dir = '' # Release to root
self.test_globs = ['test/**/*_test.rb']
extra_deps << ['json', '>= 1.0.0']
extra_deps << ['json_pure', '>= 1.0.0']
self.extra_rdoc_files = FileList['*.rdoc']
end

Expand Down
7 changes: 6 additions & 1 deletion lib/facebooker.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
unless defined?(ActiveSupport) and defined?(ActiveSupport::JSON)
require 'json'
begin
require 'json'
rescue LoadError
gem "json_pure"
require "json"
end
module Facebooker
def self.json_decode(str)
JSON.parse(str)
Expand Down
10 changes: 5 additions & 5 deletions lib/facebooker/rails/extensions/rack_setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
Rack::Facebook
)

ActionController::Dispatcher.middleware.insert_before(
ActionController::Base.session_store,
Rack::FacebookSession,
ActionController::Base.session_options[:key]
)
# ActionController::Dispatcher.middleware.insert_before(
# ActionController::Base.session_store,
# Rack::FacebookSession,
# ActionController::Base.session_options[:key]
# )
2 changes: 1 addition & 1 deletion lib/facebooker/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Facebooker #:nodoc:
module VERSION #:nodoc:
MAJOR = 1
MINOR = 0
TINY = 61
TINY = 62

STRING = [MAJOR, MINOR, TINY].join('.')
end
Expand Down

0 comments on commit c5b3ecb

Please sign in to comment.