orats 0.4.9 → 0.4.10

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: faeeee4eabfcbe7dfaf68eefd4f35829731c86d2
4
- data.tar.gz: 341436c9d23fd6a6020073095279cee80d80db72
3
+ metadata.gz: 4f16e8fca3d493283f74cfb52c13272f805f356d
4
+ data.tar.gz: a0227a92fb0322e35d923994005522fb1f8e1f4c
5
5
  SHA512:
6
- metadata.gz: b68d46cbb12e94936b6ac9951794e7c06a760f9a5d47d567615b8a1976321b3c6774ebe0a50645aae9c8391c1a7a0e04e86430ec030a412e1242679d9447e683
7
- data.tar.gz: d25c4c21a6212f709a7742c29f1122c0482f3e5356ce81a204214b3aef2b688e4a40c192a96767aed1a39c5e87778d929dd4f9244f5487e4c789b43e62449433
6
+ metadata.gz: 703767326261e5ec820485f01257534a56f645ade04aaf4f23e88af8a668c60c336d41481029115880a1b7e9aa91de1511b79e7f8e6f5b8a00631767e72a2e6a
7
+ data.tar.gz: f59fa3fa97cfd45ce987d07845d25f72d0f61abd2e5e4756dec1f7ef4dd9a83483f8d51ba19628985911b77cbe776c56e4da3c9df83c3a1714b3c402e658e29c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- orats (0.4.8)
4
+ orats (0.4.9)
5
5
  thor (~> 0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -66,6 +66,7 @@ running `orats <command name> help` from your terminal. You can also type `orats
66
66
  - Configuration:
67
67
  - Optionally takes: `--pg-location [localhost]`
68
68
  - Optionally takes: `--pg-username [postgres]`
69
+ - Optionally takes: `--redis-location [localhost]`
69
70
  - Optionally takes: `--redis-password []`
70
71
  - Template features:
71
72
  - Optionally takes: `--auth [false]`
@@ -246,7 +247,9 @@ check out each role then here's a link to their repos:
246
247
  - `nickjj.postgres` https://github.com/nickjj/ansible-postgres
247
248
  - `nickjj.ruby` https://github.com/nickjj/ansible-ruby
248
249
  - `nickjj.rails` https://github.com/nickjj/ansible-rails
250
+ - `nickjj.whenever` https://github.com/nickjj/ansible-whenever
249
251
  - `nickjj.pumacorn` https://github.com/nickjj/ansible-pumacorn
252
+ - `nickjj.sidekiq` https://github.com/nickjj/ansible-sidekiq
250
253
  - `nickjj.monit` https://github.com/nickjj/ansible-monit
251
254
  - `nickjj.nodejs` https://github.com/nickjj/ansible-nodejs
252
255
  - `nickjj.nginx` https://github.com/nickjj/ansible-nginx
@@ -254,7 +257,7 @@ check out each role then here's a link to their repos:
254
257
 
255
258
  You will need to install the roles onto your workstation before you can use them. You can do that by running this command:
256
259
 
257
- `ansible-galaxy install nickjj.user nickjj.security nickjj.postgres nickjj.ruby nickjj.nodejs nickjj.nginx nickjj.rails nickjj.pumacorn nickjj.monit DavidWittman.redis --force`
260
+ `ansible-galaxy install nickjj.user nickjj.security nickjj.postgres nickjj.ruby nickjj.nodejs nickjj.nginx nickjj.rails nickjj.whenever nickjj.pumacorn nickjj.sidekiq nickjj.monit DavidWittman.redis --force`
258
261
 
259
262
  ### Try it
260
263
 
data/lib/orats/cli.rb CHANGED
@@ -6,6 +6,7 @@ module Orats
6
6
  option :pg_location, default: 'localhost'
7
7
  option :pg_username, default: 'postgres'
8
8
  option :pg_password, required: true
9
+ option :redis_location, default: 'localhost'
9
10
  option :redis_password, default: ''
10
11
  option :auth, type: :boolean, default: false, aliases: '-a'
11
12
  option :skip_extras, type: :boolean, default: false, aliases: '-E'
@@ -24,6 +25,8 @@ module Orats
24
25
 
25
26
  `--pg-username` to supply a custom postgres username [postgres]
26
27
 
28
+ `--redis-location` to supply a custom redis location [localhost]
29
+
27
30
  `--redis-password` to supply your development redis password []
28
31
 
29
32
  Template features:
data/lib/orats/shell.rb CHANGED
@@ -19,7 +19,7 @@ module Orats
19
19
  def gsub_postgres_info
20
20
  log_message 'root', 'Changing the postgres information'
21
21
 
22
- gsub_file "#{@active_path}/.env", ': localhost', ": #{@options[:pg_location]}"
22
+ gsub_file "#{@active_path}/.env", 'DATABASE_HOST: localhost', "DATABASE_HOST: #{@options[:pg_location]}"
23
23
  gsub_file "#{@active_path}/.env", ': postgres', ": #{@options[:pg_username]}"
24
24
  gsub_file "#{@active_path}/.env", ': supersecrets', ": #{@options[:pg_password]}"
25
25
  end
@@ -29,7 +29,8 @@ module Orats
29
29
 
30
30
  gsub_file "#{@active_path}/config/initializers/sidekiq.rb", '//', "//:#{ENV['#{@app_name.upcase}_CACHE_PASSWORD']}@"
31
31
  gsub_file "#{@active_path}/.env", 'HE_PASSWORD: ', "HE_PASSWORD: #{@options[:redis_password]}"
32
- gsub_file "#{@active_path}/config/application.rb", "# pass", "pass"
32
+ gsub_file "#{@active_path}/.env", 'CACHE_HOST: localhost', "CACHE_HOST: #{@options[:redis_location]}"
33
+ gsub_file "#{@active_path}/config/application.rb", '# pass', 'pass'
33
34
  end
34
35
 
35
36
  def gsub_project_path
@@ -146,6 +147,7 @@ module Orats
146
147
  run "touch #{secrets_path}/redis_password"
147
148
  else
148
149
  save_secret_string "#{secrets_path}/redis_password"
150
+ gsub_file "#{path}/inventory/group_vars/all.yml", 'redis_password: false', 'redis_password: true'
149
151
  end
150
152
 
151
153
  save_secret_string "#{secrets_path}/mail_password"
@@ -254,7 +254,6 @@ git commit: "-m 'Add the puma config'"
254
254
  file 'config/sidekiq.yml', <<-CODE
255
255
  ---
256
256
  :pidfile: <%= ENV['#{app_name_upper}_PROJECT_PATH'] %>/tmp/sidekiq.pid
257
- :logfile: <%= ENV['#{app_name_upper}_PROJECT_PATH'] %>/log/sidekiq.log
258
257
  :concurrency: <%= ENV['#{app_name_upper}_SIDEKIQ_CONCURRENCY'].to_i %>
259
258
  :queues:
260
259
  - default
@@ -293,7 +292,7 @@ git commit: "-m 'Add the sitemap config'"
293
292
 
294
293
  file 'config/schedule.rb', <<-CODE
295
294
  every 1.day, at: '4:00 am' do
296
- rake '-s sitemap:refresh'
295
+ rake 'sitemap:refresh'
297
296
  end
298
297
  CODE
299
298
 
@@ -13,7 +13,7 @@ gem 'pg', '~> 0.17.1'
13
13
  gem 'redis-rails', '~> 4.0.0'
14
14
 
15
15
  gem 'puma', '~> 2.8.2'
16
- gem 'sidekiq', '~> 3.0.0'
16
+ gem 'sidekiq', '~> 3.1.2'
17
17
  gem 'sinatra', '>= 1.4.5', require: false
18
18
  gem 'whenever', '~> 0.9.2', require: false
19
19
  #gem 'jbuilder'
@@ -90,16 +90,15 @@ rails_deploy_env:
90
90
  nginx_base_domain: 0.0.0.0
91
91
  nginx_upstream_name: "{{ rails_deploy_app_name }}"
92
92
  nginx_upstream_server: unix://{{ rails_deploy_path }}/tmp/puma.sock
93
- nginx_root_path: /home/{{ rails_deploy_user }}/{{ rails_deploy_app_name }}.git/public
93
+ nginx_root_path: "{{ rails_deploy_path }}/public"
94
94
  nginx_ssl_local_path: "{{ secrets_load_path }}"
95
95
 
96
96
  # monit configuration
97
- monit_process_list:
98
- "{{ rails_deploy_app_name }}":
99
- - check process {{ rails_deploy_app_name }} with pidfile {{ rails_deploy_path }}/tmp/{{ pumacorn_server }}.pid
100
- - start program = "/etc/init.d/{{ rails_deploy_app_name }} start"
101
- - stop program = "/etc/init.d/{{ rails_deploy_app_name }} stop"
102
- "sidekiq":
103
- - check process sidekiq with pidfile {{ rails_deploy_path }}/tmp/sidekiq.pid
104
- - start program = "/etc/init.d/sidekiq start"
105
- - stop program = "/etc/init.d/sidekiq stop"
97
+ monit_process_list: |
98
+ check process {{ rails_deploy_app_name }} with pidfile {{ rails_deploy_path }}/tmp/{{ pumacorn_server }}.pid
99
+ start program = "/etc/init.d/{{ rails_deploy_app_name }} start"
100
+ stop program = "/etc/init.d/{{ rails_deploy_app_name }} stop"
101
+
102
+ check process sidekiq with pidfile {{ rails_deploy_path }}/tmp/sidekiq.pid
103
+ start program = "/etc/init.d/sidekiq start"
104
+ stop program = "/etc/init.d/sidekiq stop"
@@ -152,7 +152,9 @@ file 'site.yml' do <<-TEXT
152
152
  - { role: nickjj.nodejs, tags: [app, nodejs] }
153
153
  - { role: nickjj.nginx, tags: [app, nginx] }
154
154
  - { role: nickjj.rails, tags: [app, rails] }
155
+ - { role: nickjj.whenever, tags: [app, rails] }
155
156
  - { role: nickjj.pumacorn, tags: [app, rails] }
157
+ - { role: nickjj.sidekiq, tags: [app, rails] }
156
158
  - { role: nickjj.monit, tags: [app, monit] }
157
159
  TEXT
158
160
  end
data/lib/orats/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Orats
2
- VERSION = '0.4.9'
2
+ VERSION = '0.4.10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Janetakis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-31 00:00:00.000000000 Z
11
+ date: 2014-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor