apiaryio 0.3.2 → 0.3.3
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.
- data/README.md +1 -0
- data/lib/apiary/cli.rb +1 -0
- data/lib/apiary/command/preview.rb +2 -1
- data/lib/apiary/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
|
@@ -83,6 +83,7 @@ Options:
|
|
|
83
83
|
[--api-host=HOST] # Specify apiary host
|
|
84
84
|
[--server], [--no-server] # Start standalone web server on port 8080
|
|
85
85
|
[--port=PORT] # Set port for --server option
|
|
86
|
+
[--host=HOST] # Set host for --server option
|
|
86
87
|
|
|
87
88
|
Show API documentation in default browser
|
|
88
89
|
```
|
data/lib/apiary/cli.rb
CHANGED
|
@@ -24,6 +24,7 @@ module Apiary
|
|
|
24
24
|
method_option :api_host, :type => :string, :banner => 'HOST', :desc => 'Specify apiary host'
|
|
25
25
|
method_option :server, :type => :boolean, :desc => 'Start standalone web server on port 8080'
|
|
26
26
|
method_option :port, :type => :numeric, :banner => 'PORT', :desc => 'Set port for --server option'
|
|
27
|
+
method_option :host, :type => :string, :desc => 'Set host for --server option'
|
|
27
28
|
|
|
28
29
|
def preview
|
|
29
30
|
cmd = Apiary::Command::Preview.new options
|
|
@@ -34,6 +34,7 @@ module Apiary
|
|
|
34
34
|
@options.port ||= 8080
|
|
35
35
|
@options.proxy ||= ENV['http_proxy']
|
|
36
36
|
@options.server ||= false
|
|
37
|
+
@options.host ||= '127.0.0.1'
|
|
37
38
|
|
|
38
39
|
validate_apib_file
|
|
39
40
|
end
|
|
@@ -78,7 +79,7 @@ module Apiary
|
|
|
78
79
|
generate
|
|
79
80
|
end
|
|
80
81
|
|
|
81
|
-
Rack::Server.start(:Port => @options.port, :app => app)
|
|
82
|
+
Rack::Server.start(:Port => @options.port, :Host => @options.host, :app => app)
|
|
82
83
|
end
|
|
83
84
|
|
|
84
85
|
# TODO: add linux and windows systems
|
data/lib/apiary/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiaryio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
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: 2015-
|
|
12
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rest-client
|