happy_seed 0.0.16 → 0.0.17
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/Rakefile +45 -0
- data/happy_seed.rb +36 -117
- data/happy_seed.txt +55 -0
- data/lib/generators/happy_seed/admin/admin_generator.rb +13 -9
- data/lib/generators/happy_seed/angular_install/angular_install_generator.rb +9 -1
- data/lib/generators/happy_seed/angular_install/templates/app/assets/javascripts/angular_app.js.coffee.erb +9 -9
- data/lib/generators/happy_seed/angular_view/templates/app/assets/javascripts/controllers/controller.js.coffee +1 -1
- data/lib/generators/happy_seed/api/api_generator.rb +9 -9
- data/lib/generators/happy_seed/base/base_generator.rb +65 -14
- data/lib/generators/happy_seed/base/templates/.bowerrc +3 -0
- data/lib/generators/happy_seed/base/templates/Procfile +1 -1
- data/lib/generators/happy_seed/base/templates/app/views/setup/index.html.haml +0 -2
- data/lib/generators/happy_seed/base/templates/config/puma.rb +15 -0
- data/lib/generators/happy_seed/base/templates/docs/README.00.base.rdoc +1 -1
- data/lib/generators/happy_seed/base/templates/spec/requests/setup_spec.rb +11 -0
- data/lib/generators/happy_seed/bootstrap/bootstrap_generator.rb +13 -1
- data/lib/generators/happy_seed/devise/devise_generator.rb +35 -12
- data/lib/generators/happy_seed/devise_invitable/devise_invitable_generator.rb +10 -10
- data/lib/generators/happy_seed/facebook/facebook_generator.rb +8 -1
- data/lib/generators/happy_seed/github/github_generator.rb +8 -2
- data/lib/generators/happy_seed/googleoauth/googleoauth_generator.rb +8 -2
- data/lib/generators/happy_seed/happy_seed_generator.rb +28 -16
- data/lib/generators/happy_seed/instagram/instagram_generator.rb +8 -2
- data/lib/generators/happy_seed/jazz_hands/jazz_hands_generator.rb +8 -1
- data/lib/generators/happy_seed/omniauth/omniauth_generator.rb +11 -24
- data/lib/generators/happy_seed/splash/splash_generator.rb +8 -19
- data/lib/generators/happy_seed/static/templates/source/stylesheets/application.css.scss +10 -13
- data/lib/generators/happy_seed/static_blog/templates/Gemfile.lock +45 -49
- data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/application.css.scss +13 -8
- data/lib/generators/happy_seed/twitter/templates/add_secret_token_to_identity.rb +5 -0
- data/lib/generators/happy_seed/twitter/twitter_generator.rb +26 -2
- data/lib/happy_seed/cli.rb +2 -2
- data/lib/happy_seed/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +15 -0
- metadata +12 -5
- data/lib/generators/happy_seed/base/templates/config/unicorn.rb +0 -33
- data/lib/generators/happy_seed/static/templates/Gemfile.lock +0 -158
@@ -12,19 +12,16 @@ html.sticky {
|
|
12
12
|
min-height: 100%;
|
13
13
|
}
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
.sticky .footer {
|
20
|
-
position: absolute;
|
21
|
-
bottom: 0;
|
22
|
-
width: 100%;
|
23
|
-
/* Set the fixed height of the footer here */
|
24
|
-
height: $sticky_footer_height;
|
25
|
-
background-color: #f5f5f5;
|
15
|
+
@media (min-width: $screen-sm-min) {
|
16
|
+
.sticky body {
|
17
|
+
margin-bottom: $sticky_footer_height;
|
18
|
+
}
|
26
19
|
|
27
|
-
.
|
28
|
-
|
20
|
+
.sticky footer {
|
21
|
+
position: absolute;
|
22
|
+
bottom: 0;
|
23
|
+
width: 100%;
|
24
|
+
/* Set the fixed height of the footer here */
|
25
|
+
height: $sticky_footer_height;
|
29
26
|
}
|
30
27
|
}
|
@@ -1,37 +1,33 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activesupport (4.1.
|
4
|
+
activesupport (4.1.8)
|
5
5
|
i18n (~> 0.6, >= 0.6.9)
|
6
6
|
json (~> 1.7, >= 1.7.7)
|
7
7
|
minitest (~> 5.1)
|
8
8
|
thread_safe (~> 0.1)
|
9
9
|
tzinfo (~> 1.1)
|
10
|
-
addressable (2.3.
|
11
|
-
|
12
|
-
execjs
|
13
|
-
json
|
14
|
-
bootstrap-navbar (2.2.4)
|
10
|
+
addressable (2.3.6)
|
11
|
+
bootstrap-navbar (2.2.2)
|
15
12
|
gem_config (~> 0.3)
|
16
|
-
bootstrap-sass (3.3.
|
17
|
-
|
18
|
-
sass (>= 3.2.19)
|
13
|
+
bootstrap-sass (3.3.1.0)
|
14
|
+
sass (~> 3.2)
|
19
15
|
builder (3.2.2)
|
20
16
|
celluloid (0.16.0)
|
21
17
|
timers (~> 4.0.0)
|
22
|
-
chunky_png (1.3.
|
23
|
-
coffee-script (2.
|
18
|
+
chunky_png (1.3.3)
|
19
|
+
coffee-script (2.3.0)
|
24
20
|
coffee-script-source
|
25
21
|
execjs
|
26
|
-
coffee-script-source (1.
|
27
|
-
compass (1.0.
|
22
|
+
coffee-script-source (1.8.0)
|
23
|
+
compass (1.0.1)
|
28
24
|
chunky_png (~> 1.2)
|
29
|
-
compass-core (~> 1.0.
|
25
|
+
compass-core (~> 1.0.1)
|
30
26
|
compass-import-once (~> 1.0.5)
|
31
27
|
rb-fsevent (>= 0.9.3)
|
32
28
|
rb-inotify (>= 0.9)
|
33
29
|
sass (>= 3.3.13, < 3.5)
|
34
|
-
compass-core (1.0.
|
30
|
+
compass-core (1.0.1)
|
35
31
|
multi_json (~> 1.0)
|
36
32
|
sass (>= 3.3.0, < 3.5)
|
37
33
|
compass-import-once (1.0.5)
|
@@ -40,38 +36,38 @@ GEM
|
|
40
36
|
eventmachine (>= 0.12.9)
|
41
37
|
http_parser.rb (~> 0.6.0)
|
42
38
|
erubis (2.7.0)
|
43
|
-
eventmachine (1.0.
|
44
|
-
execjs (2.
|
45
|
-
ffi (1.9.
|
39
|
+
eventmachine (1.0.3)
|
40
|
+
execjs (2.2.2)
|
41
|
+
ffi (1.9.6)
|
46
42
|
gem_config (0.3.1)
|
47
|
-
haml (4.0.
|
43
|
+
haml (4.0.5)
|
48
44
|
tilt
|
49
45
|
hike (1.2.3)
|
50
46
|
hitimes (1.2.2)
|
51
47
|
hooks (0.4.0)
|
52
48
|
uber (~> 0.0.4)
|
53
49
|
http_parser.rb (0.6.0)
|
54
|
-
i18n (0.
|
50
|
+
i18n (0.6.11)
|
55
51
|
jquery-middleman (3.0.4)
|
56
52
|
thor (>= 0.14, < 2.0)
|
57
|
-
json (1.8.
|
58
|
-
kramdown (1.
|
59
|
-
listen (2.
|
60
|
-
celluloid (
|
53
|
+
json (1.8.1)
|
54
|
+
kramdown (1.5.0)
|
55
|
+
listen (2.8.2)
|
56
|
+
celluloid (>= 0.15.2)
|
61
57
|
rb-fsevent (>= 0.9.3)
|
62
58
|
rb-inotify (>= 0.9)
|
63
|
-
middleman (3.3.
|
59
|
+
middleman (3.3.7)
|
64
60
|
coffee-script (~> 2.2)
|
65
61
|
compass (>= 1.0.0, < 2.0.0)
|
66
62
|
compass-import-once (= 1.0.5)
|
67
63
|
execjs (~> 2.0)
|
68
64
|
haml (>= 4.0.5)
|
69
65
|
kramdown (~> 1.2)
|
70
|
-
middleman-core (= 3.3.
|
66
|
+
middleman-core (= 3.3.7)
|
71
67
|
middleman-sprockets (>= 3.1.2)
|
72
68
|
sass (>= 3.4.0, < 4.0)
|
73
69
|
uglifier (~> 2.5)
|
74
|
-
middleman-autometatags (0.0.
|
70
|
+
middleman-autometatags (0.0.1)
|
75
71
|
middleman-core (>= 3.0.0)
|
76
72
|
middleman-blog (3.5.3)
|
77
73
|
addressable (~> 2.3.5)
|
@@ -83,12 +79,12 @@ GEM
|
|
83
79
|
middleman-bootstrap-navbar (2.0.0)
|
84
80
|
bootstrap-navbar (~> 2.0)
|
85
81
|
middleman-core (>= 3.0)
|
86
|
-
middleman-core (3.3.
|
82
|
+
middleman-core (3.3.7)
|
87
83
|
activesupport (~> 4.1.0)
|
88
84
|
bundler (~> 1.1)
|
89
85
|
erubis
|
90
86
|
hooks (~> 0.3)
|
91
|
-
i18n (~> 0.
|
87
|
+
i18n (~> 0.6.9)
|
92
88
|
listen (>= 2.7.9, < 3.0)
|
93
89
|
padrino-helpers (~> 0.12.3)
|
94
90
|
rack (>= 1.4.5, < 2.0)
|
@@ -104,32 +100,32 @@ GEM
|
|
104
100
|
middleman-core (>= 3.0.2)
|
105
101
|
multi_json (~> 1.0)
|
106
102
|
rack-livereload
|
107
|
-
middleman-sprockets (3.
|
108
|
-
middleman-core (
|
103
|
+
middleman-sprockets (3.3.10)
|
104
|
+
middleman-core (~> 3.3)
|
109
105
|
sprockets (~> 2.12.1)
|
110
106
|
sprockets-helpers (~> 1.1.0)
|
111
|
-
sprockets-sass (~> 1.
|
112
|
-
minitest (5.
|
113
|
-
multi_json (1.
|
107
|
+
sprockets-sass (~> 1.2.0)
|
108
|
+
minitest (5.4.3)
|
109
|
+
multi_json (1.10.1)
|
114
110
|
net-sftp (2.1.2)
|
115
111
|
net-ssh (>= 2.6.5)
|
116
|
-
net-ssh (2.9.
|
117
|
-
padrino-helpers (0.12.
|
112
|
+
net-ssh (2.9.1)
|
113
|
+
padrino-helpers (0.12.4)
|
118
114
|
i18n (~> 0.6, >= 0.6.7)
|
119
|
-
padrino-support (= 0.12.
|
115
|
+
padrino-support (= 0.12.4)
|
120
116
|
tilt (~> 1.4.1)
|
121
|
-
padrino-support (0.12.
|
117
|
+
padrino-support (0.12.4)
|
122
118
|
activesupport (>= 3.1)
|
123
|
-
ptools (1.
|
124
|
-
rack (1.
|
119
|
+
ptools (1.2.6)
|
120
|
+
rack (1.5.2)
|
125
121
|
rack-livereload (0.3.15)
|
126
122
|
rack
|
127
|
-
rack-test (0.6.
|
123
|
+
rack-test (0.6.2)
|
128
124
|
rack (>= 1.0)
|
129
|
-
rb-fsevent (0.9.
|
125
|
+
rb-fsevent (0.9.4)
|
130
126
|
rb-inotify (0.9.5)
|
131
127
|
ffi (>= 0.5.0)
|
132
|
-
sass (3.4.
|
128
|
+
sass (3.4.9)
|
133
129
|
sprockets (2.12.3)
|
134
130
|
hike (~> 1.2)
|
135
131
|
multi_json (~> 1.0)
|
@@ -137,18 +133,18 @@ GEM
|
|
137
133
|
tilt (~> 1.1, != 1.3.0)
|
138
134
|
sprockets-helpers (1.1.0)
|
139
135
|
sprockets (~> 2.0)
|
140
|
-
sprockets-sass (1.
|
136
|
+
sprockets-sass (1.2.0)
|
141
137
|
sprockets (~> 2.0)
|
142
138
|
tilt (~> 1.1)
|
143
139
|
thor (0.19.1)
|
144
|
-
thread_safe (0.3.
|
140
|
+
thread_safe (0.3.4)
|
145
141
|
tilt (1.4.1)
|
146
142
|
timers (4.0.1)
|
147
143
|
hitimes
|
148
144
|
tzinfo (1.2.2)
|
149
145
|
thread_safe (~> 0.1)
|
150
|
-
uber (0.0.
|
151
|
-
uglifier (2.
|
146
|
+
uber (0.0.11)
|
147
|
+
uglifier (2.5.3)
|
152
148
|
execjs (>= 0.3.0)
|
153
149
|
json (>= 1.8.0)
|
154
150
|
|
@@ -159,9 +155,9 @@ DEPENDENCIES
|
|
159
155
|
bootstrap-sass
|
160
156
|
builder (~> 3.0)
|
161
157
|
jquery-middleman
|
162
|
-
middleman (~> 3.3)
|
158
|
+
middleman (~> 3.3.7)
|
163
159
|
middleman-autometatags
|
164
|
-
middleman-blog (~> 3.5)
|
160
|
+
middleman-blog (~> 3.5.3)
|
165
161
|
middleman-blog-drafts
|
166
162
|
middleman-bootstrap-navbar
|
167
163
|
middleman-deploy
|
data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/application.css.scss
CHANGED
@@ -12,16 +12,21 @@ html.sticky {
|
|
12
12
|
min-height: 100%;
|
13
13
|
}
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
@media (min-width: $screen-sm-min) {
|
16
|
+
.sticky body {
|
17
|
+
margin-bottom: $sticky_footer_height;
|
18
|
+
}
|
19
|
+
|
20
|
+
.sticky footer {
|
21
|
+
position: absolute;
|
22
|
+
bottom: 0;
|
23
|
+
width: 100%;
|
24
|
+
/* Set the fixed height of the footer here */
|
25
|
+
height: $sticky_footer_height;
|
26
|
+
}
|
17
27
|
}
|
18
28
|
|
19
|
-
.
|
20
|
-
position: absolute;
|
21
|
-
bottom: 0;
|
22
|
-
width: 100%;
|
23
|
-
/* Set the fixed height of the footer here */
|
24
|
-
height: $sticky_footer_height;
|
29
|
+
.footer {
|
25
30
|
background-color: #f5f5f5;
|
26
31
|
|
27
32
|
.text-muted {
|
@@ -1,12 +1,20 @@
|
|
1
|
-
require 'generators/happy_seed/
|
1
|
+
require 'generators/happy_seed/omniauth/omniauth_generator'
|
2
2
|
|
3
3
|
module HappySeed
|
4
4
|
module Generators
|
5
5
|
class TwitterGenerator < HappySeedGenerator
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
|
6
8
|
source_root File.expand_path('../templates', __FILE__)
|
7
9
|
|
10
|
+
def self.fingerprint
|
11
|
+
gem_available?( 'omniauth-twitter' )
|
12
|
+
end
|
13
|
+
|
8
14
|
def install_twitter
|
9
|
-
|
15
|
+
return if already_installed
|
16
|
+
|
17
|
+
require_generator OmniauthGenerator
|
10
18
|
|
11
19
|
gem 'omniauth-twitter'
|
12
20
|
gem 'twitter'
|
@@ -18,6 +26,22 @@ module HappySeed
|
|
18
26
|
add_omniauth :twitter
|
19
27
|
|
20
28
|
directory "docs"
|
29
|
+
insert_into_file "app/models/identity.rb", "\n identity.secrettoken = auth.credentials.secret", after: "identity.accesstoken = auth.credentials.token"
|
30
|
+
migration_template("add_secret_token_to_identity.rb", "db/migrate/add_secret_token_to_identity.rb" )
|
31
|
+
|
32
|
+
gsub_file( "app/models/user.rb", "Twitter.client( access_token: twitter.accesstoken )",
|
33
|
+
"Twitter::REST::Client.new do |config|
|
34
|
+
config.consumer_key = ENV['TWITTER_APP_ID']
|
35
|
+
config.consumer_secret = ENV['TWITTER_APP_SECRET']
|
36
|
+
config.access_token = twitter.accesstoken
|
37
|
+
config.access_token_secret = twitter.secrettoken
|
38
|
+
end")
|
39
|
+
end
|
40
|
+
|
41
|
+
protected
|
42
|
+
|
43
|
+
def self.next_migration_number(dir)
|
44
|
+
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
21
45
|
end
|
22
46
|
end
|
23
47
|
end
|
data/lib/happy_seed/cli.rb
CHANGED
@@ -4,8 +4,8 @@ module HappySeed
|
|
4
4
|
class Cli < Thor
|
5
5
|
desc "rails APPNAME", "Generate a new rails application"
|
6
6
|
def rails( *args )
|
7
|
-
|
8
|
-
system
|
7
|
+
seedrb = gem_file_path( "happy_seed.rb")
|
8
|
+
system "rails new -m #{seedrb} #{args.join( " " )} --skip-turbolinks"
|
9
9
|
end
|
10
10
|
|
11
11
|
desc "plugin NAME", "Generate a new rails plugin"
|
data/lib/happy_seed/version.rb
CHANGED
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2
|
+
-------------------------
|
3
|
+
HappySeedTest: test_truth
|
4
|
+
-------------------------
|
5
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
-------------------------
|
8
|
+
HappySeedTest: test_truth
|
9
|
+
-------------------------
|
10
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
11
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
12
|
+
-------------------------
|
13
|
+
HappySeedTest: test_truth
|
14
|
+
-------------------------
|
15
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: happy_seed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Schenk
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -66,6 +66,7 @@ files:
|
|
66
66
|
- Rakefile
|
67
67
|
- bin/happy_seed
|
68
68
|
- happy_seed.rb
|
69
|
+
- happy_seed.txt
|
69
70
|
- lib/generators/happy_seed/admin/admin_generator.rb
|
70
71
|
- lib/generators/happy_seed/admin/templates/app/admin/campaigns.rb
|
71
72
|
- lib/generators/happy_seed/admin/templates/app/admin/dashboard.rb
|
@@ -100,17 +101,19 @@ files:
|
|
100
101
|
- lib/generators/happy_seed/api/templates/spec/acceptance/api/v1/user_tokens_spec.rb
|
101
102
|
- lib/generators/happy_seed/api/templates/spec/acceptance/api/v1/users_spec.rb
|
102
103
|
- lib/generators/happy_seed/base/base_generator.rb
|
104
|
+
- lib/generators/happy_seed/base/templates/.bowerrc
|
103
105
|
- lib/generators/happy_seed/base/templates/.env
|
104
106
|
- lib/generators/happy_seed/base/templates/.foreman
|
105
107
|
- lib/generators/happy_seed/base/templates/Procfile
|
106
108
|
- lib/generators/happy_seed/base/templates/app/controllers/setup_controller.rb
|
107
109
|
- lib/generators/happy_seed/base/templates/app/views/setup/index.html.haml
|
108
110
|
- lib/generators/happy_seed/base/templates/application_controller.rb
|
109
|
-
- lib/generators/happy_seed/base/templates/config/
|
111
|
+
- lib/generators/happy_seed/base/templates/config/puma.rb
|
110
112
|
- lib/generators/happy_seed/base/templates/docs/README.00.base.rdoc
|
111
113
|
- lib/generators/happy_seed/base/templates/lib/tasks/haml2erb.rake
|
112
114
|
- lib/generators/happy_seed/base/templates/spec/controllers/application_controller_spec.rb
|
113
115
|
- lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
|
116
|
+
- lib/generators/happy_seed/base/templates/spec/requests/setup_spec.rb
|
114
117
|
- lib/generators/happy_seed/base/templates/spec/support/controller_helpers.rb
|
115
118
|
- lib/generators/happy_seed/bootstrap/bootstrap_generator.rb
|
116
119
|
- lib/generators/happy_seed/bootstrap/templates/app/assets/javascripts/application.js
|
@@ -197,7 +200,6 @@ files:
|
|
197
200
|
- lib/generators/happy_seed/static/static_generator.rb
|
198
201
|
- lib/generators/happy_seed/static/templates/.gitignore
|
199
202
|
- lib/generators/happy_seed/static/templates/Gemfile
|
200
|
-
- lib/generators/happy_seed/static/templates/Gemfile.lock
|
201
203
|
- lib/generators/happy_seed/static/templates/config.rb
|
202
204
|
- lib/generators/happy_seed/static/templates/data/site.yml
|
203
205
|
- lib/generators/happy_seed/static/templates/source/images/.gitkeep
|
@@ -243,6 +245,7 @@ files:
|
|
243
245
|
- lib/generators/happy_seed/static_blog/templates/source/stylesheets/fonts/socicon-webfont.woff
|
244
246
|
- lib/generators/happy_seed/static_blog/templates/source/stylesheets/socicons.css
|
245
247
|
- lib/generators/happy_seed/static_blog/templates/source/tag.html.haml
|
248
|
+
- lib/generators/happy_seed/twitter/templates/add_secret_token_to_identity.rb
|
246
249
|
- lib/generators/happy_seed/twitter/templates/docs/README.05.twitter.rdoc
|
247
250
|
- lib/generators/happy_seed/twitter/twitter_generator.rb
|
248
251
|
- lib/happy_seed.rb
|
@@ -279,6 +282,8 @@ files:
|
|
279
282
|
- test/dummy/config/locales/en.yml
|
280
283
|
- test/dummy/config/routes.rb
|
281
284
|
- test/dummy/config/secrets.yml
|
285
|
+
- test/dummy/db/test.sqlite3
|
286
|
+
- test/dummy/log/test.log
|
282
287
|
- test/dummy/public/404.html
|
283
288
|
- test/dummy/public/422.html
|
284
289
|
- test/dummy/public/500.html
|
@@ -305,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
305
310
|
version: '0'
|
306
311
|
requirements: []
|
307
312
|
rubyforge_project:
|
308
|
-
rubygems_version: 2.4.
|
313
|
+
rubygems_version: 2.4.8
|
309
314
|
signing_key:
|
310
315
|
specification_version: 4
|
311
316
|
summary: HappySeed is a project that will build up a rails apps using some common
|
@@ -339,6 +344,8 @@ test_files:
|
|
339
344
|
- test/dummy/config/routes.rb
|
340
345
|
- test/dummy/config/secrets.yml
|
341
346
|
- test/dummy/config.ru
|
347
|
+
- test/dummy/db/test.sqlite3
|
348
|
+
- test/dummy/log/test.log
|
342
349
|
- test/dummy/public/404.html
|
343
350
|
- test/dummy/public/422.html
|
344
351
|
- test/dummy/public/500.html
|
@@ -1,33 +0,0 @@
|
|
1
|
-
worker_processes 3
|
2
|
-
timeout 30
|
3
|
-
preload_app true
|
4
|
-
|
5
|
-
before_fork do |server, worker|
|
6
|
-
# Replace with MongoDB or whatever
|
7
|
-
if defined?(ActiveRecord::Base)
|
8
|
-
ActiveRecord::Base.connection.disconnect!
|
9
|
-
Rails.logger.info('Disconnected from ActiveRecord')
|
10
|
-
end
|
11
|
-
|
12
|
-
# If you are using Redis but not Resque, change this
|
13
|
-
if defined?(Resque)
|
14
|
-
Resque.redis.quit
|
15
|
-
Rails.logger.info('Disconnected from Redis')
|
16
|
-
end
|
17
|
-
|
18
|
-
sleep 1
|
19
|
-
end
|
20
|
-
|
21
|
-
after_fork do |server, worker|
|
22
|
-
# Replace with MongoDB or whatever
|
23
|
-
if defined?(ActiveRecord::Base)
|
24
|
-
ActiveRecord::Base.establish_connection
|
25
|
-
Rails.logger.info('Connected to ActiveRecord')
|
26
|
-
end
|
27
|
-
|
28
|
-
# If you are using Redis but not Resque, change this
|
29
|
-
if defined?(Resque)
|
30
|
-
Resque.redis = ENV['REDIS_URI']
|
31
|
-
Rails.logger.info('Connected to Redis')
|
32
|
-
end
|
33
|
-
end
|