twistage_stats_reports 1.0.4 → 1.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96843d61c0c780f737a4c7c3ce988393280e776a
4
- data.tar.gz: 36948d681790a554129f74230c7d0c05b3e958bd
3
+ metadata.gz: 644e736c7d0bf9a19af89d5a6a8d17b080348c17
4
+ data.tar.gz: 0d9308fafdce168a5869f7d077a2fecefbacf460
5
5
  SHA512:
6
- metadata.gz: fd27c7b461a3b8216faae98c2780bffd69d37bbd3652b23f1a57f351b754b36912d1a5b6e4c85e8341844306db91016d634e56b5dcc45f4db3243d9b7b85827c
7
- data.tar.gz: 12badcab2c97c31f7cac569c1533490fc150841556fbc14011bff3bcad98c9c9e079c5f3fce1b5ff06a470b5a481fa4648f2eed0e082c62edbe82fef0aa30853
6
+ metadata.gz: eb887a9cf0f7a8df07d88421eb1b0eaf02e59acf8a2862a7ff51cf92336d9ca30b4749216b7562cb956d61d60911511508b11fb69415032b688772fc93a1a448
7
+ data.tar.gz: 0adccf1491e10a67602763ab9489bacd988074968b2fee977dd17f71cc81ecd4180212765d57b3df50c10cb8ff60756e21a9abbb0eee1a7d30a4e9c1789f01e8
@@ -9,15 +9,15 @@ class Stats::BreakdownReport < Stats::EventReport
9
9
 
10
10
  @container = options[:container]
11
11
 
12
- @assets_uploaded = options[:assets_uploaded] || 0
13
- @assets_encoded = options[:assets_encoded] || 0
12
+ @assets_uploaded = options[:assets_uploaded].to_i
13
+ @assets_encoded = options[:assets_encoded].to_i
14
14
 
15
15
  @query_time = nil
16
16
 
17
- @duration_uploaded = self.class.format_duration(options[:duration_uploaded].to_f || 0)
17
+ @duration_uploaded = self.class.format_duration(options[:duration_uploaded].to_f)
18
18
  @duration_uploaded_min = self.class.format_duration(@duration_uploaded / 60.seconds.to_f)
19
19
 
20
- @duration_encoded = self.class.format_duration(options[:duration_encoded].to_f || 0)
20
+ @duration_encoded = self.class.format_duration(options[:duration_encoded].to_f)
21
21
  @duration_encoded_min = self.class.format_duration(@duration_encoded / 60.seconds.to_f)
22
22
  end
23
23
 
@@ -15,22 +15,22 @@ class Stats::PublishReport < Stats::EventReport
15
15
 
16
16
  @label = options[:label]
17
17
 
18
- @assets_uploaded = options[:assets_uploaded]
19
- @assets_encoded = options[:assets_encoded]
18
+ @assets_uploaded = options[:assets_uploaded].to_i
19
+ @assets_encoded = options[:assets_encoded].to_i
20
20
 
21
21
  @query_time = nil
22
22
 
23
- @bytes_uploaded = options[:bytes_uploaded]
24
- @bytes_uploaded_gb = self.class.format_gb(options[:bytes_uploaded] / 1.gigabyte.to_f)
23
+ @bytes_uploaded = options[:bytes_uploaded].to_i
24
+ @bytes_uploaded_gb = self.class.format_gb(options[:bytes_uploaded].to_i / 1.gigabyte.to_f)
25
25
 
26
- @bytes_encoded = options[:bytes_encoded]
27
- @bytes_encoded_gb = self.class.format_gb(options[:bytes_encoded] / 1.gigabyte.to_f)
26
+ @bytes_encoded = options[:bytes_encoded].to_i
27
+ @bytes_encoded_gb = self.class.format_gb(options[:bytes_encoded].to_i / 1.gigabyte.to_f)
28
28
 
29
- @duration_uploaded = self.class.format_duration(options[:duration_uploaded])
30
- @duration_uploaded_min = self.class.format_duration(options[:duration_uploaded] / 60.seconds.to_f)
29
+ @duration_uploaded = self.class.format_duration(options[:duration_uploaded].to_f)
30
+ @duration_uploaded_min = self.class.format_duration(options[:duration_uploaded].to_f / 60.seconds.to_f)
31
31
 
32
- @duration_encoded = self.class.format_duration(options[:duration_encoded])
33
- @duration_encoded_min = self.class.format_duration(options[:duration_encoded] / 60.seconds.to_f)
32
+ @duration_encoded = self.class.format_duration(options[:duration_encoded].to_f)
33
+ @duration_encoded_min = self.class.format_duration(options[:duration_encoded].to_f / 60.seconds.to_f)
34
34
  end
35
35
 
36
36
  def self.csv_keys
@@ -7,9 +7,9 @@ class Stats::SourceReport < Stats::EventReport
7
7
  def initialize(options = {})
8
8
  @label = options[:label]
9
9
  @publish_type = options[:publish_type]
10
- @publishes = options[:publishes] || 0
10
+ @publishes = options[:publishes].to_i
11
11
  @query_time = nil
12
- @duration = self.class.format_duration(options[:duration] || 0)
12
+ @duration = self.class.format_duration(options[:duration].to_f)
13
13
  @duration_min = self.class.format_duration(@duration / 60.seconds.to_f)
14
14
  end
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twistage_stats_reports
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Wegman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-09 00:00:00.000000000 Z
11
+ date: 2015-07-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Shared data structures and logic for interacting with the Twistage Stats
14
14
  service