net-ptth 0.0.11 → 0.0.12
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/Gemfile.lock +1 -1
 - data/lib/net/ptth.rb +8 -1
 - data/net-ptth.gemspec +1 -1
 - metadata +2 -2
 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/lib/net/ptth.rb
    CHANGED
    
    | 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require "uri"
         
     | 
| 
       2 
2 
     | 
    
         
             
            require "rack"
         
     | 
| 
       3 
3 
     | 
    
         
             
            require "net/http"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "logger"
         
     | 
| 
       4 
5 
     | 
    
         | 
| 
       5 
6 
     | 
    
         
             
            require "net/ptth/socket"
         
     | 
| 
       6 
7 
     | 
    
         
             
            require "net/ptth/parser"
         
     | 
| 
         @@ -30,7 +31,7 @@ class Net::PTTH 
     | 
|
| 
       30 
31 
     | 
    
         | 
| 
       31 
32 
     | 
    
         
             
                @host, @port = info.host, info.port || options.fetch(:port, 80)
         
     | 
| 
       32 
33 
     | 
    
         
             
                @keep_alive = options.fetch(:keep_alive, false)
         
     | 
| 
       33 
     | 
    
         
            -
                 
     | 
| 
      
 34 
     | 
    
         
            +
                set_debug_output = StringIO.new
         
     | 
| 
       34 
35 
     | 
    
         
             
              end
         
     | 
| 
       35 
36 
     | 
    
         | 
| 
       36 
37 
     | 
    
         
             
              # Public: Mimics Net::HTTP set_debug_output
         
     | 
| 
         @@ -39,6 +40,11 @@ class Net::PTTH 
     | 
|
| 
       39 
40 
     | 
    
         
             
              #
         
     | 
| 
       40 
41 
     | 
    
         
             
              def set_debug_output=(output)
         
     | 
| 
       41 
42 
     | 
    
         
             
                @debug_output = output
         
     | 
| 
      
 43 
     | 
    
         
            +
                Celluloid.logger = if output.is_a?(String)
         
     | 
| 
      
 44 
     | 
    
         
            +
                                     ::Logger.new(output)
         
     | 
| 
      
 45 
     | 
    
         
            +
                                   else
         
     | 
| 
      
 46 
     | 
    
         
            +
                                     output
         
     | 
| 
      
 47 
     | 
    
         
            +
                                   end
         
     | 
| 
       42 
48 
     | 
    
         
             
              end
         
     | 
| 
       43 
49 
     | 
    
         | 
| 
       44 
50 
     | 
    
         
             
              # Public: Closes de current connection
         
     | 
| 
         @@ -157,6 +163,7 @@ class Net::PTTH 
     | 
|
| 
       157 
163 
     | 
    
         
             
              #   string: The string to be logged
         
     | 
| 
       158 
164 
     | 
    
         
             
              #
         
     | 
| 
       159 
165 
     | 
    
         
             
              def debug(string)
         
     | 
| 
      
 166 
     | 
    
         
            +
                return unless @debug_output
         
     | 
| 
       160 
167 
     | 
    
         
             
                @debug_output << string + "\n"
         
     | 
| 
       161 
168 
     | 
    
         
             
              end
         
     | 
| 
       162 
169 
     | 
    
         
             
            end
         
     | 
    
        data/net-ptth.gemspec
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: net-ptth
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.12
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2013-10- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2013-10-22 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: rack
         
     |