rails_template_18f 0.8.0 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +92 -70
- data/README.md +60 -63
- data/lib/generators/rails_template18f/circleci/templates/circleci/config.yml.tt +1 -1
- data/lib/generators/rails_template18f/github_actions/github_actions_generator.rb +2 -2
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-production.yml.tt +2 -4
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-staging.yml.tt +2 -4
- data/lib/generators/rails_template18f/terraform/templates/terraform/README.md.tt +39 -54
- data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/import.sh +1 -0
- data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/main.tf.tt +7 -10
- data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/providers.tf +3 -3
- data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/run.sh.tt +28 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/teardown_creds.sh.tt +1 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/production/main.tf.tt +30 -42
- data/lib/generators/rails_template18f/terraform/templates/terraform/production/providers.tf.tt +8 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/staging/main.tf.tt +23 -33
- data/lib/generators/rails_template18f/terraform/templates/terraform/staging/providers.tf.tt +8 -1
- data/lib/generators/rails_template18f/terraform/terraform_generator.rb +0 -10
- data/lib/rails_template18f/version.rb +1 -1
- data/template.rb +18 -1
- data/templates/Brewfile +3 -0
- data/templates/README.md.tt +1 -0
- data/templates/bin/ops/create_service_account.sh.tt +78 -0
- data/templates/bin/ops/destroy_service_account.sh.tt +53 -0
- data/{lib/generators/rails_template18f/terraform/templates/terraform → templates/bin/ops}/set_space_egress.sh.tt +1 -1
- data/templates/config/environments/ci.rb +1 -1
- data/templates/config/environments/staging.rb +1 -1
- data/templates/doc/compliance/TODO.md +37 -0
- metadata +7 -21
- data/lib/generators/rails_template18f/terraform/templates/terraform/create_space_deployer.sh +0 -33
- data/lib/generators/rails_template18f/terraform/templates/terraform/destroy_space_deployer.sh +0 -19
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/main.tf.tt +0 -50
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/variables.tf +0 -47
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/main.tf.tt +0 -23
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/variables.tf +0 -42
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/main.tf.tt +0 -46
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/variables.tf +0 -47
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/main.tf.tt +0 -23
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/variables.tf +0 -42
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/main.tf +0 -27
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/variables.tf +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71f972115a1f66ddfefa4341186434fe24a4e78b201ad192786a4c5d34bebb8c
|
4
|
+
data.tar.gz: dcbf65cd0f011f12aa918975b426e23002d07c54c14d4251d5e8102bc59e74a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09de09463925281bdb7731686bebfe8eb4441a208e488597abfc910510dead294a0380629ed43af55956fb798fa2aeffeaddc25c0b6e2dd6e584db6791b211b0'
|
7
|
+
data.tar.gz: d12d2667e1aa2bf8e49097ccc9b3f76656a5a71b5ca829b1e02361d33df62af298c27dfe6de8da268f6ead509a54725c1df5852813196bd113f1daedf9f70de4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.8.2] - 2024-06-06
|
4
|
+
|
5
|
+
- Replace deprecated github action for cloud.gov deploys with cg-supported one
|
6
|
+
- Update terraform modules use for the actual module api - and specify the module version in use
|
7
|
+
|
8
|
+
## [0.8.1] - 2024-06-04
|
9
|
+
|
10
|
+
- fix error when compliance-template fork question is left blank
|
11
|
+
- fix deprecated and then removed use of `npm set-scripts`
|
12
|
+
- add a doc/compliance/TODO.md file with tasks that can sometimes be useful on the ATO journey.
|
13
|
+
- generalize create_space_deployer.sh to create_service_account.sh to make it easier to create SpaceAuditor users
|
14
|
+
- move support scripts set_space_egress.sh, create_service_account.sh, and destroy_service_account.sh out of terraform generator
|
15
|
+
|
3
16
|
## [0.8.0] - 2022-07-14
|
4
17
|
|
5
18
|
- use rails-erd gem for auto-updating logical data models
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rails_template_18f (0.8.
|
4
|
+
rails_template_18f (0.8.2)
|
5
5
|
activesupport (~> 7.0.0)
|
6
6
|
colorize (~> 0.8)
|
7
7
|
railties (~> 7.0.0)
|
@@ -10,25 +10,25 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actionpack (7.0.
|
14
|
-
actionview (= 7.0.
|
15
|
-
activesupport (= 7.0.
|
16
|
-
rack (~> 2.0, >= 2.2.
|
13
|
+
actionpack (7.0.8.4)
|
14
|
+
actionview (= 7.0.8.4)
|
15
|
+
activesupport (= 7.0.8.4)
|
16
|
+
rack (~> 2.0, >= 2.2.4)
|
17
17
|
rack-test (>= 0.6.3)
|
18
18
|
rails-dom-testing (~> 2.0)
|
19
19
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
20
|
-
actionview (7.0.
|
21
|
-
activesupport (= 7.0.
|
20
|
+
actionview (7.0.8.4)
|
21
|
+
activesupport (= 7.0.8.4)
|
22
22
|
builder (~> 3.1)
|
23
23
|
erubi (~> 1.4)
|
24
24
|
rails-dom-testing (~> 2.0)
|
25
25
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
26
|
-
activesupport (7.0.
|
26
|
+
activesupport (7.0.8.4)
|
27
27
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
28
28
|
i18n (>= 1.6, < 2)
|
29
29
|
minitest (>= 5.1)
|
30
30
|
tzinfo (~> 2.0)
|
31
|
-
ammeter (1.1.
|
31
|
+
ammeter (1.1.7)
|
32
32
|
activesupport (>= 3.0)
|
33
33
|
railties (>= 3.0)
|
34
34
|
rspec-rails (>= 2.2)
|
@@ -36,90 +36,112 @@ GEM
|
|
36
36
|
builder (3.2.4)
|
37
37
|
byebug (11.1.3)
|
38
38
|
colorize (0.8.1)
|
39
|
-
concurrent-ruby (1.1
|
39
|
+
concurrent-ruby (1.3.1)
|
40
40
|
crass (1.0.6)
|
41
|
-
diff-lcs (1.5.
|
42
|
-
erubi (1.
|
43
|
-
i18n (1.
|
41
|
+
diff-lcs (1.5.1)
|
42
|
+
erubi (1.12.0)
|
43
|
+
i18n (1.14.5)
|
44
44
|
concurrent-ruby (~> 1.0)
|
45
|
-
|
45
|
+
json (2.7.2)
|
46
|
+
language_server-protocol (3.17.0.3)
|
47
|
+
lint_roller (1.1.0)
|
48
|
+
loofah (2.22.0)
|
46
49
|
crass (~> 1.0.2)
|
47
|
-
nokogiri (>= 1.
|
48
|
-
method_source (1.
|
49
|
-
minitest (5.
|
50
|
-
nokogiri (1.
|
50
|
+
nokogiri (>= 1.12.0)
|
51
|
+
method_source (1.1.0)
|
52
|
+
minitest (5.23.1)
|
53
|
+
nokogiri (1.16.5-arm64-darwin)
|
51
54
|
racc (~> 1.4)
|
52
|
-
nokogiri (1.
|
55
|
+
nokogiri (1.16.5-x86_64-darwin)
|
53
56
|
racc (~> 1.4)
|
54
|
-
|
55
|
-
|
57
|
+
nokogiri (1.16.5-x86_64-linux)
|
58
|
+
racc (~> 1.4)
|
59
|
+
parallel (1.24.0)
|
60
|
+
parser (3.3.2.0)
|
56
61
|
ast (~> 2.4.1)
|
57
|
-
|
58
|
-
|
59
|
-
rack
|
62
|
+
racc
|
63
|
+
racc (1.8.0)
|
64
|
+
rack (2.2.9)
|
65
|
+
rack-test (2.1.0)
|
60
66
|
rack (>= 1.3)
|
61
|
-
rails-dom-testing (2.0
|
62
|
-
activesupport (>=
|
67
|
+
rails-dom-testing (2.2.0)
|
68
|
+
activesupport (>= 5.0.0)
|
69
|
+
minitest
|
63
70
|
nokogiri (>= 1.6)
|
64
|
-
rails-html-sanitizer (1.
|
65
|
-
loofah (~> 2.
|
66
|
-
|
67
|
-
|
68
|
-
|
71
|
+
rails-html-sanitizer (1.6.0)
|
72
|
+
loofah (~> 2.21)
|
73
|
+
nokogiri (~> 1.14)
|
74
|
+
railties (7.0.8.4)
|
75
|
+
actionpack (= 7.0.8.4)
|
76
|
+
activesupport (= 7.0.8.4)
|
69
77
|
method_source
|
70
78
|
rake (>= 12.2)
|
71
79
|
thor (~> 1.0)
|
72
80
|
zeitwerk (~> 2.5)
|
73
81
|
rainbow (3.1.1)
|
74
|
-
rake (13.
|
75
|
-
regexp_parser (2.
|
76
|
-
rexml (3.2.
|
77
|
-
|
78
|
-
|
79
|
-
rspec-
|
80
|
-
rspec-
|
81
|
-
|
82
|
-
|
83
|
-
|
82
|
+
rake (13.2.1)
|
83
|
+
regexp_parser (2.9.2)
|
84
|
+
rexml (3.2.8)
|
85
|
+
strscan (>= 3.0.9)
|
86
|
+
rspec (3.13.0)
|
87
|
+
rspec-core (~> 3.13.0)
|
88
|
+
rspec-expectations (~> 3.13.0)
|
89
|
+
rspec-mocks (~> 3.13.0)
|
90
|
+
rspec-core (3.13.0)
|
91
|
+
rspec-support (~> 3.13.0)
|
92
|
+
rspec-expectations (3.13.0)
|
84
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
85
|
-
rspec-support (~> 3.
|
86
|
-
rspec-mocks (3.
|
94
|
+
rspec-support (~> 3.13.0)
|
95
|
+
rspec-mocks (3.13.1)
|
87
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
88
|
-
rspec-support (~> 3.
|
89
|
-
rspec-rails (
|
90
|
-
actionpack (>=
|
91
|
-
activesupport (>=
|
92
|
-
railties (>=
|
93
|
-
rspec-core (~> 3.
|
94
|
-
rspec-expectations (~> 3.
|
95
|
-
rspec-mocks (~> 3.
|
96
|
-
rspec-support (~> 3.
|
97
|
-
rspec-support (3.
|
98
|
-
rubocop (1.
|
97
|
+
rspec-support (~> 3.13.0)
|
98
|
+
rspec-rails (6.1.2)
|
99
|
+
actionpack (>= 6.1)
|
100
|
+
activesupport (>= 6.1)
|
101
|
+
railties (>= 6.1)
|
102
|
+
rspec-core (~> 3.13)
|
103
|
+
rspec-expectations (~> 3.13)
|
104
|
+
rspec-mocks (~> 3.13)
|
105
|
+
rspec-support (~> 3.13)
|
106
|
+
rspec-support (3.13.1)
|
107
|
+
rubocop (1.63.5)
|
108
|
+
json (~> 2.3)
|
109
|
+
language_server-protocol (>= 3.17.0)
|
99
110
|
parallel (~> 1.10)
|
100
|
-
parser (>= 3.
|
111
|
+
parser (>= 3.3.0.2)
|
101
112
|
rainbow (>= 2.2.2, < 4.0)
|
102
113
|
regexp_parser (>= 1.8, < 3.0)
|
103
114
|
rexml (>= 3.2.5, < 4.0)
|
104
|
-
rubocop-ast (>= 1.
|
115
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
105
116
|
ruby-progressbar (~> 1.7)
|
106
|
-
unicode-display_width (>=
|
107
|
-
rubocop-ast (1.
|
108
|
-
parser (>= 3.
|
109
|
-
rubocop-performance (1.
|
110
|
-
rubocop (>= 1.
|
111
|
-
rubocop-ast (>=
|
112
|
-
ruby-progressbar (1.
|
113
|
-
standard (1.
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
117
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
118
|
+
rubocop-ast (1.31.3)
|
119
|
+
parser (>= 3.3.1.0)
|
120
|
+
rubocop-performance (1.21.0)
|
121
|
+
rubocop (>= 1.48.1, < 2.0)
|
122
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
123
|
+
ruby-progressbar (1.13.0)
|
124
|
+
standard (1.36.0)
|
125
|
+
language_server-protocol (~> 3.17.0.2)
|
126
|
+
lint_roller (~> 1.0)
|
127
|
+
rubocop (~> 1.63.0)
|
128
|
+
standard-custom (~> 1.0.0)
|
129
|
+
standard-performance (~> 1.4)
|
130
|
+
standard-custom (1.0.2)
|
131
|
+
lint_roller (~> 1.0)
|
132
|
+
rubocop (~> 1.50)
|
133
|
+
standard-performance (1.4.0)
|
134
|
+
lint_roller (~> 1.1)
|
135
|
+
rubocop-performance (~> 1.21.0)
|
136
|
+
strscan (3.1.0)
|
137
|
+
thor (1.3.1)
|
138
|
+
tzinfo (2.0.6)
|
118
139
|
concurrent-ruby (~> 1.0)
|
119
|
-
unicode-display_width (2.
|
120
|
-
zeitwerk (2.6.
|
140
|
+
unicode-display_width (2.5.0)
|
141
|
+
zeitwerk (2.6.15)
|
121
142
|
|
122
143
|
PLATFORMS
|
144
|
+
arm64-darwin-23
|
123
145
|
x86_64-darwin-20
|
124
146
|
x86_64-darwin-21
|
125
147
|
x86_64-linux
|
data/README.md
CHANGED
@@ -1,71 +1,90 @@
|
|
1
|
-
18F
|
1
|
+
18F Rails Template
|
2
2
|
============================
|
3
|
+
The 18F Rails template starts or upgrades Rails projects so that they're more secure, follow compliance rules, and are nearly ready to deploy onto cloud.gov. This gem sets up security checks and compliance diagrams, adds the U.S. Web Design System (USWDS), and much much more — [see the full list of features](#features).
|
3
4
|
|
4
5
|
This template will create a new Rails 7.0.x project.
|
5
6
|
|
6
|
-
See the `rails-6` branch for Rails 6.1.x
|
7
|
+
[See the `rails-6` branch for Rails 6.1.x](https://github.com/18F/rails-template/tree/rails-6)
|
7
8
|
|
8
|
-
##
|
9
|
+
## Installation
|
9
10
|
|
10
|
-
|
11
|
-
1. `rails_template_18f help new` for usage instructions
|
11
|
+
### For a new Rails project
|
12
12
|
|
13
|
-
|
13
|
+
1. Install the gem:
|
14
|
+
```
|
15
|
+
$ gem install rails_template_18f
|
16
|
+
```
|
14
17
|
|
15
|
-
|
18
|
+
2. Decide whether to install Rails with Hotwire, a framework for client-side interactivity using JavaScript
|
19
|
+
- **For entirely server-side rendered applications**, without any Javascript:
|
20
|
+
- Use the default configuration (`rails_template_18f new <project name> --no-hotwire`)
|
21
|
+
- **For applications that need [a bit of client-side interactivity][aBitOfJS]**, but not a full single page application like React or Vue:
|
22
|
+
- Use Hotwire (`rails_template_18f new <project name> --hotwire`)
|
23
|
+
- **For single-page applications** where most of the interaction will take place via JavaScript, and which will use a framework like React or Vue:
|
24
|
+
- Use the default configuration (`rails_template_18f new <project name> --no-hotwire`)
|
16
25
|
|
17
|
-
`
|
26
|
+
The `--hotwire` flag means that [Hotwire](https://hotwired.dev/) and [ActionCable](https://guides.rubyonrails.org/action_cable_overview.html) are installed. ActionCable is included to enable the [Turbo Streams](https://turbo.hotwired.dev/handbook/streams) functionality of Hotwire.
|
18
27
|
|
19
|
-
|
20
|
-
as well as a basis for installing a separate Single Page Application (SPA) library such as React.
|
28
|
+
Before installing, you may want to consider the other application configuration options in the next section.
|
21
29
|
|
22
|
-
|
30
|
+
[aBitOfJS]: https://engineering.18f.gov/web-architecture/#:~:text=are%20more%20complex-,If%20your%20use%20case%20requires%20a%20bit%20of%20client%2Dside%20interactivity%2C%20use%20the%20above%20options%20with%20a%20bit%20of%20JavaScript.,-You%20might%20use
|
23
31
|
|
24
|
-
|
32
|
+
#### Advanced configuration
|
25
33
|
|
26
|
-
|
34
|
+
There are a variety of options that customize your Rails application.
|
27
35
|
|
28
|
-
|
29
|
-
for more interactivity than server-rendered apps, but less than a full SPA.
|
36
|
+
**Important:** Do not use flags `--skip-bundle` or `--skip-javascript`, or various parts of this template will break.
|
30
37
|
|
31
|
-
|
38
|
+
#### Default configuration
|
32
39
|
|
33
|
-
|
40
|
+
```sh
|
41
|
+
--skip-active-storage # Don't include ActiveStorage for document upload
|
42
|
+
--skip-action-text # Don't include ActionText libraries for WYSIWYG editing
|
43
|
+
--skip-action-cable # Don't include ActionCable websocket implementation
|
44
|
+
--skip-action-mailbox # Don't include inbound email
|
45
|
+
--skip-hotwire # Don't include Hotwire JS library
|
46
|
+
--skip-test # Skip built-in test framework. (We include RSpec)
|
47
|
+
--javascript=webpack # Use webpack for JS bundling
|
48
|
+
--css=postcss # Use the PostCSS framework for bundling CSS
|
49
|
+
--template=template.rb # Add additional configuration from template.rb
|
50
|
+
--database=postgresql # Use a PostgreSQL database
|
51
|
+
```
|
34
52
|
|
35
|
-
|
53
|
+
#### Customizing the installation
|
36
54
|
|
37
|
-
|
55
|
+
| Option | Description |
|
56
|
+
|--------|-------------|
|
57
|
+
| `--no-skip-<framework>` | Each of the skipped frameworks listed above (also in `railsrc`) can be overridden on the command line. For example: `--no-skip-active-storage` will include support for `ActiveStorage` document uploads |
|
58
|
+
| `--javascript=esbuild` | Use [esbuild](https://esbuild.github.io/) instead of [webpack](https://webpack.js.org/) for JavaScript bundling. Note that maintaining IE11 support with esbuild may be tricky. |
|
59
|
+
| `--no-skip-<FRAMEWORK>` | Each of the skipped frameworks in `railsrc` can be overridden on the command line. For example: `--no-skip-active-storage` will include support for `ActiveStorage` document uploads |
|
38
60
|
|
39
|
-
|
40
|
-
maintaining IE11 support with esbuild may be tricky.
|
61
|
+
You probably won't want to customize the template — that defeats the purpose of using this gem!
|
41
62
|
|
42
|
-
|
63
|
+
_TODO: Documentation on whether you can override the `css` and `database` options._
|
43
64
|
|
44
|
-
|
65
|
+
### For an existing Rails project
|
45
66
|
|
46
|
-
|
67
|
+
Installing this gem in a new Rails project will _TODO: say how it will help_
|
47
68
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
--skip-action-mailbox # don't include inbound email
|
53
|
-
--skip-hotwire # don't include Hotwire JS library
|
54
|
-
--skip-test # Skip built in test framework. (RSpec included via template.rb)
|
55
|
-
--javascript=webpack # Use webpack for JS bundling
|
56
|
-
--css=postcss # Use the postcss CSS bundling framework
|
57
|
-
--template=template.rb # add additional configuration from template.rb
|
58
|
-
--database=postgresql # default to PostgreSQL
|
69
|
+
Add this line to your application's Gemfile:
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
gem "rails_template_18f", group: :development
|
59
73
|
```
|
60
74
|
|
61
|
-
|
75
|
+
And then run:
|
62
76
|
|
63
|
-
|
77
|
+
$ bundle install
|
64
78
|
|
65
|
-
|
79
|
+
For a list of commands this gem can perform, run:
|
66
80
|
|
81
|
+
$ rails generate | grep 18f
|
67
82
|
|
68
|
-
|
83
|
+
_TODO: Add documentation on each option._
|
84
|
+
|
85
|
+
### Features
|
86
|
+
|
87
|
+
This template does a lot! The template completes the following to-do list to make your application more secure, closer to standards-compliant, and nearly production-ready.
|
69
88
|
|
70
89
|
1. Create a better default `README`
|
71
90
|
1. Copy `CONTRIBUTING.md` and `LICENSE.md` from the [18F Open Source Policy repo](https://github.com/18F/open-source-policy/)
|
@@ -101,29 +120,7 @@ ActionCable is included to enable the [Turbo Streams](https://turbo.hotwired.dev
|
|
101
120
|
1. Create [Architecture Decision Records](https://adr.github.io/) for above setup
|
102
121
|
1. Commit the resulting project with git (unless `--skip-git` is passed)
|
103
122
|
|
104
|
-
##
|
105
|
-
|
106
|
-
### Installation
|
107
|
-
|
108
|
-
Add this line to your application's Gemfile:
|
109
|
-
|
110
|
-
```ruby
|
111
|
-
gem "rails_template_18f", group: :development
|
112
|
-
```
|
113
|
-
|
114
|
-
And then run:
|
115
|
-
|
116
|
-
$ bundle install
|
117
|
-
|
118
|
-
Or install it yourself as:
|
119
|
-
|
120
|
-
$ gem install rails_template_18f
|
121
|
-
|
122
|
-
### Usage
|
123
|
-
|
124
|
-
Run `rails generate` for a list of commands this gem can run
|
125
|
-
|
126
|
-
## Development
|
123
|
+
## Developing this gem
|
127
124
|
|
128
125
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
129
126
|
|
@@ -133,6 +130,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
133
130
|
|
134
131
|
Bug reports and pull requests are welcome on GitHub at https://github.com/18f/rails-template. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/18f/rails-template/blob/main/CODE_OF_CONDUCT.md).
|
135
132
|
|
136
|
-
## Code of
|
133
|
+
## Code of conduct
|
137
134
|
|
138
135
|
Everyone interacting in the 18F Rails Template project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rahearn/rails-template-18f/blob/main/CODE_OF_CONDUCT.md).
|
@@ -47,7 +47,7 @@ commands:
|
|
47
47
|
- run:
|
48
48
|
name: Install Cloud Foundry CLI
|
49
49
|
command: |
|
50
|
-
curl -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&version=
|
50
|
+
curl -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&version=v8&source=github'
|
51
51
|
sudo dpkg -i cf-cli_amd64.deb
|
52
52
|
- run:
|
53
53
|
name: Login with service account
|
@@ -62,8 +62,8 @@ EOB
|
|
62
62
|
def update_terraform_readme
|
63
63
|
return unless terraform?
|
64
64
|
readme_filename = "terraform/README.md"
|
65
|
-
insert_into_file readme_filename, " |- .force-action-apply\n", after: "
|
66
|
-
insert_into_file readme_filename, <<~EOM, after:
|
65
|
+
insert_into_file readme_filename, " |- .force-action-apply\n", after: "- <env>/\n"
|
66
|
+
insert_into_file readme_filename, <<~EOM, after: /.*environment-specific modules:$/
|
67
67
|
\n- `.force-action-apply` is a file that can be updated to force GitHub Actions to run `terraform apply` during the deploy phase
|
68
68
|
EOM
|
69
69
|
end
|
@@ -42,7 +42,7 @@ jobs:
|
|
42
42
|
run: terraform apply -auto-approve -input=false
|
43
43
|
<% end %>
|
44
44
|
- name: Deploy app
|
45
|
-
uses:
|
45
|
+
uses: cloud-gov/cg-cli-tools@main
|
46
46
|
env:
|
47
47
|
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
|
48
48
|
with:
|
@@ -50,6 +50,4 @@ jobs:
|
|
50
50
|
cf_password: ${{ secrets.CF_PASSWORD }}
|
51
51
|
cf_org: <%= cloud_gov_organization %>
|
52
52
|
cf_space: <%= cloud_gov_production_space %>
|
53
|
-
|
54
|
-
--vars-file config/deployment/production.yml
|
55
|
-
--var rails_master_key=$RAILS_MASTER_KEY
|
53
|
+
cf_command: push -vars-file config/deployment/production.yml --var rails_master_key=${{ env.RAILS_MASTER_KEY }} --strategy rolling
|
@@ -42,7 +42,7 @@ jobs:
|
|
42
42
|
run: terraform apply -auto-approve -input=false
|
43
43
|
<% end %>
|
44
44
|
- name: Deploy app
|
45
|
-
uses:
|
45
|
+
uses: cloud-gov/cg-cli-tools@main
|
46
46
|
env:
|
47
47
|
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
|
48
48
|
with:
|
@@ -50,6 +50,4 @@ jobs:
|
|
50
50
|
cf_password: ${{ secrets.CF_PASSWORD }}
|
51
51
|
cf_org: <%= cloud_gov_organization %>
|
52
52
|
cf_space: <%= cloud_gov_staging_space %>
|
53
|
-
|
54
|
-
--vars-file config/deployment/staging.yml
|
55
|
-
--var rails_master_key=$RAILS_MASTER_KEY
|
53
|
+
cf_command: push -vars-file config/deployment/staging.yml --var rails_master_key=${{ env.RAILS_MASTER_KEY }} --strategy rolling
|