pusher-hackathon 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: 8bfb7898d724dc2880e699d9677b3f55dfa2e15b
4
- data.tar.gz: e7315ca90777f7b6e5cae550d53bbedb452cda2f
3
+ metadata.gz: 92d236dbac89e7bd3588f5b7a21ad8ffa3d59278
4
+ data.tar.gz: cd7547f1b1f14c0add753b209d6796aeaf5954f3
5
5
  SHA512:
6
- metadata.gz: a4760eb82d9ddf3c497924b6882a676052b65e6ed0d280f5941c2ecc4ae9c6ee5ba58be96ccee205c89ad5b05846fa4c9368a7a2a3f5ed970c9df9a392c048a6
7
- data.tar.gz: 901d402bfc121ac8e27e47604c55725c40421a186f5d14e40bc53730e6c5eea6de4f6b830b89ef718b28b41c6177d24ed80c25593ceaa6fd082fba2061746140
6
+ metadata.gz: 01c0a3a6aae52dfebc3c0c0cf3671db4875e3bcf4c9c3b19ce665b14d3deb3de840d857780a9f8816074b449e469d947f6c4c382dce2d08f77de9c6c70a63729
7
+ data.tar.gz: f51e10e952a50e34b8d8f10c4be69bc3e50d4915d2004d8f99bc904cab496abbd35e34b0163bdb6fe957c6bdb25738ee4dadc5b5ec98c012f6aa96d5ab308049
data/bin/pusher-hackathon CHANGED
@@ -4,31 +4,30 @@ require 'rubygems'
4
4
  require 'commander/import'
5
5
  require_relative '../lib/hackathon'
6
6
 
7
- program :version, '0.0.1'
7
+ program :version, PusherHackathon::VERSION
8
8
  program :description, 'A command-line tool to set up Pusher private- and presence-channel authentication for hackathons.'
9
9
 
10
10
  command :run do |c|
11
- c.syntax = 'pusher-hackathon run [options]'
12
- c.summary = 'Run your authentication endpoint on localhost'
13
- c.description = ''
14
- c.example 'description', 'pusher-hackathon run --id your_app_id --key your_app_key --secret your_app_secret'
15
- c.option '--key STRING', String, 'Your Pusher App Key'
16
- c.option '--secret STRING',String, 'Your Pusher App Secret'
17
- c.option '--id STRING', String,'Your Pusher App Id'
18
- c.option '--port NUMBER', String, '[optional] The port you wish to run the endpoint on'
19
- c.action do |args, options|
11
+ c.syntax = 'pusher-hackathon run [options]'
12
+ c.summary = 'Run your authentication endpoint on localhost'
13
+ c.description = ''
14
+ c.example 'description', 'pusher-hackathon run --id your_app_id --key your_app_key --secret your_app_secret'
15
+ c.option '--key STRING', String, 'Your Pusher App Key'
16
+ c.option '--secret STRING',String, 'Your Pusher App Secret'
17
+ c.option '--id STRING', String,'Your Pusher App Id'
18
+ c.option '--port NUMBER', String, '[optional] The port you wish to run the endpoint on'
19
+ c.action do |args, options|
20
20
 
21
- if !(options.key && options.secret && options.id)
22
- puts "Type: `pusher-hackathon run --id your_app_id --key your_app_key --secret your_app_secret`"
23
- else
21
+ if !(options.key && options.secret && options.id)
22
+ puts "Type: `pusher-hackathon run --id your_app_id --key your_app_key --secret your_app_secret`"
23
+ else
24
24
 
25
25
  Pusher.app_id = options.id
26
26
  Pusher.key = options.key
27
27
  Pusher.secret = options.secret
28
28
 
29
- PusherHackathon::AuthApp.set :port, options.port.to_i || 9090
30
- PusherHackathon::AuthApp.run!
29
+ PusherHackathon::AuthApp.set :port, (!options.port.to_i.zero?) || 9090
30
+ PusherHackathon::AuthApp.run!
31
+ end
31
32
  end
32
-
33
- end
34
33
  end
@@ -1,3 +1,3 @@
1
1
  module PusherHackathon
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pusher-hackathon
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
  - Jamie Patel