cerberus 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +5 -0
 - data/README +8 -0
 - data/lib/cerberus/component_lazy_loader.rb +18 -13
 - data/lib/cerberus/constants.rb +1 -1
 - data/lib/cerberus/manager.rb +1 -1
 - data/lib/cerberus/publisher/irc.rb +7 -7
 - metadata +2 -2
 
    
        data/CHANGES
    CHANGED
    
    
    
        data/README
    CHANGED
    
    | 
         @@ -90,6 +90,14 @@ Cerberus currently supports the following build systems: 
     | 
|
| 
       90 
90 
     | 
    
         
             
              * Maven2
         
     | 
| 
       91 
91 
     | 
    
         
             
              * Bjam
         
     | 
| 
       92 
92 
     | 
    
         | 
| 
      
 93 
     | 
    
         
            +
            == Mailing List / Public Forums
         
     | 
| 
      
 94 
     | 
    
         
            +
             
     | 
| 
      
 95 
     | 
    
         
            +
            http://groups.google.com/group/cerberusci
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
            == Issue Tracker
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
            http://cpjolicoeur.lighthouseapp.com/projects/22299-cerberus
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
       93 
101 
     | 
    
         
             
            == License
         
     | 
| 
       94 
102 
     | 
    
         | 
| 
       95 
103 
     | 
    
         
             
            This plugin is licensed under the MIT license. Complete license text
         
     | 
| 
         @@ -9,10 +9,10 @@ module Cerberus 
     | 
|
| 
       9 
9 
     | 
    
         
             
                }
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
                def self.get(type)
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
      
 12 
     | 
    
         
            +
                  class_name = TYPES[type.to_sym]
         
     | 
| 
      
 13 
     | 
    
         
            +
                  say "SCM #{type} not supported" unless class_name
         
     | 
| 
      
 14 
     | 
    
         
            +
                  require "cerberus/scm/#{type}"
         
     | 
| 
      
 15 
     | 
    
         
            +
                  const_get(class_name)
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         | 
| 
         @@ -49,11 +49,16 @@ module Cerberus 
     | 
|
| 
       49 
49 
     | 
    
         
             
                  :twitter => 'Twitter'
         
     | 
| 
       50 
50 
     | 
    
         
             
                }
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
     | 
    
         
            -
                def self.get(type)
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
      
 52 
     | 
    
         
            +
                def self.get(type, config)
         
     | 
| 
      
 53 
     | 
    
         
            +
                  class_name = TYPES[type.to_sym]
         
     | 
| 
      
 54 
     | 
    
         
            +
                  if not class_name
         
     | 
| 
      
 55 
     | 
    
         
            +
                    class_name = config[:class_name]
         
     | 
| 
      
 56 
     | 
    
         
            +
                    say "Publisher #{type} not supported" unless class_name
         
     | 
| 
      
 57 
     | 
    
         
            +
                    require config[:require]
         
     | 
| 
      
 58 
     | 
    
         
            +
                  else
         
     | 
| 
      
 59 
     | 
    
         
            +
                    require "cerberus/publisher/#{type}"
         
     | 
| 
      
 60 
     | 
    
         
            +
                  end
         
     | 
| 
      
 61 
     | 
    
         
            +
                  const_get(class_name)
         
     | 
| 
       57 
62 
     | 
    
         
             
                end
         
     | 
| 
       58 
63 
     | 
    
         
             
              end
         
     | 
| 
       59 
64 
     | 
    
         | 
| 
         @@ -67,10 +72,10 @@ module Cerberus 
     | 
|
| 
       67 
72 
     | 
    
         
             
                }
         
     | 
| 
       68 
73 
     | 
    
         | 
| 
       69 
74 
     | 
    
         
             
                def self.get(type)
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
      
 75 
     | 
    
         
            +
                  class_name = TYPES[type.to_sym]
         
     | 
| 
      
 76 
     | 
    
         
            +
                  say "Builder #{type} not supported" unless class_name
         
     | 
| 
      
 77 
     | 
    
         
            +
                  require "cerberus/builder/#{type}"
         
     | 
| 
      
 78 
     | 
    
         
            +
                  const_get(class_name)
         
     | 
| 
       74 
79 
     | 
    
         
             
                end
         
     | 
| 
       75 
80 
     | 
    
         
             
              end
         
     | 
| 
       76 
81 
     | 
    
         
             
            end
         
     | 
    
        data/lib/cerberus/constants.rb
    CHANGED
    
    
    
        data/lib/cerberus/manager.rb
    CHANGED
    
    | 
         @@ -134,7 +134,7 @@ module Cerberus 
     | 
|
| 
       134 
134 
     | 
    
         
             
                          raise "Publisher have no configuration: #{pub}" unless publisher_config
         
     | 
| 
       135 
135 
     | 
    
         | 
| 
       136 
136 
     | 
    
         
             
                          events = interpret_state(publisher_config[:on_event] || @config[:publisher, :on_event] || 'default')
         
     | 
| 
       137 
     | 
    
         
            -
                          Publisher.get(pub).publish(@status, self, @config) if events.include?(@status.current_state)
         
     | 
| 
      
 137 
     | 
    
         
            +
                          Publisher.get(pub, publisher_config).publish(@status, self, @config) if events.include?(@status.current_state)
         
     | 
| 
       138 
138 
     | 
    
         
             
                        end
         
     | 
| 
       139 
139 
     | 
    
         | 
| 
       140 
140 
     | 
    
         | 
| 
         @@ -9,19 +9,19 @@ class Cerberus::Publisher::IRC < Cerberus::Publisher::Base 
     | 
|
| 
       9 
9 
     | 
    
         
             
                subject,body = Cerberus::Publisher::Base.formatted_message(state, manager, options)
         
     | 
| 
       10 
10 
     | 
    
         
             
                message = subject + "\n" + '*' * subject.length + "\n" + body
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
12 
     | 
    
         
             
                channel = '#' + irc_options[:channel]
         
     | 
| 
       14 
13 
     | 
    
         
             
                bot = IRC.new(irc_options[:nick] || 'cerberus', irc_options[:server], irc_options[:port] || 6667)
         
     | 
| 
       15 
14 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
                silence_stream(STDOUT)  
     | 
| 
       17 
     | 
    
         
            -
                  IRCEvent.add_callback('endofmotd')  
     | 
| 
      
 15 
     | 
    
         
            +
                silence_stream(STDOUT) do
         
     | 
| 
      
 16 
     | 
    
         
            +
                  IRCEvent.add_callback('endofmotd') do |event| 
         
     | 
| 
       18 
17 
     | 
    
         
             
                    bot.add_channel(channel) 
         
     | 
| 
       19 
     | 
    
         
            -
                    message.split("\n").each 
     | 
| 
      
 18 
     | 
    
         
            +
                    message.split("\n").each do |line|
         
     | 
| 
       20 
19 
     | 
    
         
             
                      bot.send_message(channel, line)
         
     | 
| 
       21 
     | 
    
         
            -
                     
     | 
| 
      
 20 
     | 
    
         
            +
                    end
         
     | 
| 
       22 
21 
     | 
    
         
             
                    bot.send_quit
         
     | 
| 
       23 
     | 
    
         
            -
                   
     | 
| 
      
 22 
     | 
    
         
            +
                  end
         
     | 
| 
       24 
23 
     | 
    
         
             
                  bot.connect
         
     | 
| 
       25 
     | 
    
         
            -
                 
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
       26 
26 
     | 
    
         
             
              end
         
     | 
| 
       27 
27 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: cerberus
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.4.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Anatol Pomozov
         
     | 
| 
         @@ -9,7 +9,7 @@ autorequire: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            date: 2009-02- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2009-02-15 00:00:00 -05:00
         
     | 
| 
       13 
13 
     | 
    
         
             
            default_executable: cerberus
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |