rails_template_18f 0.4.1 → 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 +6 -0
- data/Gemfile.lock +3 -3
- data/lib/generators/rails_template18f/active_storage/active_storage_generator.rb +0 -1
- data/lib/generators/rails_template18f/sidekiq/sidekiq_generator.rb +9 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/README.md.tt +1 -1
- data/lib/generators/rails_template18f/terraform/terraform_generator.rb +10 -1
- data/lib/rails_template18f/version.rb +1 -1
- data/template.rb +10 -0
- 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/env +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9452d60916a767ee1b00bb0a76e6582d4d1ed760b3bf0c4d68a07c8225ddfd4
|
4
|
+
data.tar.gz: 481c2ee7693849f2c21d382d78edd08a59370b8c2b440bef8502d22a039a2243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a5b1be47db25412b0ba04dd19a395401f86b6d5ee14b907c2de54e95bfae159a6407851bfcd83b07ac20ca9423de568580c5cfdec0c5d49bfd5e2f7f62e59df
|
7
|
+
data.tar.gz: 75ff52ec4661f95c4da617217d7eb7dc993192610d9209ab3f9a438504111281a8c779db3074c1d6506073b126d437c6aaebe328b11add1363797938f70d006e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.5.0] - 2022-03-04
|
4
|
+
|
5
|
+
- use Brewfile for installing homebrew-based dependencies
|
6
|
+
- move test site banner to the _usa_banner.html.erb partial
|
7
|
+
- use dockerize within bin/with-server to wait for rails to start
|
8
|
+
|
3
9
|
## [0.4.1] - 2022-02-25
|
4
10
|
|
5
11
|
- update gem dependencies
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rails_template_18f (0.
|
4
|
+
rails_template_18f (0.5.0)
|
5
5
|
activesupport (~> 7.0.0)
|
6
6
|
colorize (~> 0.8)
|
7
7
|
railties (~> 7.0.0)
|
@@ -47,9 +47,9 @@ GEM
|
|
47
47
|
nokogiri (>= 1.5.9)
|
48
48
|
method_source (1.0.0)
|
49
49
|
minitest (5.15.0)
|
50
|
-
nokogiri (1.13.
|
50
|
+
nokogiri (1.13.3-x86_64-darwin)
|
51
51
|
racc (~> 1.4)
|
52
|
-
nokogiri (1.13.
|
52
|
+
nokogiri (1.13.3-x86_64-linux)
|
53
53
|
racc (~> 1.4)
|
54
54
|
parallel (1.21.0)
|
55
55
|
parser (3.1.0.0)
|
@@ -18,6 +18,15 @@ module RailsTemplate18f
|
|
18
18
|
bundle_install
|
19
19
|
end
|
20
20
|
|
21
|
+
def install_redis
|
22
|
+
append_to_file "Brewfile", <<~EOB
|
23
|
+
|
24
|
+
# queue for sidekiq jobs
|
25
|
+
brew "redis"
|
26
|
+
EOB
|
27
|
+
insert_into_file "README.md", indent("* [redis]()\n"), after: /\* Install homebrew dependencies: `brew bundle`\n/
|
28
|
+
end
|
29
|
+
|
21
30
|
def configure_server_runner
|
22
31
|
append_to_file "Procfile.dev", "worker: bundle exec sidekiq\n"
|
23
32
|
insert_into_file "manifest.yml", indent(<<~EOYAML), after: /processes:$\n/
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This directory holds the terraform modules for maintaining your complete persistent infrastructure.
|
4
4
|
|
5
|
-
Prerequisite: install the `jq` JSON processor: `brew install jq`
|
5
|
+
Prerequisite: install the `jq` JSON processor: `brew bundle` or `brew install jq`
|
6
6
|
|
7
7
|
## Initial setup
|
8
8
|
|
@@ -19,6 +19,15 @@ module RailsTemplate18f
|
|
19
19
|
chmod "terraform/bootstrap/teardown_creds.sh", 0o755
|
20
20
|
end
|
21
21
|
|
22
|
+
def install_jq
|
23
|
+
append_to_file "Brewfile", <<~EOB
|
24
|
+
|
25
|
+
# used in terraform/create_space_deployer.sh
|
26
|
+
brew "jq"
|
27
|
+
EOB
|
28
|
+
insert_into_file "README.md", indent("* [jq](https://stedolan.github.io/jq/)\n"), after: /\* Install homebrew dependencies: `brew bundle`\n/
|
29
|
+
end
|
30
|
+
|
22
31
|
def ignore_files
|
23
32
|
unless skip_git?
|
24
33
|
append_to_file ".gitignore", <<~EOM
|
@@ -34,7 +43,7 @@ module RailsTemplate18f
|
|
34
43
|
end
|
35
44
|
|
36
45
|
def update_readme
|
37
|
-
gsub_file "README.md", /^(### Automatic linting)
|
46
|
+
gsub_file "README.md", /^(### Automatic linting)\s*$/, '\1 and terraform formatting'
|
38
47
|
gsub_file "README.md", /(ruby linting) (on every)/, '\1 and terraform formatting \2'
|
39
48
|
gsub_file "README.md", /^Before the first deploy only.*$/, "Follow the instructions in `terraform/README.md` to create the supporting services."
|
40
49
|
end
|
data/template.rb
CHANGED
@@ -87,6 +87,13 @@ register_announcement("Documentation", <<~EOM)
|
|
87
87
|
* Review any TBD sections of the README and update where appropriate.
|
88
88
|
EOM
|
89
89
|
|
90
|
+
# ensure dependencies are installed
|
91
|
+
copy_file "Brewfile"
|
92
|
+
insert_into_file "bin/setup", <<EOSETUP, after: /Add necessary setup steps to this file.\n/
|
93
|
+
puts "== Installing homebrew dependencies =="
|
94
|
+
system("brew bundle --no-lock")
|
95
|
+
EOSETUP
|
96
|
+
|
90
97
|
# setup nvmrc
|
91
98
|
file ".nvmrc", @node_version
|
92
99
|
|
@@ -196,6 +203,9 @@ unless skip_git?
|
|
196
203
|
end
|
197
204
|
append_to_file ".gitignore", <<~EOM
|
198
205
|
|
206
|
+
# Ignore Brewfile debug info
|
207
|
+
Brewfile.lock.json
|
208
|
+
|
199
209
|
# Ignore local dotenv overrides
|
200
210
|
.env*.local
|
201
211
|
|
data/templates/Brewfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Brewfile
|
2
|
+
# add any dependencies that must be installed from homebrew here
|
3
|
+
|
4
|
+
# cloud.gov RDS is on postgres 12
|
5
|
+
brew "postgresql@12", link: true
|
6
|
+
|
7
|
+
# used in bin/with-server script
|
8
|
+
brew "dockerize"
|
9
|
+
|
10
|
+
# helper scripts for creating new ADRs
|
11
|
+
brew "adr-tools"
|
12
|
+
|
13
|
+
# chromedriver for integration tests
|
14
|
+
cask "chromedriver"
|
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
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
|
@@ -210,6 +210,7 @@ files:
|
|
210
210
|
- railsrc
|
211
211
|
- railsrc-hotwire
|
212
212
|
- template.rb
|
213
|
+
- templates/Brewfile
|
213
214
|
- templates/README.md.tt
|
214
215
|
- templates/app/assets/images/uswds.js
|
215
216
|
- templates/app/assets/stylesheets/uswds-settings.scss
|
@@ -263,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
264
|
- !ruby/object:Gem::Version
|
264
265
|
version: '0'
|
265
266
|
requirements: []
|
266
|
-
rubygems_version: 3.
|
267
|
+
rubygems_version: 3.2.32
|
267
268
|
signing_key:
|
268
269
|
specification_version: 4
|
269
270
|
summary: Generators for creating an 18F-flavored Rails app
|