vkontakte_api 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +4 -0
- data/.yardopts +3 -0
- data/README.md +33 -15
- data/README.ru.md +33 -15
- data/lib/vkontakte_api.rb +1 -0
- data/lib/vkontakte_api/api.rb +26 -2
- data/lib/vkontakte_api/client.rb +6 -0
- data/lib/vkontakte_api/configuration.rb +12 -0
- data/lib/vkontakte_api/error.rb +11 -1
- data/lib/vkontakte_api/namespaces.yml +3 -0
- data/lib/vkontakte_api/resolver.rb +41 -7
- data/lib/vkontakte_api/version.rb +1 -1
- data/spec/vkontakte_api/api_spec.rb +13 -14
- data/spec/vkontakte_api/resolver_spec.rb +18 -9
- metadata +22 -20
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# vkontakte_api
|
1
|
+
# vkontakte_api [![Build Status](https://secure.travis-ci.org/7even/vkontakte_api.png)](http://travis-ci.org/7even/vkontakte_api)
|
2
2
|
|
3
3
|
`vkontakte_api` is a Ruby wrapper for VKontakte API. It allows you to call all API methods in the simplest possible way.
|
4
4
|
|
@@ -20,7 +20,13 @@ VkontakteApi.configure do |config|
|
|
20
20
|
end
|
21
21
|
```
|
22
22
|
|
23
|
-
All requests are sent via `VkontakteApi::Client` instance.
|
23
|
+
All requests are sent via `VkontakteApi::Client` instance.
|
24
|
+
|
25
|
+
``` ruby
|
26
|
+
@app = VkontakteApi::Client.new
|
27
|
+
```
|
28
|
+
|
29
|
+
To create a client able to perform authorized requests you need to pass an access token.
|
24
30
|
|
25
31
|
``` ruby
|
26
32
|
@app = VkontakteApi::Client.new('my_access_token')
|
@@ -47,18 +53,25 @@ Now for parameters. All method parameters are named, and you can pass them in a
|
|
47
53
|
|
48
54
|
``` ruby
|
49
55
|
@app.friends.get(fields: 'uid,first_name,last_name')
|
50
|
-
# =>
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
]
|
56
|
+
# => [
|
57
|
+
# {
|
58
|
+
# :uid => "1",
|
59
|
+
# :first_name => "Павел",
|
60
|
+
# :last_name => "Дуров"
|
61
|
+
# },
|
62
|
+
# {
|
63
|
+
# :uid => "6492",
|
64
|
+
# :first_name => "Andrew",
|
65
|
+
# :last_name => "Rogozov"
|
66
|
+
# }
|
67
|
+
# ]
|
68
|
+
```
|
69
|
+
|
70
|
+
If the parameter value is a comma-separated list, you can pass it as an array - it will be properly handled before the request:
|
71
|
+
|
72
|
+
``` ruby
|
73
|
+
users_ids = [1, 6492]
|
74
|
+
@app.users.get(uids: users_ids) # => same output as above
|
62
75
|
```
|
63
76
|
|
64
77
|
It's also worth noting that all returned hashes have symbolized keys.
|
@@ -83,10 +96,15 @@ If VKontakte returns an error in response, you get a `VkontakteApi::Error` excep
|
|
83
96
|
# => VkontakteApi::Error: VKontakte returned an error 1: 'Unknown error occured' after calling method 'audio.getById' with parameters {}.
|
84
97
|
```
|
85
98
|
|
99
|
+
## Changelog
|
100
|
+
|
101
|
+
* 0.1 Initial stable version
|
102
|
+
* 0.2 Array arguments support, cleaned up non-authorized requests, updated namespaces list, code documentation
|
103
|
+
|
86
104
|
## Roadmap
|
87
105
|
|
88
106
|
* Authentication (getting the access_token from VK)
|
89
|
-
*
|
107
|
+
* Maybe Struct-like objects in result (instead of Hashes)
|
90
108
|
|
91
109
|
## Contributing
|
92
110
|
|
data/README.ru.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# vkontakte_api
|
1
|
+
# vkontakte_api [![Build Status](https://secure.travis-ci.org/7even/vkontakte_api.png)](http://travis-ci.org/7even/vkontakte_api)
|
2
2
|
|
3
3
|
`vkontakte_api` - ruby-обертка для API ВКонтакте. Она позволяет вызывать методы API настолько просто, насколько это возможно.
|
4
4
|
|
@@ -20,7 +20,13 @@ VkontakteApi.configure do |config|
|
|
20
20
|
end
|
21
21
|
```
|
22
22
|
|
23
|
-
Все запросы к API отправляются через объект класса `VkontakteApi::Client`.
|
23
|
+
Все запросы к API отправляются через объект класса `VkontakteApi::Client`.
|
24
|
+
|
25
|
+
``` ruby
|
26
|
+
@app = VkontakteApi::Client.new
|
27
|
+
```
|
28
|
+
|
29
|
+
Чтобы создать клиент для отправки авторизованных запросов, нужно просто передать в конструктор токен доступа.
|
24
30
|
|
25
31
|
``` ruby
|
26
32
|
@app = VkontakteApi::Client.new('my_access_token')
|
@@ -47,18 +53,25 @@ end
|
|
47
53
|
|
48
54
|
``` ruby
|
49
55
|
@app.friends.get(fields: 'uid,first_name,last_name')
|
50
|
-
# =>
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
]
|
56
|
+
# => [
|
57
|
+
# {
|
58
|
+
# :uid => "1",
|
59
|
+
# :first_name => "Павел",
|
60
|
+
# :last_name => "Дуров"
|
61
|
+
# },
|
62
|
+
# {
|
63
|
+
# :uid => "6492",
|
64
|
+
# :first_name => "Andrew",
|
65
|
+
# :last_name => "Rogozov"
|
66
|
+
# }
|
67
|
+
# ]
|
68
|
+
```
|
69
|
+
|
70
|
+
Если значение параметра - список, разделенный запятыми, то его можно передать в виде массива; он будет корректно обработан перед отправкой запроса:
|
71
|
+
|
72
|
+
``` ruby
|
73
|
+
users_ids = [1, 6492]
|
74
|
+
@app.users.get(uids: users_ids) # => тот же вывод, что и выше
|
62
75
|
```
|
63
76
|
|
64
77
|
Также следует заметить, что все возвращаемые хэши имеют символьные ключи.
|
@@ -83,10 +96,15 @@ end
|
|
83
96
|
# => VkontakteApi::Error: VKontakte returned an error 1: 'Unknown error occured' after calling method 'audio.getById' with parameters {}.
|
84
97
|
```
|
85
98
|
|
99
|
+
## Changelog
|
100
|
+
|
101
|
+
* 0.1 Первая стабильная версия
|
102
|
+
* 0.2 Поддержка аргументов-массивов, подчищенные неавторизованные запросы, обновленный список пространств имен, документация кода
|
103
|
+
|
86
104
|
## Планы
|
87
105
|
|
88
106
|
* Авторизация (получение токена доступа с ВКонтакте)
|
89
|
-
*
|
107
|
+
* Возможно, Struct-подобные объекты в результатах запросов (вместо Hash)
|
90
108
|
|
91
109
|
## Участие в разработке
|
92
110
|
|
data/lib/vkontakte_api.rb
CHANGED
data/lib/vkontakte_api/api.rb
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
module VkontakteApi
|
2
|
+
# A low-level module which handles the requests to VKontakte and returns their results as hashes with symbolized keys.
|
3
|
+
#
|
4
|
+
# It uses Faraday underneath the hood.
|
2
5
|
module API
|
3
6
|
BASE_HOST = 'https://api.vkontakte.ru'
|
4
7
|
BASE_URL = '/method/'
|
5
8
|
|
6
9
|
class << self
|
10
|
+
# Main interface method.
|
11
|
+
# @param [String] method_name A full name of the method.
|
12
|
+
# @param [Hash] args Method arguments including the access token.
|
13
|
+
# @return [Hash] The result of the method call.
|
14
|
+
# @raise [VkontakteApi::Error] raised when VKontakte returns an error.
|
7
15
|
def call(method_name, args = {}, &block)
|
8
16
|
connection = Faraday.new(:url => BASE_HOST) do |builder|
|
9
17
|
builder.adapter(VkontakteApi.adapter)
|
@@ -19,9 +27,25 @@ module VkontakteApi
|
|
19
27
|
response[:response]
|
20
28
|
end
|
21
29
|
end
|
30
|
+
|
22
31
|
private
|
23
|
-
def url_for(method_name,
|
24
|
-
|
32
|
+
def url_for(method_name, arguments)
|
33
|
+
flat_arguments = flatten_arguments(arguments)
|
34
|
+
"#{BASE_URL}#{method_name}?#{flat_arguments.to_param}"
|
35
|
+
end
|
36
|
+
|
37
|
+
def flatten_arguments(arguments)
|
38
|
+
arguments.inject({}) do |flat_args, (arg_name, arg_value)|
|
39
|
+
flat_args[arg_name] = if arg_value.respond_to?(:join)
|
40
|
+
# if value is an array, we join it with a comma
|
41
|
+
arg_value.join(',')
|
42
|
+
else
|
43
|
+
# otherwise leave it untouched
|
44
|
+
arg_value
|
45
|
+
end
|
46
|
+
|
47
|
+
flat_args
|
48
|
+
end
|
25
49
|
end
|
26
50
|
end
|
27
51
|
end
|
data/lib/vkontakte_api/client.rb
CHANGED
@@ -1,15 +1,21 @@
|
|
1
1
|
module VkontakteApi
|
2
|
+
# A class representing a connection to VK. It holds an access token.
|
2
3
|
class Client
|
4
|
+
# An access token needed by authorized requests.
|
3
5
|
attr_reader :access_token
|
4
6
|
|
7
|
+
# A new API client.
|
8
|
+
# @param [String] access_token An access token.
|
5
9
|
def initialize(access_token = nil)
|
6
10
|
@access_token = access_token
|
7
11
|
end
|
8
12
|
|
13
|
+
# Is a `VkontakteApi::Client` instance authorized.
|
9
14
|
def authorized?
|
10
15
|
!@access_token.nil?
|
11
16
|
end
|
12
17
|
|
18
|
+
# All unknown methods are delegated to a `VkontakteApi::Resolver` instance.
|
13
19
|
def method_missing(method_name, *args, &block)
|
14
20
|
args = args.first || {}
|
15
21
|
VkontakteApi::Resolver.new(:access_token => @access_token).send(method_name, args, &block)
|
@@ -1,20 +1,32 @@
|
|
1
1
|
module VkontakteApi
|
2
|
+
# General configuration module.
|
3
|
+
#
|
4
|
+
# It extends `VkontakteApi` so it's methods should be called from there.
|
2
5
|
module Configuration
|
6
|
+
# Available options.
|
3
7
|
OPTION_NAMES = [:app_id, :app_secret, :adapter]
|
4
8
|
|
5
9
|
attr_accessor *OPTION_NAMES
|
6
10
|
|
11
|
+
# Default HTTP adapter.
|
7
12
|
DEFAULT_ADAPTER = :net_http
|
8
13
|
|
14
|
+
# A global configuration set via the block.
|
15
|
+
# @example
|
16
|
+
# VkontakteApi.configure do |config|
|
17
|
+
# config.adapter = :net_http
|
18
|
+
# end
|
9
19
|
def configure
|
10
20
|
yield self if block_given?
|
11
21
|
self
|
12
22
|
end
|
13
23
|
|
24
|
+
# Reset all configuration options to defaults.
|
14
25
|
def reset
|
15
26
|
@adapter = DEFAULT_ADAPTER
|
16
27
|
end
|
17
28
|
|
29
|
+
# When this module is extended, set all configuration options to their default values.
|
18
30
|
def self.extended(base)
|
19
31
|
base.reset
|
20
32
|
end
|
data/lib/vkontakte_api/error.rb
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
module VkontakteApi
|
2
|
+
# An exception raised by `VkontakteApi::API` when VKontakte returns an error.
|
2
3
|
class Error < StandardError
|
4
|
+
# An error code.
|
5
|
+
# @return [Fixnum]
|
6
|
+
attr_reader :error_code
|
7
|
+
|
8
|
+
# An exception is initialized by the data from response hash.
|
9
|
+
# @param [Hash] data Error data.
|
3
10
|
def initialize(data)
|
4
11
|
@error_code = data.delete(:error_code)
|
5
12
|
@error_msg = data.delete(:error_msg)
|
@@ -13,9 +20,12 @@ module VkontakteApi
|
|
13
20
|
@params = request_params
|
14
21
|
end
|
15
22
|
|
23
|
+
# A full description of the error.
|
24
|
+
# @return [String]
|
16
25
|
def message
|
17
|
-
"VKontakte returned an error #{@error_code}:
|
26
|
+
"VKontakte returned an error #{@error_code}: '#{@error_msg}' after calling method '#{@method_name}' with parameters #{@params.inspect}."
|
18
27
|
end
|
28
|
+
|
19
29
|
private
|
20
30
|
def parse_params(params)
|
21
31
|
params.inject({}) do |memo, pair|
|
@@ -1,27 +1,49 @@
|
|
1
1
|
module VkontakteApi
|
2
|
+
# A class for resolving namespaced methods like `friends.get`.
|
3
|
+
#
|
4
|
+
# Methods are dispatched the following way:
|
5
|
+
#
|
6
|
+
# 1. API client gets an unknown method, creates a `VkontakteApi::Resolver` instance and sends it the method
|
7
|
+
# 2. if the method is a namespace (like `friends`), it creates another `VkontakteApi::Resolver` instance, namespaced this time; else go to 3
|
8
|
+
# 3. the `VkontakteApi::Resolver` instance gets the last method, inserts an access token into params and sends it to `VkontakteApi::API`
|
9
|
+
# 4. the result is typecasted and/or yielded (mapped) to a block depending on it's type
|
2
10
|
class Resolver
|
11
|
+
# A pattern for names of methods with a boolean result.
|
3
12
|
PREDICATE_NAMES = /^(is.*)\?$/
|
4
13
|
|
14
|
+
# A namespace of the current instance (if present).
|
5
15
|
attr_reader :namespace
|
6
16
|
|
17
|
+
# A new resolver.
|
18
|
+
# @option options [String] :namespace A namespace.
|
19
|
+
# @option options [String] :access_token An access token.
|
7
20
|
def initialize(options = {})
|
8
21
|
@namespace = options.delete(:namespace)
|
9
22
|
@access_token = options.delete(:access_token)
|
10
23
|
end
|
11
24
|
|
25
|
+
# Main methods dispatch.
|
26
|
+
#
|
27
|
+
# If the called method is a namespace, it creates and returns a new `VkontakteApi::Resolver` instance.
|
28
|
+
# Otherwise it determines the full method name and result type, and sends everything to `VkontakteApi::API`.
|
29
|
+
#
|
30
|
+
# If the result is enumerable, each element is yielded to the block (or returned as is if called without a block).
|
31
|
+
# Non-enumerable results are typecasted (and yielded if the block is present).
|
32
|
+
#
|
33
|
+
# Called with a block, it returns the result of the block; called without a block it returns just the result.
|
34
|
+
# @todo Break this crap into several small methods.
|
12
35
|
def method_missing(method_name, *args, &block)
|
13
36
|
method_name = method_name.to_s
|
14
37
|
|
15
38
|
if Resolver.namespaces.include?(method_name)
|
16
|
-
# method with a two-level name called
|
39
|
+
# first level of method with a two-level name called
|
17
40
|
Resolver.new(:namespace => method_name, :access_token => @access_token)
|
18
41
|
else
|
19
|
-
# method with a one-level name called
|
42
|
+
# method with a one-level name called (or second level of a two-level method)
|
20
43
|
name, type = Resolver.vk_method_name(method_name, @namespace)
|
21
44
|
|
22
|
-
# adding access_token to the args hash
|
23
45
|
args = args.first || {}
|
24
|
-
args
|
46
|
+
args[:access_token] = @access_token unless @access_token.nil?
|
25
47
|
|
26
48
|
result = API.call(name, args, &block)
|
27
49
|
|
@@ -37,6 +59,7 @@ module VkontakteApi
|
|
37
59
|
end
|
38
60
|
end
|
39
61
|
end
|
62
|
+
|
40
63
|
private
|
41
64
|
def typecast(parameter, type)
|
42
65
|
case type
|
@@ -49,17 +72,27 @@ module VkontakteApi
|
|
49
72
|
end
|
50
73
|
|
51
74
|
class << self
|
75
|
+
# An array of method namespaces.
|
76
|
+
# @return [Array]
|
52
77
|
attr_reader :namespaces
|
53
78
|
|
54
|
-
#
|
79
|
+
# Loading namespaces array from `namespaces.yml`.
|
80
|
+
# This method is called automatically at startup time.
|
55
81
|
def load_namespaces
|
56
82
|
filename = File.expand_path('../namespaces.yml', __FILE__)
|
57
83
|
file = File.read(filename)
|
58
84
|
@namespaces = YAML.load(file)
|
59
85
|
end
|
60
86
|
|
61
|
-
#
|
62
|
-
#
|
87
|
+
# A complete method name needed by VKontakte.
|
88
|
+
#
|
89
|
+
# Returns a full name and the result type (:boolean or :anything).
|
90
|
+
# @example
|
91
|
+
# vk_method_name('is_app_user?')
|
92
|
+
# # => 'isAppUser'
|
93
|
+
# vk_method_name('get_country_by_id', 'places')
|
94
|
+
# # => 'places.getCountryById'
|
95
|
+
# @return [Array] full method name and type
|
63
96
|
def vk_method_name(method_name, namespace = nil)
|
64
97
|
method_name = method_name.to_s
|
65
98
|
|
@@ -78,6 +111,7 @@ module VkontakteApi
|
|
78
111
|
|
79
112
|
[full_name, type]
|
80
113
|
end
|
114
|
+
|
81
115
|
private
|
82
116
|
# convert('get_profiles')
|
83
117
|
# => 'getProfiles'
|
@@ -22,13 +22,7 @@ describe VkontakteApi::API do
|
|
22
22
|
@connection.stub(:get).and_return(response)
|
23
23
|
|
24
24
|
@result = stub("Result")
|
25
|
-
@result.stub(:has_key?)
|
26
|
-
if key == 'response'
|
27
|
-
true
|
28
|
-
else
|
29
|
-
false
|
30
|
-
end
|
31
|
-
end
|
25
|
+
@result.stub(:has_key?) { |key| key == 'response' }
|
32
26
|
|
33
27
|
@result_response = stub("Result[response]")
|
34
28
|
@result_error = stub("Result[error]").as_null_object
|
@@ -57,13 +51,7 @@ describe VkontakteApi::API do
|
|
57
51
|
|
58
52
|
context "with an error response" do
|
59
53
|
before(:each) do
|
60
|
-
@result.stub(:has_key?)
|
61
|
-
if key == 'response'
|
62
|
-
false
|
63
|
-
else
|
64
|
-
true
|
65
|
-
end
|
66
|
-
end
|
54
|
+
@result.stub(:has_key?) { |key| key != 'response' }
|
67
55
|
end
|
68
56
|
|
69
57
|
it "raises a VkontakteApi::Error" do
|
@@ -79,5 +67,16 @@ describe VkontakteApi::API do
|
|
79
67
|
url = VkontakteApi::API.send(:url_for, @method_name, @args)
|
80
68
|
url.should == '/method/apiMethod?access_token=some_token&field=value'
|
81
69
|
end
|
70
|
+
|
71
|
+
context "with an array argument" do
|
72
|
+
before(:each) do
|
73
|
+
@args_with_array = @args.merge(:array_arg => [1, 2, 3])
|
74
|
+
end
|
75
|
+
|
76
|
+
it "concats it with a comma" do
|
77
|
+
url = VkontakteApi::API.send(:url_for, @method_name, @args_with_array)
|
78
|
+
url.should == "/method/apiMethod?access_token=some_token&array_arg=#{CGI.escape('1,2,3')}&field=value"
|
79
|
+
end
|
80
|
+
end
|
82
81
|
end
|
83
82
|
end
|
@@ -13,33 +13,42 @@ describe VkontakteApi::Resolver do
|
|
13
13
|
|
14
14
|
context "with a nil @namespace" do
|
15
15
|
before(:each) do
|
16
|
+
VkontakteApi::Resolver.stub(:vk_method_name).and_return(['apiMethod', :anything])
|
16
17
|
@resolver = VkontakteApi::Resolver.new(:access_token => @token)
|
17
18
|
end
|
18
19
|
|
19
|
-
context "with method_name not from
|
20
|
-
before(:each) do
|
21
|
-
VkontakteApi::Resolver.stub(:vk_method_name).and_return(['apiMethod', :anything])
|
22
|
-
end
|
23
|
-
|
20
|
+
context "with method_name not from namespaces" do
|
24
21
|
it "calls #vk_method_name with method name and nil namespace" do
|
25
22
|
VkontakteApi::Resolver.should_receive(:vk_method_name).with('api_method', nil)
|
26
23
|
@resolver.api_method
|
27
24
|
end
|
28
25
|
|
29
|
-
it "calls #api_call with full VK method name" do
|
30
|
-
|
31
|
-
VkontakteApi::API.should_receive(:call).with('apiMethod',
|
26
|
+
it "calls #api_call with full VK method name and access_token" do
|
27
|
+
@args.should_receive(:[]=).with(:access_token, @token)
|
28
|
+
VkontakteApi::API.should_receive(:call).with('apiMethod', @args)
|
32
29
|
@resolver.api_method(@args).should == @result
|
33
30
|
end
|
34
31
|
end
|
35
32
|
|
36
|
-
context "with method_name from
|
33
|
+
context "with method_name from namespaces" do
|
37
34
|
it "return a new resolver with the corresponding @namespace" do
|
38
35
|
new_resolver = @resolver.friends
|
39
36
|
new_resolver.should be_a(VkontakteApi::Resolver)
|
40
37
|
new_resolver.namespace.should == 'friends'
|
41
38
|
end
|
42
39
|
end
|
40
|
+
|
41
|
+
context "without a token" do
|
42
|
+
before(:each) do
|
43
|
+
@resolver = VkontakteApi::Resolver.new
|
44
|
+
end
|
45
|
+
|
46
|
+
it "calls #api_call with full VK method name but without a token" do
|
47
|
+
@args.should_not_receive(:[]=).with(:access_token, anything)
|
48
|
+
VkontakteApi::API.should_receive(:call).with('apiMethod', @args)
|
49
|
+
@resolver.api_method(@args).should == @result
|
50
|
+
end
|
51
|
+
end
|
43
52
|
end
|
44
53
|
|
45
54
|
context "with a non-nil @namespace" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vkontakte_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
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-
|
12
|
+
date: 2012-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &70235030424180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70235030424180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: i18n
|
27
|
-
requirement: &
|
27
|
+
requirement: &70235030421960 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0.6'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70235030421960
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: faraday
|
38
|
-
requirement: &
|
38
|
+
requirement: &70235030420280 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.7.6
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70235030420280
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: yajl-ruby
|
49
|
-
requirement: &
|
49
|
+
requirement: &70235030434380 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '1.0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70235030434380
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rake
|
60
|
-
requirement: &
|
60
|
+
requirement: &70235030433320 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70235030433320
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
|
-
requirement: &
|
71
|
+
requirement: &70235030432180 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70235030432180
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: pry
|
82
|
-
requirement: &
|
82
|
+
requirement: &70235030431540 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70235030431540
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: awesome_print
|
93
|
-
requirement: &
|
93
|
+
requirement: &70235030430680 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70235030430680
|
102
102
|
description: A transparent wrapper for API of vk.com social network called VKontakte.
|
103
103
|
Supports ruby-way method naming (without any method lists inside), result typecasting
|
104
104
|
and any faraday-supported http adapter of your choice (no hardcoded Net::HTTP).
|
@@ -109,6 +109,8 @@ extensions: []
|
|
109
109
|
extra_rdoc_files: []
|
110
110
|
files:
|
111
111
|
- .gitignore
|
112
|
+
- .travis.yml
|
113
|
+
- .yardopts
|
112
114
|
- Gemfile
|
113
115
|
- MIT-LICENSE
|
114
116
|
- README.md
|
@@ -144,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
146
|
version: '0'
|
145
147
|
segments:
|
146
148
|
- 0
|
147
|
-
hash:
|
149
|
+
hash: 4524106874123629909
|
148
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
151
|
none: false
|
150
152
|
requirements:
|
@@ -153,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
155
|
version: '0'
|
154
156
|
segments:
|
155
157
|
- 0
|
156
|
-
hash:
|
158
|
+
hash: 4524106874123629909
|
157
159
|
requirements: []
|
158
160
|
rubyforge_project:
|
159
161
|
rubygems_version: 1.8.10
|