Permalink
Browse files

Page#hours format change

  • Loading branch information...
1 parent e98db42 commit 2278fcf18eb8ef58e23b45960b42c6dda5f35799 @nov nov committed Nov 17, 2011
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- fb_graph (2.2.0.beta)
+ fb_graph (2.2.1)
httpclient (>= 2.2.0.2)
rack-oauth2 (>= 0.9.4)
@@ -90,12 +90,11 @@ def initialize_with_category_specific_attributes(identifier, attributes = {})
@checkin_count = attributes[:checkins]
@hours = {}
if attributes[:hours]
- utc_beginning_of_day = Time.now.utc.beginning_of_day
attributes[:hours].each do |key, value|
date, index, mode = key.split('_')
index = index.to_i - 1
date, mode = date.to_sym, mode.to_sym
- time = value.since(utc_beginning_of_day)
+ time = Time.parse(value)
time = Time.utc(1970, 1, 1, time.hour, time.min)
@hours[date] ||= []
@hours[date][index] ||= {}
@@ -42,10 +42,14 @@
its(:hours) { should be_instance_of Hash }
its(:hours) do
should == {
- :mon => [
- {:open => Time.parse('Thu Jan 01 09:00:00 UTC 1970')},
- {:close => Time.parse('Thu Jan 01 17:00:00 UTC 1970')}
- ]
+ :mon => [{
+ :open => Time.parse('1970-01-01 10:00:00 UTC'),
+ :close => Time.parse('1970-01-01 20:00:00 UTC')
+ }],
+ :tue=>[{
+ :open => Time.parse('1970-01-01 10:00:00 UTC'),
+ :close => Time.parse('1970-01-01 20:00:00 UTC')
+ }]
}
end
@@ -1,7 +1,7 @@
{
"id": "196723247025808",
"name": "Local Business Sample",
- "picture": "http:\/\/b.static.ak.fbcdn.net\/rsrc.php\/v1\/y0\/r\/XsEg9L6Ie5_.jpg",
+ "picture": "http:\/\/profile.ak.fbcdn.net\/static-ak\/rsrc.php\/v1\/y0\/r\/XsEg9L6Ie5_.jpg",
"link": "http:\/\/www.facebook.com\/pages\/Local-Business-Sample\/196723247025808",
"category": "Bar",
"location": {
@@ -12,29 +12,45 @@
},
"parking": {
"street": 1,
+ "lot": 0,
"valet": 1
},
+ "price_range": "$ (0-10)",
"public_transit": "30 min from Kyoto St.",
"hours": {
- "mon_1_open": 378000,
- "mon_2_close": 406800
+ "mon_1_open": "10:00",
+ "mon_1_close": "20:00",
+ "tue_1_open": "10:00",
+ "tue_1_close": "20:00"
},
"attire": "Casual",
"payment_options": {
+ "cash_only": 0,
"visa": 1,
"amex": 1,
- "mastercard": 1
+ "mastercard": 1,
+ "discover": 0
},
"culinary_team": "Team FbGraph!",
"general_manager": "Nov Matake",
- "price_range": "$ (0-10)",
"restaurant_services": {
"reserve": 1,
- "groups": 1
+ "walkins": 0,
+ "groups": 1,
+ "kids": 0,
+ "takeout": 0,
+ "delivery": 0,
+ "catering": 0,
+ "waiter": 0,
+ "outdoor": 0
},
"restaurant_specialties": {
+ "breakfast": 0,
+ "lunch": 0,
"dinner": 1,
+ "coffee": 0,
"drinks": 1
},
- "phone": "1234567890"
+ "phone": "1234567890",
+ "can_post": true
}

0 comments on commit 2278fcf

Please sign in to comment.