rails_template_18f 0.3.0 → 0.5.0
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/CHANGELOG.md +19 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +4 -4
- data/exe/rails_template_18f +31 -0
- data/lib/generators/rails_template18f/active_storage/active_storage_generator.rb +141 -0
- data/lib/generators/rails_template18f/active_storage/templates/app/jobs/file_scan_job.rb +33 -0
- data/lib/generators/rails_template18f/active_storage/templates/app/models/file_upload.rb +25 -0
- data/lib/generators/rails_template18f/active_storage/templates/doc/adr/clamav.md.tt +30 -0
- data/lib/generators/rails_template18f/active_storage/templates/spec/jobs/file_scan_job_spec.rb +35 -0
- data/lib/generators/rails_template18f/active_storage/templates/spec/models/file_upload_spec.rb +38 -0
- data/lib/generators/rails_template18f/circleci/circleci_generator.rb +4 -1
- data/lib/generators/rails_template18f/cloud_gov_config/cloud_gov_config_generator.rb +29 -0
- data/lib/generators/rails_template18f/cloud_gov_config/templates/app/models/cloud_gov_config.rb +15 -0
- data/lib/generators/rails_template18f/cloud_gov_config/templates/spec/models/cloud_gov_config_spec.rb +44 -0
- data/lib/generators/rails_template18f/i18n/i18n_generator.rb +8 -9
- data/lib/generators/rails_template18f/i18n_js/i18n_js_generator.rb +59 -0
- data/lib/generators/rails_template18f/i18n_js/templates/lib/tasks/i18n.rake +9 -0
- data/lib/generators/rails_template18f/newrelic/newrelic_generator.rb +2 -0
- data/lib/generators/rails_template18f/sidekiq/sidekiq_generator.rb +81 -0
- data/lib/generators/rails_template18f/sidekiq/templates/config/initializers/redis.rb +14 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/README.md.tt +1 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/production/main.tf.tt +37 -5
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/main.tf.tt +50 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/providers.tf +16 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/variables.tf +47 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/main.tf.tt +23 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/providers.tf +16 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/variables.tf +42 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/staging/main.tf.tt +37 -5
- data/lib/generators/rails_template18f/terraform/terraform_generator.rb +10 -12
- data/lib/rails_template18f/app_updater.rb +19 -0
- data/lib/rails_template18f/generators/base.rb +37 -5
- data/lib/rails_template18f/generators/cloud_gov_options.rb +0 -4
- data/lib/rails_template18f/version.rb +1 -1
- data/rails-template-18f.gemspec +1 -0
- data/template.rb +29 -1
- data/templates/Brewfile +14 -0
- data/templates/README.md.tt +9 -10
- data/templates/app/views/application/_header.html.erb +0 -1
- data/templates/app/views/application/_usa_banner.html.erb +2 -0
- data/templates/bin/with-server +1 -2
- data/templates/config/deployment/staging.yml +1 -1
- data/templates/config/environments/ci.rb +0 -1
- data/templates/doc/compliance/apps/application.boundary.md.tt +0 -7
- data/templates/env +1 -1
- metadata +37 -2
data/templates/README.md.tt
CHANGED
@@ -12,16 +12,15 @@ guide for an introduction to the framework.
|
|
12
12
|
|
13
13
|
* Install Ruby <%= @ruby_version %>
|
14
14
|
* Install NodeJS <%= @node_version %>
|
15
|
-
* Install
|
16
|
-
*
|
17
|
-
|
18
|
-
*
|
19
|
-
|
15
|
+
* Install homebrew dependencies: `brew bundle`
|
16
|
+
* [PostgreSQL](https://www.postgresql.org/)
|
17
|
+
* [Dockerize](https://github.com/jwilder/dockerize)
|
18
|
+
* [ADR Tools](https://github.com/npryce/adr-tools)
|
19
|
+
* [Chromedriver](https://sites.google.com/chromium.org/driver/)
|
20
|
+
* Chromedriver must be allowed to run. You can either do that by:
|
21
|
+
* The command line: `xattr -d com.apple.quarantine $(which chromedriver)` (this is the only option if you are on Big Sur)
|
22
|
+
* Manually: clicking "allow" when you run the integration tests for the first time and a dialogue opens up
|
20
23
|
* Install Ruby dependencies: `bundle install`
|
21
|
-
* Install chromedriver for integration tests: `brew install --cask chromedriver`
|
22
|
-
* Chromedriver must be allowed to run. You can either do that by:
|
23
|
-
* The command line: `xattr -d com.apple.quarantine $(which chromedriver)` (this is the only option if you are on Big Sur)
|
24
|
-
* Manually: clicking "allow" when you run the integration tests for the first time and a dialogue opens up
|
25
24
|
* Install JS dependencies: `yarn install`
|
26
25
|
* Create database: `bundle exec rake db:create`
|
27
26
|
* Run migrations: `bundle exec rake db:migrate`
|
@@ -145,7 +144,7 @@ Configuration that changes from staging to production, but is public, should be
|
|
145
144
|
Architectural Decision Records (ADR) are stored in `doc/adr`
|
146
145
|
To create a new ADR, first install [ADR-tools](https://github.com/npryce/adr-tools) if you don't
|
147
146
|
already have it installed.
|
148
|
-
* `brew install adr-tools`
|
147
|
+
* `brew bundle` or `brew install adr-tools`
|
149
148
|
|
150
149
|
Then create the ADR:
|
151
150
|
* `adr new Title Of Architectural Decision`
|
data/templates/bin/with-server
CHANGED
@@ -30,15 +30,11 @@ Boundary(aws, "AWS GovCloud") {
|
|
30
30
|
System_Boundary(inventory, "Application") {
|
31
31
|
Container(app, "<&layers> <%= app_name.titleize %>", "Ruby <%= @ruby_version %>, Rails <%= Rails.version %>", "TKTK Application Description")
|
32
32
|
ContainerDb(app_db, "Application DB", "AWS RDS (PostgreSQL)", "Primary data storage")
|
33
|
-
<% if !skip_active_storage? %>
|
34
|
-
ContainerDb(app_s3, "File Storage", "AWS S3", "User-uploaded file storage")
|
35
|
-
<% end %>
|
36
33
|
}
|
37
34
|
}
|
38
35
|
}
|
39
36
|
}
|
40
37
|
|
41
|
-
|
42
38
|
Boundary(gsa_saas, "GSA-authorized SaaS") {
|
43
39
|
}
|
44
40
|
|
@@ -49,9 +45,6 @@ Rel(browser, aws_alb, "request info, submit requests", "https GET/POST (443)")
|
|
49
45
|
Rel(aws_alb, cloudgov_router, "proxies requests", "https GET/POST (443)")
|
50
46
|
Rel(cloudgov_router, app, "proxies requests", "https GET/POST (443)")
|
51
47
|
Rel(app, app_db, "reads/writes primary data", "psql (5432)")
|
52
|
-
<% if !skip_active_storage? %>
|
53
|
-
Rel(app, app_s3, "reads/writes file data", "https (443)")
|
54
|
-
<% end %>
|
55
48
|
@enduml
|
56
49
|
```
|
57
50
|
|
data/templates/env
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_template_18f
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Ahearn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: colorize
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.8'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.8'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,11 +128,20 @@ files:
|
|
114
128
|
- bin/console
|
115
129
|
- bin/setup
|
116
130
|
- exe/rails_template_18f
|
131
|
+
- lib/generators/rails_template18f/active_storage/active_storage_generator.rb
|
132
|
+
- lib/generators/rails_template18f/active_storage/templates/app/jobs/file_scan_job.rb
|
133
|
+
- lib/generators/rails_template18f/active_storage/templates/app/models/file_upload.rb
|
134
|
+
- lib/generators/rails_template18f/active_storage/templates/doc/adr/clamav.md.tt
|
135
|
+
- lib/generators/rails_template18f/active_storage/templates/spec/jobs/file_scan_job_spec.rb
|
136
|
+
- lib/generators/rails_template18f/active_storage/templates/spec/models/file_upload_spec.rb
|
117
137
|
- lib/generators/rails_template18f/circleci/circleci_generator.rb
|
118
138
|
- lib/generators/rails_template18f/circleci/templates/Dockerfile.tt
|
119
139
|
- lib/generators/rails_template18f/circleci/templates/bin/ci-server-start
|
120
140
|
- lib/generators/rails_template18f/circleci/templates/circleci/config.yml.tt
|
121
141
|
- lib/generators/rails_template18f/circleci/templates/docker-compose.ci.yml
|
142
|
+
- lib/generators/rails_template18f/cloud_gov_config/cloud_gov_config_generator.rb
|
143
|
+
- lib/generators/rails_template18f/cloud_gov_config/templates/app/models/cloud_gov_config.rb
|
144
|
+
- lib/generators/rails_template18f/cloud_gov_config/templates/spec/models/cloud_gov_config_spec.rb
|
122
145
|
- lib/generators/rails_template18f/dap/dap_generator.rb
|
123
146
|
- lib/generators/rails_template18f/github_actions/github_actions_generator.rb
|
124
147
|
- lib/generators/rails_template18f/github_actions/templates/github/actions/run-server/action.yml
|
@@ -139,8 +162,12 @@ files:
|
|
139
162
|
- lib/generators/rails_template18f/i18n/templates/config/locales/es.yml
|
140
163
|
- lib/generators/rails_template18f/i18n/templates/config/locales/fr.yml
|
141
164
|
- lib/generators/rails_template18f/i18n/templates/config/locales/zh.yml
|
165
|
+
- lib/generators/rails_template18f/i18n_js/i18n_js_generator.rb
|
166
|
+
- lib/generators/rails_template18f/i18n_js/templates/lib/tasks/i18n.rake
|
142
167
|
- lib/generators/rails_template18f/newrelic/newrelic_generator.rb
|
143
168
|
- lib/generators/rails_template18f/newrelic/templates/config/newrelic.yml.tt
|
169
|
+
- lib/generators/rails_template18f/sidekiq/sidekiq_generator.rb
|
170
|
+
- lib/generators/rails_template18f/sidekiq/templates/config/initializers/redis.rb
|
144
171
|
- lib/generators/rails_template18f/terraform/templates/terraform/README.md.tt
|
145
172
|
- lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/import.sh
|
146
173
|
- lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/main.tf.tt
|
@@ -153,12 +180,18 @@ files:
|
|
153
180
|
- lib/generators/rails_template18f/terraform/templates/terraform/production/main.tf.tt
|
154
181
|
- lib/generators/rails_template18f/terraform/templates/terraform/production/providers.tf.tt
|
155
182
|
- lib/generators/rails_template18f/terraform/templates/terraform/production/variables.tf
|
183
|
+
- lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/main.tf.tt
|
184
|
+
- lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/providers.tf
|
185
|
+
- lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/variables.tf
|
156
186
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/database/main.tf.tt
|
157
187
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/database/providers.tf
|
158
188
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/database/variables.tf
|
159
189
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/main.tf.tt
|
160
190
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/providers.tf
|
161
191
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/variables.tf
|
192
|
+
- lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/main.tf.tt
|
193
|
+
- lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/providers.tf
|
194
|
+
- lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/variables.tf
|
162
195
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/main.tf
|
163
196
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/providers.tf
|
164
197
|
- lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/variables.tf
|
@@ -166,6 +199,7 @@ files:
|
|
166
199
|
- lib/generators/rails_template18f/terraform/templates/terraform/staging/providers.tf.tt
|
167
200
|
- lib/generators/rails_template18f/terraform/templates/terraform/staging/variables.tf
|
168
201
|
- lib/generators/rails_template18f/terraform/terraform_generator.rb
|
202
|
+
- lib/rails_template18f/app_updater.rb
|
169
203
|
- lib/rails_template18f/generators.rb
|
170
204
|
- lib/rails_template18f/generators/base.rb
|
171
205
|
- lib/rails_template18f/generators/cloud_gov_options.rb
|
@@ -176,6 +210,7 @@ files:
|
|
176
210
|
- railsrc
|
177
211
|
- railsrc-hotwire
|
178
212
|
- template.rb
|
213
|
+
- templates/Brewfile
|
179
214
|
- templates/README.md.tt
|
180
215
|
- templates/app/assets/images/uswds.js
|
181
216
|
- templates/app/assets/stylesheets/uswds-settings.scss
|