rest_shifter 0.0.17 → 0.0.18

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: ae98789e7da5e32296f2542c616c09709f0fa686
4
- data.tar.gz: ea503b73a6471f32675f4ac80f9f6d5cea7afa93
3
+ metadata.gz: 2c859be3899d8c25c59062d2fb4399ef35c53c74
4
+ data.tar.gz: 6ebf6006ef0c888aebdf584d9a383ab0be394547
5
5
  SHA512:
6
- metadata.gz: 56b60e234b9aaec4cc1cefaea2e11174714a0c974dc742083d3c101168ed521bc16d67bfb65cdc28b94cfcb7a3bc2f80b8bdad3bcb28972596f8ec11b24cef6a
7
- data.tar.gz: 0d050b17e94546b608df77f24354a293fa77112b7baa48ca61701b89370a8889f7d1caa1f5c9a78b56530bbe04bd98ef1cf167d13e674535b02ef40a446d4361
6
+ metadata.gz: e9f4505f9b6f8eea95f13a905f293f988d9493fa4c2697de424a030d8cf74c1a88ad8f76601f7bf98e5a8f75138df7803c2a174044f307d7e28ea5a3b6d1f10b
7
+ data.tar.gz: 355021f9333d22a311fe96334f70b9e2ef3d0b237cc648a38b8b097ba60feb0f7d08372523e534343a4d26e1dc78871063ccf8db224927a917387685d02e8625
data/CHANGES CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ ** 0.0.18
3
+ - Feature
4
+ -- now the port for ssl service must be defined when starting the service
5
+
2
6
  ** 0.0.17
3
7
  - internal improvements
4
8
  -- removing code duplication
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:4567/hello_world](http://localhost:8080/hello_world)
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
@@ -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 => 4433,
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),
@@ -1,3 +1,3 @@
1
1
  module RestShifter
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_shifter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Ribeiro