way_of_working 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +30 -0
  3. data/CODE_OF_CONDUCT.md +133 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +101 -0
  6. data/exe/way_of_working +5 -0
  7. data/lib/tasks/audit_gems.rake +60 -0
  8. data/lib/way_of_working/cli.rb +125 -0
  9. data/lib/way_of_working/generators/changelog/init.rb +110 -0
  10. data/lib/way_of_working/generators/code_of_conduct/init.rb +32 -0
  11. data/lib/way_of_working/generators/decision_record/init.rb +29 -0
  12. data/lib/way_of_working/generators/decision_record/new.rb +67 -0
  13. data/lib/way_of_working/generators/linter/exec.rb +77 -0
  14. data/lib/way_of_working/generators/linter/init.rb +60 -0
  15. data/lib/way_of_working/generators/rake_tasks/init.rb +47 -0
  16. data/lib/way_of_working/git/repo_reader.rb +72 -0
  17. data/lib/way_of_working/git/summary_tag.rb +27 -0
  18. data/lib/way_of_working/paths.rb +16 -0
  19. data/lib/way_of_working/sub_command_base.rb +16 -0
  20. data/lib/way_of_working/tasks.rb +8 -0
  21. data/lib/way_of_working/templates/.github/linters/.markdown-link-check.json +13 -0
  22. data/lib/way_of_working/templates/.github/linters/rubocop_defaults.yml +55 -0
  23. data/lib/way_of_working/templates/.github/workflows/mega-linter.yml +82 -0
  24. data/lib/way_of_working/templates/.mega-linter.yml +129 -0
  25. data/lib/way_of_working/templates/.rubocop +1 -0
  26. data/lib/way_of_working/templates/CODE_OF_CONDUCT.md.tt +134 -0
  27. data/lib/way_of_working/templates/docs/decisions/README.md +7 -0
  28. data/lib/way_of_working/templates/docs/decisions/adr-template.md.tt +79 -0
  29. data/lib/way_of_working/version.rb +5 -0
  30. data/lib/way_of_working.rb +10 -0
  31. data/way_of_working.gemspec +43 -0
  32. metadata +121 -0
@@ -0,0 +1,134 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, caste, color, religion, or sexual
11
+ identity and orientation.
12
+
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
15
+
16
+ ## Our Standards
17
+
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
20
+
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the overall
27
+ community
28
+
29
+ Examples of unacceptable behavior include:
30
+
31
+ * The use of sexualized language or imagery, and sexual attention or advances of
32
+ any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
34
+ * Public or private harassment
35
+ * Publishing others' private information, such as a physical or email address,
36
+ without their explicit permission
37
+ * Other conduct which could reasonably be considered inappropriate in a
38
+ professional setting
39
+
40
+ ## Enforcement Responsibilities
41
+
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
46
+
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
51
+
52
+ ## Scope
53
+
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official e-mail address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
59
+
60
+ ## Enforcement
61
+
62
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
+ reported to the community leaders responsible for enforcement at
64
+ <%= options['contact_method'] %>.
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series of
87
+ actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or permanent
94
+ ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within the
114
+ community.
115
+
116
+ ## Attribution
117
+
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.1, available at
120
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
+
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127
+ [https://www.contributor-covenant.org/translations][translations].
128
+
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131
+ [Mozilla CoC]: https://github.com/mozilla/diversity
132
+ [FAQ]: https://www.contributor-covenant.org/faq
133
+ [translations]: https://www.contributor-covenant.org/translations
134
+
@@ -0,0 +1,7 @@
1
+ # Decisions
2
+
3
+ This directory contains decision records for the project.
4
+
5
+ For new ADRs, please use [adr-template.md](adr-template.md) as basis.
6
+ More information on MADR is available at <https://adr.github.io/madr/>.
7
+ General information about architectural decision records is available at <https://adr.github.io/>.
@@ -0,0 +1,79 @@
1
+ ---
2
+ # These are optional elements. Feel free to remove any of them.
3
+ status: {proposed | rejected | accepted | deprecated | … | superseded by ADR-0005 <0005-example.md>}
4
+ date: <%= @decision_date %>
5
+ deciders: {list everyone involved in the decision}
6
+ consulted: {list everyone whose opinions are sought (typically subject-matter experts); and with whom there is a two-way communication}
7
+ informed: {list everyone who is kept up-to-date on progress; and with whom there is a one-way communication}
8
+ ---
9
+ # <%= @title %>
10
+
11
+ ## Context and Problem Statement
12
+
13
+ {Describe the context and problem statement, e.g., in free form using two to three sentences or in the form of an illustrative story.
14
+ You may want to articulate the problem in form of a question and add links to collaboration boards or issue management systems.}
15
+
16
+ <!-- This is an optional element. Feel free to remove. -->
17
+ ## Decision Drivers
18
+
19
+ * {decision driver 1, e.g., a force, facing concern, …}
20
+ * {decision driver 2, e.g., a force, facing concern, …}
21
+ * … <!-- numbers of drivers can vary -->
22
+
23
+ ## Considered Options
24
+
25
+ * {title of option 1}
26
+ * {title of option 2}
27
+ * {title of option 3}
28
+ * … <!-- numbers of options can vary -->
29
+
30
+ ## Decision Outcome
31
+
32
+ Chosen option: "{title of option 1}", because
33
+ {justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force {force} | … | comes out best (see below)}.
34
+
35
+ <!-- This is an optional element. Feel free to remove. -->
36
+ ### Consequences
37
+
38
+ * Good, because {positive consequence, e.g., improvement of one or more desired qualities, …}
39
+ * Bad, because {negative consequence, e.g., compromising one or more desired qualities, …}
40
+ * … <!-- numbers of consequences can vary -->
41
+
42
+ <!-- This is an optional element. Feel free to remove. -->
43
+ ## Validation
44
+
45
+ {describe how the implementation of/compliance with the ADR is validated. E.g., by a review or an ArchUnit test}
46
+
47
+ <!-- This is an optional element. Feel free to remove. -->
48
+ ## Pros and Cons of the Options
49
+
50
+ ### {title of option 1}
51
+
52
+ <!-- This is an optional element. Feel free to remove. -->
53
+ {example | description | pointer to more information | …}
54
+
55
+ * Good, because {argument a}
56
+ * Good, because {argument b}
57
+ <!-- use "neutral" if the given argument weights neither for good nor bad -->
58
+ * Neutral, because {argument c}
59
+ * Bad, because {argument d}
60
+ * … <!-- numbers of pros and cons can vary -->
61
+
62
+ ### {title of other option}
63
+
64
+ {example | description | pointer to more information | …}
65
+
66
+ * Good, because {argument a}
67
+ * Good, because {argument b}
68
+ * Neutral, because {argument c}
69
+ * Bad, because {argument d}
70
+ * …
71
+
72
+ <!-- This is an optional element. Feel free to remove. -->
73
+ ## More Information
74
+
75
+ {You might want to provide additional evidence/confidence for the decision outcome here and/or
76
+ document the team agreement on the decision and/or
77
+ define when and how this decision should be realized and if/when it should be re-visited and/or
78
+ how the decision is validated.
79
+ Links to other decisions and resources might appear here as well.}
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WayOfWorking
4
+ VERSION = '1.0.0'
5
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+ require_relative 'way_of_working/cli'
5
+ require_relative 'way_of_working/paths'
6
+ require_relative 'way_of_working/version'
7
+
8
+ module WayOfWorking
9
+ class Error < StandardError; end
10
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/way_of_working/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'way_of_working'
7
+ spec.version = WayOfWorking::VERSION
8
+ spec.authors = ['Tim Gentry']
9
+ spec.email = ['52189+timgentry@users.noreply.github.com']
10
+
11
+ spec.summary = 'RubyGem for the HDI way of working.'
12
+ # spec.description = "TODO: Write a longer description or delete this line."
13
+ spec.homepage = 'https://healthdatainsight.github.io/way_of_working'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = '>= 2.6'
16
+
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+ spec.metadata['rubygems_mfa_required'] = 'true'
19
+
20
+ spec.metadata['homepage_uri'] = spec.homepage
21
+ spec.metadata['source_code_uri'] = 'https://github.com/HealthDataInsight/way_of_working'
22
+ spec.metadata['changelog_uri'] = 'https://github.com/HealthDataInsight/way_of_working/blob/main/CHANGELOG.md'
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ spec.files = Dir.chdir(__dir__) do
27
+ `git ls-files -z`.split("\x0").select do |f|
28
+ f.match(%r{\A(?:(?:exe|lib)/|[^/]+\.(?:gemspec|md|txt))})
29
+ end
30
+ end
31
+ spec.bindir = 'exe'
32
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ['lib']
34
+
35
+ # Uncomment to register a new dependency of your gem
36
+ # spec.add_dependency "example-gem", "~> 1.0"
37
+
38
+ # For more information and examples about making a new gem, check out our
39
+ # guide at: https://bundler.io/guides/creating_gem.html
40
+ spec.add_dependency 'git', '~> 1.13'
41
+ spec.add_dependency 'rainbow', '~> 3.1'
42
+ spec.add_dependency 'thor', '~> 1.2'
43
+ end
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: way_of_working
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Tim Gentry
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-02-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: git
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rainbow
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: thor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.2'
55
+ description:
56
+ email:
57
+ - 52189+timgentry@users.noreply.github.com
58
+ executables:
59
+ - way_of_working
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - CHANGELOG.md
64
+ - CODE_OF_CONDUCT.md
65
+ - LICENSE.txt
66
+ - README.md
67
+ - exe/way_of_working
68
+ - lib/tasks/audit_gems.rake
69
+ - lib/way_of_working.rb
70
+ - lib/way_of_working/cli.rb
71
+ - lib/way_of_working/generators/changelog/init.rb
72
+ - lib/way_of_working/generators/code_of_conduct/init.rb
73
+ - lib/way_of_working/generators/decision_record/init.rb
74
+ - lib/way_of_working/generators/decision_record/new.rb
75
+ - lib/way_of_working/generators/linter/exec.rb
76
+ - lib/way_of_working/generators/linter/init.rb
77
+ - lib/way_of_working/generators/rake_tasks/init.rb
78
+ - lib/way_of_working/git/repo_reader.rb
79
+ - lib/way_of_working/git/summary_tag.rb
80
+ - lib/way_of_working/paths.rb
81
+ - lib/way_of_working/sub_command_base.rb
82
+ - lib/way_of_working/tasks.rb
83
+ - lib/way_of_working/templates/.github/linters/.markdown-link-check.json
84
+ - lib/way_of_working/templates/.github/linters/rubocop_defaults.yml
85
+ - lib/way_of_working/templates/.github/workflows/mega-linter.yml
86
+ - lib/way_of_working/templates/.mega-linter.yml
87
+ - lib/way_of_working/templates/.rubocop
88
+ - lib/way_of_working/templates/CODE_OF_CONDUCT.md.tt
89
+ - lib/way_of_working/templates/docs/decisions/README.md
90
+ - lib/way_of_working/templates/docs/decisions/adr-template.md.tt
91
+ - lib/way_of_working/version.rb
92
+ - way_of_working.gemspec
93
+ homepage: https://healthdatainsight.github.io/way_of_working
94
+ licenses:
95
+ - MIT
96
+ metadata:
97
+ allowed_push_host: https://rubygems.org
98
+ rubygems_mfa_required: 'true'
99
+ homepage_uri: https://healthdatainsight.github.io/way_of_working
100
+ source_code_uri: https://github.com/HealthDataInsight/way_of_working
101
+ changelog_uri: https://github.com/HealthDataInsight/way_of_working/blob/main/CHANGELOG.md
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '2.6'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubygems_version: 3.1.6
118
+ signing_key:
119
+ specification_version: 4
120
+ summary: RubyGem for the HDI way of working.
121
+ test_files: []