all_seeing_eye 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/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.0. | 
| 1 | 
            +
            0.0.12
         | 
    
        data/all_seeing_eye.gemspec
    CHANGED
    
    | @@ -5,11 +5,11 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{all_seeing_eye}
         | 
| 8 | 
            -
              s.version = "0.0. | 
| 8 | 
            +
              s.version = "0.0.12"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Josh Symonds"]
         | 
| 12 | 
            -
              s.date = %q{2011-08- | 
| 12 | 
            +
              s.date = %q{2011-08-11}
         | 
| 13 13 | 
             
              s.default_executable = %q{all-seeing-eye}
         | 
| 14 14 | 
             
              s.description = %q{AllSeeingEye observes all requests, with parameters that you specify, to Redis. Then it composes them into graphs for you to see.}
         | 
| 15 15 | 
             
              s.email = %q{veraticus@gmail.com}
         | 
| @@ -18,8 +18,8 @@ class AllSeeingEye | |
| 18 18 | 
             
                        AllSeeingEye::Request.create(hash)
         | 
| 19 19 | 
             
                        Rails.logger.info('+++ Request watched by AllSeeingEye')
         | 
| 20 20 | 
             
                      }
         | 
| 21 | 
            -
                    rescue Timeout::Error
         | 
| 22 | 
            -
                      Rails.logger.info('+++ Request not watched by AllSeeingEye; it took too long to complete')
         | 
| 21 | 
            +
                    rescue Timeout::Error, Errno::EAGAIN
         | 
| 22 | 
            +
                      Rails.logger.info('+++ Request not watched by AllSeeingEye; it took too long to complete or the server was unreachable')
         | 
| 23 23 | 
             
                    end
         | 
| 24 24 | 
             
                  end
         | 
| 25 25 | 
             
                end
         | 
    
        data/lib/all_seeing_eye/model.rb
    CHANGED
    
    | @@ -110,7 +110,7 @@ class AllSeeingEye::Model | |
| 110 110 | 
             
              def self.conglomerate(array, options = {})
         | 
| 111 111 | 
             
                return [] if array.empty?
         | 
| 112 112 |  | 
| 113 | 
            -
                options = {:granularity =>  | 
| 113 | 
            +
                options = {:granularity => 100}.merge(options)
         | 
| 114 114 | 
             
                if !array.first.score.nil?
         | 
| 115 115 | 
             
                  array = array.sort{|a, b| a.score <=> b.score} 
         | 
| 116 116 | 
             
                else
         | 
| @@ -13,11 +13,11 @@ | |
| 13 13 | 
             
                <div id='graph'></div>
         | 
| 14 14 |  | 
| 15 15 | 
             
                <script type='text/javascript'>
         | 
| 16 | 
            -
                  var ids = [ <%= @requests. | 
| 16 | 
            +
                  var ids = [ <%= @requests[0..10].collect{|r| "'#{r.first}'"}.join(',') %>]
         | 
| 17 17 |  | 
| 18 18 | 
             
                  $.plot($("#graph"),
         | 
| 19 19 | 
             
                    [{
         | 
| 20 | 
            -
                     data: [ <%= @requests. | 
| 20 | 
            +
                     data: [ <%= @requests[0..10].enum_for(:each_with_index).collect {|f, i| "[#{i}, #{f.last}]"}.join(',') %> ],
         | 
| 21 21 | 
             
                     label: 'requests'
         | 
| 22 22 | 
             
                    }],
         | 
| 23 23 | 
             
                    {
         | 
| @@ -27,7 +27,7 @@ | |
| 27 27 | 
             
                     grid: { hoverable: true, clickable: true },
         | 
| 28 28 | 
             
                     xaxis: {
         | 
| 29 29 | 
             
                       autoscaleMargin: 0.05,
         | 
| 30 | 
            -
                       ticks: [ <%= @requests. | 
| 30 | 
            +
                       ticks: [ <%= @requests[0..10].enum_for(:each_with_index).collect {|f, i| "[#{i}, '#{f.first.split(' ').join('\n').gsub('/','/\n')}']"}.join(',') %> ]
         | 
| 31 31 | 
             
                     },
         | 
| 32 32 | 
             
                     yaxis: {
         | 
| 33 33 | 
             
                       autoscaleMargin: 0.01
         | 
| @@ -38,8 +38,8 @@ class AllSeeingEye | |
| 38 38 |  | 
| 39 39 | 
             
                  def tab(name, prefix = nil)
         | 
| 40 40 | 
             
                    dname = name.to_s.downcase
         | 
| 41 | 
            -
                    path = url_path(dname)
         | 
| 42 | 
            -
                    "<li #{class_if_current( | 
| 41 | 
            +
                    path = url_path("#{prefix.nil? ? '' : "#{prefix}/"}" + dname)
         | 
| 42 | 
            +
                    "<li #{class_if_current(dname)}><a href='#{path}'>#{humanize name}</a></li>"
         | 
| 43 43 | 
             
                  end
         | 
| 44 44 |  | 
| 45 45 | 
             
                  def round(float, n = 2)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: all_seeing_eye
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 7
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 0
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.0. | 
| 9 | 
            +
              - 12
         | 
| 10 | 
            +
              version: 0.0.12
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Josh Symonds
         | 
| @@ -15,7 +15,7 @@ autorequire: | |
| 15 15 | 
             
            bindir: bin
         | 
| 16 16 | 
             
            cert_chain: []
         | 
| 17 17 |  | 
| 18 | 
            -
            date: 2011-08- | 
| 18 | 
            +
            date: 2011-08-11 00:00:00 -05:00
         | 
| 19 19 | 
             
            default_executable: all-seeing-eye
         | 
| 20 20 | 
             
            dependencies: 
         | 
| 21 21 | 
             
            - !ruby/object:Gem::Dependency 
         |