specjour 0.3.0 → 0.3.1
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/History.markdown +9 -0
- data/VERSION +1 -1
- data/lib/specjour/dispatcher.rb +8 -10
- data/lib/specjour/manager.rb +8 -2
- data/lib/specjour.rb +1 -1
- data/specjour.gemspec +2 -2
- metadata +4 -4
    
        data/History.markdown
    CHANGED
    
    | @@ -1,6 +1,15 @@ | |
| 1 1 | 
             
            History
         | 
| 2 2 | 
             
            =======
         | 
| 3 3 |  | 
| 4 | 
            +
            0.3.1 / 2010-10-16
         | 
| 5 | 
            +
            ----------------
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            #### Fixes
         | 
| 8 | 
            +
            * Stopping bonjour actually stops the currently running service
         | 
| 9 | 
            +
            * Only retry connecting to a DRb object 5 times instead of timing out
         | 
| 10 | 
            +
              trying to connect to one bad connection
         | 
| 11 | 
            +
            * Set correct process name when the dispatcher starts a listener
         | 
| 12 | 
            +
             | 
| 4 13 | 
             
            ## 0.3.0 / 2010-10-14
         | 
| 5 14 |  | 
| 6 15 | 
             
            * [fixed] Cucumber output for scenario outlines (delitescere & supaspoida)
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.3. | 
| 1 | 
            +
            0.3.1
         | 
    
        data/lib/specjour/dispatcher.rb
    CHANGED
    
    | @@ -4,7 +4,7 @@ module Specjour | |
| 4 4 | 
             
                Thread.abort_on_exception = true
         | 
| 5 5 | 
             
                include SocketHelper
         | 
| 6 6 |  | 
| 7 | 
            -
                attr_reader :project_alias, :managers, :manager_threads, :hosts, :options, :all_tests
         | 
| 7 | 
            +
                attr_reader :project_alias, :managers, :manager_threads, :hosts, :options, :all_tests, :drb_connection_errors
         | 
| 8 8 | 
             
                attr_accessor :worker_size, :project_path
         | 
| 9 9 |  | 
| 10 10 | 
             
                def initialize(options = {})
         | 
| @@ -13,6 +13,7 @@ module Specjour | |
| 13 13 | 
             
                  @project_path = File.expand_path options[:project_path]
         | 
| 14 14 | 
             
                  @worker_size = 0
         | 
| 15 15 | 
             
                  @managers = []
         | 
| 16 | 
            +
                  @drb_connection_errors = Hash.new(0)
         | 
| 16 17 | 
             
                  find_tests
         | 
| 17 18 | 
             
                  clear_manager_threads
         | 
| 18 19 | 
             
                end
         | 
| @@ -77,17 +78,14 @@ module Specjour | |
| 77 78 | 
             
                end
         | 
| 78 79 |  | 
| 79 80 | 
             
                def fetch_manager(uri)
         | 
| 80 | 
            -
                   | 
| 81 | 
            -
             | 
| 82 | 
            -
                     | 
| 83 | 
            -
                      add_manager(manager)
         | 
| 84 | 
            -
                    end
         | 
| 81 | 
            +
                  manager = DRbObject.new_with_uri(uri.to_s)
         | 
| 82 | 
            +
                  if !managers.include?(manager) && manager.available_for?(project_alias)
         | 
| 83 | 
            +
                    add_manager(manager)
         | 
| 85 84 | 
             
                  end
         | 
| 86 | 
            -
                rescue Timeout::Error
         | 
| 87 | 
            -
                  Specjour.logger.debug "Timeout: couldn't connect to manager at #{uri}"
         | 
| 88 85 | 
             
                rescue DRb::DRbConnError => e
         | 
| 89 | 
            -
                   | 
| 90 | 
            -
                   | 
| 86 | 
            +
                  drb_connection_errors[uri] += 1
         | 
| 87 | 
            +
                  Specjour.logger.debug "#{e.message}: couldn't connect to manager at #{uri}"
         | 
| 88 | 
            +
                  retry if drb_connection_errors[uri] < 5
         | 
| 91 89 | 
             
                end
         | 
| 92 90 |  | 
| 93 91 | 
             
                def fork_local_manager
         | 
    
        data/lib/specjour/manager.rb
    CHANGED
    
    | @@ -45,6 +45,7 @@ module Specjour | |
| 45 45 | 
             
                end
         | 
| 46 46 |  | 
| 47 47 | 
             
                def drb_start
         | 
| 48 | 
            +
                  $PROGRAM_NAME = "specjour listen" if quiet?
         | 
| 48 49 | 
             
                  DRb.start_service drb_uri.to_s, self
         | 
| 49 50 | 
             
                  at_exit { DRb.stop_service }
         | 
| 50 51 | 
             
                end
         | 
| @@ -117,7 +118,7 @@ module Specjour | |
| 117 118 | 
             
                end
         | 
| 118 119 |  | 
| 119 120 | 
             
                def bonjour_service
         | 
| 120 | 
            -
                  @bonjour_service  | 
| 121 | 
            +
                  @bonjour_service ||= DNSSD::Service.new
         | 
| 121 122 | 
             
                end
         | 
| 122 123 |  | 
| 123 124 | 
             
                def cmd(command)
         | 
| @@ -132,8 +133,13 @@ module Specjour | |
| 132 133 | 
             
                  end
         | 
| 133 134 | 
             
                end
         | 
| 134 135 |  | 
| 135 | 
            -
                def  | 
| 136 | 
            +
                def stop_bonjour
         | 
| 136 137 | 
             
                  bonjour_service.stop
         | 
| 138 | 
            +
                  @bonjour_service = nil
         | 
| 139 | 
            +
                end
         | 
| 140 | 
            +
             | 
| 141 | 
            +
                def suspend_bonjour(&block)
         | 
| 142 | 
            +
                  stop_bonjour
         | 
| 137 143 | 
             
                  block.call
         | 
| 138 144 | 
             
                  bonjour_announce
         | 
| 139 145 | 
             
                end
         | 
    
        data/lib/specjour.rb
    CHANGED
    
    
    
        data/specjour.gemspec
    CHANGED
    
    | @@ -5,11 +5,11 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{specjour}
         | 
| 8 | 
            -
              s.version = "0.3. | 
| 8 | 
            +
              s.version = "0.3.1"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Sandro Turriate"]
         | 
| 12 | 
            -
              s.date = %q{2010-10- | 
| 12 | 
            +
              s.date = %q{2010-10-16}
         | 
| 13 13 | 
             
              s.default_executable = %q{specjour}
         | 
| 14 14 | 
             
              s.description = %q{Distribute your spec suite amongst your LAN via Bonjour.}
         | 
| 15 15 | 
             
              s.email = %q{sandro.turriate@gmail.com}
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: specjour
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 17
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 3
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.3. | 
| 9 | 
            +
              - 1
         | 
| 10 | 
            +
              version: 0.3.1
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Sandro Turriate
         | 
| @@ -15,7 +15,7 @@ autorequire: | |
| 15 15 | 
             
            bindir: bin
         | 
| 16 16 | 
             
            cert_chain: []
         | 
| 17 17 |  | 
| 18 | 
            -
            date: 2010-10- | 
| 18 | 
            +
            date: 2010-10-16 00:00:00 -04:00
         | 
| 19 19 | 
             
            default_executable: specjour
         | 
| 20 20 | 
             
            dependencies: 
         | 
| 21 21 | 
             
            - !ruby/object:Gem::Dependency 
         |