diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-11-23 14:26:58 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-11-23 14:26:58 +0000 |
commit | df7188a2e5f04fa241577d91ab986fb927b6155b (patch) | |
tree | a485fd687af996a538188c411bc677e77845497d /lib | |
parent | 75acf141d5a6660e8c3734e3eba6e0154bd0bc53 (diff) | |
download | redmine-df7188a2e5f04fa241577d91ab986fb927b6155b.tar.gz redmine-df7188a2e5f04fa241577d91ab986fb927b6155b.zip |
cleanup: rubocop: fix Layout/IndentFirstHashElement in lib/redmine/scm/adapters/git_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19198 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/scm/adapters/git_adapter.rb | 64 |
1 files changed, 37 insertions, 27 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 88c52c361..d06639726 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -176,15 +176,17 @@ module Redmine id = lines[0].split[1] author = lines[1].match('Author:\s+(.*)$')[1] time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1]) - - Revision.new({ - :identifier => id, - :scmid => id, - :author => author, - :time => time, - :message => nil, - :paths => nil - }) + Revision. + new( + { + :identifier => id, + :scmid => id, + :author => author, + :time => time, + :message => nil, + :paths => nil + } + ) rescue NoMethodError => e logger.error("The revision '#{path}' has a wrong format") return nil @@ -236,15 +238,19 @@ module Redmine parents_str = $2 if [1, 2].include?(parsing_descr) parsing_descr = 0 - revision = Revision.new({ - :identifier => changeset[:commit], - :scmid => changeset[:commit], - :author => changeset[:author], - :time => Time.parse(changeset[:date]), - :message => changeset[:description], - :paths => files, - :parents => changeset[:parents] - }) + revision = + Revision. + new( + { + :identifier => changeset[:commit], + :scmid => changeset[:commit], + :author => changeset[:author], + :time => Time.parse(changeset[:date]), + :message => changeset[:description], + :paths => files, + :parents => changeset[:parents] + } + ) if block_given? yield revision else @@ -290,15 +296,19 @@ module Redmine end if changeset[:commit] - revision = Revision.new({ - :identifier => changeset[:commit], - :scmid => changeset[:commit], - :author => changeset[:author], - :time => Time.parse(changeset[:date]), - :message => changeset[:description], - :paths => files, - :parents => changeset[:parents] - }) + revision = + Revision. + new( + { + :identifier => changeset[:commit], + :scmid => changeset[:commit], + :author => changeset[:author], + :time => Time.parse(changeset[:date]), + :message => changeset[:description], + :paths => files, + :parents => changeset[:parents] + } + ) if block_given? yield revision else |