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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c92f7a6394523135d5eac0f85fd640670792229c
4
- data.tar.gz: e1fefdb6535ba47777394b7213989c8173dc1a14
3
+ metadata.gz: 54b1fb67fa10624f47c2c47dfcf550aa2f41fada
4
+ data.tar.gz: 41df07f66ac48246b273f53d30c4e4169a9f52aa
5
5
  SHA512:
6
- metadata.gz: 539b505930db2610f2b496d4a8137b3f4ba048c597511bd99f45d74b9f1cfae5db50039ef9f3b1ecab01d867d8046e87f35daf8edf59c939c7f097b6bbc80974
7
- data.tar.gz: 9a469dd997a9c667ac66a1df38bdf86fcbe93a025f6c915a0e4c94a3843225ef900b7ffec7a24b3cdcc1b34ab6791a7c575e10fc2fae93b52d4bf85d3c213e0e
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
- Add this line to your application's Gemfile:
7
+ Install the gem from rubygems as follow:
8
8
 
9
- ```ruby
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
- $ soaring init
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
- $ cp config/environment.yml.example config/environment.yml
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
- $ soaring run
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
@@ -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
- binding_address = '0.0.0.0'
11
- # exec("export SOAR_TECH=debug; export RACK_ENV=development; ./run.sh")
12
- `bundle exec rackup -E #{environment} ./config.ru -p #{port} --host #{binding_address}`
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
@@ -1,3 +1,3 @@
1
1
  module Soaring
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soaring
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barney de Villiers