rails_template_18f 0.5.2 → 0.5.3

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
  SHA256:
3
- metadata.gz: 2081ea2fe971ba6cdd3af16c00a9e91146fea1e489b48118543b1c95b075f3d9
4
- data.tar.gz: 6f7c93f8a5429e2a63fb560e79afc34c940a652168c3cba0e2d548ad61e0c9ca
3
+ metadata.gz: 69b1bf665be20b3234b5a6cc358a35167cf3ab4dc7833ba1f8a3615970f2a617
4
+ data.tar.gz: ec93203edd447a12699c94d57583b7971f846e70f415ad91915860386f83e862
5
5
  SHA512:
6
- metadata.gz: dd118690c1537a3de6db28e7478a492617540ba5d8b2322d80506d5800adbe7997ee78b08098cfb36ace459612f72ae2310bd8ad77a068e5fb3e11fbf6c39f61
7
- data.tar.gz: 406ef4a7f114415d3059be3d1713015af635a2dd57e76355d5fb685b74d734d90c835bcec860a4fdd980df512d29b4d413b3ec3733efd46e4adf1a3d2414bdfc
6
+ metadata.gz: dec9d9bcd8c8111fbcfc826d995fd8197751e93c0c4463fd0d321d3a71b71a920f39340b60df4011cf0ab3ccbce9a6ec71258044cfc11bdae29f271fcde4d978
7
+ data.tar.gz: 22e0ce9181cef72c2081326175b314e865f752422e9d72a54e74f01fca39e23c70b23659ba5c7372ec4dc141a826f48a691d0f68690ba810ce7fe9e6eab6269b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.3] - 2022-06-06
4
+
5
+ - check that server started properly before running anything in `bin/with-server`
6
+ - add helper script for setting cloud.gov egress rules
7
+
3
8
  ## [0.5.2] - 2022-03-24
4
9
 
5
10
  - add extra branch test coverage to CloudGovConfig
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_template_18f (0.5.2)
4
+ rails_template_18f (0.5.3)
5
5
  activesupport (~> 7.0.0)
6
6
  colorize (~> 0.8)
7
7
  railties (~> 7.0.0)
@@ -10,20 +10,20 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionpack (7.0.2.3)
14
- actionview (= 7.0.2.3)
15
- activesupport (= 7.0.2.3)
13
+ actionpack (7.0.3)
14
+ actionview (= 7.0.3)
15
+ activesupport (= 7.0.3)
16
16
  rack (~> 2.0, >= 2.2.0)
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.2.3)
21
- activesupport (= 7.0.2.3)
20
+ actionview (7.0.3)
21
+ activesupport (= 7.0.3)
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.2.3)
26
+ activesupport (7.0.3)
27
27
  concurrent-ruby (~> 1.0, >= 1.0.2)
28
28
  i18n (>= 1.6, < 2)
29
29
  minitest (>= 5.1)
@@ -36,26 +36,26 @@ GEM
36
36
  builder (3.2.4)
37
37
  byebug (11.1.3)
38
38
  colorize (0.8.1)
39
- concurrent-ruby (1.1.9)
39
+ concurrent-ruby (1.1.10)
40
40
  crass (1.0.6)
41
41
  diff-lcs (1.5.0)
42
42
  erubi (1.10.0)
43
43
  i18n (1.10.0)
44
44
  concurrent-ruby (~> 1.0)
45
- loofah (2.15.0)
45
+ loofah (2.18.0)
46
46
  crass (~> 1.0.2)
47
47
  nokogiri (>= 1.5.9)
48
48
  method_source (1.0.0)
49
49
  minitest (5.15.0)
50
- nokogiri (1.13.3-x86_64-darwin)
50
+ nokogiri (1.13.6-x86_64-darwin)
51
51
  racc (~> 1.4)
52
- nokogiri (1.13.3-x86_64-linux)
52
+ nokogiri (1.13.6-x86_64-linux)
53
53
  racc (~> 1.4)
54
- parallel (1.21.0)
55
- parser (3.1.1.0)
54
+ parallel (1.22.1)
55
+ parser (3.1.2.0)
56
56
  ast (~> 2.4.1)
57
57
  racc (1.6.0)
58
- rack (2.2.3)
58
+ rack (2.2.3.1)
59
59
  rack-test (1.1.0)
60
60
  rack (>= 1.0, < 3)
61
61
  rails-dom-testing (2.0.3)
@@ -63,16 +63,16 @@ GEM
63
63
  nokogiri (>= 1.6)
64
64
  rails-html-sanitizer (1.4.2)
65
65
  loofah (~> 2.3)
66
- railties (7.0.2.3)
67
- actionpack (= 7.0.2.3)
68
- activesupport (= 7.0.2.3)
66
+ railties (7.0.3)
67
+ actionpack (= 7.0.3)
68
+ activesupport (= 7.0.3)
69
69
  method_source
70
70
  rake (>= 12.2)
71
71
  thor (~> 1.0)
72
72
  zeitwerk (~> 2.5)
73
73
  rainbow (3.1.1)
74
74
  rake (13.0.6)
75
- regexp_parser (2.2.1)
75
+ regexp_parser (2.4.0)
76
76
  rexml (3.2.5)
77
77
  rspec (3.11.0)
78
78
  rspec-core (~> 3.11.0)
@@ -83,10 +83,10 @@ GEM
83
83
  rspec-expectations (3.11.0)
84
84
  diff-lcs (>= 1.2.0, < 2.0)
85
85
  rspec-support (~> 3.11.0)
86
- rspec-mocks (3.11.0)
86
+ rspec-mocks (3.11.1)
87
87
  diff-lcs (>= 1.2.0, < 2.0)
88
88
  rspec-support (~> 3.11.0)
89
- rspec-rails (5.1.1)
89
+ rspec-rails (5.1.2)
90
90
  actionpack (>= 5.2)
91
91
  activesupport (>= 5.2)
92
92
  railties (>= 5.2)
@@ -95,23 +95,23 @@ GEM
95
95
  rspec-mocks (~> 3.10)
96
96
  rspec-support (~> 3.10)
97
97
  rspec-support (3.11.0)
98
- rubocop (1.26.0)
98
+ rubocop (1.29.0)
99
99
  parallel (~> 1.10)
100
100
  parser (>= 3.1.0.0)
101
101
  rainbow (>= 2.2.2, < 4.0)
102
102
  regexp_parser (>= 1.8, < 3.0)
103
- rexml
104
- rubocop-ast (>= 1.16.0, < 2.0)
103
+ rexml (>= 3.2.5, < 4.0)
104
+ rubocop-ast (>= 1.17.0, < 2.0)
105
105
  ruby-progressbar (~> 1.7)
106
106
  unicode-display_width (>= 1.4.0, < 3.0)
107
- rubocop-ast (1.16.0)
107
+ rubocop-ast (1.17.0)
108
108
  parser (>= 3.1.1.0)
109
109
  rubocop-performance (1.13.3)
110
110
  rubocop (>= 1.7.0, < 2.0)
111
111
  rubocop-ast (>= 0.4.0)
112
112
  ruby-progressbar (1.11.0)
113
- standard (1.8.0)
114
- rubocop (= 1.26.0)
113
+ standard (1.12.0)
114
+ rubocop (= 1.29.0)
115
115
  rubocop-performance (= 1.13.3)
116
116
  thor (1.2.1)
117
117
  tzinfo (2.0.4)
@@ -121,6 +121,7 @@ GEM
121
121
 
122
122
  PLATFORMS
123
123
  x86_64-darwin-20
124
+ x86_64-darwin-21
124
125
  x86_64-linux
125
126
 
126
127
  DEPENDENCIES
@@ -132,4 +133,4 @@ DEPENDENCIES
132
133
  standard (~> 1.3)
133
134
 
134
135
  BUNDLED WITH
135
- 2.2.32
136
+ 2.3.15
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env bash
2
+
3
+ org="<%= cloud_gov_organization %>"
4
+
5
+ usage="
6
+ $0: Set egress rules for given space
7
+
8
+ Usage:
9
+ $0 -h
10
+ $0 -s <SPACE NAME> [-o <ORG NAME>] [-p] [-t]
11
+
12
+ Options:
13
+ -h: show help and exit
14
+ -s <SPACE NAME>: configure the space to act on. Required
15
+ -o <ORG NAME>: configure the organization to act on. Default: $org
16
+ -p: Add the public egress rules
17
+ -t: Add the trusted egress rules
18
+
19
+ Notes:
20
+ * If -p or -t are not passed, the related security groups will be removed, if they were present
21
+ "
22
+
23
+ set -e
24
+
25
+ space=""
26
+ public=false
27
+ trusted=false
28
+
29
+ while getopts ":hs:o:pt" opt; do
30
+ case "$opt" in
31
+ s)
32
+ space=${OPTARG}
33
+ ;;
34
+ o)
35
+ org=${OPTARG}
36
+ ;;
37
+ p)
38
+ public=true
39
+ ;;
40
+ t)
41
+ trusted=true
42
+ ;;
43
+ h)
44
+ echo "$usage"
45
+ exit 0
46
+ ;;
47
+ esac
48
+ done
49
+
50
+ if [[ $space = "" ]]; then
51
+ echo "$usage"
52
+ exit 1
53
+ fi
54
+
55
+ if [[ $public = true ]]; then
56
+ cf bind-security-group public_networks_egress $org --space $space
57
+ else
58
+ cf unbind-security-group public_networks_egress $org $space
59
+ fi
60
+
61
+ if [[ $trusted = true ]]; then
62
+ cf bind-security-group trusted_local_networks_egress $org --space $space
63
+ else
64
+ cf unbind-security-group trusted_local_networks_egress $org $space
65
+ fi
66
+
67
+ echo "Done"
@@ -15,6 +15,7 @@ module RailsTemplate18f
15
15
 
16
16
  def install
17
17
  directory "terraform", mode: :preserve
18
+ chmod "terraform/set_space_egress.sh", 0o755
18
19
  chmod "terraform/bootstrap/run.sh", 0o755
19
20
  chmod "terraform/bootstrap/teardown_creds.sh", 0o755
20
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsTemplate18f
4
- VERSION = "0.5.2"
4
+ VERSION = "0.5.3"
5
5
  end
@@ -22,13 +22,15 @@ bundle exec rails server &
22
22
  server_pid=$!
23
23
 
24
24
  dockerize -wait http://localhost:3000 -timeout 1m
25
-
26
- $@
27
25
  exit_status=$?
28
26
 
27
+ if [[ $exit_status -eq 0 ]]; then
28
+ $@
29
+ exit_status=$?
30
+ fi
29
31
 
30
32
  # shut down the server and cleanup after ourselves
31
- bundle exec rake assets:clobber
32
33
  kill $server_pid
34
+ bundle exec rake assets:clobber
33
35
 
34
36
  exit $exit_status
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.5.2
4
+ version: 0.5.3
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-03-24 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -180,6 +180,7 @@ files:
180
180
  - lib/generators/rails_template18f/terraform/templates/terraform/production/main.tf.tt
181
181
  - lib/generators/rails_template18f/terraform/templates/terraform/production/providers.tf.tt
182
182
  - lib/generators/rails_template18f/terraform/templates/terraform/production/variables.tf
183
+ - lib/generators/rails_template18f/terraform/templates/terraform/set_space_egress.sh.tt
183
184
  - lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/main.tf.tt
184
185
  - lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/providers.tf
185
186
  - lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/variables.tf