lemur 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +3 -1
- data/lemur.gemspec +1 -0
- data/lib/lemur.rb +5 -3
- data/lib/lemur/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2E3NjBjZTkwMjVhZjcxZjI1N2RkMWQ2OWU0ZGQ4ZDJiMWFhYTJjOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjAwY2ZhMWU2MmYxNjE1ZDUzNjgzOTRlZDJmMzcyYTExNDViZTE1MA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTc1YjhmMTUwZmJkZjRlYzE4YzMwMDQzZDMwN2M0ZjRmNjY2MTA4YjQ0NGZj
|
10
|
+
Y2M2YTRmOWNiODYxM2ViZmE0NWQ4OTlhNjFkMjcyMTQ5M2EyYzFmNDBjYjI1
|
11
|
+
MWNiYjE5ZTVjZjBlNjYxY2IzYTkzNmY1OWIzYjZlY2NkYzBiMDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDk2MjA4YjQ3ZTJlMmVmMmE5MzM0MjkyNGIwMTBhNDczNDVhOTA4YmM0Zjk5
|
14
|
+
MTYwNTZiNWE1YzIxNmYzMGQ2MWY4MGIyM2YxN2VkNTZkMmJjYTQyMmYxNzkw
|
15
|
+
MTNiZTUzYWJiZTc3YTgyMzI5MWMzN2ZjZDJlYzQwNDE3NjM0MGY=
|
data/README.md
CHANGED
@@ -8,8 +8,10 @@ Lemur is a lightweight, flexible Ruby SDK for Odnoklassniki. It allows read/writ
|
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
|
-
gem
|
11
|
+
gem "lemur", "~> 0.0.5"
|
12
|
+
|
12
13
|
or instal gem with latest changes
|
14
|
+
|
13
15
|
gem 'lemur', :git => "git@github.com:edikgat/lemur.git"
|
14
16
|
|
15
17
|
And then execute:
|
data/lemur.gemspec
CHANGED
data/lib/lemur.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "lemur/version"
|
2
2
|
|
3
|
-
require 'json'
|
4
3
|
require 'digest/md5'
|
4
|
+
require 'multi_json'
|
5
5
|
|
6
6
|
module Lemur
|
7
7
|
|
@@ -40,7 +40,7 @@ module Lemur
|
|
40
40
|
client_secret: @security_options[:application_secret_key]
|
41
41
|
}
|
42
42
|
end
|
43
|
-
new_token_response =
|
43
|
+
new_token_response = MultiJson.load(new_token_response.body)
|
44
44
|
@security_options[:access_token] = new_token_response['access_token']
|
45
45
|
new_token_response['access_token']
|
46
46
|
end
|
@@ -55,13 +55,15 @@ module Lemur
|
|
55
55
|
|
56
56
|
def get(request_params)
|
57
57
|
@response = get_request(request_params)
|
58
|
-
json_data =
|
58
|
+
json_data = MultiJson.load(response.body)
|
59
59
|
if json_data.is_a? Hash
|
60
60
|
if json_data['error_code']
|
61
61
|
raise ApiError, json_data
|
62
62
|
end
|
63
63
|
end
|
64
64
|
json_data
|
65
|
+
rescue MultiJson::DecodeError
|
66
|
+
raise ApiError, @response.body
|
65
67
|
end
|
66
68
|
|
67
69
|
private
|
data/lib/lemur/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lemur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduard Gataullin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.8'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: multi_json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.3'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
55
69
|
description: Lemur is a lightweight, flexible Ruby SDK for Odnoklassniki. It allows
|
56
70
|
read/write access to Odnoklassniki API. To work with Lemur you need VALUABLE ACCESS
|
57
71
|
to odnoklassniki api. This api work only with access_token that gives you odnoklassniki,
|