social 0.0.8 → 0.0.9
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.
- data/lib/social/auth/controller.rb +1 -1
- data/lib/social/network/graph/ok/base.rb +52 -18
- data/lib/social/network/graph/ok/user.rb +38 -9
- data/lib/social/network/graph/vk/base.rb +6 -2
- data/lib/social/network/graph/vk/user.rb +11 -6
- data/lib/social/version.rb +1 -1
- data/social.gemspec +1 -0
- data/spec/lib/social/config_spec.rb +32 -0
- data/spec/lib/social/ok_api_spec.rb +142 -0
- data/spec/lib/social/vk_api_spec.rb +61 -0
- data/spec/lib/social_spec.rb +0 -22
- data/spec/spec_helper.rb +4 -4
- metadata +35 -18
@@ -128,7 +128,7 @@ module Social
|
|
128
128
|
|
129
129
|
def ie_hack
|
130
130
|
response.headers["P3P"]='CP="CAO PSA OUR"'
|
131
|
-
#header('P3P: CP="NOI ADM DEV COM NAV OUR STP"');
|
131
|
+
#header('P3P: CP="NOI ADM DEV COM NAV OUR STP"P3P: CP="NOI ADM DEV COM NAV OUR STP"');
|
132
132
|
end
|
133
133
|
|
134
134
|
def store_location
|
@@ -1,3 +1,30 @@
|
|
1
|
+
module Rack
|
2
|
+
module Utils # :nodoc:
|
3
|
+
|
4
|
+
def universal_build(value, prefix = nil)
|
5
|
+
case value.class.to_s
|
6
|
+
when Array.to_s
|
7
|
+
value.map do |v|
|
8
|
+
unless unescape(prefix) =~ /\[\]$/
|
9
|
+
prefix = "#{prefix}[]"
|
10
|
+
end
|
11
|
+
universal_build(v, "#{prefix}")
|
12
|
+
end.join("&")
|
13
|
+
when Hash.to_s
|
14
|
+
value.map do |k, v|
|
15
|
+
universal_build(v, prefix ? "#{prefix}[#{escape(k)}]" : escape(k))
|
16
|
+
end.join("&")
|
17
|
+
when NilClass.to_s
|
18
|
+
prefix.to_s
|
19
|
+
else
|
20
|
+
"#{prefix}=#{escape(value.to_s)}"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module_function :universal_build
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
1
28
|
module Social
|
2
29
|
module Network
|
3
30
|
module Graph
|
@@ -16,26 +43,33 @@ module Social
|
|
16
43
|
msg
|
17
44
|
end
|
18
45
|
|
19
|
-
def
|
46
|
+
def http_query(query)
|
47
|
+
result = []
|
20
48
|
url = URI.parse(config['api_server'])
|
21
49
|
retries = 0
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
50
|
+
result = Net::HTTP.start(url.host, url.port) { |http|
|
51
|
+
http.read_timeout = 10
|
52
|
+
http.get(query)
|
53
|
+
}
|
54
|
+
rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
|
55
|
+
retries += 1
|
56
|
+
retry if retries < 3
|
57
|
+
ensure
|
58
|
+
result
|
59
|
+
end
|
60
|
+
|
61
|
+
def deliver(params)
|
62
|
+
result = []
|
63
|
+
request_params = build_request_params(params)
|
64
|
+
query = "/fb.do?#{Rack::Utils.universal_build(request_params)}"
|
65
|
+
result = self.http_query(query)
|
66
|
+
rescue => e
|
67
|
+
puts "====== Send problem"
|
68
|
+
puts params.inspect
|
69
|
+
puts e.to_s
|
70
|
+
puts e.backtrace
|
71
|
+
ensure
|
72
|
+
result
|
39
73
|
end
|
40
74
|
|
41
75
|
def build_sig(params, key)
|
@@ -6,15 +6,34 @@ module Social
|
|
6
6
|
|
7
7
|
FIELDS = 'uid,first_name,last_name,gender,birthday,pic_1,pic_2,pic_3,pic_4,url_profile,location,current_location,age,url_profile,current_status'
|
8
8
|
|
9
|
-
def get_info(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
def get_info(*args)
|
10
|
+
|
11
|
+
args.pop if args.last.nil?
|
12
|
+
|
13
|
+
if args.last.kind_of?(Hash)
|
14
|
+
options = args.pop #.with_indefferend_access
|
15
|
+
secret = options[:secret]
|
16
|
+
fields = options[:fields]
|
17
|
+
|
18
|
+
fields = fields.join(',') if fields.kind_of?(Array)
|
19
|
+
|
20
|
+
if fields
|
21
|
+
avalible_fields = FIELDS.split(',')
|
22
|
+
fields = fields.split(',').select { |field|
|
23
|
+
avalible_fields.include?(field)
|
24
|
+
}.sort.join(',')
|
25
|
+
fields = nil if fields.empty?
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
uids = Array.wrap(args)
|
30
|
+
params = { "method" => 'users.getInfo', "fields" => (fields || FIELDS),
|
31
|
+
:uids => uids.join(",") }
|
32
|
+
params[:session_secret_key] = secret if secret
|
33
|
+
|
34
|
+
code, response = self.deliver(params)
|
35
|
+
result = response.present? ? MultiJson.load(response) : { 'error_msg' => 'Empty response' }
|
36
|
+
result = result.is_a?(Hash) && result['error_msg'] ? [] : result['response']
|
18
37
|
|
19
38
|
return result unless block_given?
|
20
39
|
yield(result) if block_given?
|
@@ -38,6 +57,16 @@ module Social
|
|
38
57
|
return friend_profiles unless block_given?
|
39
58
|
yield(friend_profiles) if block_given?
|
40
59
|
end
|
60
|
+
|
61
|
+
def charge_off_balance(uid, balance)
|
62
|
+
return [] unless block_given?
|
63
|
+
yield([]) if block_given?
|
64
|
+
end
|
65
|
+
|
66
|
+
def balance(uid)
|
67
|
+
return nil unless block_given?
|
68
|
+
yield(nil) if block_given?
|
69
|
+
end
|
41
70
|
|
42
71
|
alias :get_friends_uids :get_friends
|
43
72
|
alias :get_friends_info :get_friends_profiles
|
@@ -7,12 +7,16 @@ module Social
|
|
7
7
|
include Social::Network::Graph::Tail
|
8
8
|
include Social::Config::Vk
|
9
9
|
|
10
|
+
def http_query(query)
|
11
|
+
Net::HTTP.start("api.vkontakte.ru", 80).get(query)
|
12
|
+
end
|
13
|
+
|
10
14
|
def process(params)
|
11
15
|
params = default_options.merge(params).with_indifferent_access
|
12
16
|
params.merge!({'sig' => form_signature(params)})
|
13
17
|
query = "/api.php?#{Rack::Utils.build_query(params)}"
|
14
|
-
status, data =
|
15
|
-
|
18
|
+
status, data = http_query(query)
|
19
|
+
MultiJson.load(data)['response']
|
16
20
|
end
|
17
21
|
|
18
22
|
def process_secure(params)
|
@@ -6,14 +6,15 @@ module Social
|
|
6
6
|
|
7
7
|
FIELDS = 'uid,first_name,last_name,nickname,domain,sex,birthdate,city,country,timezone,photo,photo_medium,photo_big,has_mobile,rate,contacts,education'
|
8
8
|
|
9
|
-
def get_info(
|
9
|
+
def get_info(*args)
|
10
|
+
uids = Array.wrap(args)
|
11
|
+
|
12
|
+
params = { "method" => 'getProfiles', "fields" => FIELDS, :uids => uids.join(",")}
|
10
13
|
|
11
|
-
params = { "method" => 'getProfiles', "fields" => FIELDS, :uids => Array.wrap(uids).join(",")}
|
12
14
|
results = send(:process, params)
|
13
15
|
|
14
|
-
results
|
15
|
-
|
16
|
-
result
|
16
|
+
results.each_with_index { |result, i|
|
17
|
+
results[i]['birthday'] = result['bdate'] || result['birthday']
|
17
18
|
}
|
18
19
|
|
19
20
|
return results unless block_given?
|
@@ -21,6 +22,8 @@ module Social
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def get_friends(uid)
|
25
|
+
throw 'Not give uid for friends request' unless uid
|
26
|
+
|
24
27
|
params = { "method" => 'friends.get', :uid => uid, "fields" => FIELDS}
|
25
28
|
result = send(:process_secure, params)
|
26
29
|
|
@@ -29,6 +32,8 @@ module Social
|
|
29
32
|
end
|
30
33
|
|
31
34
|
def balance(uid)
|
35
|
+
throw 'Not give uid for balance request' unless uid
|
36
|
+
|
32
37
|
params = { "method" => 'secure.getBalance', :uid => uid }
|
33
38
|
result = send(:process_secure, params)
|
34
39
|
result = ((result / 100).to_f.round(2) * root.rate)
|
@@ -38,7 +43,7 @@ module Social
|
|
38
43
|
end
|
39
44
|
|
40
45
|
def charge_off_balance(uid, balance)
|
41
|
-
amount = (((balance).floor / root.rate
|
46
|
+
amount = (((balance).floor / root.rate.to_f).round(2) * 100).round
|
42
47
|
params = { "method" => 'secure.withdrawVotes', :uid => uid, :votes => amount }
|
43
48
|
result = send(:process_secure, params)
|
44
49
|
|
data/lib/social/version.rb
CHANGED
data/social.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
22
|
s.add_development_dependency "rspec-core", "~> 2.0"
|
23
|
+
s.add_development_dependency "rspec-mocks"
|
23
24
|
s.add_development_dependency "rspec-expectations", "~> 2.0"
|
24
25
|
s.add_development_dependency 'rack', '~> 1.4.1'
|
25
26
|
s.add_development_dependency 'rack-test', '~> 0.6.1'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Config' do
|
4
|
+
|
5
|
+
before do
|
6
|
+
@vk_api = Social::Network(:vk)
|
7
|
+
@ok_api = Social::Network(:ok)
|
8
|
+
end
|
9
|
+
|
10
|
+
it "must load config to vk" do
|
11
|
+
@vk_api.config.should_not be_nil
|
12
|
+
@vk_api.config['key'].should_not be_nil
|
13
|
+
@vk_api.config['app_id'].should_not be_nil
|
14
|
+
end
|
15
|
+
|
16
|
+
it "must load config to ok" do
|
17
|
+
@ok_api.config.should_not be_nil
|
18
|
+
@ok_api.config['api_server'].should_not be_nil
|
19
|
+
@ok_api.config['application_key'].should_not be_nil
|
20
|
+
@ok_api.config['secret_key'].should_not be_nil
|
21
|
+
end
|
22
|
+
|
23
|
+
it "valid safe config data for vk" do
|
24
|
+
avalible_keys = [ :app_id , :logged_user_id ]
|
25
|
+
@vk_api.safe_config.keys.should =~ avalible_keys
|
26
|
+
end
|
27
|
+
|
28
|
+
it "valid safe config data for ok" do
|
29
|
+
avalible_keys = [ :api_server , :application_key, :logged_user_id ]
|
30
|
+
@ok_api.safe_config.keys.should =~ avalible_keys
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe 'Спецификация OkApi' do
|
5
|
+
|
6
|
+
context "функция user.get_info" do
|
7
|
+
|
8
|
+
before do
|
9
|
+
@api = Social::Network(:ok)
|
10
|
+
|
11
|
+
fake_data_index = 1
|
12
|
+
@make_fake_data = lambda do
|
13
|
+
fake_data_index += 1
|
14
|
+
|
15
|
+
return {
|
16
|
+
:nickname => "fake data #{fake_data_index}",
|
17
|
+
:first_name => "fake data #{fake_data_index}",
|
18
|
+
:last_name => "fake data #{fake_data_index}",
|
19
|
+
:location => "fake data #{fake_data_index}",
|
20
|
+
:location => "fake data #{fake_data_index}",
|
21
|
+
:birthday => "fake data #{fake_data_index}",
|
22
|
+
:url_profile => "fake data #{fake_data_index}",
|
23
|
+
:pic_1 => "fake data #{fake_data_index}",
|
24
|
+
:gender => "fake data #{fake_data_index}"
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
@make_fake_datas = lambda do |quantity|
|
29
|
+
datas = []
|
30
|
+
quantity.times { datas.push(@make_fake_data.call) }
|
31
|
+
datas
|
32
|
+
end
|
33
|
+
|
34
|
+
@uids = [ 1,2,3,4 ]
|
35
|
+
@secret = 'session_secret_key'
|
36
|
+
@fields = [ 'uid', 'first_name', 'last_name' ]
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
it "вне зависимости от способа передачи uids запрос должен формироваться стандартно" do
|
42
|
+
params = {
|
43
|
+
"method" => 'users.getInfo',
|
44
|
+
"fields" => Social::Network::Graph::Ok::User::FIELDS,
|
45
|
+
:uids => @uids.join(",")
|
46
|
+
}
|
47
|
+
|
48
|
+
@api.user.should_receive(:deliver).with(params).exactly(3).and_return([])
|
49
|
+
@api.user.get_info(*@uids)
|
50
|
+
@api.user.get_info(@uids)
|
51
|
+
@api.user.get_info([@uids])
|
52
|
+
end
|
53
|
+
|
54
|
+
it "передача сессионного secret_key" do
|
55
|
+
|
56
|
+
params = {
|
57
|
+
"method" => 'users.getInfo',
|
58
|
+
"fields" => Social::Network::Graph::Ok::User::FIELDS,
|
59
|
+
:uids => @uids.join(","),
|
60
|
+
:session_secret_key => @secret
|
61
|
+
}
|
62
|
+
|
63
|
+
@api.user.should_receive(:deliver).with(params).exactly(3).and_return([])
|
64
|
+
@api.user.get_info(@uids, { :secret => @secret })
|
65
|
+
@api.user.get_info([@uids], { :secret => @secret })
|
66
|
+
@api.user.get_info(*@uids, { :secret => @secret })
|
67
|
+
end
|
68
|
+
|
69
|
+
it "передача полей" do
|
70
|
+
|
71
|
+
params = {
|
72
|
+
"method" => 'users.getInfo',
|
73
|
+
"fields" => @fields.sort.join(','),
|
74
|
+
:uids => @uids.join(","),
|
75
|
+
:session_secret_key => @secret
|
76
|
+
}
|
77
|
+
|
78
|
+
@api.user.should_receive(:deliver).with(params).exactly(1).and_return([])
|
79
|
+
@api.user.get_info(@uids, { :secret => @secret, :fields => @fields })
|
80
|
+
end
|
81
|
+
|
82
|
+
it "передача некоторых не корректных полей" do
|
83
|
+
|
84
|
+
params = {
|
85
|
+
"method" => 'users.getInfo',
|
86
|
+
"fields" => @fields.sort.join(','),
|
87
|
+
:uids => @uids.join(","),
|
88
|
+
:session_secret_key => @secret
|
89
|
+
}
|
90
|
+
|
91
|
+
uncorrect_fields = @fields + [ "uncorrect_field 1", "uncorrect_field 2" ]
|
92
|
+
|
93
|
+
@api.user.should_receive(:deliver).with(params).exactly(1).and_return([])
|
94
|
+
@api.user.get_info(@uids, { :secret => @secret, :fields => uncorrect_fields })
|
95
|
+
end
|
96
|
+
|
97
|
+
it "передача всех не корректных полей" do
|
98
|
+
|
99
|
+
params = {
|
100
|
+
"method" => 'users.getInfo',
|
101
|
+
"fields" => Social::Network::Graph::Ok::User::FIELDS,
|
102
|
+
:uids => @uids.join(","),
|
103
|
+
:session_secret_key => @secret
|
104
|
+
}
|
105
|
+
|
106
|
+
uncorrect_fields = [ "uncorrect_field 1", "uncorrect_field 2" ]
|
107
|
+
|
108
|
+
@api.user.should_receive(:deliver).with(params).exactly(1).and_return([])
|
109
|
+
@api.user.get_info(@uids, { :secret => @secret, :fields => uncorrect_fields })
|
110
|
+
end
|
111
|
+
|
112
|
+
it "вызов с неопределенными опциями" do
|
113
|
+
params = {
|
114
|
+
"method" => 'users.getInfo',
|
115
|
+
"fields" => Social::Network::Graph::Ok::User::FIELDS,
|
116
|
+
:uids => @uids.join(",")
|
117
|
+
}
|
118
|
+
|
119
|
+
@api.user.should_receive(:deliver).with(params).exactly(1).and_return([])
|
120
|
+
@api.user.get_info(@uids, nil)
|
121
|
+
end
|
122
|
+
|
123
|
+
it "вызов с пустыми опциями" do
|
124
|
+
params = {
|
125
|
+
"method" => 'users.getInfo',
|
126
|
+
"fields" => Social::Network::Graph::Ok::User::FIELDS,
|
127
|
+
:uids => @uids.join(",")
|
128
|
+
}
|
129
|
+
|
130
|
+
@api.user.should_receive(:deliver).with(params).exactly(1).and_return([])
|
131
|
+
@api.user.get_info(@uids, {})
|
132
|
+
end
|
133
|
+
|
134
|
+
it "данные по пользователю должны возвращаться в известном формате" do
|
135
|
+
data = @make_fake_datas.call(1)
|
136
|
+
@api.user.stub!(:http_query).and_return([200, { :response => data }.to_json])
|
137
|
+
results = @api.user.get_info(1234567890)
|
138
|
+
results.should == MultiJson.load(data.to_json)
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|
142
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe 'Спецификация VkApi' do
|
5
|
+
|
6
|
+
context "функция user.get_info" do
|
7
|
+
|
8
|
+
before do
|
9
|
+
@api = Social::Network(:vk)
|
10
|
+
|
11
|
+
fake_data_index = 1
|
12
|
+
@make_fake_data = lambda do
|
13
|
+
fake_data_index += 1
|
14
|
+
|
15
|
+
return {
|
16
|
+
:nickname => "fake data #{fake_data_index}",
|
17
|
+
:first_name => "fake data #{fake_data_index}",
|
18
|
+
:last_name => "fake data #{fake_data_index}",
|
19
|
+
:location => "fake data #{fake_data_index}",
|
20
|
+
:location => "fake data #{fake_data_index}",
|
21
|
+
:birthday => "fake data #{fake_data_index}",
|
22
|
+
:url_profile => "fake data #{fake_data_index}",
|
23
|
+
:pic_1 => "fake data #{fake_data_index}",
|
24
|
+
:gender => "fake data #{fake_data_index}"
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
@make_fake_datas = lambda do |quantity|
|
29
|
+
datas = []
|
30
|
+
quantity.times { datas.push(@make_fake_data.call) }
|
31
|
+
datas
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
it "вне зависимости от способа передачи uids запрос должен формироваться стандартно" do
|
37
|
+
uids = [ 1,2,3,4 ]
|
38
|
+
params = {
|
39
|
+
"method" => 'getProfiles',
|
40
|
+
"fields" => Social::Network::Graph::Vk::User::FIELDS,
|
41
|
+
:uids => uids.join(',')
|
42
|
+
}
|
43
|
+
|
44
|
+
@api.user.should_receive(:process).with(params).exactly(3).and_return([])
|
45
|
+
@api.user.get_info(*uids)
|
46
|
+
@api.user.get_info(uids)
|
47
|
+
@api.user.get_info([uids])
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
it "данные по пользователю должны возвращаться в известном формате" do
|
52
|
+
data = @make_fake_datas.call(1)
|
53
|
+
@api.user.stub!(:http_query).and_return([200, { :response => data }.to_json])
|
54
|
+
results = @api.user.get_info(1234567890)
|
55
|
+
results.should == MultiJson.load(data.to_json)
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
data/spec/lib/social_spec.rb
CHANGED
@@ -12,26 +12,4 @@ describe Social do
|
|
12
12
|
Social::Network(:vk).rate.should_not be_nil
|
13
13
|
end
|
14
14
|
|
15
|
-
it "must load config to vk" do
|
16
|
-
Social::Network(:vk).config.should_not be_nil
|
17
|
-
Social::Network(:vk).config['key'].should_not be_nil
|
18
|
-
Social::Network(:vk).config['app_id'].should_not be_nil
|
19
|
-
end
|
20
|
-
|
21
|
-
it "must load config to ok" do
|
22
|
-
Social::Network(:ok).config.should_not be_nil
|
23
|
-
Social::Network(:ok).config['api_server'].should_not be_nil
|
24
|
-
Social::Network(:ok).config['application_key'].should_not be_nil
|
25
|
-
Social::Network(:ok).config['secret_key'].should_not be_nil
|
26
|
-
end
|
27
|
-
|
28
|
-
it "valid safe config data for vk" do
|
29
|
-
avalible_keys = [ :app_id , :logged_user_id ]
|
30
|
-
Social::Network(:vk).safe_config.keys.should =~ avalible_keys
|
31
|
-
end
|
32
|
-
|
33
|
-
it "valid safe config data for ok" do
|
34
|
-
avalible_keys = [ :api_server , :application_key, :logged_user_id ]
|
35
|
-
Social::Network(:ok).safe_config.keys.should =~ avalible_keys
|
36
|
-
end
|
37
15
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -2,8 +2,8 @@ require "bundler"
|
|
2
2
|
Bundler.require :default, :development
|
3
3
|
|
4
4
|
RSpec.configure do |config|
|
5
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
6
|
-
config.run_all_when_everything_filtered = true
|
7
|
-
config.filter_run :focus
|
8
|
-
config.mock_with :rr
|
5
|
+
#config.treat_symbols_as_metadata_keys_with_true_values = true
|
6
|
+
#config.run_all_when_everything_filtered = true
|
7
|
+
#config.filter_run :focus
|
8
|
+
#config.mock_with :rr
|
9
9
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
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-05-09 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec-core
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156101640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,21 @@ dependencies:
|
|
21
21
|
version: '2.0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156101640
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec-mocks
|
27
|
+
requirement: &2156100920 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *2156100920
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: rspec-expectations
|
27
|
-
requirement: &
|
38
|
+
requirement: &2156100180 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ~>
|
@@ -32,10 +43,10 @@ dependencies:
|
|
32
43
|
version: '2.0'
|
33
44
|
type: :development
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156100180
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: rack
|
38
|
-
requirement: &
|
49
|
+
requirement: &2156099520 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ~>
|
@@ -43,10 +54,10 @@ dependencies:
|
|
43
54
|
version: 1.4.1
|
44
55
|
type: :development
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *2156099520
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
59
|
name: rack-test
|
49
|
-
requirement: &
|
60
|
+
requirement: &2156098900 !ruby/object:Gem::Requirement
|
50
61
|
none: false
|
51
62
|
requirements:
|
52
63
|
- - ~>
|
@@ -54,10 +65,10 @@ dependencies:
|
|
54
65
|
version: 0.6.1
|
55
66
|
type: :development
|
56
67
|
prerelease: false
|
57
|
-
version_requirements: *
|
68
|
+
version_requirements: *2156098900
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: rr
|
60
|
-
requirement: &
|
71
|
+
requirement: &2156098300 !ruby/object:Gem::Requirement
|
61
72
|
none: false
|
62
73
|
requirements:
|
63
74
|
- - ~>
|
@@ -65,10 +76,10 @@ dependencies:
|
|
65
76
|
version: '1.0'
|
66
77
|
type: :development
|
67
78
|
prerelease: false
|
68
|
-
version_requirements: *
|
79
|
+
version_requirements: *2156098300
|
69
80
|
- !ruby/object:Gem::Dependency
|
70
81
|
name: pry
|
71
|
-
requirement: &
|
82
|
+
requirement: &2156097700 !ruby/object:Gem::Requirement
|
72
83
|
none: false
|
73
84
|
requirements:
|
74
85
|
- - ~>
|
@@ -76,10 +87,10 @@ dependencies:
|
|
76
87
|
version: 0.9.8.4
|
77
88
|
type: :development
|
78
89
|
prerelease: false
|
79
|
-
version_requirements: *
|
90
|
+
version_requirements: *2156097700
|
80
91
|
- !ruby/object:Gem::Dependency
|
81
92
|
name: activesupport
|
82
|
-
requirement: &
|
93
|
+
requirement: &2156097080 !ruby/object:Gem::Requirement
|
83
94
|
none: false
|
84
95
|
requirements:
|
85
96
|
- - ~>
|
@@ -87,10 +98,10 @@ dependencies:
|
|
87
98
|
version: 3.1.3
|
88
99
|
type: :development
|
89
100
|
prerelease: false
|
90
|
-
version_requirements: *
|
101
|
+
version_requirements: *2156097080
|
91
102
|
- !ruby/object:Gem::Dependency
|
92
103
|
name: i18n
|
93
|
-
requirement: &
|
104
|
+
requirement: &2156096440 !ruby/object:Gem::Requirement
|
94
105
|
none: false
|
95
106
|
requirements:
|
96
107
|
- - ~>
|
@@ -98,7 +109,7 @@ dependencies:
|
|
98
109
|
version: 0.6.0
|
99
110
|
type: :development
|
100
111
|
prerelease: false
|
101
|
-
version_requirements: *
|
112
|
+
version_requirements: *2156096440
|
102
113
|
description: ! "This is social networks api wrapper and authorization tools for social
|
103
114
|
applications. \n Now it is a compilation of code from various projects in production.
|
104
115
|
Without tests. =( NOT RECOMMENDED USE IN PRODUCTION."
|
@@ -148,6 +159,9 @@ files:
|
|
148
159
|
- lib/social/provider.rb
|
149
160
|
- lib/social/version.rb
|
150
161
|
- social.gemspec
|
162
|
+
- spec/lib/social/config_spec.rb
|
163
|
+
- spec/lib/social/ok_api_spec.rb
|
164
|
+
- spec/lib/social/vk_api_spec.rb
|
151
165
|
- spec/lib/social_spec.rb
|
152
166
|
- spec/spec_helper.rb
|
153
167
|
homepage: http://github.com/realb0t/social
|
@@ -175,5 +189,8 @@ signing_key:
|
|
175
189
|
specification_version: 3
|
176
190
|
summary: Social API wrapper and Tools
|
177
191
|
test_files:
|
192
|
+
- spec/lib/social/config_spec.rb
|
193
|
+
- spec/lib/social/ok_api_spec.rb
|
194
|
+
- spec/lib/social/vk_api_spec.rb
|
178
195
|
- spec/lib/social_spec.rb
|
179
196
|
- spec/spec_helper.rb
|