mosaic-foursquare 0.2.1 → 0.2.2

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWU4ZWQ0YzM5YjNkNmI1YjdhZGUyMzM1N2MwYjFlZmUwZTRmZjUwNg==
4
+ NzhiMjBkNTQ5YWIwYTA4Y2I1ZmM4YTJlYjQ4ODE0ZjU2OGM0OTk4MA==
5
5
  data.tar.gz: !binary |-
6
- ZWU3ZDBhN2UwZWMzYTJhM2MwNmRmYzc5MjFiZjQwNmNiNTVjNzNmMw==
6
+ ZGE3MTIxMmVjZTQ0NGU2ZTU2MzA0NjcxNzVjMDc2NWZiMWQwMGUzMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OTFhZmJjNjg2ODRlMTg1NzM0OGQ4Yjc1N2ZjMjY3M2EwN2Y2NDFkMmIzNzAx
10
- ZjIyZTVkODhkNDc0YmYyMDUzMThiMWFlMDg2ODVhMGUwNDkwZDAwNzliNzg2
11
- MWFmY2YwMWEwZTczMGUzOTA5NjQwZWI1ODE4NTRiZDY4NzJiNzE=
9
+ NGU1ODBkOTE5MDUzMmQwYTk0NTMwOWI1NDI0ZjRlM2RkYTEyMmI2ZDdlYjhl
10
+ YTJkMDU0MWUzMWI2NWFiOGZkMmIyNTViZWU4Mjk1ZDhlY2QwZDBkMTU1MDJl
11
+ MmQwOGZlZDlhZTg2MzhmNTkyMmVkYzYwNzAwY2VkMmZiMWQwZTE=
12
12
  data.tar.gz: !binary |-
13
- NGIyMTU3ZjIyY2U1NDE4MWE3YzYwYjEyMGU1ZmQ1OGY0NDc1YjYyMDk3Yjk2
14
- N2FhN2VkY2I0MGQ5YThiY2I2YTVjNjkxY2NhMzdlNjljYWVhODg0ZjNiMWU1
15
- Mzg4MmJmOWJiNzJmNWI1ODkxZjgyZjVkZGNhZWRhNjE2ZjE0Nzg=
13
+ NzFmNWRlMDUyODc5MDMxNTgyYmY0ZWRiNjc1ODRhZTcyNTZlMTZjMzk1Nzky
14
+ N2Y0YTk5OTM3MmExOTg2MWEwOWQyMzgzNDIxNWQxN2JmNzA3MjhlMTFlNmYy
15
+ YjYxYjYzYzY3MDNiYTFjZDc5YjMzNmExODcyYTEyN2E3OTdkYzQ=
@@ -3,7 +3,12 @@ require 'mosaic/foursquare/object'
3
3
  module Mosaic
4
4
  module Foursquare
5
5
  class Photo < Mosaic::Foursquare::Object
6
- attr_accessor :id, :url, :visibility
6
+ attr_accessor :id, :url, :visibility, :user
7
+
8
+ def initialize(options = {})
9
+ super
10
+ self.user &&= Mosaic::Foursquare::User.new(user)
11
+ end
7
12
 
8
13
  def url(size = "original")
9
14
  @url ||= @prefix.to_s + size + @suffix.to_s
@@ -1,5 +1,5 @@
1
1
  module Mosaic
2
2
  module Foursquare
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
@@ -21,6 +21,11 @@ describe Mosaic::Foursquare::Photo, :vcr => {:cassette_name => 'Venue/shared'} d
21
21
  expect(photo.url).to eql("https://irs2.4sqi.net/img/general/original/photopath.jpg")
22
22
  end
23
23
 
24
+ it "should have the author of the photo as the user argument, and load their profile picture" do
25
+ expect(photo.user).to be_an_instance_of(Mosaic::Foursquare::User)
26
+ expect(photo.user.photo).to be_an_instance_of(Mosaic::Foursquare::Photo)
27
+ end
28
+
24
29
  it "should pass arguments into the url" do
25
30
  expect(photo.url("300x500")).to eql("https://irs2.4sqi.net/img/general/300x500/photopath.jpg")
26
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mosaic-foursquare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - S. Brent Faulkner