weibo 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/weibo.rb +1 -3
- data/lib/weibo/config.rb +13 -0
- data/lib/weibo/oauth_hack.rb +9 -1
- data/lib/weibo/request.rb +1 -0
- data/weibo.gemspec +2 -1
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/lib/weibo.rb
CHANGED
@@ -11,9 +11,6 @@ gem 'httparty', '>= 0.5.2'
|
|
11
11
|
require 'httparty'
|
12
12
|
|
13
13
|
module Weibo
|
14
|
-
module Config
|
15
|
-
mattr_accessor :api_key
|
16
|
-
end
|
17
14
|
class WeiboError < StandardError
|
18
15
|
attr_reader :data
|
19
16
|
|
@@ -57,6 +54,7 @@ require File.join(directory, 'weibo', 'oauth')
|
|
57
54
|
require File.join(directory, 'weibo', 'oauth_hack')
|
58
55
|
require File.join(directory, 'weibo', 'httpauth')
|
59
56
|
require File.join(directory, 'weibo', 'request')
|
57
|
+
require File.join(directory, 'weibo', 'config')
|
60
58
|
require File.join(directory, 'weibo', 'base')
|
61
59
|
|
62
60
|
# code is an adaptation of the twitter gem by John Nunemaker
|
data/lib/weibo/config.rb
ADDED
data/lib/weibo/oauth_hack.rb
CHANGED
@@ -2,7 +2,15 @@
|
|
2
2
|
# as Sina Weibo doesn't follow the god damned OAuth specifications!!!
|
3
3
|
|
4
4
|
module PostBodyHack
|
5
|
-
|
5
|
+
@@parameters = nil
|
6
|
+
def self.parameters=(val)
|
7
|
+
@@parameters = val
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.parameters
|
11
|
+
@@parameters
|
12
|
+
end
|
13
|
+
|
6
14
|
def self.apply_hack(params={}, &block)
|
7
15
|
self.parameters = params.stringify_keys
|
8
16
|
rv = yield
|
data/lib/weibo/request.rb
CHANGED
data/weibo.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{weibo}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Scott Ballantyne"]
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
"VERSION",
|
26
26
|
"lib/weibo.rb",
|
27
27
|
"lib/weibo/base.rb",
|
28
|
+
"lib/weibo/config.rb",
|
28
29
|
"lib/weibo/httpauth.rb",
|
29
30
|
"lib/weibo/oauth.rb",
|
30
31
|
"lib/weibo/oauth_hack.rb",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Scott Ballantyne
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- VERSION
|
48
48
|
- lib/weibo.rb
|
49
49
|
- lib/weibo/base.rb
|
50
|
+
- lib/weibo/config.rb
|
50
51
|
- lib/weibo/httpauth.rb
|
51
52
|
- lib/weibo/oauth.rb
|
52
53
|
- lib/weibo/oauth_hack.rb
|