Skip to content

Commit

Permalink
Merge branch 'master' of github.com:noted/scholar
Browse files Browse the repository at this point in the history
  • Loading branch information
ethnt committed Apr 8, 2013
2 parents b631d32 + 496e7b9 commit 8f974a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/scholar/citation.rb
Expand Up @@ -47,6 +47,14 @@ def initialize(options = {})
@raw = @attributes.clone
@attributes.delete(:type)

@attributes.each do |k, v|
if v.is_a?(Fixnum)
@attributes[k] = v.to_s
end
end

@attributes.delete_if {|k, v| v.nil? || v.empty? }

if @attributes[:contributors]
@attributes = Scholar::Utilities.contributors!(@attributes)
end
Expand Down
2 changes: 2 additions & 0 deletions lib/scholar/utilities/contributor.rb
Expand Up @@ -40,6 +40,8 @@ def initialize(data, order = :first)
data[:role] = :author
end

data.delete_if {|k, v| v.nil? || v.empty? }

@order = order

@attributes = order!(data)
Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Expand Up @@ -8,7 +8,6 @@

SimpleCov.start


require 'spork'

Spork.prefork do
Expand Down

0 comments on commit 8f974a3

Please sign in to comment.