yt 0.24.4 → 0.24.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: 13f722082a0563925b7f9d95ece5ff723fd96b7d
4
- data.tar.gz: 0cf90eda3d4d1170a0b6c618c193f864af9c3b89
3
+ metadata.gz: fbc2354a912d7ad995c5d19197b47378bddb8a93
4
+ data.tar.gz: 808ff6d0a67518c1dd92f5c08739c0dd0b41b91b
5
5
  SHA512:
6
- metadata.gz: 34b643c9657ad003fefcba80cd3bc7ec286813f323f6d947854b704f413f161093b031c8113aa93fd63f1fc4caa264897cbeca4cf950c7c7bdab5b50dd03e335
7
- data.tar.gz: ae540eff03ac2222382408bb910c9bb10abfffbac6ef3b5cb524483f947c21ca8631a5acd41e9f275f9967fb6c1421166d0253b65f80a78cddce04ac5e7a0a49
6
+ metadata.gz: 5911cafa3a60922aad8fd6d9ad6c381c615bf5c059e8c2e75fa589098bfe0c388e3c32aa27186fd6e3f696eb54c08dee7be588ab2d87d2ba4a2a5092150bb17a
7
+ data.tar.gz: 543a13299e27c989ffbf58bcdb5ac66ff8ab908c3a4757a23f62a43f3704ea4a5852945f0c4b6f26f0901e8d73085d1d77d821898fd2d20f36c4e79ab26d6f17
@@ -6,6 +6,10 @@ For more information about changelogs, check
6
6
  [Keep a Changelog](http://keepachangelog.com) and
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
+ ## 0.24.5 - 2015-06-08
10
+
11
+ * [ENHANCEMENT] When grouping by device type, return results sorted by descending views
12
+
9
13
  ## 0.24.4 - 2015-06-05
10
14
 
11
15
  * [ENHANCEMENT] When grouping by traffic source, country, state or playback location, return results sorted by descending views
data/README.md CHANGED
@@ -41,7 +41,7 @@ To install on your system, run
41
41
 
42
42
  To use inside a bundled Ruby project, add this line to the Gemfile:
43
43
 
44
- gem 'yt', '~> 0.24.4'
44
+ gem 'yt', '~> 0.24.5'
45
45
 
46
46
  Since the gem follows [Semantic Versioning](http://semver.org),
47
47
  indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
@@ -76,7 +76,7 @@ module Yt
76
76
  end
77
77
  if dimension == :month
78
78
  hash = hash.transform_values{|h| h.sort_by{|range, v| range.first}.to_h}
79
- elsif dimension.in? [:traffic_source, :country, :state, :playback_location]
79
+ elsif dimension.in? [:traffic_source, :country, :state, :playback_location, :device_type]
80
80
  hash = hash.transform_values{|h| h.sort_by{|range, v| -v}.to_h}
81
81
  end
82
82
  (@metrics.one? || @metrics.keys == [:earnings, :estimated_minutes_watched]) ? hash[@metrics.keys.first] : hash
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.24.4'
2
+ VERSION = '0.24.5'
3
3
  end
@@ -404,6 +404,11 @@ describe Yt::Channel, :partner do
404
404
  expect(views.keys).to all(be_instance_of Symbol)
405
405
  expect(views.values).to all(be_an Integer)
406
406
  end
407
+
408
+ specify 'and are returned sorted by descending views' do
409
+ views = channel.views range.merge by: :device_type
410
+ expect(views.values.sort.reverse).to eq views.values
411
+ end
407
412
  end
408
413
 
409
414
  describe 'views can be grouped by country' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.4
4
+ version: 0.24.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-05 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport