rest_shifter 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +4 -0
- data/README.md +2 -2
- data/lib/rest_shifter/commands/start.rb +2 -1
- data/lib/rest_shifter/shifter.rb +2 -2
- data/lib/rest_shifter/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: 2c859be3899d8c25c59062d2fb4399ef35c53c74
|
4
|
+
data.tar.gz: 6ebf6006ef0c888aebdf584d9a383ab0be394547
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9f4505f9b6f8eea95f13a905f293f988d9493fa4c2697de424a030d8cf74c1a88ad8f76601f7bf98e5a8f75138df7803c2a174044f307d7e28ea5a3b6d1f10b
|
7
|
+
data.tar.gz: 355021f9333d22a311fe96334f70b9e2ef3d0b237cc648a38b8b097ba60feb0f7d08372523e534343a4d26e1dc78871063ccf8db224927a917387685d02e8625
|
data/CHANGES
CHANGED
data/README.md
CHANGED
@@ -66,9 +66,9 @@ Start the service in a different port than 8080
|
|
66
66
|
|
67
67
|
Optionally, you can start the service over https using captal "S":
|
68
68
|
|
69
|
-
$ rest_shifter -S /path/to/file.crt /path/to/file.key
|
69
|
+
$ rest_shifter -S 4433 /path/to/file.crt /path/to/file.key
|
70
70
|
|
71
|
-
Go to a browser and open the url: [http://localhost:
|
71
|
+
Go to a browser and open the url: [http://localhost:8080/hello_world](http://localhost:8080/hello_world)
|
72
72
|
|
73
73
|
You should see the following JSON:
|
74
74
|
|
@@ -9,12 +9,13 @@ class RestShifter::Commands::Start
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def run_secure(args=ARGV)
|
12
|
+
port = args.shift
|
12
13
|
crt = args.shift
|
13
14
|
key = args.shift
|
14
15
|
|
15
16
|
prepare_server
|
16
17
|
Shifter.use Rack::SSL
|
17
|
-
Shifter.run_ssl! crt, key
|
18
|
+
Shifter.run_ssl! port, crt, key
|
18
19
|
end
|
19
20
|
|
20
21
|
private
|
data/lib/rest_shifter/shifter.rb
CHANGED
@@ -7,9 +7,9 @@ module RestShifter; end
|
|
7
7
|
|
8
8
|
class Shifter < Sinatra::Base
|
9
9
|
|
10
|
-
def self.run_ssl! crt, key
|
10
|
+
def self.run_ssl! port, crt, key
|
11
11
|
server_options = {
|
12
|
-
:Port =>
|
12
|
+
:Port => port.to_i,
|
13
13
|
:bind => '0.0.0.0',
|
14
14
|
:SSLEnable => true,
|
15
15
|
:SSLCertificate => OpenSSL::X509::Certificate.new(File.open(crt).read),
|
data/lib/rest_shifter/version.rb
CHANGED