uc 0.0.3 → 0.0.4
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/bin/uc +7 -1
- data/lib/uc/server.rb +4 -2
- data/lib/uc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 08086a7afb6bf1747aa12a730de0a066abc76b6b
|
|
4
|
+
data.tar.gz: 063a437998e41fee47b5b2d069ca9431bedf0f28
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a24f77d4061bd57356651c20e68e68aec828634ad1abdef341112bbfe12d414c8a8f054910c230f8665cf5d05a3fdd666d3e05e5501aed0a0b28198fc0437e3a
|
|
7
|
+
data.tar.gz: c681b851bc6cd25a2a8231314d84b1d51df68b98679662eccd91bdb7f1df2a763f95b502c39a18b89cf63f8648e91ef605238c76b9d5313869893eceb0bdcb38
|
data/bin/uc
CHANGED
|
@@ -8,6 +8,8 @@ require 'uc/version'
|
|
|
8
8
|
require 'uc/server'
|
|
9
9
|
|
|
10
10
|
options = {}
|
|
11
|
+
options[:rails_env] = "production"
|
|
12
|
+
|
|
11
13
|
opts_parser = OptionParser.new do |opts|
|
|
12
14
|
|
|
13
15
|
banner = []
|
|
@@ -25,6 +27,10 @@ opts_parser = OptionParser.new do |opts|
|
|
|
25
27
|
options[:app_dir] = path
|
|
26
28
|
end
|
|
27
29
|
|
|
30
|
+
opts.on("-e", "--environment [RAILS_ENV]" , "Set rails env") do |e|
|
|
31
|
+
options[:rails_env] = e
|
|
32
|
+
end
|
|
33
|
+
|
|
28
34
|
opts.on("-v", "--version", "Show version") do |v|
|
|
29
35
|
puts ::Uc::VERSION
|
|
30
36
|
exit
|
|
@@ -40,7 +46,7 @@ begin
|
|
|
40
46
|
opts_parser.parse!(ARGV)
|
|
41
47
|
|
|
42
48
|
app_dir = options[:app_dir] || Dir.pwd
|
|
43
|
-
server = ::Uc::Server.new(app_dir)
|
|
49
|
+
server = ::Uc::Server.new(app_dir, rails_env: options[:rails_env])
|
|
44
50
|
command = ARGV.shift
|
|
45
51
|
|
|
46
52
|
case command
|
data/lib/uc/server.rb
CHANGED
|
@@ -12,9 +12,11 @@ module Uc
|
|
|
12
12
|
include ::Uc::Logger
|
|
13
13
|
|
|
14
14
|
attr_reader :uconfig
|
|
15
|
+
attr_reader :rails_env
|
|
15
16
|
|
|
16
|
-
def initialize(app_dir)
|
|
17
|
+
def initialize(app_dir, rails_env: "production")
|
|
17
18
|
@uconfig = ::Uc::UnicornConfig.new(app_dir)
|
|
19
|
+
@rails_env = rails_env
|
|
18
20
|
end
|
|
19
21
|
|
|
20
22
|
def app_env(&block)
|
|
@@ -29,7 +31,7 @@ module Uc
|
|
|
29
31
|
return
|
|
30
32
|
end
|
|
31
33
|
|
|
32
|
-
cmd %{unicorn -c #{uconfig.config_path} -D}, return_output: false,
|
|
34
|
+
cmd %{unicorn -c #{uconfig.config_path} -D -E #{rails_env} }, return_output: false,
|
|
33
35
|
error_msg: "error starting unicorn"
|
|
34
36
|
end
|
|
35
37
|
end
|
data/lib/uc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: uc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Neeraj
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-05-
|
|
11
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|