redline 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -12,8 +12,6 @@ begin
12
12
  gem.authors = ["James Daniels"]
13
13
  gem.add_development_dependency "rspec", ">= 1.2.9"
14
14
  gem.add_development_dependency "braintree"
15
- gem.add_development_dependency "activerecord"
16
- gem.add_development_dependency "activesupport"
17
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18
16
  end
19
17
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -4,7 +4,8 @@ module RedLine
4
4
  def braintree_customer_attributes
5
5
  wanted_attributes = Braintree::Customer._create_signature.reject{|a| a.is_a? Hash}.reject{|a| a == :id}
6
6
  wanted_attributes.inject({}) {|hash, key| hash.merge(key => (self.send(self.class.braintree_customer_attribute_map[key] || key) rescue nil))}.
7
- merge(:custom_fields => self.class.braintree_customer_custom_fields.inject({}) {|hash, key| hash.merge(key => (self.send(self.class.braintree_customer_attribute_map[key] || key) rescue nil))})
7
+ merge(:custom_fields => self.class.braintree_customer_custom_fields.inject({}) {|hash, key| hash.merge(key => (self.send(self.class.braintree_customer_attribute_map[key] || key) rescue nil))}).
8
+ reject { |key, value| value.empty?}
8
9
  end
9
10
  def customer
10
11
  Braintree::Customer.find(customer_id) if customer_id
data/redline.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{redline}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Daniels"]
12
- s.date = %q{2010-03-17}
12
+ s.date = %q{2010-04-13}
13
13
  s.description = %q{Syncs your AR models with Braintree (Payment Gateway) and offers a lightweight reoccurring billing script}
14
14
  s.email = %q{james@marginleft.com}
15
15
  s.extra_rdoc_files = [
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
45
45
  s.homepage = %q{http://github.com/jamesdaniels/redline}
46
46
  s.rdoc_options = ["--charset=UTF-8"]
47
47
  s.require_paths = ["lib"]
48
- s.rubygems_version = %q{1.3.5}
48
+ s.rubygems_version = %q{1.3.6}
49
49
  s.summary = %q{Syncs your AR models with Braintree (Payment Gateway) and offers a lightweight reoccurring billing script}
50
50
  s.test_files = [
51
51
  "spec/billing_spec.rb",
@@ -64,19 +64,13 @@ Gem::Specification.new do |s|
64
64
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
65
65
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
66
66
  s.add_development_dependency(%q<braintree>, [">= 0"])
67
- s.add_development_dependency(%q<activerecord>, [">= 0"])
68
- s.add_development_dependency(%q<activesupport>, [">= 0"])
69
67
  else
70
68
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
71
69
  s.add_dependency(%q<braintree>, [">= 0"])
72
- s.add_dependency(%q<activerecord>, [">= 0"])
73
- s.add_dependency(%q<activesupport>, [">= 0"])
74
70
  end
75
71
  else
76
72
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
77
73
  s.add_dependency(%q<braintree>, [">= 0"])
78
- s.add_dependency(%q<activerecord>, [">= 0"])
79
- s.add_dependency(%q<activesupport>, [">= 0"])
80
74
  end
81
75
  end
82
76
 
@@ -26,7 +26,7 @@ describe User do
26
26
  (User.instance_methods & expected_methods).sort.should eql(expected_methods.sort)
27
27
  end
28
28
  it "should have proper braintree attributes" do
29
- valid_user.braintree_customer_attributes.should eql({:first_name=>"James", :last_name=>"Daniels", :email=>"james@marginleft.com", :custom_fields=>{}})
29
+ valid_user.braintree_customer_attributes.should eql({:first_name=>"James", :last_name=>"Daniels", :email=>"james@marginleft.com"})
30
30
  end
31
31
  it "should fire Braintree::Customer.create!" do
32
32
  Braintree::Customer.should_receive('create!').with(valid_user.braintree_customer_attributes).and_return(mock_customer)
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 3
8
+ - 2
9
+ version: 0.3.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - James Daniels
@@ -9,49 +14,35 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-17 00:00:00 -04:00
17
+ date: 2010-04-13 00:00:00 -04:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rspec
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 2
30
+ - 9
23
31
  version: 1.2.9
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: braintree
27
32
  type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: "0"
34
- version:
33
+ version_requirements: *id001
35
34
  - !ruby/object:Gem::Dependency
36
- name: activerecord
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
35
+ name: braintree
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
40
38
  requirements:
41
39
  - - ">="
42
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
43
  version: "0"
44
- version:
45
- - !ruby/object:Gem::Dependency
46
- name: activesupport
47
44
  type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: "0"
54
- version:
45
+ version_requirements: *id002
55
46
  description: Syncs your AR models with Braintree (Payment Gateway) and offers a lightweight reoccurring billing script
56
47
  email: james@marginleft.com
57
48
  executables: []
@@ -99,18 +90,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
90
  requirements:
100
91
  - - ">="
101
92
  - !ruby/object:Gem::Version
93
+ segments:
94
+ - 0
102
95
  version: "0"
103
- version:
104
96
  required_rubygems_version: !ruby/object:Gem::Requirement
105
97
  requirements:
106
98
  - - ">="
107
99
  - !ruby/object:Gem::Version
100
+ segments:
101
+ - 0
108
102
  version: "0"
109
- version:
110
103
  requirements: []
111
104
 
112
105
  rubyforge_project:
113
- rubygems_version: 1.3.5
106
+ rubygems_version: 1.3.6
114
107
  signing_key:
115
108
  specification_version: 3
116
109
  summary: Syncs your AR models with Braintree (Payment Gateway) and offers a lightweight reoccurring billing script