instagram 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -10,3 +10,4 @@ coverage/*
10
10
  doc/*
11
11
  log/*
12
12
  pkg/*
13
+ .idea/*
data/README.md CHANGED
@@ -89,7 +89,7 @@ API Usage Examples
89
89
  puts Instagram.follows
90
90
 
91
91
  # Get a list of media close to a given latitude and longitude
92
- puts Instagram.media_search("37.7808851,-122.3948632")
92
+ puts Instagram.media_search("37.7808851","-122.3948632")
93
93
 
94
94
  # Get a list of the overall most popular media items
95
95
  puts Instagram.media_popular
@@ -5,9 +5,9 @@ Gem::Specification.new do |s|
5
5
  s.add_development_dependency('rspec', '~> 2.4')
6
6
  s.add_development_dependency('webmock', '~> 1.6')
7
7
  s.add_development_dependency('bluecloth', '~> 2.0.11')
8
- s.add_runtime_dependency('faraday', '~> 0.7')
8
+ s.add_runtime_dependency('faraday', ['>= 0.7', '< 0.9'])
9
9
  s.add_runtime_dependency('faraday_middleware', '~> 0.8')
10
- s.add_runtime_dependency('multi_json', '~> 1.0.3')
10
+ s.add_runtime_dependency('multi_json', '>= 1.0.3', '~> 1.0')
11
11
  s.add_runtime_dependency('hashie', '>= 0.4.0')
12
12
  s.authors = ["Shayne Sweeney"]
13
13
  s.description = %q{A Ruby wrapper for the Instagram REST and Search APIs}
@@ -7,13 +7,17 @@ module FaradayMiddleware
7
7
  def call(env)
8
8
 
9
9
  if env[:method] == :get or env[:method] == :delete
10
- env[:url].query_values = {} if env[:url].query_values.nil?
10
+ if env[:url].query.nil?
11
+ query = {}
12
+ else
13
+ query = Faraday::Utils.parse_query(env[:url].query)
14
+ end
11
15
 
12
- if @access_token and not env[:url].query_values["client_secret"]
13
- env[:url].query_values = env[:url].query_values.merge(:access_token => @access_token)
16
+ if @access_token and not query["client_secret"]
17
+ env[:url].query = Faraday::Utils.build_query(query.merge(:access_token => @access_token))
14
18
  env[:request_headers] = env[:request_headers].merge('Authorization' => "Token token=\"#{@access_token}\"")
15
19
  elsif @client_id
16
- env[:url].query_values = env[:url].query_values.merge(:client_id => @client_id)
20
+ env[:url].query = Faraday::Utils.build_query(query.merge(:client_id => @client_id))
17
21
  end
18
22
  else
19
23
  if @access_token and not env[:body] && env[:body][:client_secret]
@@ -25,7 +29,6 @@ module FaradayMiddleware
25
29
  end
26
30
  end
27
31
 
28
- env[:url].query_values = nil if env[:url].query_values == {}
29
32
 
30
33
  @app.call env
31
34
  end
@@ -17,7 +17,6 @@ module Instagram
17
17
  Faraday::Connection.new(options) do |connection|
18
18
  connection.use FaradayMiddleware::OAuth2, client_id, access_token
19
19
  connection.use Faraday::Request::UrlEncoded
20
- connection.adapter(adapter)
21
20
  connection.use FaradayMiddleware::Mashify unless raw
22
21
  unless raw
23
22
  case format.to_s.downcase
@@ -25,6 +24,7 @@ module Instagram
25
24
  end
26
25
  end
27
26
  connection.use FaradayMiddleware::RaiseHttpException
27
+ connection.adapter(adapter)
28
28
  end
29
29
  end
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module Instagram
2
- VERSION = '0.8.4'.freeze unless defined?(::Instagram::VERSION)
2
+ VERSION = '0.8.5'.freeze unless defined?(::Instagram::VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instagram
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-07 00:00:00.000000000Z
12
+ date: 2012-07-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70234824417720 !ruby/object:Gem::Requirement
16
+ requirement: &70311845220480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.4'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70234824417720
24
+ version_requirements: *70311845220480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: webmock
27
- requirement: &70234824416580 !ruby/object:Gem::Requirement
27
+ requirement: &70311845218780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.6'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70234824416580
35
+ version_requirements: *70311845218780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bluecloth
38
- requirement: &70234824415400 !ruby/object:Gem::Requirement
38
+ requirement: &70311845217920 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,21 +43,24 @@ dependencies:
43
43
  version: 2.0.11
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70234824415400
46
+ version_requirements: *70311845217920
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: faraday
49
- requirement: &70234824414280 !ruby/object:Gem::Requirement
49
+ requirement: &70311845217080 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
- - - ~>
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.7'
55
+ - - <
56
+ - !ruby/object:Gem::Version
57
+ version: '0.9'
55
58
  type: :runtime
56
59
  prerelease: false
57
- version_requirements: *70234824414280
60
+ version_requirements: *70311845217080
58
61
  - !ruby/object:Gem::Dependency
59
62
  name: faraday_middleware
60
- requirement: &70234824413220 !ruby/object:Gem::Requirement
63
+ requirement: &70311845215700 !ruby/object:Gem::Requirement
61
64
  none: false
62
65
  requirements:
63
66
  - - ~>
@@ -65,21 +68,24 @@ dependencies:
65
68
  version: '0.8'
66
69
  type: :runtime
67
70
  prerelease: false
68
- version_requirements: *70234824413220
71
+ version_requirements: *70311845215700
69
72
  - !ruby/object:Gem::Dependency
70
73
  name: multi_json
71
- requirement: &70234824411780 !ruby/object:Gem::Requirement
74
+ requirement: &70311845214840 !ruby/object:Gem::Requirement
72
75
  none: false
73
76
  requirements:
74
- - - ~>
77
+ - - ! '>='
75
78
  - !ruby/object:Gem::Version
76
79
  version: 1.0.3
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '1.0'
77
83
  type: :runtime
78
84
  prerelease: false
79
- version_requirements: *70234824411780
85
+ version_requirements: *70311845214840
80
86
  - !ruby/object:Gem::Dependency
81
87
  name: hashie
82
- requirement: &70234824410420 !ruby/object:Gem::Requirement
88
+ requirement: &70311845213800 !ruby/object:Gem::Requirement
83
89
  none: false
84
90
  requirements:
85
91
  - - ! '>='
@@ -87,7 +93,7 @@ dependencies:
87
93
  version: 0.4.0
88
94
  type: :runtime
89
95
  prerelease: false
90
- version_requirements: *70234824410420
96
+ version_requirements: *70311845213800
91
97
  description: A Ruby wrapper for the Instagram REST and Search APIs
92
98
  email:
93
99
  - shayne@instagr.am
@@ -189,7 +195,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
195
  version: '0'
190
196
  segments:
191
197
  - 0
192
- hash: 794823889550936591
198
+ hash: -1111246945157108473
193
199
  required_rubygems_version: !ruby/object:Gem::Requirement
194
200
  none: false
195
201
  requirements: