daddy 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/tasks/nginx.conf.erb +30 -0
- data/lib/tasks/nginx.rake +31 -0
- data/lib/tasks/nginx.repo +5 -0
- data/lib/tasks/unicorn.erb +51 -0
- data/lib/tasks/unicorn.rake +24 -0
- data/lib/tasks/unicorn.rb +29 -0
- metadata +37 -53
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NmU2ZGRlYjZiOThiY2Q2NDQwOTBlM2FjNTZhMjdjMDE5MDY5YmRlZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NzgzZGEzYzRmY2Q2YzczMzY1ZGFkNWU0ODQ2MDBkN2NlYjBiZDU1NA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NTI3ZjMwM2VkYmMyZWIxYjNmODU4MzNmOGU1M2RkMGY5Mzg1NGM1YTg4NWZj
|
10
|
+
MmI3MDA1MTkwNDE0ZmEzNjIxZjY0MGZlNDZiZTIzYjMyNzgyODc1Yjg2YmY3
|
11
|
+
MmJiMDYzNTJiZjdlOTliOThkY2Y0NGVhOGIxMDdjNjllMzQ0ZWU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MTRjNzZjZDRlYjVkYzRjOTBhNGY5NjVjZTRjYzMyODJmMDRkN2U1ZTFhNjM5
|
14
|
+
Y2JhYmYyODgyNTQ3MGQ2MjhjYzcxNTIxODFmMGU4YzFlYmRjNGRkODZlMzM1
|
15
|
+
ZTA2N2U3MjQ2NTYyZDVkYmVjNTRiMWQ5NDI0YmRkY2JiOTZmZWE=
|
@@ -0,0 +1,30 @@
|
|
1
|
+
upstream jenkins {
|
2
|
+
server localhost:8081;
|
3
|
+
}
|
4
|
+
|
5
|
+
upstream unicorn {
|
6
|
+
server unix:/tmp/unicorn.sock;
|
7
|
+
}
|
8
|
+
|
9
|
+
server {
|
10
|
+
listen 80 default_server;
|
11
|
+
server_name _;
|
12
|
+
deny all;
|
13
|
+
}
|
14
|
+
|
15
|
+
server {
|
16
|
+
listen 80;
|
17
|
+
server_name localhost;
|
18
|
+
|
19
|
+
root <%= ENV['RAILS_ROOT'] %>/public;
|
20
|
+
|
21
|
+
try_files $uri/index.html $uri @app;
|
22
|
+
|
23
|
+
location @app {
|
24
|
+
proxy_pass http://unicorn;
|
25
|
+
}
|
26
|
+
|
27
|
+
location /jenkins {
|
28
|
+
proxy_pass http://jenkins;
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: UTF-8
|
2
|
+
|
3
|
+
require 'rake'
|
4
|
+
|
5
|
+
namespace :dad do
|
6
|
+
namespace :nginx do
|
7
|
+
|
8
|
+
desc 'Nginxをインストールします。'
|
9
|
+
task :install do
|
10
|
+
repo = File.dirname(__FILE__) + '/nginx.repo'
|
11
|
+
ret = system("sudo cp -f #{repo} /etc/yum.repos.d/")
|
12
|
+
fail unless ret
|
13
|
+
|
14
|
+
ret = system("sudo yum install nginx")
|
15
|
+
fail unless ret
|
16
|
+
|
17
|
+
if File.exist?('/etc/nginx/conf.d/default.conf')
|
18
|
+
system("sudo mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.org")
|
19
|
+
end
|
20
|
+
if File.exist?('/etc/nginx/conf.d/example_ssl.conf')
|
21
|
+
system("sudo mv /etc/nginx/conf.d/example_ssl.conf /etc/nginx/conf.d/example_ssl.conf.org")
|
22
|
+
end
|
23
|
+
|
24
|
+
rails_root = ENV['RAILS_ROOT'] || Rails.root
|
25
|
+
ret = system("RAILS_ROOT=#{rails_root} erb -T - #{File.dirname(__FILE__)}/nginx.conf.erb > tmp/nginx.conf")
|
26
|
+
fail unless ret
|
27
|
+
system("sudo cp -f tmp/nginx.conf /etc/nginx/conf.d/nginx.conf")
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# chkconfig: - 85 15
|
4
|
+
# description: unicorn
|
5
|
+
|
6
|
+
. /etc/rc.d/init.d/functions
|
7
|
+
|
8
|
+
if [ -z ${RAILS_USER} ]; then
|
9
|
+
RAILS_USER=<%= ENV['USER'] %>
|
10
|
+
fi
|
11
|
+
|
12
|
+
if [ -z ${RAILS_ENV} ]; then
|
13
|
+
RAILS_ENV=<%= ENV['RAILS_ENV'] %>
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ -z ${RAILS_ROOT} ]; then
|
17
|
+
RAILS_ROOT=<%= ENV['RAILS_ROOT'] %>
|
18
|
+
fi
|
19
|
+
|
20
|
+
PID=${RAILS_ROOT}/tmp/pids/unicorn.pid
|
21
|
+
CONFIG=${RAILS_ROOT}/config/unicorn.rb
|
22
|
+
|
23
|
+
export PATH="${PATH}":/usr/local/bin
|
24
|
+
|
25
|
+
start() {
|
26
|
+
daemon --user=${RAILS_USER} --pidfile=$PID bundle exec unicorn_rails -c ${CONFIG} -E ${RAILS_ENV} -D
|
27
|
+
}
|
28
|
+
|
29
|
+
stop() {
|
30
|
+
killproc -p ${PID} -QUIT
|
31
|
+
}
|
32
|
+
|
33
|
+
cd ${RAILS_ROOT} || exit 1
|
34
|
+
|
35
|
+
case $1 in
|
36
|
+
|
37
|
+
start)
|
38
|
+
start
|
39
|
+
;;
|
40
|
+
stop)
|
41
|
+
stop
|
42
|
+
;;
|
43
|
+
restart)
|
44
|
+
stop
|
45
|
+
start
|
46
|
+
;;
|
47
|
+
*)
|
48
|
+
echo >&2 "Usage: $0 <start|stop|restart>"
|
49
|
+
exit 1
|
50
|
+
;;
|
51
|
+
esac
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: UTF-8
|
2
|
+
|
3
|
+
require 'rake'
|
4
|
+
|
5
|
+
namespace :dad do
|
6
|
+
namespace :unicorn do
|
7
|
+
|
8
|
+
desc 'Unicornをインストールします。'
|
9
|
+
task :install => :environment do
|
10
|
+
rails_env = ENV['RAILS_ENV'] || Rails.env
|
11
|
+
rails_root = ENV['RAILS_ROOT'] || Rails.root
|
12
|
+
ret = system("RAILS_ENV=#{rails_env} RAILS_ROOT=#{rails_root} erb -T - #{File.dirname(__FILE__)}/unicorn.erb > tmp/unicorn")
|
13
|
+
fail unless ret
|
14
|
+
|
15
|
+
system("sudo cp -f #{File.dirname(__FILE__)}/unicorn.rb config/unicorn.rb")
|
16
|
+
|
17
|
+
system("sudo cp -f tmp/unicorn /etc/init.d/unicorn")
|
18
|
+
system("sudo chown root:root /etc/init.d/unicorn")
|
19
|
+
system("sudo chmod 755 /etc/init.d/unicorn")
|
20
|
+
system("sudo /sbin/chkconfig unicorn on")
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: UTF-8
|
2
|
+
|
3
|
+
rails_root = "#{File.dirname(File.expand_path(__FILE__))}/.."
|
4
|
+
|
5
|
+
worker_processes 2
|
6
|
+
working_directory rails_root
|
7
|
+
|
8
|
+
listen '/tmp/unicorn.sock'
|
9
|
+
|
10
|
+
stdout_path rails_root + '/log/unicorn.log'
|
11
|
+
stderr_path rails_root + '/log/unicorn.log'
|
12
|
+
|
13
|
+
preload_app true
|
14
|
+
|
15
|
+
before_fork do |server, worker|
|
16
|
+
ActiveRecord::Base.connection.disconnect!
|
17
|
+
old_pid = "#{server.config[:pid]}.oldbin"
|
18
|
+
if old_pid != server.pid
|
19
|
+
begin
|
20
|
+
sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
|
21
|
+
Process.kill(sig, File.read(old_pid).to_i)
|
22
|
+
rescue Errno::ENOENT, Errno::ESRCH
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
after_fork do |server, worker|
|
28
|
+
ActiveRecord::Base.establish_connection
|
29
|
+
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.20
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- ichy
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: capybara
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: capybara-webkit
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - '='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - '='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: cucumber
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: cucumber-rails
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: ci_reporter
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ! '>='
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ! '>='
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: differ
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ! '>='
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,7 +90,6 @@ dependencies:
|
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ! '>='
|
108
95
|
- !ruby/object:Gem::Version
|
@@ -110,7 +97,6 @@ dependencies:
|
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rails
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
101
|
- - ~>
|
116
102
|
- !ruby/object:Gem::Version
|
@@ -118,7 +104,6 @@ dependencies:
|
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
108
|
- - ~>
|
124
109
|
- !ruby/object:Gem::Version
|
@@ -126,7 +111,6 @@ dependencies:
|
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: rails-i18n
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
115
|
- - ! '>='
|
132
116
|
- !ruby/object:Gem::Version
|
@@ -134,7 +118,6 @@ dependencies:
|
|
134
118
|
type: :runtime
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
122
|
- - ! '>='
|
140
123
|
- !ruby/object:Gem::Version
|
@@ -142,7 +125,6 @@ dependencies:
|
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: simplecov
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
129
|
- - ! '>='
|
148
130
|
- !ruby/object:Gem::Version
|
@@ -150,7 +132,6 @@ dependencies:
|
|
150
132
|
type: :runtime
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
136
|
- - ! '>='
|
156
137
|
- !ruby/object:Gem::Version
|
@@ -158,7 +139,6 @@ dependencies:
|
|
158
139
|
- !ruby/object:Gem::Dependency
|
159
140
|
name: simplecov-rcov
|
160
141
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
142
|
requirements:
|
163
143
|
- - ! '>='
|
164
144
|
- !ruby/object:Gem::Version
|
@@ -166,7 +146,6 @@ dependencies:
|
|
166
146
|
type: :runtime
|
167
147
|
prerelease: false
|
168
148
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
149
|
requirements:
|
171
150
|
- - ! '>='
|
172
151
|
- !ruby/object:Gem::Version
|
@@ -178,60 +157,65 @@ executables: []
|
|
178
157
|
extensions: []
|
179
158
|
extra_rdoc_files: []
|
180
159
|
files:
|
181
|
-
- lib/
|
182
|
-
- lib/
|
183
|
-
- lib/tasks/jenkins
|
184
|
-
- lib/tasks/cucumber.rake
|
185
|
-
- lib/tasks/jenkins.conf
|
186
|
-
- lib/tasks/cucumber_install.rake
|
187
|
-
- lib/tasks/database.yml.erb
|
188
|
-
- lib/tasks/test.rake
|
189
|
-
- lib/tasks/db_create.rake
|
190
|
-
- lib/tasks/jenkins_install.sh
|
191
|
-
- lib/tasks/publish.rake
|
192
|
-
- lib/tasks/jenkins.rake
|
193
|
-
- lib/tasks/cucumber_steps.rake
|
194
|
-
- lib/tasks/diary.rake
|
195
|
-
- lib/daddy/railtie.rb
|
196
|
-
- lib/daddy/cucumber/diff.rb
|
197
|
-
- lib/daddy/cucumber/html.rb
|
198
|
-
- lib/daddy/cucumber/capture.rb
|
199
|
-
- lib/daddy/cucumber/assert.rb
|
160
|
+
- lib/daddy.rb
|
161
|
+
- lib/daddy/cucumber.rb
|
200
162
|
- lib/daddy/cucumber/pause.rb
|
163
|
+
- lib/daddy/cucumber/capture.rb
|
164
|
+
- lib/daddy/cucumber/html.rb
|
201
165
|
- lib/daddy/cucumber/step_definitions/common.rb
|
166
|
+
- lib/daddy/cucumber/assert.rb
|
202
167
|
- lib/daddy/cucumber/table.rb
|
203
|
-
- lib/daddy/
|
204
|
-
- lib/daddy/
|
205
|
-
- lib/daddy/
|
168
|
+
- lib/daddy/cucumber/diff.rb
|
169
|
+
- lib/daddy/capistrano/remote_cache_subdir.rb
|
170
|
+
- lib/daddy/git.rb
|
206
171
|
- lib/daddy/formatter/menu.html.erb
|
172
|
+
- lib/daddy/formatter/html.rb
|
207
173
|
- lib/daddy/formatter/daddy_html.rb
|
174
|
+
- lib/daddy/formatter/daddy.css
|
175
|
+
- lib/daddy/formatter/cucumber.css
|
208
176
|
- lib/daddy/formatter/jquery-min.js
|
209
|
-
- lib/daddy/
|
210
|
-
- lib/
|
211
|
-
- lib/
|
212
|
-
- lib/
|
177
|
+
- lib/daddy/railtie.rb
|
178
|
+
- lib/tasks/jenkins
|
179
|
+
- lib/tasks/nginx.repo
|
180
|
+
- lib/tasks/unicorn.rb
|
181
|
+
- lib/tasks/jenkins.rake
|
182
|
+
- lib/tasks/dad.rake
|
183
|
+
- lib/tasks/db_config.rake
|
184
|
+
- lib/tasks/publish.rake
|
185
|
+
- lib/tasks/cucumber_steps.rake
|
186
|
+
- lib/tasks/jenkins_install.sh
|
187
|
+
- lib/tasks/cucumber.rake
|
188
|
+
- lib/tasks/nginx.rake
|
189
|
+
- lib/tasks/jenkins.conf
|
190
|
+
- lib/tasks/cucumber_install.rake
|
191
|
+
- lib/tasks/unicorn.rake
|
192
|
+
- lib/tasks/diary.rake
|
193
|
+
- lib/tasks/db_create.rake
|
194
|
+
- lib/tasks/unicorn.erb
|
195
|
+
- lib/tasks/test.rake
|
196
|
+
- lib/tasks/database.yml.erb
|
197
|
+
- lib/tasks/nginx.conf.erb
|
213
198
|
homepage: https://github.com/ichylinux/daddy
|
214
199
|
licenses: []
|
200
|
+
metadata: {}
|
215
201
|
post_install_message:
|
216
202
|
rdoc_options: []
|
217
203
|
require_paths:
|
218
204
|
- lib
|
219
205
|
required_ruby_version: !ruby/object:Gem::Requirement
|
220
|
-
none: false
|
221
206
|
requirements:
|
222
207
|
- - ! '>='
|
223
208
|
- !ruby/object:Gem::Version
|
224
209
|
version: '0'
|
225
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
|
-
none: false
|
227
211
|
requirements:
|
228
212
|
- - ! '>='
|
229
213
|
- !ruby/object:Gem::Version
|
230
214
|
version: '0'
|
231
215
|
requirements: []
|
232
216
|
rubyforge_project:
|
233
|
-
rubygems_version:
|
217
|
+
rubygems_version: 2.0.3
|
234
218
|
signing_key:
|
235
|
-
specification_version:
|
219
|
+
specification_version: 4
|
236
220
|
summary: My rails dad
|
237
221
|
test_files: []
|