alexa_ruby 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 614cfabdfe8ff5b456181b71845955ef4f42cc70
4
- data.tar.gz: 272c62255de2f0ffe5ad774fa3cb87a331e6253d
3
+ metadata.gz: c64a178ea35c5280218a441dcc9993679965990c
4
+ data.tar.gz: aaf9815ad8f4fcd99e9a9f623aeb973eb9ffdbdd
5
5
  SHA512:
6
- metadata.gz: ca93f9950a01cb3dcbf3337ba4e669d8b7de7aa9af49cc3d9800ef3205286a04fd6a459838026ada39b1e2dc6be877df869061018863824f2aca5bd730d8f035
7
- data.tar.gz: 16a2a33ca5ec93c3af3a0c7cd519dd4d3ec89871ef2afa907a4b659055ee05cb54db0825a87ee165dd24e31c334b397c459bae2596e113077faa069485508629
6
+ metadata.gz: ff171ca1e709b0fde16930e42a9e49f08b5d788eda174de7ea727356b5e82d0a958646d6dbb825b2bf8fb3c33694ecb10d4e9dcc423b06ad1b6a0c040660f928
7
+ data.tar.gz: fadf34ec57b1d7aaf6a4b0c9ce9f2cec734a02769c49378e3f58fd2bd00d41a716e8991ca657d7d99092552d81680a0ee10d12b6d6f4c8e31dbfb9f77779f2ba
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/alexa_ruby.svg)](https://badge.fury.io/rb/alexa_ruby)
4
4
  [![Build Status](https://travis-ci.org/mulev/alexa-ruby.svg?branch=master)](https://travis-ci.org/mulev/alexa-ruby)
5
+ [![CircleCI](https://circleci.com/bb/mmulev/alexa-ruby/tree/master.svg?style=svg&circle-token=6a8088af16c301880712400c2db43ed32e1291f3)](https://circleci.com/bb/mmulev/alexa-ruby/tree/master)
5
6
  [![Code Climate](https://codeclimate.com/github/mulev/alexa-ruby/badges/gpa.svg)](https://codeclimate.com/github/mulev/alexa-ruby)
6
7
  [![Coverage Status](https://coveralls.io/repos/github/mulev/alexa-ruby/badge.svg?branch=develop)](https://coveralls.io/github/mulev/alexa-ruby?branch=develop)
7
8
 
@@ -15,7 +15,7 @@ module AlexaRuby
15
15
  raise ArgumentError, 'Audio URL must be a valid ' \
16
16
  'SSL-enabled (HTTPS) endpoint'
17
17
  end
18
- token = params[:token] || SecureRandom.uuid
18
+ token = token(params[:token])
19
19
  offset = params[:offset] || 0
20
20
  build_directive('AudioPlayer.Play', url, token, offset)
21
21
  end
@@ -53,5 +53,13 @@ module AlexaRuby
53
53
  def invalid_url?(url)
54
54
  URI.parse(url).scheme != 'https'
55
55
  end
56
+
57
+ # Get station token
58
+ #
59
+ # @param token [String] station token
60
+ # @return [Boolean]
61
+ def token(token)
62
+ token.nil? || token.empty? ? SecureRandom.uuid : token
63
+ end
56
64
  end
57
65
  end
@@ -1,3 +1,3 @@
1
1
  module AlexaRuby
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexa_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Mulev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-02 00:00:00.000000000 Z
11
+ date: 2017-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler