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 +4 -4
- data/bin/pusher-hackathon +16 -17
- data/lib/hackathon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92d236dbac89e7bd3588f5b7a21ad8ffa3d59278
|
4
|
+
data.tar.gz: cd7547f1b1f14c0add753b209d6796aeaf5954f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
30
|
-
|
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
|
data/lib/hackathon/version.rb
CHANGED