instagram 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjU2MDUzZjgzZGI4NjQ0ZDYwMzFlMzZiYjRiOTAzNzNlOWFkYTI1Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDliNWJkYjljZTVjM2I5NTA1MWU1NTY4NGJjZmYzYjk1ZGZjYjRiOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODI0ZTI4ZWFmNjQxM2Y1OGM0YTQ3M2I1M2UzZmQwN2M0MTYwNDE2MTIxZjlj
|
10
|
+
ZTljMzdmNjIwMjg3YjVlZTE3NmNjZjFhMjhjODQ3MDBiZGFjNGNjZGMwYzMz
|
11
|
+
NmZiYWY4MjQ1Y2EzZGJjMTcwNmVlNjVhZDNlNTE0ZmY5Y2RhMGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDgyNDI2M2U1NmM3YWYyNDM4NWZlYzY4YTE3NjQ0YjkyOTIzNzg3MTFjMTI3
|
14
|
+
YmQ0MzEzMTBkNTVjZjQ3ZWMxN2MxYjg4Y2Q2OTgyM2RhMjUyNDQ5NTRiMDFk
|
15
|
+
Y2E0N2Y1YWY5MjcxNDQ0ZjI5MTU3ODE1NjAwN2RhYzE1MGYyMjc=
|
@@ -183,7 +183,7 @@ module Instagram
|
|
183
183
|
if !client_secret
|
184
184
|
raise ArgumentError, "client_secret must be set during configure"
|
185
185
|
end
|
186
|
-
digest = OpenSSL::Digest
|
186
|
+
digest = OpenSSL::Digest.new('sha1')
|
187
187
|
verify_signature = OpenSSL::HMAC.hexdigest(digest, client_secret, json)
|
188
188
|
|
189
189
|
if options[:signature] != verify_signature
|
@@ -11,7 +11,7 @@ module Instagram
|
|
11
11
|
# limit = response.headers[:x_ratelimit_limit]
|
12
12
|
#
|
13
13
|
def utils_raw_response
|
14
|
-
response = get('users/self/feed',nil,true)
|
14
|
+
response = get('users/self/feed',nil, false, true)
|
15
15
|
response
|
16
16
|
end
|
17
17
|
|
@@ -25,4 +25,4 @@ module Instagram
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
|
-
end
|
28
|
+
end
|
data/lib/instagram/request.rb
CHANGED
@@ -51,7 +51,7 @@ module Instagram
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def get_insta_fowarded_for(ips, secret)
|
54
|
-
digest = OpenSSL::Digest
|
54
|
+
digest = OpenSSL::Digest.new('sha256')
|
55
55
|
signature = OpenSSL::HMAC.hexdigest(digest, secret, ips)
|
56
56
|
return [ips, signature].join('|')
|
57
57
|
end
|
data/lib/instagram/version.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.expand_path('../../../spec_helper', __FILE__)
|
2
|
+
|
3
|
+
describe Instagram::Client do
|
4
|
+
Instagram::Configuration::VALID_FORMATS.each do |format|
|
5
|
+
context ".new(:format => '#{format}')" do
|
6
|
+
|
7
|
+
before do
|
8
|
+
@client = Instagram::Client.new(:format => format, :client_id => 'CID', :client_secret => 'CS', :client_ips => '1.2.3.4', :access_token => 'AT')
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '.utils_raw_response' do
|
12
|
+
before do
|
13
|
+
stub_get("users/self/feed.#{format}").
|
14
|
+
with(:query => {:access_token => @client.access_token}).
|
15
|
+
to_return(:body => fixture("user_media_feed.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
|
16
|
+
end
|
17
|
+
|
18
|
+
before(:each) do
|
19
|
+
@response = @client.utils_raw_response
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'return raw data' do
|
23
|
+
expect(@response).to be_instance_of(Faraday::Response)
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'response content headers' do
|
27
|
+
expect(@response).to be_respond_to(:headers)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -5,7 +5,7 @@ describe Instagram::Request do
|
|
5
5
|
before do
|
6
6
|
@ips = "1.2.3.4"
|
7
7
|
@secret = "CS"
|
8
|
-
digest = OpenSSL::Digest
|
8
|
+
digest = OpenSSL::Digest.new('sha256')
|
9
9
|
signature = OpenSSL::HMAC.hexdigest(digest, @secret, @ips)
|
10
10
|
@signed_header = [@ips, signature].join('|')
|
11
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instagram
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shayne Sweeney
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- spec/instagram/client/subscriptions_spec.rb
|
230
230
|
- spec/instagram/client/tags_spec.rb
|
231
231
|
- spec/instagram/client/users_spec.rb
|
232
|
+
- spec/instagram/client/utils_spec.rb
|
232
233
|
- spec/instagram/client_spec.rb
|
233
234
|
- spec/instagram/request_spec.rb
|
234
235
|
- spec/instagram_spec.rb
|
@@ -349,6 +350,7 @@ test_files:
|
|
349
350
|
- spec/instagram/client/subscriptions_spec.rb
|
350
351
|
- spec/instagram/client/tags_spec.rb
|
351
352
|
- spec/instagram/client/users_spec.rb
|
353
|
+
- spec/instagram/client/utils_spec.rb
|
352
354
|
- spec/instagram/client_spec.rb
|
353
355
|
- spec/instagram/request_spec.rb
|
354
356
|
- spec/instagram_spec.rb
|