Changeset 6388
- Timestamp:
- 02/08/08 21:53:51 (5 years ago)
- Location:
- websites/coderepos.org/scripts/commit-ping-to-irc
- Files:
-
- 1 added
- 1 modified
-
commig-ping-tiarra.rb (modified) (5 diffs)
-
commig-ping-tiarra_spec.rb (added)
Legend:
- Unmodified
- Added
- Removed
-
websites/coderepos.org/scripts/commit-ping-to-irc/commig-ping-tiarra.rb
r6387 r6388 21 21 yaml = YAML.load(yaml) if yaml.kind_of?(String) 22 22 23 info = OpenStruct.new(yaml) 23 info = make_info(yaml) 24 text = info.instance_eval(@opts.format) 25 26 notify_tiarra(:channel => @opts.channel, :text => text) 27 end 28 29 def make_info(hash) 30 info = OpenStruct.new(hash) 24 31 info.comment = NKF.nkf("-w", info.comment.gsub(/\?\\(\d+)/) {|i| 25 32 $1.to_i.chr 26 }) 33 }).chomp 27 34 28 35 # remove svk prefix … … 33 40 34 41 # remove lines but first 35 if info.comment.sub!(/[\r\n].*/ , "")42 if info.comment.sub!(/[\r\n].*/m, "") 36 43 info.comment << "..." 37 44 end … … 65 72 info.platform = info.platform.uniq.join(", ") 66 73 info.path = info.path.uniq.join(", ") 67 68 text = info.instance_eval(@opts.format) 69 70 notify_tiarra(:channel => @opts.channel, :text => text) 74 info 71 75 end 72 76 … … 96 100 end 97 101 end 102 98 103 99 104 config = File.open("commig-ping-tiarra.yaml") {|f| YAML.load(f) } … … 166 171 warn e.inspect 167 172 warn e.backtrace.join("\n\t") 168 end 173 end if __FILE__ == $0 169 174 170 175 __END__
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)