soaring 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -7
- data/lib/soaring/cli.rb +4 -0
- data/lib/soaring/runner.rb +7 -3
- data/lib/soaring/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: 54b1fb67fa10624f47c2c47dfcf550aa2f41fada
|
4
|
+
data.tar.gz: 41df07f66ac48246b273f53d30c4e4169a9f52aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61bc41311f40d2f0d080f67b6a5c20153cafd6840f877687afd4431d5b5ed2560ce8f1fc8ff78c234769c34c3c030360e097ed6c4bf1f29d2616999b32ee15f0
|
7
|
+
data.tar.gz: 7f55be59ec253f8189ab58a91b10bfc8fc0f91ec5bcaa44e9da83e6dde3cad6915440ed842a7e19b98a25cf66f660ca6640e2a914d645bcba3e39470a0f5a11f
|
data/README.md
CHANGED
@@ -4,22 +4,38 @@ This gem provides a collection of command line tools that simplifies the creatio
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
Install the gem from rubygems as follow:
|
8
8
|
|
9
|
-
|
10
|
-
gem 'soaring'
|
11
|
-
```
|
9
|
+
gem install soaring
|
12
10
|
|
13
11
|
## Creating a new project
|
14
12
|
|
15
13
|
Create the fresh project skeleton:
|
16
|
-
|
14
|
+
soaring init
|
15
|
+
|
16
|
+
Switch to the appropriate ruby version and install the gem dependencies
|
17
|
+
rvm use . && bundle install
|
17
18
|
|
18
19
|
Create an environment.yml file by copying the example:
|
19
|
-
|
20
|
+
cp config/environment.yml.example config/environment.yml
|
21
|
+
|
22
|
+
## Running a service component locally
|
20
23
|
|
21
24
|
Start up a local instance of the service component to check that all is well
|
22
|
-
|
25
|
+
soaring run
|
26
|
+
|
27
|
+
This will default to a MRI ruby rack application running with the following defaults that can be specified
|
28
|
+
port = 9393
|
29
|
+
environment = 'development'
|
30
|
+
|
31
|
+
## Packaging the service component for deployment
|
32
|
+
|
33
|
+
Make sure your git repo is committed and pushed to master. Execute the following command.
|
34
|
+
soaring package
|
35
|
+
|
36
|
+
The output build zip file will be placed in the builds folder.
|
37
|
+
|
38
|
+
Note that you can specify the --ignore_git_checks flag if you want to skip the git repo validation
|
23
39
|
|
24
40
|
## Contributing
|
25
41
|
|
data/lib/soaring/cli.rb
CHANGED
@@ -55,6 +55,10 @@ module Soaring
|
|
55
55
|
options[:environment] = environment
|
56
56
|
end
|
57
57
|
|
58
|
+
opt.on("-p","--port PORT","port to which the service component run must bind to") do |port|
|
59
|
+
options[:port] = port
|
60
|
+
end
|
61
|
+
|
58
62
|
opt.on("-r","--soar_sc_refspec REF_SPEC","git reference spec for the soar_sc to base your init on") do |soar_sc_refspec|
|
59
63
|
options[:soar_sc_refspec] = soar_sc_refspec
|
60
64
|
end
|
data/lib/soaring/runner.rb
CHANGED
@@ -6,10 +6,14 @@ module Soaring
|
|
6
6
|
|
7
7
|
def run(project_folder)
|
8
8
|
environment = 'development'
|
9
|
+
environment = @options[:environment] if @options[:environment]
|
9
10
|
port = 9393
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
port = @options[:port] if @options[:port]
|
12
|
+
|
13
|
+
bind_address = '0.0.0.0'
|
14
|
+
rackup_parameters = "-E #{environment} ./config.ru -p #{port} --host #{bind_address}"
|
15
|
+
puts "starting rackup with parameters #{rackup_parameters}" if @options[:verbose]
|
16
|
+
`bundle exec rackup #{rackup_parameters}`
|
13
17
|
end
|
14
18
|
|
15
19
|
end
|
data/lib/soaring/version.rb
CHANGED