google_otg 1.0.12 → 1.0.13
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 +1 -1
 - data/google_otg.gemspec +2 -2
 - data/lib/google_otg.rb +9 -1
 - metadata +2 -2
 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            1.0. 
     | 
| 
      
 1 
     | 
    
         
            +
            1.0.13
         
     | 
    
        data/google_otg.gemspec
    CHANGED
    
    | 
         @@ -5,11 +5,11 @@ 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.name = %q{google_otg}
         
     | 
| 
       8 
     | 
    
         
            -
              s.version = "1.0. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "1.0.13"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       11 
11 
     | 
    
         
             
              s.authors = ["esilverberg"]
         
     | 
| 
       12 
     | 
    
         
            -
              s.date = %q{2009-10- 
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = %q{2009-10-06}
         
     | 
| 
       13 
13 
     | 
    
         
             
              s.description = %q{Include Google's Over Time Graph in your app}
         
     | 
| 
       14 
14 
     | 
    
         
             
              s.email = %q{eric@ericsilverberg.com}
         
     | 
| 
       15 
15 
     | 
    
         
             
              s.extra_rdoc_files = [
         
     | 
    
        data/lib/google_otg.rb
    CHANGED
    
    | 
         @@ -66,6 +66,10 @@ module GoogleOtg 
     | 
|
| 
       66 
66 
     | 
    
         
             
                    src = args.has_key?(:src) ? args[:src] : "http://www.google.com/analytics/static/flash/OverTimeGraph.swf"
         
     | 
| 
       67 
67 
     | 
    
         | 
| 
       68 
68 
     | 
    
         
             
                    if hits.is_a?(Array) and hits[0].is_a?(Array)
         
     | 
| 
      
 69 
     | 
    
         
            +
                        lower_bound_time = nil
         
     | 
| 
      
 70 
     | 
    
         
            +
                        hits.map{|series| lower_bound_time = series[0] if !lower_bound_time || series[0].created_at < lower_bound_time.created_at}
         
     | 
| 
      
 71 
     | 
    
         
            +
                        args[:lower_bound_time] = lower_bound_time if lower_bound_time 
         
     | 
| 
      
 72 
     | 
    
         
            +
                        
         
     | 
| 
       69 
73 
     | 
    
         
             
                        range = hits.map{|h| hits_to_otg_range(h, args) }
         
     | 
| 
       70 
74 
     | 
    
         
             
                    else
         
     | 
| 
       71 
75 
     | 
    
         
             
                        range = [hits_to_otg_range(hits, args)]
         
     | 
| 
         @@ -232,7 +236,11 @@ eos 
     | 
|
| 
       232 
236 
     | 
    
         
             
                    now_floored = tz.local(now_days.year, now_days.month, now_days.day, 
         
     | 
| 
       233 
237 
     | 
    
         
             
                        now_minutes.hour, now_minutes.min, now_minutes.sec)
         
     | 
| 
       234 
238 
     | 
    
         | 
| 
       235 
     | 
    
         
            -
                     
     | 
| 
      
 239 
     | 
    
         
            +
                    if args[:lower_bound_time]
         
     | 
| 
      
 240 
     | 
    
         
            +
                        current = time_fn.call(args[:lower_bound_time])
         
     | 
| 
      
 241 
     | 
    
         
            +
                    else
         
     | 
| 
      
 242 
     | 
    
         
            +
                        current = hits.length > 0 ? time_fn.call(hits[0]) : now_floored
         
     | 
| 
      
 243 
     | 
    
         
            +
                    end
         
     | 
| 
       236 
244 
     | 
    
         | 
| 
       237 
245 
     | 
    
         
             
                    while (current < now_floored + range.minutes && range > 0) do
         
     | 
| 
       238 
246 
     | 
    
         
             
                        if hits_dict[current]
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: google_otg
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.13
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
7 
     | 
    
         
             
            - esilverberg
         
     | 
| 
         @@ -9,7 +9,7 @@ autorequire: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            date: 2009-10- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2009-10-06 00:00:00 -07:00
         
     | 
| 
       13 
13 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |