pps_commons 0.1.16 → 0.1.17
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.
- checksums.yaml +4 -4
- data/info +0 -0
- data/lib/pps_commons.rb +15 -10
- data/lib/pps_commons/version.rb +1 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 4cfed165960243388887af3b4a6bff9a545281da
         | 
| 4 | 
            +
              data.tar.gz: f089c531d59bc1293f12f5460955769c8557292d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8a63be093a040233adc08f1fad73fa5df844827dec693ed346d77990169a3a835c662e114b848c497b0d36054dbac2e41a3a21ae2d45b0748b8334576ccb430b
         | 
| 7 | 
            +
              data.tar.gz: c1f3f0c3b5e6385a6f8d5d1873e1acad17e6850287cd6082994752090468daaf8b9c2b211f1abef477638deb5c36a26b9c9e1ef13c8fa50c7d9eb53569cc5333
         | 
    
        data/info
    ADDED
    
    | 
            File without changes
         | 
    
        data/lib/pps_commons.rb
    CHANGED
    
    | @@ -18,9 +18,10 @@ module WGU | |
| 18 18 | 
             
                  end
         | 
| 19 19 | 
             
                end
         | 
| 20 20 |  | 
| 21 | 
            -
                # this tells EventMachine how many threads it can use.  There is a lot of | 
| 22 | 
            -
                # in this project so it helps to run a higher number.
         | 
| 23 | 
            -
                # EM defaults to '20', PPS defaults to '40'
         | 
| 21 | 
            +
                # this tells EventMachine how many threads it can use.  There is a lot of
         | 
| 22 | 
            +
                # Deferrals in this project so it helps to run a higher number.
         | 
| 23 | 
            +
                # EM defaults to '20', PPS defaults to '40'.  This can be adjusted by
         | 
| 24 | 
            +
                # adjusting the `PPS_THREAD_COUNT` environment variable
         | 
| 24 25 | 
             
                def PPSCommons.unleash_the_fury_level
         | 
| 25 26 | 
             
                  found = ENV['PPS_THREAD_COUNT'].to_i
         | 
| 26 27 | 
             
                  found.eql?(0) ? 40 : found.to_i
         | 
| @@ -28,15 +29,19 @@ module WGU | |
| 28 29 |  | 
| 29 30 | 
             
                # Common instance methods
         | 
| 30 31 | 
             
                module InstanceMethods
         | 
| 31 | 
            -
                  def logger(file = ENV['PPS_COMMONS_DEFAULT_LOG_LOCATION'])
         | 
| 32 | 
            +
                  def logger(file = ENV['PPS_COMMONS_DEFAULT_LOG_LOCATION'] || STDOUT)
         | 
| 32 33 | 
             
                    if @logger.nil?
         | 
| 33 | 
            -
                      log =  | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
                         | 
| 37 | 
            -
             | 
| 34 | 
            +
                      log = file.eql?(STDOUT) ? file : nil
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                      unless file.eql? STDOUT
         | 
| 37 | 
            +
                        log = ::File.expand_path(file)
         | 
| 38 | 
            +
                        unless ::File.exist?(log)
         | 
| 39 | 
            +
                          log_dir = File.dirname(log)
         | 
| 40 | 
            +
                          unless ::Dir.exist?(log_dir)
         | 
| 41 | 
            +
                            ::FileUtils.mkdir_p(log_dir)
         | 
| 42 | 
            +
                          end
         | 
| 43 | 
            +
                          ::File.new(log, 'a+')
         | 
| 38 44 | 
             
                        end
         | 
| 39 | 
            -
                        ::File.new(log, 'a+')
         | 
| 40 45 | 
             
                      end
         | 
| 41 46 |  | 
| 42 47 | 
             
                      Logger.new(log)
         | 
    
        data/lib/pps_commons/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pps_commons
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.17
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Adam Phillipps
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2018-01-18 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: aws-sdk-s3
         | 
| @@ -124,6 +124,7 @@ files: | |
| 124 124 | 
             
            - Rakefile
         | 
| 125 125 | 
             
            - bin/console
         | 
| 126 126 | 
             
            - bin/setup
         | 
| 127 | 
            +
            - info
         | 
| 127 128 | 
             
            - lib/pps_commons.rb
         | 
| 128 129 | 
             
            - lib/pps_commons/chef_comms.rb
         | 
| 129 130 | 
             
            - lib/pps_commons/delegation_agent.rb
         |