bifrost-client 0.1.0 → 0.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
  SHA256:
3
- metadata.gz: 3354b44b58bfe9235b57e656d7f3aef5899ef15e9b9c8aaaf6cf85383a48701f
4
- data.tar.gz: 300fcfaf94f4f8c0499efd7cfd16ce7c1548da46e2d63ec2e59772dcdc457cae
3
+ metadata.gz: 8ad06c57701c03134c8e27053d76423bce2be19016dd54b67342976ba93b41d7
4
+ data.tar.gz: a04a78603b1d759d8a4f5266c00673d07a71335d7d0e51c1fd24bd22308be2ae
5
5
  SHA512:
6
- metadata.gz: 6967087f3458d75605e1b85c002bedaf3712513ac7d2c79017c7b059f26bb318999f982c549d6bfa8cd7682903e496b9cf4a6ff5e31589fbbfb19f1cba08251b
7
- data.tar.gz: 696cd1fb5dfddedd6e4848c66d666b5873cbf66ff1f5fd8a6ec9b2eb7926d54d72303de1f8208ce333c53760bc17ec27b9eeef72b7bf0ded74669f116e8b196e
6
+ metadata.gz: 7e0d57e6c16576ea65c646b6a79b604f64a14da074ff18e254b804de503315de2ae6d210690a74f79b7d5fd8d05eaa8896f5a417e5e09e18a3c449c0d6af609c
7
+ data.tar.gz: 1bad75eb3c3f69cf376e70b683ff733a372d449d1f4d60deb060659200fb478d61152c4f57ed05d2d4fc99f4f8b8ecd4149fbfba0d28a64a2b96de3071740654
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bifrost-client (0.1.0)
4
+ bifrost-client (0.1.1)
5
5
  jwt (>= 2.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Bifrost Ruby Client
2
2
 
3
- A ruby client helper for the [bifrost crystal](https://github.com/alternatelabs/bifrost) websockets server.
3
+ [![Build Status](https://travis-ci.org/alternatelabs/bifrost-ruby-client.svg?branch=master)](https://travis-ci.org/alternatelabs/bifrost-ruby-client)
4
+
5
+ A ruby client library for the [bifrost crystal](https://github.com/alternatelabs/bifrost) websockets server.
4
6
 
5
7
  ## Installation
6
8
 
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Bifrost::Client::VERSION
9
9
  spec.authors = ["Pete Hawkins"]
10
10
  spec.email = ["pete@alternatelabs.co"]
11
+ spec.metadata = { "source_code_uri" => "https://github.com/alternatelabs/bifrost-ruby-client" }
11
12
 
12
13
  spec.summary = %q{Ruby client library for the bifrost crystal websocket server}
13
14
  spec.description = %q{Bifrost is a crystal websocket server, this is a client library to simplify broadcasting messages to it.}
data/bin/rake ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rake", "rake")
data/bin/rspec ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rspec-core", "rspec")
@@ -19,7 +19,7 @@ module Bifrost
19
19
  event: event,
20
20
  data: data
21
21
  },
22
- exp: Time.now.to_i + 3600
22
+ exp: Time.now.to_i + 60
23
23
  }
24
24
  jwt = JWT.encode(data, jwt_secret, "HS512")
25
25
  uri = URI.parse(bifrost_server_url)
@@ -41,7 +41,7 @@ module Bifrost
41
41
  end
42
42
 
43
43
  def token_for(channels:)
44
- payload = { channels: channels }
44
+ payload = { channels: channels, exp: Time.now.to_i + 60 }
45
45
  JWT.encode(payload, jwt_secret, "HS512")
46
46
  end
47
47
  end
@@ -1,5 +1,5 @@
1
1
  module Bifrost
2
2
  class Client
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bifrost-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Hawkins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-17 00:00:00.000000000 Z
11
+ date: 2018-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -98,13 +98,16 @@ files:
98
98
  - Rakefile
99
99
  - bifrost-client.gemspec
100
100
  - bin/console
101
+ - bin/rake
102
+ - bin/rspec
101
103
  - bin/setup
102
104
  - lib/bifrost/client.rb
103
105
  - lib/bifrost/client/version.rb
104
106
  homepage: https://github.com/alternatelabs/bifrost
105
107
  licenses:
106
108
  - MIT
107
- metadata: {}
109
+ metadata:
110
+ source_code_uri: https://github.com/alternatelabs/bifrost-ruby-client
108
111
  post_install_message:
109
112
  rdoc_options: []
110
113
  require_paths: