rails_template_18f 0.7.0 → 0.7.1

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: a69496a0836c43df3d636ecf91d120c5975b8462ab285edaacc2494b3af8265f
4
- data.tar.gz: 7d1fbc494eb83d99bb0f498fc983db9dd6d45c1ca37895da5a60876c5fea5d0f
3
+ metadata.gz: ec09af68270ab8a9c37472e382f4f5c847e2b14a5d865d5d0b161fdb7a5fc6c2
4
+ data.tar.gz: f83f58fc2fe89dc1d9516874138452ac2a6331aebaee7db9458abe1bc72c2cd2
5
5
  SHA512:
6
- metadata.gz: 35b93c784bd2fd885745e300e16d054861ef48303dfde9167a6c21edaeb0e78c846a950e99d51d559868f71275c341443a158bd84b766b9b0a822d2d68606d25
7
- data.tar.gz: 10703f7f1a3a75ecdd62fcc05123058b75dd6d9685121ee0bb38f0014d3354ab15ff2b4f30619439c436d4be2c58247d4e07ec65172c49c769c2b346e7802023
6
+ metadata.gz: 63584d2d0737790f36294c34e7e8d3611cf2d4e930e6664582b1d812e9d6117b609ba1912f40a2243d5bb24178cf989fddc1c3db8e29f41e178e188bd1e576bd
7
+ data.tar.gz: 6e78c92eb7cb24522aedb57c91a82ba077fd6780f4b34f0f138953e0ca4992daefcf610e0a934c10f32fee785e7dd72335ea2fbd87e4839d64dbae42cdc6a592
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.7.1] - 2022-07-05
4
+
5
+ - fix issue with initial git commit when no OSCAL docs were updated during initial app creation
6
+ - add extra content to project README about working with submodules
7
+
3
8
  ## [0.7.0] - 2022-07-05
4
9
 
5
10
  - OSCAL generator to integrate with https://github.com/GSA-TTS/compliance-template
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_template_18f (0.7.0)
4
+ rails_template_18f (0.7.1)
5
5
  activesupport (~> 7.0.0)
6
6
  colorize (~> 0.8)
7
7
  railties (~> 7.0.0)
@@ -44,30 +44,54 @@ module RailsTemplate18f
44
44
  end
45
45
  end
46
46
 
47
+ def configure_submodule
48
+ unless detach?
49
+ git config: "-f .gitmodules submodule.\"doc/compliance/oscal\".branch #{branch_name}"
50
+ git config: "diff.submodule log"
51
+ git config: "status.submodulesummary 1"
52
+ git config: "push.recurseSubmodules check"
53
+ end
54
+ end
55
+
47
56
  no_tasks do
48
57
  def branch_name
49
58
  options[:branch].present? ? options[:branch] : app_name
50
59
  end
51
60
 
52
61
  def readme_contents
53
- if detach?
54
- <<~README
62
+ content = <<~README
55
63
 
56
- ### Compliance Documentation
64
+ ### Compliance Documentation
57
65
 
58
- Security Controls should be documented within doc/compliance/oscal.
59
- README
60
- else
61
- <<~README
66
+ Security Controls should be documented within doc/compliance/oscal.
67
+ README
68
+ return content if detach?
69
+ <<~README
70
+ #{content}
62
71
 
63
- ### Compliance Documentation
72
+ #### Git Submodule Commands
64
73
 
65
- Security Controls should be documented within doc/compliance/oscal.
74
+ See git's [submodule documentation](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
75
+ for more information on tracking changes to these files.
66
76
 
67
- See git's [submodule documentation](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
68
- for more information on tracking changes to these files.
69
- README
70
- end
77
+ ##### Cloning this project
78
+
79
+ `git clone --recurse-submodules <<REPO_ADDRESS>>`
80
+
81
+ ##### Pull changes including OSCAL changes
82
+
83
+ `git pull --recurse-submodules`
84
+
85
+ ##### Push changes including OSCAL changes
86
+
87
+ `git push --recurse-submodules=check` _then_ `git push --recurse-submodules=on-demand`
88
+
89
+ ##### Helpful config settings:
90
+
91
+ * `git config diff.submodule log`
92
+ * `git config status.submodulesummary 1`
93
+ * `git config push.recurseSubmodules check`
94
+ README
71
95
  end
72
96
 
73
97
  def detach?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsTemplate18f
4
- VERSION = "0.7.0"
4
+ VERSION = "0.7.1"
5
5
  end
data/template.rb CHANGED
@@ -483,7 +483,8 @@ after_bundle do
483
483
  EOM
484
484
  if compliance_template_submodule
485
485
  inside "doc/compliance/oscal" do
486
- git commit: "-a -m 'rails-template generated control statements'"
486
+ run "git add -A"
487
+ run "git diff-index --quiet HEAD || git commit -am 'rails-template generated control statements'"
487
488
  end
488
489
  end
489
490
  git add: "."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_template_18f
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Ahearn