grnds-looker-hmac 0.0.1 → 0.0.2

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: b4b3290ae1a93dc669e4a66a17144535a4296808
4
- data.tar.gz: b7378ec4b8ab422ca944da294b6ebcecce05ac8e
3
+ metadata.gz: 4f9c6c4ec8853cea177cb230ce3e50064989e5c5
4
+ data.tar.gz: 6a1468e72ce071c40caae1ccc826818a81a5d23f
5
5
  SHA512:
6
- metadata.gz: f0a4aa1836835ad5a0898b972376234e86904ebf8ceee751ce2e26cec6b00489dc5a3c5fed8f411ff7ab0e75cfc664575ced6f9a9ff26a3b6e65485261909b79
7
- data.tar.gz: b521736b8d04dbae73125dda4e4cd095f0f77591a7adc40907f2cad44e543d5f3bf9df4570b7804366198f76e116351b662437689c7958971fc8959c3b8c8516
6
+ metadata.gz: 7ab9842c119b062e9c044f41f43be90eeebf382c6627c6781e73df8b3fa29c89a71808fa41a527d4b15176a145f35f1a7c40eb596d3d6332a0b0bbe12ba58d15
7
+ data.tar.gz: 95f9619956da988147b134f4c7c06226dc6eec66662ef4912962df575f055cbbb486669afeab0a7ddc6c9467681644cf5fbad466a9a368e49f94c88150218c09
data/README.md CHANGED
@@ -1,14 +1,12 @@
1
1
  # Grnds::Looker::Hmac
2
2
 
3
- Looker message authentication code helper for Grandrounds
3
+ A simple looker.com authentication code helper for Grandrounds
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- ```ruby
10
- gem 'grnds-looker-hmac'
11
- ```
9
+ gem 'grnds-looker-hmac'
12
10
 
13
11
  And then execute:
14
12
 
@@ -20,7 +18,6 @@ Or install it yourself as:
20
18
 
21
19
  ## Usage
22
20
 
23
- ```
24
21
  #first set your LOOKER_EMBED_SECRET env var
25
22
 
26
23
  config = {
@@ -36,12 +33,3 @@ Or install it yourself as:
36
33
 
37
34
  signer = Grnds::Looker::Hmac::SignedUrlGenerator.new(config)
38
35
  signedUrl = signer.getUrl
39
- ```
40
-
41
- ## Contributing
42
-
43
- 1. Fork it ( https://github.com/[my-github-username]/grnds-looker-hmac/fork )
44
- 2. Create your feature branch (`git checkout -b my-new-feature`)
45
- 3. Commit your changes (`git commit -am 'Add some feature'`)
46
- 4. Push to the branch (`git push origin my-new-feature`)
47
- 5. Create a new Pull Request
@@ -11,6 +11,7 @@ module Grnds
11
11
  class SignedUrlGenerator
12
12
 
13
13
  def initialize(config)
14
+ ENV['LOOKER_EMBED_SECRET'] || raise('no LOOKER_EMBED_SECRET provided')
14
15
  @config = config
15
16
  end
16
17
 
@@ -46,7 +47,7 @@ module Grnds
46
47
 
47
48
  signature = Base64.encode64(
48
49
  OpenSSL::HMAC.digest(
49
- OpenSSL::Digest::Digest.new('sha1'),
50
+ OpenSSL::Digest.new('sha1'),
50
51
  secret,
51
52
  string_to_sign.force_encoding('utf-8'))).strip
52
53
 
@@ -1,7 +1,7 @@
1
1
  module Grnds
2
2
  module Looker
3
3
  module Hmac
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grnds-looker-hmac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bradley Johnson
@@ -47,7 +47,6 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - ".gitignore"
49
49
  - Gemfile
50
- - LICENSE.txt
51
50
  - README.md
52
51
  - Rakefile
53
52
  - grnds-looker-hmac.gemspec
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 Bradley Johnson
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.