kosher 0.2.20 → 0.2.21
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/lib/kosher/book.rb +2 -1
- data/lib/kosher/description.rb +1 -0
- data/lib/kosher/offer.rb +3 -2
- data/lib/kosher/readable.rb +4 -0
- data/lib/kosher/version.rb +1 -1
- data/lib/kosher.rb +1 -1
- data/spec/kosher/book_spec.rb +2 -2
- data/spec/kosher/{human_readable_spec.rb → readable_spec.rb} +1 -1
- metadata +6 -6
- data/lib/kosher/human_readable.rb +0 -4
data/Rakefile
CHANGED
data/lib/kosher/book.rb
CHANGED
data/lib/kosher/description.rb
CHANGED
data/lib/kosher/offer.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
module Kosher
|
2
2
|
|
3
|
-
#
|
4
|
-
class Offer < Struct.new(:id, :item, :seller, :shipping, :
|
3
|
+
# An offer by a book seller.
|
4
|
+
class Offer < Struct.new(:venue, :id, :item, :seller, :shipping, :readable)
|
5
|
+
|
5
6
|
include Comparable
|
6
7
|
|
7
8
|
class << self
|
data/lib/kosher/version.rb
CHANGED
data/lib/kosher.rb
CHANGED
data/spec/kosher/book_spec.rb
CHANGED
@@ -22,7 +22,7 @@ module Kosher
|
|
22
22
|
@book.offers << @offer2
|
23
23
|
end
|
24
24
|
|
25
|
-
it "returns the kosher offer with the
|
25
|
+
it "returns the kosher offer with the lowest price" do
|
26
26
|
@book.best_kosher_offer.should eql @offer2
|
27
27
|
end
|
28
28
|
end
|
@@ -38,7 +38,7 @@ module Kosher
|
|
38
38
|
@book.offers << @offer2
|
39
39
|
end
|
40
40
|
|
41
|
-
it "returns the
|
41
|
+
it "returns the kosher offer" do
|
42
42
|
@book.best_kosher_offer.should eql @offer1
|
43
43
|
end
|
44
44
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: kosher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.21
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Paper Cavalier
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-15 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -44,10 +44,10 @@ files:
|
|
44
44
|
- lib/kosher/book.rb
|
45
45
|
- lib/kosher/condition.rb
|
46
46
|
- lib/kosher/description.rb
|
47
|
-
- lib/kosher/human_readable.rb
|
48
47
|
- lib/kosher/item.rb
|
49
48
|
- lib/kosher/location.rb
|
50
49
|
- lib/kosher/offer.rb
|
50
|
+
- lib/kosher/readable.rb
|
51
51
|
- lib/kosher/seller.rb
|
52
52
|
- lib/kosher/shipping.rb
|
53
53
|
- lib/kosher/threshold.rb
|
@@ -56,10 +56,10 @@ files:
|
|
56
56
|
- spec/kosher/book_spec.rb
|
57
57
|
- spec/kosher/condition_spec.rb
|
58
58
|
- spec/kosher/description_spec.rb
|
59
|
-
- spec/kosher/human_readable_spec.rb
|
60
59
|
- spec/kosher/item_spec.rb
|
61
60
|
- spec/kosher/location_spec.rb
|
62
61
|
- spec/kosher/offer_spec.rb
|
62
|
+
- spec/kosher/readable_spec.rb
|
63
63
|
- spec/kosher/seller_spec.rb
|
64
64
|
- spec/kosher/shipping_spec.rb
|
65
65
|
- spec/spec_helper.rb
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
requirements: []
|
88
88
|
|
89
89
|
rubyforge_project: kosher
|
90
|
-
rubygems_version: 1.
|
90
|
+
rubygems_version: 1.6.2
|
91
91
|
signing_key:
|
92
92
|
specification_version: 3
|
93
93
|
summary: A somewhat overengineered attempt to abstract bookselling into a set of models
|
@@ -96,10 +96,10 @@ test_files:
|
|
96
96
|
- spec/kosher/book_spec.rb
|
97
97
|
- spec/kosher/condition_spec.rb
|
98
98
|
- spec/kosher/description_spec.rb
|
99
|
-
- spec/kosher/human_readable_spec.rb
|
100
99
|
- spec/kosher/item_spec.rb
|
101
100
|
- spec/kosher/location_spec.rb
|
102
101
|
- spec/kosher/offer_spec.rb
|
102
|
+
- spec/kosher/readable_spec.rb
|
103
103
|
- spec/kosher/seller_spec.rb
|
104
104
|
- spec/kosher/shipping_spec.rb
|
105
105
|
- spec/spec_helper.rb
|