tuesday 0.0.2 → 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tuesday.rb +36 -38
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4a331e53e1663e5526b7345a9b134dbc0a2b3fd
4
- data.tar.gz: 138c1f7632408e179bac1b8b5e12f6c9bbee4f2d
3
+ metadata.gz: d5352c8e9dcaf1ec3a339e86586e051621d9be87
4
+ data.tar.gz: 37ebeabe09d4acff24a5935c370ffdca676f0f1c
5
5
  SHA512:
6
- metadata.gz: cfb7af331317437201c1586bc26d8b058d50f5cc3915ff76e53a85a83e34a5231037e2a6e615c468fc582860c8ea8307f98e93c58001e3615cbf35e5993300eb
7
- data.tar.gz: 5ef5601d2d301a05bf29cce24028b3510871cea8120957d183e68390c72989f69c09ecf8d3d9251cbc5d054af41d0ce4ef104740c48ace9c5c5f3c50da48c2ff
6
+ metadata.gz: fee4e84f20ebff043e715ec284d940770a18e8fe7445a58429e4d6927d8a981541e99182fd050563e5e4829b8051d0a2d76510eb0bbc793ad453174565a1f4ef
7
+ data.tar.gz: bc44f673c8d54cc24fb1c7ce00672601e2bf908da926a9c2829a401c3971d187120b7a1c2b34195359b57b307048200b4a840028fdd9f9dbb1a44a06f2243074
data/lib/tuesday.rb CHANGED
@@ -87,43 +87,6 @@ class Tuesday
87
87
  #
88
88
  #write new default conf file
89
89
 
90
- def gen_nginx(app_name, domain_name)
91
- "
92
-
93
- upstream #{app_name} {
94
- # Path to Unicorn SOCK file, as defined previously
95
- server unix:/tmp/unicorn.#{app_name}.sock fail_timeout=0;
96
- }
97
-
98
- server {
99
-
100
-
101
- listen 80;
102
-
103
- # Set the server name, similar to Apache's settings
104
- server_name localhost #{app_name}.#{domain_name};
105
-
106
- # Application root, as defined previously
107
- root /var/www/#{app_name}/public;
108
-
109
- try_files $uri/index.html $uri @#{app_name};
110
-
111
- location @#{app_name} {
112
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
113
- proxy_set_header Host $http_host;
114
- proxy_redirect off;
115
- proxy_pass http://#{app_name};
116
- }
117
-
118
- error_page 500 502 503 504 /500.html;
119
- client_max_body_size 4G;
120
- keepalive_timeout 10;
121
-
122
- }
123
-
124
- "
125
- end
126
-
127
90
  new_nginx = ""
128
91
 
129
92
  #kill old unicorns
@@ -149,8 +112,43 @@ class Tuesday
149
112
  kitchen.each do |key,value|
150
113
  puts `unicorn -c "#{value[:pwd]}"/unicorn.rb -D`
151
114
  value[:pid] = IO.readlines("#{value[:pwd]}/pids/unicorn.pid").join.strip
115
+ app_name = key
116
+ domain_name = settings[:domain]
117
+ #new_nginx += gen_nginx(key,settings[:domain])
118
+ new_nginx += "
119
+
120
+ upstream #{app_name} {
121
+ # Path to Unicorn SOCK file, as defined previously
122
+ server unix:/tmp/unicorn.#{app_name}.sock fail_timeout=0;
123
+ }
124
+
125
+ server {
126
+
127
+
128
+ listen 80;
129
+
130
+ # Set the server name, similar to Apache's settings
131
+ server_name localhost #{app_name}.#{domain_name};
132
+
133
+ # Application root, as defined previously
134
+ root /var/www/#{app_name}/public;
135
+
136
+ try_files $uri/index.html $uri @#{app_name};
137
+
138
+ location @#{app_name} {
139
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
140
+ proxy_set_header Host $http_host;
141
+ proxy_redirect off;
142
+ proxy_pass http://#{app_name};
143
+ }
144
+
145
+ error_page 500 502 503 504 /500.html;
146
+ client_max_body_size 4G;
147
+ keepalive_timeout 10;
148
+
149
+ }
152
150
 
153
- new_nginx += gen_nginx(key,settings[:domain])
151
+ "
154
152
  end
155
153
 
156
154
  File.write('/usr/local/bin/kitchen', "#{kitchen}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tuesday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yves DeSousa