mousetrap 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/mousetrap/customer.rb +4 -0
- data/mousetrap.gemspec +2 -2
- data/spec/factories.rb +1 -0
- data/spec/integration/smoke_test.rb +5 -0
- data/spec/mousetrap/customer_spec.rb +1 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/lib/mousetrap/customer.rb
CHANGED
@@ -6,6 +6,7 @@ module Mousetrap
|
|
6
6
|
:email,
|
7
7
|
:first_name,
|
8
8
|
:last_name,
|
9
|
+
:company,
|
9
10
|
:subscription
|
10
11
|
|
11
12
|
def subscription_attributes=(attributes)
|
@@ -19,6 +20,7 @@ module Mousetrap
|
|
19
20
|
:email => email,
|
20
21
|
:first_name => first_name,
|
21
22
|
:last_name => last_name,
|
23
|
+
:company => company
|
22
24
|
}
|
23
25
|
end
|
24
26
|
|
@@ -107,6 +109,7 @@ module Mousetrap
|
|
107
109
|
:email => attributes[:email],
|
108
110
|
:firstName => attributes[:first_name],
|
109
111
|
:lastName => attributes[:last_name],
|
112
|
+
:company => attributes[:company]
|
110
113
|
}
|
111
114
|
mutated_hash.merge!(:code => attributes[:code]) if new_record
|
112
115
|
mutated_hash
|
@@ -118,6 +121,7 @@ module Mousetrap
|
|
118
121
|
:code => attributes['code'],
|
119
122
|
:first_name => attributes['firstName'],
|
120
123
|
:last_name => attributes['lastName'],
|
124
|
+
:company => attributes['company'],
|
121
125
|
:email => attributes['email']
|
122
126
|
}
|
123
127
|
end
|
data/mousetrap.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mousetrap}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jon Larkowski", "Sandro Turriate", "Wolfram Arnold", "Corey Grusden"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-18}
|
13
13
|
s.description = %q{CheddarGetter API Client in Ruby}
|
14
14
|
s.email = %q{jonlarkowski@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/factories.rb
CHANGED
@@ -2,6 +2,7 @@ Factory.define :new_customer, :class => Mousetrap::Customer, :default_strategy =
|
|
2
2
|
f.email { random_email_address }
|
3
3
|
f.first_name { random_string }
|
4
4
|
f.last_name { random_string }
|
5
|
+
f.company { random_string }
|
5
6
|
f.code { |me| me.email }
|
6
7
|
f.add_attribute :id, nil
|
7
8
|
f.subscription_attributes { Factory.attributes_for :subscription }
|
@@ -35,6 +35,10 @@ shared_examples_for "a Customer record from CheddarGetter" do
|
|
35
35
|
@api_customer.last_name.should == @customer.last_name
|
36
36
|
end
|
37
37
|
|
38
|
+
it "And I should see company" do
|
39
|
+
@api_customer.company.should == @customer.company
|
40
|
+
end
|
41
|
+
|
38
42
|
it "And I should see the code" do
|
39
43
|
@api_customer.code.should == @customer.code
|
40
44
|
end
|
@@ -191,6 +195,7 @@ describe "The Wrapper Gem" do
|
|
191
195
|
@customer.first_name = attributes[:first_name]
|
192
196
|
@customer.last_name = attributes[:last_name]
|
193
197
|
@customer.email = attributes[:email]
|
198
|
+
@customer.company = attributes[:company]
|
194
199
|
@customer.save
|
195
200
|
end
|
196
201
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mousetrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Larkowski
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-10-
|
15
|
+
date: 2009-10-18 00:00:00 -04:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|