Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipmplement to_asciibib #28 #29

Merged
merged 10 commits into from
Aug 19, 2020
Merged

ipmplement to_asciibib #28 #29

merged 10 commits into from
Aug 19, 2020

Conversation

andrew2net
Copy link
Contributor

No description provided.

# @param prefix [String]
# @param count [Integer] number of titles
# @return [String]
def to_asciibib(prefix = "", count = 1) # rubocop:disable Metrics/AbcSize
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/AbcSize.

# @param prefix [String]
# @param count [Integer] number of elements
# @return [String]
def to_asciibib(prefix = "", count = 1) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [107/80]

@@ -61,7 +62,7 @@ def to_xml(builder)
end

# @return [Hash]
def to_hash
def to_hash # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.

@@ -48,7 +49,7 @@ def empty?
end

# @param builder [Nokogiri::XML::Builder]
def to_xml(builder)
def to_xml(builder) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [87/80]

unless content.is_a?(String) || content.is_a?(Array) &&
(inv = content.reject { |c| c.is_a?(LocalizedString) || c.is_a?(Hash) }).
none? && content.any?
def initialize(content, language = nil, script = nil) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [172/80]

@@ -238,7 +239,7 @@ def person_identifiers_hash_to_bib(person)
end
end

def affiliation_hash_to_bib(person)
def affiliation_hash_to_bib(person) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [97/80]

)
end

def fullname_hash_to_bib(person)
def fullname_hash_to_bib(person) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [102/80]

@@ -177,7 +178,7 @@ def stage(stg)
DocumentStatus::Stage.new(**args)
end

def contributors_hash_to_bib(ret)
def contributors_hash_to_bib(ret) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [125/80]

# @param prefix [String]
# @param count [Integer]
# @return [String]
def to_asciibib(prefix = "", count = 1) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength,Metrics/PerceivedComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [157/80]

@@ -95,7 +97,7 @@ def to_xml(builder)
# rubocop:enable Metrics/PerceivedComplexity

# @return [Hash]
def to_hash
def to_hash # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [130/80]

@ronaldtse
Copy link
Contributor

Thanks @andrew2net , feel free to merge when ready.

@@ -504,7 +560,7 @@ def bibtex_contributor(item)
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength

# @param [BibTeX::Entry]
def bibtex_note(item)
def bibtex_note(item) # rubocop:disable Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.

@@ -487,7 +543,7 @@ def bibtex_author(item)
end

# @param [BibTeX::Entry]
def bibtex_contributor(item)
def bibtex_contributor(item) # rubocop:disable Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.

@@ -470,7 +526,7 @@ def bibtex_type
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength

# @param [BibTeX::Entry]
def bibtex_author(item)
def bibtex_author(item) # rubocop:disable Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.

@revdate ||= if version&.revision_date
version.revision_date
else
date.detect { |d| d.type == "published" }&.on&.to_s
end
end

# @param prefix [String]
# @return [String]
def to_asciibib(prefix = "") # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [147/80]

@@ -440,14 +449,61 @@ def to_most_recent_reference

# If revision_date exists then returns it else returns published date or nil
# @return [String, NilClass]
def revdate
def revdate # rubocop:disable Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.

# @param prefix [String]
# @param count [Integer]
# @return [String]
def to_asciibib(prefix = "", count = 1) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [107/80]

# @param prefix [String]
# @param count [Iteger] number of copyright elements
# @return [String]
def to_asciibib(prefix = "", count = 1) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [107/80]


# @param prefix [String]
# @return [String]
def to_asciibib(prefix = "") # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [96/80]

end

private

# @param array [Array]
# @return [Array<String>, String]
def single_element_array(array)
def single_element_array(array) # rubocop:disable Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.

# @param date [String, Integer, Date]
# @return [Date, NilClass]
def parse_date(date)
def parse_date(date) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [93/80]

# @param ext [Nokogiri::XML::Element]
# @return [RelatonBib::StructuredIdentifierCollection]
def fetch_structuredidentifier(ext)
def fetch_structuredidentifier(ext) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [127/80]
Unnecessary disabling of Metrics/CyclomaticComplexity.

@@ -219,7 +229,7 @@ def get_org(org)
identifier: identifier)
end

def get_person(person)
def get_person(person) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [114/80]
Unnecessary disabling of Metrics/CyclomaticComplexity.

end

def fetch_dates(item)
def fetch_dates(item) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [91/80]

# rubocop:disable Metrics/AbcSize, Metrics/MethodLength

def fetch_series(item)
def fetch_series(item) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/MethodLength
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.
Line is too long. [114/80]

@@ -19,7 +20,7 @@ def from_xml(xml)
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize

# @return [Hash]
def item_data(bibitem)
def item_data(bibitem) # rubocop:disable Metrics/CyclomaticComplexity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary disabling of Metrics/CyclomaticComplexity.

@andrew2net andrew2net merged commit 6222971 into master Aug 19, 2020
@andrew2net andrew2net deleted the feature/to_asciibib branch August 19, 2020 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants