bibsonomy 0.4.4 → 0.4.5
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.
- checksums.yaml +4 -4
- data/.travis.yml +7 -2
- data/README.md +1 -1
- data/Rakefile +7 -0
- data/bibsonomy.gemspec +4 -1
- data/lib/bibsonomy/api.rb +3 -3
- data/lib/bibsonomy/csl.rb +3 -3
- data/lib/bibsonomy/version.rb +1 -1
- data/test/post_test.rb +6 -6
- data/test/test_helper.rb +3 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 095e2d069a16a1e1f74a13e2d86e05f90e0a7ea4
|
4
|
+
data.tar.gz: 04cd4ad56e5596f8198333cf4361a0c4e73054a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a8120c2f359eafbcf34feb26b5a7e642b905ccdff1c88c60edf2107bae1ade05d8a2a24c66ab01b91a64ff735a6f97d9b244d47f34b3ed5c59d93d3a0379747
|
7
|
+
data.tar.gz: 6f8de4d7c4e982b37e2d233a5d099717554435fba7ded75e9b9586e3ffdbf8c00e47df6e6af1bb624d471e88655ae2a48873ee8ce60863360abafc720a5c645c
|
data/.travis.yml
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
|
4
|
-
|
3
|
+
- 2.1.5
|
4
|
+
|
5
|
+
env:
|
6
|
+
global:
|
7
|
+
- secure: "DrOfGkF2HMW5eyL/boTXpIGoF3fbchcNb+zjshLDXIRfug+rs9TXctspDqVjIIfw1UTNLMmA6s/tTkUbQXAmqk39uGRFVAXPY5n7POwiAg01/ldohYlUMfcem0CA+0Onln7AdSA7jo3gJbaG/rM+CTZbTL5+d2a7VMpAXxegFHg="
|
8
|
+
- secure: "gGvXae34ZHvFPD6cSHzwfm60vhjKRrbhcCrSXDjql/6qroKa/ScpZX2wJCnGFVQdLJahKFwENh+wzpha8l9mf+DLbh9AVK9NA2vjkjCI7BGvC2/MSCXZGlCJf7y/nTTe7Sqro91iYEZqCrPRVIkxvy09Q6MtkiGks3f8uEg1NW4="
|
9
|
+
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
BibSonomy client for Ruby
|
4
4
|
|
5
5
|
[](http://badge.fury.io/rb/bibsonomy)
|
6
|
-
|
6
|
+
[](https://travis-ci.org/rjoberon/bibsonomy-ruby)
|
7
7
|
[](https://coveralls.io/r/rjoberon/bibsonomy-ruby)
|
8
8
|
|
9
9
|
## Installation
|
data/Rakefile
CHANGED
data/bibsonomy.gemspec
CHANGED
@@ -18,13 +18,16 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.required_ruby_version = '~> 2.1'
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
25
|
spec.add_development_dependency "minitest", "~> 5.4"
|
24
26
|
spec.add_development_dependency "vcr", "~> 2.9"
|
25
27
|
spec.add_development_dependency "webmock", "~> 1.19"
|
26
28
|
spec.add_development_dependency "coveralls", '~> 0.7'
|
27
|
-
|
29
|
+
spec.add_development_dependency "simplecov", '~> 0.7'
|
30
|
+
|
28
31
|
spec.add_dependency "faraday", "~> 0.9"
|
29
32
|
spec.add_dependency "json", "~> 1.8"
|
30
33
|
spec.add_dependency "citeproc", "~> 1.0"
|
data/lib/bibsonomy/api.rb
CHANGED
@@ -30,9 +30,9 @@ module BibSonomy
|
|
30
30
|
# @param api_key [String] the API key corresponding to the user account - can be obtained from http://www.bibsonomy.org/settings?selTab=1
|
31
31
|
#
|
32
32
|
# @param format [String] The requested return format. One of:
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
33
|
+
# 'xml', 'json', 'ruby', 'csl', 'bibtex'. The default is 'ruby'
|
34
|
+
# which returns Ruby objects defined by this library. Currently,
|
35
|
+
# 'csl' and 'bibtex' are only available for publications.
|
36
36
|
#
|
37
37
|
def initialize(user_name, api_key, format = 'ruby')
|
38
38
|
|
data/lib/bibsonomy/csl.rb
CHANGED
@@ -63,9 +63,9 @@ module BibSonomy
|
|
63
63
|
attr_accessor :opt_sep
|
64
64
|
|
65
65
|
# @return [String] When a post has several documents and the
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
66
|
+
# filename of one of them ends with `public_doc_postfix`, only
|
67
|
+
# this document is downloaded and linked, all other are
|
68
|
+
# ignored. (default: '_oa.pdf')
|
69
69
|
attr_accessor :public_doc_postfix
|
70
70
|
|
71
71
|
#
|
data/lib/bibsonomy/version.rb
CHANGED
data/test/post_test.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require './test/test_helper'
|
2
2
|
|
3
|
-
class BibSonomyPostTest < Minitest::
|
3
|
+
class BibSonomyPostTest < Minitest::Test
|
4
4
|
|
5
5
|
def setup
|
6
|
-
@api = BibSonomy::API.new(ENV['
|
6
|
+
@api = BibSonomy::API.new(ENV['BIBSONOMY_USER_NAME'], ENV['BIBSONOMY_API_KEY'], 'ruby')
|
7
7
|
end
|
8
8
|
|
9
9
|
def test_exists
|
@@ -13,11 +13,11 @@ class BibSonomyPostTest < Minitest::Unit::TestCase
|
|
13
13
|
|
14
14
|
def test_find_post
|
15
15
|
VCR.use_cassette('one_post') do
|
16
|
-
post = @api.get_post("
|
16
|
+
post = @api.get_post("bibsonomy-ruby", "c9437d5ec56ba949f533aeec00f571e3")
|
17
17
|
assert_equal BibSonomy::Post, post.class
|
18
18
|
|
19
19
|
# Check that the fields are accessible by our model
|
20
|
-
assert_equal "
|
20
|
+
assert_equal "bibsonomy-ruby", post.user_name
|
21
21
|
assert_equal "c9437d5ec56ba949f533aeec00f571e3", post.intra_hash
|
22
22
|
assert_equal "The Social Bookmark and Publication Management System {BibSonomy}", post.title
|
23
23
|
assert_equal "2010", post.year
|
@@ -26,10 +26,10 @@ class BibSonomyPostTest < Minitest::Unit::TestCase
|
|
26
26
|
|
27
27
|
def test_find_posts
|
28
28
|
VCR.use_cassette('all_posts') do
|
29
|
-
result = @api.get_posts_for_user("
|
29
|
+
result = @api.get_posts_for_user("bibsonomy-ruby", "publication", ["test"], 0, 20)
|
30
30
|
|
31
31
|
# Make sure we got all the posts
|
32
|
-
assert_equal
|
32
|
+
assert_equal 1, result.length
|
33
33
|
|
34
34
|
# Make sure that the JSON was parsed
|
35
35
|
assert result.kind_of?(Array)
|
data/test/test_helper.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start
|
3
|
+
|
1
4
|
require './lib/bibsonomy'
|
2
5
|
require 'minitest/autorun'
|
3
6
|
require 'webmock/minitest'
|
@@ -5,7 +8,6 @@ require 'vcr'
|
|
5
8
|
require 'coveralls'
|
6
9
|
|
7
10
|
Coveralls.wear!
|
8
|
-
SimpleCov.start
|
9
11
|
|
10
12
|
VCR.configure do |c|
|
11
13
|
c.cassette_library_dir = "test/fixtures"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibsonomy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Jäschke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.7'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.7'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.7'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: faraday
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,9 +195,9 @@ require_paths:
|
|
181
195
|
- lib
|
182
196
|
required_ruby_version: !ruby/object:Gem::Requirement
|
183
197
|
requirements:
|
184
|
-
- - "
|
198
|
+
- - "~>"
|
185
199
|
- !ruby/object:Gem::Version
|
186
|
-
version: '
|
200
|
+
version: '2.1'
|
187
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
202
|
requirements:
|
189
203
|
- - ">="
|