rollups 0.3.1 → 0.3.2
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/CHANGELOG.md +4 -0
 - data/lib/rollup/aggregator.rb +9 -2
 - data/lib/rollup/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 0e5c6fead572e785077c4ab0afd4e627dd152580a5f7d06dfaec55cca368892f
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: c48a223298b96a5404fda29192f6453e92f6f00fe10b53db5dfc633fe46696c8
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: d831822c3b6c4b70d119a2bcd704ae579d8f444cf7ffce388842aa5fc7841d0435669a203b9c54a55629088dfb553ead3288a6282d9f4ea5d5b9b9f737222086
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: af477019c11b0a75548d4181e7cf693d75487565ab99dd4b469bc3d748902d0cb802f2f868509cc71eb914e37796a435b013bbcc42a82a3189f9be0779b43c19
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/lib/rollup/aggregator.rb
    CHANGED
    
    | 
         @@ -43,7 +43,7 @@ class Rollup 
     | 
|
| 
       43 
43 
     | 
    
         
             
                  raise ArgumentError, "Cannot use range and current together" if range && !current.nil?
         
     | 
| 
       44 
44 
     | 
    
         | 
| 
       45 
45 
     | 
    
         
             
                  current = true if current.nil?
         
     | 
| 
       46 
     | 
    
         
            -
                  time_zone  
     | 
| 
      
 46 
     | 
    
         
            +
                  time_zone = Rollup.time_zone if time_zone.nil?
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
48 
     | 
    
         
             
                  gd_options = {
         
     | 
| 
       49 
49 
     | 
    
         
             
                    current: current
         
     | 
| 
         @@ -68,7 +68,14 @@ class Rollup 
     | 
|
| 
       68 
68 
     | 
    
         
             
                      # for MySQL on Ubuntu 18.04 (and likely other platforms)
         
     | 
| 
       69 
69 
     | 
    
         
             
                      if max_time.is_a?(String)
         
     | 
| 
       70 
70 
     | 
    
         
             
                        utc = ActiveSupport::TimeZone["Etc/UTC"]
         
     | 
| 
       71 
     | 
    
         
            -
                        max_time = 
     | 
| 
      
 71 
     | 
    
         
            +
                        max_time =
         
     | 
| 
      
 72 
     | 
    
         
            +
                          if Utils.date_interval?(interval)
         
     | 
| 
      
 73 
     | 
    
         
            +
                            max_time.to_date
         
     | 
| 
      
 74 
     | 
    
         
            +
                          else
         
     | 
| 
      
 75 
     | 
    
         
            +
                            t = utc.parse(max_time)
         
     | 
| 
      
 76 
     | 
    
         
            +
                            t = t.in_time_zone(time_zone) if time_zone
         
     | 
| 
      
 77 
     | 
    
         
            +
                            t
         
     | 
| 
      
 78 
     | 
    
         
            +
                          end
         
     | 
| 
       72 
79 
     | 
    
         
             
                      end
         
     | 
| 
       73 
80 
     | 
    
         | 
| 
       74 
81 
     | 
    
         
             
                      # aligns perfectly if time zone doesn't change
         
     | 
    
        data/lib/rollup/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rollups
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Andrew Kane
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-02-10 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activesupport
         
     | 
| 
         @@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       75 
75 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       76 
76 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       77 
77 
     | 
    
         
             
            requirements: []
         
     | 
| 
       78 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 78 
     | 
    
         
            +
            rubygems_version: 3.5.3
         
     | 
| 
       79 
79 
     | 
    
         
             
            signing_key:
         
     | 
| 
       80 
80 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       81 
81 
     | 
    
         
             
            summary: Rollup time-series data in Rails
         
     |