quickcite 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- quickcite (1.0.5)
4
+ quickcite (1.0.6)
5
5
  bibtex-ruby (>= 2.0)
6
6
  bundler
7
7
  highline
@@ -11,10 +11,10 @@ PATH
11
11
  GEM
12
12
  remote: http://rubygems.org/
13
13
  specs:
14
- bibtex-ruby (2.1.0)
14
+ bibtex-ruby (2.1.1)
15
15
  latex-decode (>= 0.0.6)
16
16
  multi_json (~> 1.3)
17
- highline (1.6.14)
17
+ highline (1.6.15)
18
18
  json (1.7.5)
19
19
  latex-decode (0.0.12)
20
20
  unicode (~> 0.4)
@@ -39,7 +39,12 @@ module QuickCite
39
39
 
40
40
  response = Net::HTTP::get(uri)
41
41
  json = JSON.parse(response)
42
-
42
+
43
+ hit_count = json["result"]["hits"]["@sent"];
44
+ if hit_count == 0 then
45
+ []
46
+ end
47
+
43
48
  hits = json["result"]["hits"]["hit"]
44
49
 
45
50
  # NB. when there is only a single result DBLP returns a single
@@ -1,3 +1,3 @@
1
1
  module QuickCite
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quickcite
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 5
10
- version: 1.0.5
9
+ - 6
10
+ version: 1.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Russell Power
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-05 00:00:00 Z
18
+ date: 2012-10-16 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bibtex-ruby