@@ -5,7 +5,7 @@ module Cvs
55 class Activity < OhlohScm ::Activity
66 def tags
77 cmd = "cvs -Q -d #{ url } rlog -h #{ scm . branch_name } | awk -F\" [.:]\" '/^\\ t/&&$(NF-1)!=0'"
8- tag_strings = run ( cmd ) . split ( / \n / )
8+ tag_strings = run ( cmd ) . split ( " \n " )
99 tag_strings . map do |tag_string |
1010 tag_name , version = tag_string . split ( ':' )
1111 [ tag_name . delete ( "\t " ) , version . strip ]
@@ -45,7 +45,7 @@ def commits(opts = {})
4545 next unless result [ i ] . token &.match? ( re ) # We found the match for after
4646 return [ ] if i == result . size - 1 # There aren't any new commits.
4747
48- return result [ i + 1 ..- 1 ]
48+ return result [ i + 1 ..]
4949 end
5050
5151 # Something bad is going on: 'after' does not match any timestamp in the rlog.
@@ -72,7 +72,7 @@ def export_tag(dest_dir, tag_name = 'HEAD')
7272 def ensure_host_key
7373 return if protocol != :ext
7474
75- ensure_key_file = File . dirname ( __FILE__ ) + ' /../../../../bin/ensure_key'
75+ ensure_key_file = " #{ File . dirname ( __FILE__ ) } /../../../../bin/ensure_key"
7676 cmd = "#{ ensure_key_file } '#{ host } '"
7777 run_with_err ( cmd )
7878 end
@@ -92,12 +92,12 @@ def ensure_host_key
9292 # that predate the requested time.
9393 # That's better than missing revisions completely! Just be sure to check for duplicates.
9494 # rubocop:disable Metrics/AbcSize
95- def open_log_file ( opts = { } )
95+ def open_log_file ( opts = { } , & block )
9696 ensure_host_key
9797 status . lock?
9898 run "cvsnt -d #{ url } rlog #{ opt_branch } #{ opt_time ( opts [ :after ] ) } '#{ scm . branch_name } '" \
9999 " | #{ string_encoder_path } > #{ rlog_filename } "
100- File . open ( rlog_filename , 'r' ) { | file | yield file }
100+ File . open ( rlog_filename , 'r' , & block )
101101 ensure
102102 File . delete ( rlog_filename ) if File . exist? ( rlog_filename )
103103 end
@@ -113,7 +113,7 @@ def opt_time(after = nil)
113113 end
114114
115115 def rlog_filename
116- File . join ( temp_folder , ( url + scm . branch_name . to_s ) . gsub ( /\W / , '' ) + ' .rlog' )
116+ File . join ( temp_folder , " #{ ( url + scm . branch_name . to_s ) . gsub ( /\W / , '' ) } .rlog" )
117117 end
118118
119119 # Converts a CVS time string to a Ruby Time object
@@ -128,9 +128,9 @@ def parse_time(token)
128128 # returns the host this adapter is connecting to
129129 def host
130130 @host ||= begin
131- url =~ /@([^:]*):/
132- Regexp . last_match ( 1 )
133- end
131+ url =~ /@([^:]*):/
132+ Regexp . last_match ( 1 )
133+ end
134134 end
135135
136136 # returns the protocol this adapter connects with
0 commit comments