crown 0.0.9 → 0.0.10
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/ChangeLog +4 -0
- data/VERSION +1 -1
- data/crown.gemspec +2 -2
- data/lib/crown.rb +1 -1
- data/lib/crown/topsy.rb +1 -1
- metadata +4 -4
data/ChangeLog
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.10
|
data/crown.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{crown}
|
|
8
|
-
s.version = "0.0.
|
|
8
|
+
s.version = "0.0.10"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["clown"]
|
|
12
|
-
s.date = %q{2011-
|
|
12
|
+
s.date = %q{2011-05-12}
|
|
13
13
|
s.description = %q{crown is uncategorized ruby libraries, which is added according to author's mood :-D}
|
|
14
14
|
s.email = %q{tt.clown@gmail.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/crown.rb
CHANGED
data/lib/crown/topsy.rb
CHANGED
|
@@ -48,7 +48,7 @@ module Crown
|
|
|
48
48
|
session = Net::HTTP.new('otter.topsy.com', 80, proxy_host, proxy_port)
|
|
49
49
|
path = '/urlinfo.json?url=' + CGI.escape(uri)
|
|
50
50
|
response = Crown::HTTP.get(session, path)
|
|
51
|
-
return
|
|
51
|
+
return 0 if (response == nil || response.code.to_i != 200)
|
|
52
52
|
|
|
53
53
|
json = JSON.parse(response.body)
|
|
54
54
|
return json["response"]["trackback_total"].to_i
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: crown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 11
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 10
|
|
10
|
+
version: 0.0.10
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- clown
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-05-12 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
name: json
|