daddy 0.5.17 → 0.5.18

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: adebf94afd27d89f889ea11223950555d34a33c5
4
- data.tar.gz: 7242fa1f7bb280e389ac351f9af2b43d5a2448af
3
+ metadata.gz: 9a78a31cdfa48e44f67c9ad5c945d9e310dbc82e
4
+ data.tar.gz: 2736fd828a981ea2a9de5f122627d058b2e0692f
5
5
  SHA512:
6
- metadata.gz: 5f29678c5d49c00800672439c38dbcc07a32db0f3be094009786e12cdfc9d9005883261cb422a91db3dd082ac8c20bf0c4d4e656ac70e4c3d6e6fe4c93ed4d34
7
- data.tar.gz: 5c690f51b37b6fa374f158b2220710dcabf82c632c3e3869ff4bc0f0edf00da414b0c7ec206878f4dae158168c450ad7aece8a84c65f56a4cd742dfdcb5727e3
6
+ metadata.gz: 30bf825a24c47fa9d398de69c428cbe4b5cb199ab87cb7bf4b9918c2ed12bab41dbc609f048f353809488203532caa11c0a646ba9db1fee5951dccdd7b1d6035
7
+ data.tar.gz: 745f663df717ffc4076cd694a37172ff2eae71b87f1286bcb42c490795a262264a1eaa6829bb60bf204d810b7cea0c7a0391cb67f0bf7c1b1f9b438c40e62c5b
@@ -16,5 +16,6 @@ template "/etc/nginx/conf.d/servers/#{ENV['APP_NAME']}.conf" do
16
16
  variables :app_name => ENV['APP_NAME'],
17
17
  :server_name => ENV['SERVER_NAME'],
18
18
  :rails_env => ENV['RAILS_ENV'],
19
- :rails_root => ENV['RAILS_ROOT']
19
+ :rails_root => ENV['RAILS_ROOT'],
20
+ :behind_load_balancer => false
20
21
  end
@@ -36,8 +36,12 @@ server {
36
36
  proxy_pass http://<%= @app_name %>;
37
37
  proxy_set_header Host $http_host;
38
38
  proxy_set_header X-Real-IP $remote_addr;
39
- proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
40
39
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
40
+ <%- if @behind_load_balancer %>
41
+ proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
42
+ <%- else -%>
43
+ proxy_set_header X-Forwarded-Proto $scheme;
44
+ <%- end %>
41
45
  }
42
46
 
43
47
  <%- if @rails_env == 'production' -%>
@@ -15,7 +15,7 @@ when /rhel-6\.(.*?)/
15
15
  variables :app_name => ENV['APP_NAME'],
16
16
  :rails_env => ENV['RAILS_ENV'],
17
17
  :rails_root => ENV['RAILS_ROOT'],
18
- :worker_processes => ENV['RAILS_ROOT'] == 'production' ? 2 : 1
18
+ :worker_processes => ENV['RAILS_ENV'] == 'production' ? 2 : 1
19
19
  end
20
20
  when /rhel-7\.(.*?)/
21
21
  template "/etc/systemd/system/#{ENV['APP_NAME']}.service" do
@@ -28,7 +28,7 @@ when /rhel-7\.(.*?)/
28
28
  :rails_env => ENV['RAILS_ENV'],
29
29
  :rails_root => ENV['RAILS_ROOT'],
30
30
  :user => ENV['USER'],
31
- :worker_processes => ENV['RAILS_ROOT'] == 'production' ? 2 : 1
31
+ :worker_processes => ENV['RAILS_ENV'] == 'production' ? 2 : 1
32
32
  end
33
33
 
34
34
  execute 'systemctl daemon-reload' do
@@ -1,4 +1,4 @@
1
- if ENV["COVERAGE"]
1
+ if ENV['COVERAGE']
2
2
  begin
3
3
  require 'simplecov'
4
4
  rescue LoadError => e
@@ -1,3 +1,3 @@
1
1
  module Daddy
2
- VERSION = '0.5.17'
2
+ VERSION = '0.5.18'
3
3
  end
@@ -1,5 +1,4 @@
1
- require 'rake'
2
- require 'yaml'
1
+ require_relative 'task_helper'
3
2
 
4
3
  namespace :dad do
5
4
  namespace :resque do
@@ -19,31 +18,33 @@ namespace :dad do
19
18
  end
20
19
  end
21
20
 
22
- require 'resque/tasks'
23
- require 'resque/scheduler/tasks'
24
-
25
- namespace :resque do
26
- task :setup do
27
- require 'resque'
28
- require 'resque/scheduler'
29
-
30
- # If you want to be able to dynamically change the schedule,
31
- # uncomment this line. A dynamic schedule can be updated via the
32
- # Resque::Scheduler.set_schedule (and remove_schedule) methods.
33
- # When dynamic is set to true, the scheduler process looks for
34
- # schedule changes and applies them on the fly.
35
- # Note: This feature is only available in >=2.0.0.
36
- Resque::Scheduler.dynamic = true
37
-
38
- # The schedule doesn't need to be stored in a YAML, it just needs to
39
- # be a hash. YAML is usually the easiest.
40
- #Resque.schedule = YAML.load_file('your_resque_schedule.yml')
41
-
42
- # If your schedule already has +queue+ set for each job, you don't
43
- # need to require your jobs. This can be an advantage since it's
44
- # less code that resque-scheduler needs to know about. But in a small
45
- # project, it's usually easier to just include you job classes here.
46
- # So, something like this:
47
- #require 'jobs'
21
+ if defined?(Resque::Scheduler)
22
+ require 'resque/tasks'
23
+ require 'resque/scheduler/tasks'
24
+
25
+ namespace :resque do
26
+ task :setup do
27
+ require 'resque'
28
+ require 'resque/scheduler'
29
+
30
+ # If you want to be able to dynamically change the schedule,
31
+ # uncomment this line. A dynamic schedule can be updated via the
32
+ # Resque::Scheduler.set_schedule (and remove_schedule) methods.
33
+ # When dynamic is set to true, the scheduler process looks for
34
+ # schedule changes and applies them on the fly.
35
+ # Note: This feature is only available in >=2.0.0.
36
+ Resque::Scheduler.dynamic = true
37
+
38
+ # The schedule doesn't need to be stored in a YAML, it just needs to
39
+ # be a hash. YAML is usually the easiest.
40
+ #Resque.schedule = YAML.load_file('your_resque_schedule.yml')
41
+
42
+ # If your schedule already has +queue+ set for each job, you don't
43
+ # need to require your jobs. This can be an advantage since it's
44
+ # less code that resque-scheduler needs to know about. But in a small
45
+ # project, it's usually easier to just include you job classes here.
46
+ # So, something like this:
47
+ #require 'jobs'
48
+ end
48
49
  end
49
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.17
4
+ version: 0.5.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-06 00:00:00.000000000 Z
11
+ date: 2017-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -140,72 +140,78 @@ dependencies:
140
140
  name: rails
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: 4.2.0
146
+ - - "<"
144
147
  - !ruby/object:Gem::Version
145
- version: '4.1'
148
+ version: 5.1.0
146
149
  type: :runtime
147
150
  prerelease: false
148
151
  version_requirements: !ruby/object:Gem::Requirement
149
152
  requirements:
150
- - - "~>"
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: 4.2.0
156
+ - - "<"
151
157
  - !ruby/object:Gem::Version
152
- version: '4.1'
158
+ version: 5.1.0
153
159
  - !ruby/object:Gem::Dependency
154
- name: resque
160
+ name: database_cleaner
155
161
  requirement: !ruby/object:Gem::Requirement
156
162
  requirements:
157
163
  - - "~>"
158
164
  - !ruby/object:Gem::Version
159
- version: '1.25'
160
- type: :runtime
165
+ version: '1.5'
166
+ type: :development
161
167
  prerelease: false
162
168
  version_requirements: !ruby/object:Gem::Requirement
163
169
  requirements:
164
170
  - - "~>"
165
171
  - !ruby/object:Gem::Version
166
- version: '1.25'
172
+ version: '1.5'
167
173
  - !ruby/object:Gem::Dependency
168
- name: resque-scheduler
174
+ name: resque
169
175
  requirement: !ruby/object:Gem::Requirement
170
176
  requirements:
171
177
  - - "~>"
172
178
  - !ruby/object:Gem::Version
173
- version: '4.0'
174
- type: :runtime
179
+ version: '1.26'
180
+ type: :development
175
181
  prerelease: false
176
182
  version_requirements: !ruby/object:Gem::Requirement
177
183
  requirements:
178
184
  - - "~>"
179
185
  - !ruby/object:Gem::Version
180
- version: '4.0'
186
+ version: '1.26'
181
187
  - !ruby/object:Gem::Dependency
182
- name: selenium-webdriver
188
+ name: resque-scheduler
183
189
  requirement: !ruby/object:Gem::Requirement
184
190
  requirements:
185
191
  - - "~>"
186
192
  - !ruby/object:Gem::Version
187
- version: '2.51'
188
- type: :runtime
193
+ version: '4.0'
194
+ type: :development
189
195
  prerelease: false
190
196
  version_requirements: !ruby/object:Gem::Requirement
191
197
  requirements:
192
198
  - - "~>"
193
199
  - !ruby/object:Gem::Version
194
- version: '2.51'
200
+ version: '4.0'
195
201
  - !ruby/object:Gem::Dependency
196
- name: database_cleaner
202
+ name: selenium-webdriver
197
203
  requirement: !ruby/object:Gem::Requirement
198
204
  requirements:
199
205
  - - "~>"
200
206
  - !ruby/object:Gem::Version
201
- version: '1.5'
207
+ version: '2.51'
202
208
  type: :development
203
209
  prerelease: false
204
210
  version_requirements: !ruby/object:Gem::Requirement
205
211
  requirements:
206
212
  - - "~>"
207
213
  - !ruby/object:Gem::Version
208
- version: '1.5'
214
+ version: '2.51'
209
215
  - !ruby/object:Gem::Dependency
210
216
  name: simplecov
211
217
  requirement: !ruby/object:Gem::Requirement