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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/Gemfile.lock +92 -70
  4. data/README.md +60 -63
  5. data/lib/generators/rails_template18f/circleci/templates/circleci/config.yml.tt +1 -1
  6. data/lib/generators/rails_template18f/github_actions/github_actions_generator.rb +2 -2
  7. data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-production.yml.tt +2 -4
  8. data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-staging.yml.tt +2 -4
  9. data/lib/generators/rails_template18f/terraform/templates/terraform/README.md.tt +39 -54
  10. data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/import.sh +1 -0
  11. data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/main.tf.tt +7 -10
  12. data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/providers.tf +3 -3
  13. data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/run.sh.tt +28 -1
  14. data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/teardown_creds.sh.tt +1 -1
  15. data/lib/generators/rails_template18f/terraform/templates/terraform/production/main.tf.tt +30 -42
  16. data/lib/generators/rails_template18f/terraform/templates/terraform/production/providers.tf.tt +8 -1
  17. data/lib/generators/rails_template18f/terraform/templates/terraform/staging/main.tf.tt +23 -33
  18. data/lib/generators/rails_template18f/terraform/templates/terraform/staging/providers.tf.tt +8 -1
  19. data/lib/generators/rails_template18f/terraform/terraform_generator.rb +0 -10
  20. data/lib/rails_template18f/version.rb +1 -1
  21. data/template.rb +18 -1
  22. data/templates/Brewfile +3 -0
  23. data/templates/README.md.tt +1 -0
  24. data/templates/bin/ops/create_service_account.sh.tt +78 -0
  25. data/templates/bin/ops/destroy_service_account.sh.tt +53 -0
  26. data/{lib/generators/rails_template18f/terraform/templates/terraform → templates/bin/ops}/set_space_egress.sh.tt +1 -1
  27. data/templates/config/environments/ci.rb +1 -1
  28. data/templates/config/environments/staging.rb +1 -1
  29. data/templates/doc/compliance/TODO.md +37 -0
  30. metadata +7 -21
  31. data/lib/generators/rails_template18f/terraform/templates/terraform/create_space_deployer.sh +0 -33
  32. data/lib/generators/rails_template18f/terraform/templates/terraform/destroy_space_deployer.sh +0 -19
  33. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/main.tf.tt +0 -50
  34. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/providers.tf +0 -16
  35. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/variables.tf +0 -47
  36. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/main.tf.tt +0 -23
  37. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/providers.tf +0 -16
  38. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/variables.tf +0 -42
  39. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/main.tf.tt +0 -46
  40. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/providers.tf +0 -16
  41. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/variables.tf +0 -47
  42. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/main.tf.tt +0 -23
  43. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/providers.tf +0 -16
  44. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/variables.tf +0 -42
  45. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/main.tf +0 -27
  46. data/lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/providers.tf +0 -16
  47. 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: dcc4a62d027d473b29b87425d2418522373457ae750a3bfa1e7d5834f3e3d39f
4
- data.tar.gz: 88d86b8508c80de0b0593ca4852a789442e4ac5e84324c074e866bc85d50de37
3
+ metadata.gz: 71f972115a1f66ddfefa4341186434fe24a4e78b201ad192786a4c5d34bebb8c
4
+ data.tar.gz: dcbf65cd0f011f12aa918975b426e23002d07c54c14d4251d5e8102bc59e74a3
5
5
  SHA512:
6
- metadata.gz: b8145b8f45a774296b8ea2add76694855f5c618e5900e2dcb4528666c6a855913d5a8eace278d1f208bce0ff1fa23818544bf1a931b11e88856451684fa6a465
7
- data.tar.gz: ef237cfc40495ef9bece29583ad4007c08631e5cfd092e9415914442ffa588302a980f4fef1584d520827df970a791d1633a43cbe90e8d5eb72c036be7e84a0c
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.0)
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.3)
14
- actionview (= 7.0.3)
15
- activesupport (= 7.0.3)
16
- rack (~> 2.0, >= 2.2.0)
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.3)
21
- activesupport (= 7.0.3)
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.3)
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.5)
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.10)
39
+ concurrent-ruby (1.3.1)
40
40
  crass (1.0.6)
41
- diff-lcs (1.5.0)
42
- erubi (1.10.0)
43
- i18n (1.10.0)
41
+ diff-lcs (1.5.1)
42
+ erubi (1.12.0)
43
+ i18n (1.14.5)
44
44
  concurrent-ruby (~> 1.0)
45
- loofah (2.18.0)
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.5.9)
48
- method_source (1.0.0)
49
- minitest (5.16.2)
50
- nokogiri (1.13.6-x86_64-darwin)
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.13.6-x86_64-linux)
55
+ nokogiri (1.16.5-x86_64-darwin)
53
56
  racc (~> 1.4)
54
- parallel (1.22.1)
55
- parser (3.1.2.0)
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
- racc (1.6.0)
58
- rack (2.2.4)
59
- rack-test (2.0.2)
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.3)
62
- activesupport (>= 4.2.0)
67
+ rails-dom-testing (2.2.0)
68
+ activesupport (>= 5.0.0)
69
+ minitest
63
70
  nokogiri (>= 1.6)
64
- rails-html-sanitizer (1.4.3)
65
- loofah (~> 2.3)
66
- railties (7.0.3)
67
- actionpack (= 7.0.3)
68
- activesupport (= 7.0.3)
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.0.6)
75
- regexp_parser (2.5.0)
76
- rexml (3.2.5)
77
- rspec (3.11.0)
78
- rspec-core (~> 3.11.0)
79
- rspec-expectations (~> 3.11.0)
80
- rspec-mocks (~> 3.11.0)
81
- rspec-core (3.11.0)
82
- rspec-support (~> 3.11.0)
83
- rspec-expectations (3.11.0)
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.11.0)
86
- rspec-mocks (3.11.1)
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.11.0)
89
- rspec-rails (5.1.2)
90
- actionpack (>= 5.2)
91
- activesupport (>= 5.2)
92
- railties (>= 5.2)
93
- rspec-core (~> 3.10)
94
- rspec-expectations (~> 3.10)
95
- rspec-mocks (~> 3.10)
96
- rspec-support (~> 3.10)
97
- rspec-support (3.11.0)
98
- rubocop (1.29.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.1.0.0)
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.17.0, < 2.0)
115
+ rubocop-ast (>= 1.31.1, < 2.0)
105
116
  ruby-progressbar (~> 1.7)
106
- unicode-display_width (>= 1.4.0, < 3.0)
107
- rubocop-ast (1.18.0)
108
- parser (>= 3.1.1.0)
109
- rubocop-performance (1.13.3)
110
- rubocop (>= 1.7.0, < 2.0)
111
- rubocop-ast (>= 0.4.0)
112
- ruby-progressbar (1.11.0)
113
- standard (1.12.1)
114
- rubocop (= 1.29.1)
115
- rubocop-performance (= 1.13.3)
116
- thor (1.2.1)
117
- tzinfo (2.0.4)
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.2.0)
120
- zeitwerk (2.6.0)
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-Flavored Rails 7 Project
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
- ## Use for new Rails Project
9
+ ## Installation
9
10
 
10
- 1. `gem install rails_template_18f`
11
- 1. `rails_template_18f help new` for usage instructions
11
+ ### For a new Rails project
12
12
 
13
- ### Choosing whether to use `--hotwire`
13
+ 1. Install the gem:
14
+ ```
15
+ $ gem install rails_template_18f
16
+ ```
14
17
 
15
- #### Server Rendered _or_ Single Page Applications
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
- `rails_template_18f new <<PATH_TO_PROJECT>>` _or_ `rails_template_18f new <<PATH_TO_PROJECT>> --no-hotwire`
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
- This creates a Rails application that is appropriate for both server-rendered applications,
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
- #### A bit more JavaScript needed
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
- `rails_template_18f new <<PATH_TO_PROJECT>> --hotwire`
32
+ #### Advanced configuration
25
33
 
26
- This creates a Rails application that includes the [Hotwire](https://hotwired.dev/) JavaScript framework.
34
+ There are a variety of options that customize your Rails application.
27
35
 
28
- Hotwire can be used to add [a bit of JavaScript](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)
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
- ### Available Options
38
+ #### Default configuration
32
39
 
33
- The following options can be added to change how the template behaves.
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
- **Important:** You must not pass `--skip-bundle` or `--skip-javascript` to `rails_template_18f` or various aspects of the template will be broken
53
+ #### Customizing the installation
36
54
 
37
- #### `--javascript=esbuild`
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
- Use [esbuild](https://esbuild.github.io/) instead of [webpack](https://webpack.js.org/) for JavaScript bundling. Note that
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
- #### `--no-skip-FRAMEWORK`
63
+ _TODO: Documentation on whether you can override the `css` and `database` options._
43
64
 
44
- 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
65
+ ### For an existing Rails project
45
66
 
46
- ### What default use or `--no-hotwire` does
67
+ Installing this gem in a new Rails project will _TODO: say how it will help_
47
68
 
48
- ```
49
- --skip-active-storage # don't include ActiveStorage for document upload
50
- --skip-action-text # don't include ActionText libraries for WYSIWYG editing
51
- --skip-action-cable # don't include ActionCable websocket implementation
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
- ### What `--hotwire` does
75
+ And then run:
62
76
 
63
- Identical to `--no-hotwire` except that [Hotwire](https://hotwired.dev/) and [ActionCable](https://guides.rubyonrails.org/action_cable_overview.html) are not skipped.
77
+ $ bundle install
64
78
 
65
- ActionCable is included to enable the [Turbo Streams](https://turbo.hotwired.dev/handbook/streams) functionality of Hotwire.
79
+ For a list of commands this gem can perform, run:
66
80
 
81
+ $ rails generate | grep 18f
67
82
 
68
- ### What `template.rb` does
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
- ## Use for an existing Rails project
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 Conduct
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=v7&source=github'
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: " |- secrets.auto.tfvars\n"
66
- insert_into_file readme_filename, <<~EOM, after: /- `secrets.auto.tfvars`.*$/
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: 18F/cg-deploy-action@main
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
- push_arguments: >-
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: 18F/cg-deploy-action@main
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
- push_arguments: >-
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