aduki 0.2.2 → 0.2.3
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.
- checksums.yaml +4 -4
- data/lib/aduki.rb +3 -0
- data/lib/aduki/version.rb +1 -1
- data/spec/finder_spec.rb +5 -0
- data/spec/spec_helper.rb +2 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b3953aa4709e4f7e4818e105c28ec4c625c3726
|
|
4
|
+
data.tar.gz: c16d9d42ff965ac449453dcd5288c7fdb634e81a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bee1c572fcb3f93fd62c54f8b2caabe7fe271ea4f354a67cc38ee485d6edd45524625bd73d106f87b9f9769be3a7179938ece074ddea3853db509505215e523c
|
|
7
|
+
data.tar.gz: ff843521d375a36bd2b4ff29df620af67932dbd2493ab655eb2f4172808986b2800c6b8327f1b97cfe3ca9b511020977c80a97dfde2890824535b6076076d5da
|
data/lib/aduki.rb
CHANGED
data/lib/aduki/version.rb
CHANGED
data/spec/finder_spec.rb
CHANGED
|
@@ -20,6 +20,7 @@ end
|
|
|
20
20
|
|
|
21
21
|
def widget_holder
|
|
22
22
|
@widget_holder ||= WidgetHolder.find(@widget_holder_id) unless @widget_holder_id.nil? || @widget_holder_id == ''
|
|
23
|
+
@widget_holder
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
def widget_holder= x
|
|
@@ -48,6 +49,7 @@ end
|
|
|
48
49
|
|
|
49
50
|
def happy_hour
|
|
50
51
|
@happy_hour ||= HappyHour.open(@happy_hour_time) unless @happy_hour_time.nil? || @happy_hour_time == ''
|
|
52
|
+
@happy_hour
|
|
51
53
|
end
|
|
52
54
|
|
|
53
55
|
def happy_hour= x
|
|
@@ -69,6 +71,7 @@ end
|
|
|
69
71
|
|
|
70
72
|
def widget
|
|
71
73
|
@widget ||= WidgetHolder::Base.open(@widget_time) unless @widget_time.nil? || @widget_time == ''
|
|
74
|
+
@widget
|
|
72
75
|
end
|
|
73
76
|
|
|
74
77
|
def widget= x
|
|
@@ -97,6 +100,7 @@ end
|
|
|
97
100
|
|
|
98
101
|
def birthday_gifts
|
|
99
102
|
@birthday_gifts ||= BirthdayGift.purchase @birthday_gift_prices unless @birthday_gift_prices.nil?
|
|
103
|
+
@birthday_gifts
|
|
100
104
|
end
|
|
101
105
|
|
|
102
106
|
def birthday_gifts= x
|
|
@@ -124,6 +128,7 @@ end
|
|
|
124
128
|
|
|
125
129
|
def birthday_gifts
|
|
126
130
|
@birthday_gifts ||= ToyShop.purchase @birthday_gift_prices unless @birthday_gift_prices.nil?
|
|
131
|
+
@birthday_gifts
|
|
127
132
|
end
|
|
128
133
|
|
|
129
134
|
def birthday_gifts= x
|
data/spec/spec_helper.rb
CHANGED
|
@@ -22,9 +22,8 @@ City.new("madrid" ).register
|
|
|
22
22
|
City.new("stockholm").register
|
|
23
23
|
City.new("dublin" ).register
|
|
24
24
|
|
|
25
|
-
class Gift
|
|
25
|
+
class Gift < Aduki::Initializable
|
|
26
26
|
GIFTS = { }
|
|
27
|
-
include Aduki::Initializer
|
|
28
27
|
attr_accessor :name, :price
|
|
29
28
|
def self.lookup name
|
|
30
29
|
name.is_a?(String) ? GIFTS[name] : name.map { |n| GIFTS[n] }
|
|
@@ -40,8 +39,7 @@ Gift.new(name: "med_cruise", price: :expensive).register
|
|
|
40
39
|
Gift.new(name: "whiskey" , price: :medium ).register
|
|
41
40
|
Gift.new(name: "cigars" , price: :medium ).register
|
|
42
41
|
|
|
43
|
-
class Politician
|
|
44
|
-
include Aduki::Initializer
|
|
42
|
+
class Politician < Aduki::Initializable
|
|
45
43
|
attr_accessor :name
|
|
46
44
|
attr_finder :aduki_find, :name, :city
|
|
47
45
|
attr_many_finder :lookup, :name, :gifts
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aduki
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Conan Dalton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-05-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|