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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25582d9d2e9169e3ee00706a2343d52d1f33c4c5
4
- data.tar.gz: 73ae74482afd1f40e91e5b2cbfd6726227e7a363
3
+ metadata.gz: 095e2d069a16a1e1f74a13e2d86e05f90e0a7ea4
4
+ data.tar.gz: 04cd4ad56e5596f8198333cf4361a0c4e73054a0
5
5
  SHA512:
6
- metadata.gz: fc904f777d00f20b07a01ef174f2a9682ef66c5cde55dec7728307661576f404cb804a73647eb8205b544dfb61fd105a8003b5e0435d3190297255a3cbc4179c
7
- data.tar.gz: 52ba59db8232cf43f65420b0a5ecadcbec0a614de67cabbad22873daa34e23a53c24efb16ddbe20b9c11cd0ecda920b62beb16ac9970c359df7810f892ac41ca
6
+ metadata.gz: 9a8120c2f359eafbcf34feb26b5a7e642b905ccdff1c88c60edf2107bae1ade05d8a2a24c66ab01b91a64ff735a6f97d9b244d47f34b3ed5c59d93d3a0379747
7
+ data.tar.gz: 6f8de4d7c4e982b37e2d233a5d099717554435fba7ded75e9b9586e3ffdbf8c00e47df6e6af1bb624d471e88655ae2a48873ee8ce60863360abafc720a5c645c
@@ -1,4 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "2.1.5"
4
- - rbx
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
  [![Gem Version](https://badge.fury.io/rb/bibsonomy.svg)](http://badge.fury.io/rb/bibsonomy)
6
-
6
+ [![Build Status](https://travis-ci.org/rjoberon/bibsonomy-ruby.svg?branch=master)](https://travis-ci.org/rjoberon/bibsonomy-ruby)
7
7
  [![Coverage Status](https://coveralls.io/repos/rjoberon/bibsonomy-ruby/badge.svg)](https://coveralls.io/r/rjoberon/bibsonomy-ruby)
8
8
 
9
9
  ## Installation
data/Rakefile CHANGED
@@ -1,2 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rake/testtask'
2
3
 
4
+ Rake::TestTask.new do |task|
5
+ task.libs << %w(test lib)
6
+ task.pattern = 'test/*_test.rb'
7
+ end
8
+
9
+ task :default => :test
@@ -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"
@@ -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
- # '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.
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
 
@@ -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
- # 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')
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
  #
@@ -1,3 +1,3 @@
1
1
  module BibSonomy
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
@@ -1,9 +1,9 @@
1
1
  require './test/test_helper'
2
2
 
3
- class BibSonomyPostTest < Minitest::Unit::TestCase
3
+ class BibSonomyPostTest < Minitest::Test
4
4
 
5
5
  def setup
6
- @api = BibSonomy::API.new(ENV['USER_NAME'], ENV['API_KEY'], 'ruby')
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("jaeschke", "c9437d5ec56ba949f533aeec00f571e3")
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 "jaeschke", post.user_name
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("jaeschke", "publication", nil, 0, 20)
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 20, result.length
32
+ assert_equal 1, result.length
33
33
 
34
34
  # Make sure that the JSON was parsed
35
35
  assert result.kind_of?(Array)
@@ -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
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-25 00:00:00.000000000 Z
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: '0'
200
+ version: '2.1'
187
201
  required_rubygems_version: !ruby/object:Gem::Requirement
188
202
  requirements:
189
203
  - - ">="