braintree 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/lib/braintree.rb +36 -46
  2. data/lib/braintree/address.rb +14 -14
  3. data/lib/braintree/base_module.rb +3 -3
  4. data/lib/braintree/configuration.rb +16 -16
  5. data/lib/braintree/credit_card.rb +39 -30
  6. data/lib/braintree/credit_card_verification.rb +4 -3
  7. data/lib/braintree/customer.rb +22 -22
  8. data/lib/braintree/digest.rb +2 -8
  9. data/lib/braintree/error_codes.rb +16 -3
  10. data/lib/braintree/error_result.rb +5 -5
  11. data/lib/braintree/exceptions.rb +58 -0
  12. data/lib/braintree/http.rb +7 -7
  13. data/lib/braintree/paged_collection.rb +14 -14
  14. data/lib/braintree/ssl_expiration_check.rb +5 -1
  15. data/lib/braintree/subscription.rb +110 -0
  16. data/lib/braintree/successful_result.rb +3 -3
  17. data/lib/braintree/test/credit_card_numbers.rb +1 -1
  18. data/lib/braintree/test/transaction_amounts.rb +18 -0
  19. data/lib/braintree/transaction.rb +52 -25
  20. data/lib/braintree/transaction/address_details.rb +2 -2
  21. data/lib/braintree/transaction/credit_card_details.rb +12 -4
  22. data/lib/braintree/transaction/customer_details.rb +9 -1
  23. data/lib/braintree/transaction/status_details.rb +1 -1
  24. data/lib/braintree/transparent_redirect.rb +15 -15
  25. data/lib/braintree/util.rb +7 -7
  26. data/lib/braintree/validation_error.rb +1 -1
  27. data/lib/braintree/validation_error_collection.rb +6 -6
  28. data/lib/braintree/version.rb +3 -3
  29. data/lib/braintree/xml/generator.rb +2 -2
  30. data/lib/braintree/xml/libxml.rb +1 -1
  31. data/lib/braintree/xml/parser.rb +1 -1
  32. data/spec/integration/braintree/address_spec.rb +12 -12
  33. data/spec/integration/braintree/credit_card_spec.rb +189 -37
  34. data/spec/integration/braintree/customer_spec.rb +35 -35
  35. data/spec/integration/braintree/http_spec.rb +3 -3
  36. data/spec/integration/braintree/subscription_spec.rb +362 -0
  37. data/spec/integration/braintree/transaction_spec.rb +130 -58
  38. data/spec/integration/spec_helper.rb +1 -1
  39. data/spec/spec_helper.rb +4 -4
  40. data/spec/unit/braintree/address_spec.rb +6 -6
  41. data/spec/unit/braintree/base_module_spec.rb +18 -0
  42. data/spec/unit/braintree/configuration_spec.rb +10 -10
  43. data/spec/unit/braintree/credit_card_spec.rb +15 -15
  44. data/spec/unit/braintree/credit_card_verification_spec.rb +4 -2
  45. data/spec/unit/braintree/customer_spec.rb +8 -8
  46. data/spec/unit/braintree/digest_spec.rb +4 -0
  47. data/spec/unit/braintree/http_spec.rb +2 -2
  48. data/spec/unit/braintree/paged_collection_spec.rb +12 -12
  49. data/spec/unit/braintree/ssl_expiration_check_spec.rb +18 -9
  50. data/spec/unit/braintree/transaction/credit_card_details_spec.rb +15 -0
  51. data/spec/unit/braintree/transaction/customer_details_spec.rb +19 -0
  52. data/spec/unit/braintree/transaction_spec.rb +14 -14
  53. data/spec/unit/braintree/transparent_redirect_spec.rb +11 -11
  54. data/spec/unit/braintree/util_spec.rb +8 -8
  55. data/spec/unit/braintree/validation_error_collection_spec.rb +6 -6
  56. data/spec/unit/braintree/validation_error_spec.rb +2 -2
  57. data/spec/unit/braintree/xml/libxml_spec.rb +5 -5
  58. data/spec/unit/braintree/xml_spec.rb +16 -16
  59. data/spec/unit/braintree_spec.rb +11 -0
  60. metadata +8 -2
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + "/spec_helper"
2
+
3
+ describe Braintree do
4
+ it "doesn't produce warnings if loading braintree.rb twice" do
5
+ lib_dir = File.dirname(__FILE__) + "/../../lib"
6
+ braintree_file = "#{lib_dir}/braintree.rb"
7
+ File.exist?(braintree_file).should == true
8
+ output = `ruby -r rubygems -I #{lib_dir} -e 'load #{braintree_file.inspect}; load #{braintree_file.inspect}' 2>&1`
9
+ output.should == ""
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: braintree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Braintree Payment Solutions
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-20 00:00:00 -06:00
12
+ date: 2010-02-25 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -34,9 +34,11 @@ files:
34
34
  - lib/braintree/error_codes.rb
35
35
  - lib/braintree/error_result.rb
36
36
  - lib/braintree/errors.rb
37
+ - lib/braintree/exceptions.rb
37
38
  - lib/braintree/http.rb
38
39
  - lib/braintree/paged_collection.rb
39
40
  - lib/braintree/ssl_expiration_check.rb
41
+ - lib/braintree/subscription.rb
40
42
  - lib/braintree/successful_result.rb
41
43
  - lib/braintree/test/credit_card_numbers.rb
42
44
  - lib/braintree/test/transaction_amounts.rb
@@ -61,12 +63,14 @@ files:
61
63
  - spec/integration/braintree/customer_spec.rb
62
64
  - spec/integration/braintree/error_codes_spec.rb
63
65
  - spec/integration/braintree/http_spec.rb
66
+ - spec/integration/braintree/subscription_spec.rb
64
67
  - spec/integration/braintree/test/transaction_amounts_spec.rb
65
68
  - spec/integration/braintree/transaction_spec.rb
66
69
  - spec/integration/spec_helper.rb
67
70
  - spec/script/httpsd.rb
68
71
  - spec/spec_helper.rb
69
72
  - spec/unit/braintree/address_spec.rb
73
+ - spec/unit/braintree/base_module_spec.rb
70
74
  - spec/unit/braintree/configuration_spec.rb
71
75
  - spec/unit/braintree/credit_card_spec.rb
72
76
  - spec/unit/braintree/credit_card_verification_spec.rb
@@ -79,6 +83,7 @@ files:
79
83
  - spec/unit/braintree/ssl_expiration_check_spec.rb
80
84
  - spec/unit/braintree/successful_result_spec.rb
81
85
  - spec/unit/braintree/transaction/credit_card_details_spec.rb
86
+ - spec/unit/braintree/transaction/customer_details_spec.rb
82
87
  - spec/unit/braintree/transaction_spec.rb
83
88
  - spec/unit/braintree/transparent_redirect_spec.rb
84
89
  - spec/unit/braintree/util_spec.rb
@@ -86,6 +91,7 @@ files:
86
91
  - spec/unit/braintree/validation_error_spec.rb
87
92
  - spec/unit/braintree/xml/libxml_spec.rb
88
93
  - spec/unit/braintree/xml_spec.rb
94
+ - spec/unit/braintree_spec.rb
89
95
  - spec/unit/spec_helper.rb
90
96
  - lib/ssl/securetrust_ca.crt
91
97
  - lib/ssl/valicert_ca.crt