bibsonomy 0.4.7 → 0.4.8

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: cfc29c3c38865ebf77e49be3e526070ea1c596f9
4
- data.tar.gz: 9ed678b079893cbe99a7f3cbd1614ebcebef197e
3
+ metadata.gz: 2dc63bd9e3b259ddf0c5808f4f7c2aaf70a86ae0
4
+ data.tar.gz: 68b95dc7e2123f176cf04ee8df9bd959fa3d99e4
5
5
  SHA512:
6
- metadata.gz: 9eba9e923dfb6e4c149a741d32513d01f2351ddb3a2a783ee5f79060daa182c5ef6f47c9a560cc876977d61d7e4cb1dcc34f85142924fabdea79899540919f98
7
- data.tar.gz: 652a1e547c8460df327387b5a9ba27f5320e87b6a3a63bd77a1f5733f18d9d480adbba09e58e1c84d491f6958338be1d848f07537040822e6d0809180c73874b
6
+ metadata.gz: 9946d9fb4ab157a8d5b2509b86cbb67ad46cc5458793a08878368b41d46c24f37b499a15fdc7d00853938e194431f348dce9527d39c152c3e3a42428f83dc9a5
7
+ data.tar.gz: 1d9e13932a6e3e4d85f91a95b58d9487f89a824760f78888593a925e5c93881190c47e944bca32e60b0ffb155751e5d4de735af784039f5139d61f48129d764f
@@ -21,6 +21,8 @@ require 'bibsonomy'
21
21
  # - group
22
22
  #
23
23
  # Changes:
24
+ # 2017-05-31
25
+ # - added support to get posts of a group
24
26
  # 2017-01-19
25
27
  # - added optional parameter group to control which posts are
26
28
  # included based on their viewability for a specific group (not yet activated!)
@@ -103,13 +105,14 @@ module BibSonomy
103
105
  #
104
106
  # Download `count` posts for the given `user` and `tag(s)` and render them with {http://citationstyles.org/ CSL}.
105
107
  #
106
- # @param user [String] the name of the posts' owner
108
+ # @param grouping [String] the type of the name (either "user" or "group")
109
+ # @param name [String] the name of the group or user
107
110
  # @param tags [Array<String>] the tags that all posts must contain (can be empty)
108
111
  # @param count [Integer] number of posts to download
109
112
  # @return [String] the rendered posts as HTML
110
- def render(user, tags, count)
113
+ def render(grouping, name, tags, count)
111
114
  # get posts from BibSonomy
112
- posts = JSON.parse(@bibsonomy.get_posts_for_user(user, 'publication', tags, 0, count))
115
+ posts = JSON.parse(@bibsonomy.get_posts(grouping, name, 'publication', tags, 0, count))
113
116
 
114
117
  # render them with citeproc
115
118
  cp = CiteProc::Processor.new style: @style, format: 'html'
@@ -1,3 +1,3 @@
1
1
  module BibSonomy
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  end
@@ -12,7 +12,7 @@ class BibSonomyCSLTest < Minitest::Test
12
12
 
13
13
  def test_render
14
14
  VCR.use_cassette('render') do
15
- html = @csl.render("bibsonomy-ruby", [], 10)
15
+ html = @csl.render("user", "bibsonomy-ruby", [], 10)
16
16
 
17
17
  assert_equal "<h3>2010</h3>", html[0..12]
18
18
  assert_equal "</ul>", html[-6..-2]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibsonomy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Jäschke