Skip to content

Commit

Permalink
Suppress Layout/ClassStructure offense
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Dec 25, 2022
1 parent 6487aa3 commit 6bfbf14
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions tasks/changelog.rb
Expand Up @@ -77,6 +77,19 @@ def github_user
user
end
end

def self.pending?
entry_paths.any?
end

def self.entry_paths
Dir["#{ENTRIES_PATH}*"]
end

def self.read_entries
entry_paths.to_h { |path| [path, File.read(path)] }
end

attr_reader :header, :rest

def initialize(content: File.read(PATH), entries: Changelog.read_entries)
Expand Down Expand Up @@ -107,18 +120,6 @@ def merge_content
merged_content << EOF
end

def self.pending?
entry_paths.any?
end

def self.entry_paths
Dir["#{ENTRIES_PATH}*"]
end

def self.read_entries
entry_paths.to_h { |path| [path, File.read(path)] }
end

def new_contributor_lines
contributors
.map { |user| format(CONTRIBUTOR, user: user) }
Expand Down

0 comments on commit 6bfbf14

Please sign in to comment.