slanger 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of slanger might be problematic. Click here for more details.
- data/README.md +1 -1
- data/bin/slanger +7 -5
- data/lib/slanger/version.rb +3 -0
- metadata +3 -2
data/README.md
CHANGED
@@ -138,7 +138,7 @@ Slanger supports several configuration options, which can be supplied as command
|
|
138
138
|
|
139
139
|
-b or --webhook_url URL for webhooks. This argument is optional, if given webhook callbacks will be made http://pusher.com/docs/webhooks
|
140
140
|
|
141
|
-
-c or --
|
141
|
+
-c or --cert_chain_file Certificate chain file or the Certificate file for SSL support. This argument is optional, if given, SSL will be enabled
|
142
142
|
|
143
143
|
-v or --[no-]verbose This makes Slanger run verbosely, meaning WebSocket frames will be echoed to STDOUT. Useful for debugging
|
144
144
|
</pre>
|
data/bin/slanger
CHANGED
@@ -50,9 +50,9 @@ OptionParser.new do |opts|
|
|
50
50
|
options[:webhook_url] = p
|
51
51
|
end
|
52
52
|
|
53
|
-
opts.on '-c', '--
|
53
|
+
opts.on '-c', '--cert_chain_file FILE', "Certificate chain file for SSL transport" do |p|
|
54
54
|
options[:tls_options] ||= {}
|
55
|
-
options[:tls_options][:
|
55
|
+
options[:tls_options][:cert_chain_file] = p
|
56
56
|
end
|
57
57
|
|
58
58
|
opts.on "-v", "--[no-]verbose", "Run verbosely" do |v|
|
@@ -63,7 +63,6 @@ OptionParser.new do |opts|
|
|
63
63
|
|
64
64
|
%w<app_key secret>.each do |parameter|
|
65
65
|
unless options[parameter.to_sym]
|
66
|
-
puts options.inspect
|
67
66
|
puts "--#{parameter} STRING is a required argument. Use your Pusher #{parameter}.\n"
|
68
67
|
puts opts
|
69
68
|
exit
|
@@ -75,9 +74,9 @@ end
|
|
75
74
|
|
76
75
|
|
77
76
|
if options[:tls_options]
|
78
|
-
[:
|
77
|
+
[:cert_chain_file, :private_key_file].each do |param|
|
79
78
|
raise RuntimeError.new "--#{param} does not exist at `#{options[:tls_options][param]}`" unless File.exists? options[:tls_options][param]
|
80
|
-
raise RuntimeError.new "Both --
|
79
|
+
raise RuntimeError.new "Both --cert_chain_file and --private_key_file need to be specified" unless options[:tls_options][param]
|
81
80
|
end
|
82
81
|
end
|
83
82
|
|
@@ -104,6 +103,9 @@ EM.run do
|
|
104
103
|
puts ' "Y88P" '
|
105
104
|
puts "\n" * 2
|
106
105
|
|
106
|
+
puts "Running Slanger v.#{Slanger::VERSION}"
|
107
|
+
puts "\n"
|
108
|
+
|
107
109
|
puts "Slanger API server listening on port #{options[:api_port]}"
|
108
110
|
puts "Slanger WebSocket server listening on port #{options[:websocket_port]}"
|
109
111
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slanger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
@@ -319,6 +319,7 @@ files:
|
|
319
319
|
- lib/slanger/redis.rb
|
320
320
|
- lib/slanger/service.rb
|
321
321
|
- lib/slanger/subscription.rb
|
322
|
+
- lib/slanger/version.rb
|
322
323
|
- lib/slanger/web_socket_server.rb
|
323
324
|
- lib/slanger/webhook.rb
|
324
325
|
- slanger.rb
|