Skip to content

Commit

Permalink
2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
braintreeps committed Sep 3, 2010
1 parent 52830f1 commit fcadea1
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 127 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.rdoc
@@ -1,6 +1,11 @@
== 2.5.2

* removed ssl expiration check
* lazy initialize Configuration.logger when directly instantiating configuration

== 2.5.1

* lazy initialize Configuration.logger at the class level
* lazy initialize Configuration.logger to fix bug with ssl expiration check

== 2.5.0

Expand Down
3 changes: 0 additions & 3 deletions lib/braintree.rb
Expand Up @@ -39,7 +39,6 @@ module Braintree
require "braintree/gateway"
require "braintree/http"
require "braintree/resource_collection"
require "braintree/ssl_expiration_check"
require "braintree/subscription"
require "braintree/subscription_gateway"
require "braintree/subscription_search"
Expand All @@ -65,5 +64,3 @@ module Braintree
require "braintree/xml/rexml"
require "braintree/xml/parser"

Braintree::SSLExpirationCheck.check_dates

6 changes: 5 additions & 1 deletion lib/braintree/configuration.rb
Expand Up @@ -6,7 +6,7 @@ class Configuration
class << self
attr_writer :custom_user_agent, :logger, :merchant_id, :public_key, :private_key
end
attr_reader :logger, :merchant_id, :public_key, :private_key
attr_reader :merchant_id, :public_key, :private_key

def self.expectant_reader(*attributes) # :nodoc:
attributes.each do |attribute|
Expand Down Expand Up @@ -77,6 +77,10 @@ def http # :nodoc:
Http.new(self)
end

def logger
@logger ||= self.class._default_logger
end

def port # :nodoc:
case @environment
when :development
Expand Down
27 changes: 0 additions & 27 deletions lib/braintree/ssl_expiration_check.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/braintree/version.rb
Expand Up @@ -2,7 +2,7 @@ module Braintree
module Version
Major = 2
Minor = 5
Tiny = 1
Tiny = 2

String = "#{Major}.#{Minor}.#{Tiny}"
end
Expand Down
93 changes: 0 additions & 93 deletions spec/integration/braintree/ssl_expiration_check_spec.rb

This file was deleted.

12 changes: 12 additions & 0 deletions spec/unit/braintree/configuration_spec.rb
Expand Up @@ -63,6 +63,18 @@
end
end

describe "logger" do
it "defaults to logging to stdout with log_level info" do
config = Braintree::Configuration.new
config.logger.level.should == Logger::INFO
end

it "lazily initializes so that you can do Braintree::Configuration.logger.level = when configuring the client lib" do
config = Braintree::Configuration.new :logger => nil
config.logger.should_not == nil
end
end

describe "self.environment" do
it "raises an exception if it hasn't been set yet" do
Braintree::Configuration.instance_variable_set(:@environment, nil)
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/braintree_spec.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + "/spec_helper"

describe Braintree do
xit "ssl warning -- doesn't produce warnings if loading braintree.rb twice" do
it "doesn't produce warnings if loading braintree.rb twice" do
lib_dir = File.dirname(__FILE__) + "/../../lib"
braintree_file = "#{lib_dir}/braintree.rb"
File.exist?(braintree_file).should == true
Expand Down

0 comments on commit fcadea1

Please sign in to comment.