jira-auto-tool 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +291 -0
  4. data/CHANGELOG.md +5 -0
  5. data/CODE_OF_CONDUCT.md +132 -0
  6. data/Guardfile +105 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +159 -0
  9. data/Rakefile +20 -0
  10. data/bin/jira-auto-tool +57 -0
  11. data/bin/jira-auto-tool.bat +2 -0
  12. data/bin/setup +8 -0
  13. data/bin/setup-dev-win.bat +3 -0
  14. data/cucumber.yml +7 -0
  15. data/features/align_sprint_time_in_dates.feature +33 -0
  16. data/features/assign_tickets_to_team_sprints.feature +73 -0
  17. data/features/cache_boards.feature +24 -0
  18. data/features/control_http_request_rate_limit.feature +17 -0
  19. data/features/create_sprints_using_existing_ones_as_reference.feature +79 -0
  20. data/features/list_boards.feature +12 -0
  21. data/features/list_project_fields.feature +89 -0
  22. data/features/list_sprint_prefixes.feature +77 -0
  23. data/features/quarterly_add_sprints_using_existing_ones_as_a_reference.feature +71 -0
  24. data/features/quarterly_create_sprints_until_specific_date.feature +75 -0
  25. data/features/quarterly_rename_sprints.feature +179 -0
  26. data/features/rename_sprints.feature +203 -0
  27. data/features/self_documented_command_line.feature +15 -0
  28. data/features/sprint_filtering.feature +111 -0
  29. data/features/step_definitions/execution_context_steps.rb +33 -0
  30. data/features/step_definitions/jira_board_steps.rb +102 -0
  31. data/features/step_definitions/jira_ticket_steps.rb +63 -0
  32. data/features/support/10.setup_cucumber.rb +10 -0
  33. data/features/support/env.rb +25 -0
  34. data/features/support/hooks.rb +25 -0
  35. data/features/support/setup_rspec.rb +14 -0
  36. data/features/support/setup_simplecov.rb +5 -0
  37. data/features/update_sprint_end_date_and_shift_following_ones.feature +52 -0
  38. data/lib/jira/auto/tool/board/cache.rb +67 -0
  39. data/lib/jira/auto/tool/board/unavailable_board.rb +36 -0
  40. data/lib/jira/auto/tool/board.rb +105 -0
  41. data/lib/jira/auto/tool/board_controller/options.rb +32 -0
  42. data/lib/jira/auto/tool/board_controller.rb +88 -0
  43. data/lib/jira/auto/tool/common_options.rb +37 -0
  44. data/lib/jira/auto/tool/config/options.rb +19 -0
  45. data/lib/jira/auto/tool/config.rb +64 -0
  46. data/lib/jira/auto/tool/fetch_custom_field_options.rb +47 -0
  47. data/lib/jira/auto/tool/field.rb +59 -0
  48. data/lib/jira/auto/tool/field_controller.rb +50 -0
  49. data/lib/jira/auto/tool/field_option.rb +35 -0
  50. data/lib/jira/auto/tool/get_createmeta_for_project.rb +24 -0
  51. data/lib/jira/auto/tool/helpers/environment_based_value.rb +96 -0
  52. data/lib/jira/auto/tool/helpers/option_parser.rb +16 -0
  53. data/lib/jira/auto/tool/helpers/overridable_time.rb +18 -0
  54. data/lib/jira/auto/tool/helpers/pagination.rb +50 -0
  55. data/lib/jira/auto/tool/jira_http_options.rb +20 -0
  56. data/lib/jira/auto/tool/next_sprint_creator.rb +60 -0
  57. data/lib/jira/auto/tool/performer/options.rb +76 -0
  58. data/lib/jira/auto/tool/performer/planning_increment_sprint_creator.rb +42 -0
  59. data/lib/jira/auto/tool/performer/prefix_sprint_updater.rb +42 -0
  60. data/lib/jira/auto/tool/performer/quarterly_sprint_renamer/next_name_generator.rb +60 -0
  61. data/lib/jira/auto/tool/performer/quarterly_sprint_renamer.rb +19 -0
  62. data/lib/jira/auto/tool/performer/sprint_end_date_updater.rb +55 -0
  63. data/lib/jira/auto/tool/performer/sprint_renamer/keep_same_name_generator.rb +19 -0
  64. data/lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb +47 -0
  65. data/lib/jira/auto/tool/performer/sprint_renamer.rb +55 -0
  66. data/lib/jira/auto/tool/performer/sprint_time_in_dates_aligner.rb +52 -0
  67. data/lib/jira/auto/tool/project/options.rb +22 -0
  68. data/lib/jira/auto/tool/project/ticket_fields.rb +70 -0
  69. data/lib/jira/auto/tool/project.rb +40 -0
  70. data/lib/jira/auto/tool/rate_limited_jira_client.rb +50 -0
  71. data/lib/jira/auto/tool/request_builder/field_context_fetcher.rb +78 -0
  72. data/lib/jira/auto/tool/request_builder/field_option_fetcher.rb +54 -0
  73. data/lib/jira/auto/tool/request_builder/get.rb +29 -0
  74. data/lib/jira/auto/tool/request_builder/sprint_creator.rb +112 -0
  75. data/lib/jira/auto/tool/request_builder/sprint_state_updater.rb +60 -0
  76. data/lib/jira/auto/tool/request_builder.rb +89 -0
  77. data/lib/jira/auto/tool/setup_logging.rb +35 -0
  78. data/lib/jira/auto/tool/sprint/name.rb +105 -0
  79. data/lib/jira/auto/tool/sprint/prefix.rb +66 -0
  80. data/lib/jira/auto/tool/sprint.rb +183 -0
  81. data/lib/jira/auto/tool/sprint_controller/options.rb +61 -0
  82. data/lib/jira/auto/tool/sprint_controller.rb +152 -0
  83. data/lib/jira/auto/tool/sprint_state_controller.rb +58 -0
  84. data/lib/jira/auto/tool/team.rb +23 -0
  85. data/lib/jira/auto/tool/team_sprint_prefix_mapper/options.rb +27 -0
  86. data/lib/jira/auto/tool/team_sprint_prefix_mapper.rb +62 -0
  87. data/lib/jira/auto/tool/team_sprint_ticket_dispatcher.rb +76 -0
  88. data/lib/jira/auto/tool/ticket.rb +110 -0
  89. data/lib/jira/auto/tool/until_date.rb +68 -0
  90. data/lib/jira/auto/tool/version.rb +9 -0
  91. data/lib/jira/auto/tool.rb +216 -0
  92. data/sig/jira/sprint/tool.rbs +8 -0
  93. data/spec/jira/auto/tool/board/cache_spec.rb +179 -0
  94. data/spec/jira/auto/tool/board/unavailable_board_spec.rb +34 -0
  95. data/spec/jira/auto/tool/board_controller/options_spec.rb +52 -0
  96. data/spec/jira/auto/tool/board_controller_spec.rb +154 -0
  97. data/spec/jira/auto/tool/board_spec.rb +163 -0
  98. data/spec/jira/auto/tool/common_options_spec.rb +49 -0
  99. data/spec/jira/auto/tool/config_spec.rb +108 -0
  100. data/spec/jira/auto/tool/field_controller_spec.rb +121 -0
  101. data/spec/jira/auto/tool/field_option_spec.rb +42 -0
  102. data/spec/jira/auto/tool/field_spec.rb +99 -0
  103. data/spec/jira/auto/tool/helpers/environment_based_value_spec.rb +21 -0
  104. data/spec/jira/auto/tool/helpers/option_parser_spec.rb +21 -0
  105. data/spec/jira/auto/tool/helpers/overridable_time_spec.rb +43 -0
  106. data/spec/jira/auto/tool/helpers/pagination_spec.rb +72 -0
  107. data/spec/jira/auto/tool/jira_http_options_spec.rb +32 -0
  108. data/spec/jira/auto/tool/next_sprint_creator_spec.rb +85 -0
  109. data/spec/jira/auto/tool/performer/option_spec.rb +55 -0
  110. data/spec/jira/auto/tool/performer/planning_increment_sprint_creator_spec.rb +62 -0
  111. data/spec/jira/auto/tool/performer/prefix_sprint_updater_spec.rb +35 -0
  112. data/spec/jira/auto/tool/performer/quarterly_sprint_renamer/next_name_generator_spec.rb +175 -0
  113. data/spec/jira/auto/tool/performer/quarterly_sprint_renamer_spec.rb +239 -0
  114. data/spec/jira/auto/tool/performer/sprint_end_date_updater_spec.rb +90 -0
  115. data/spec/jira/auto/tool/performer/sprint_renamer/keep_same_name_generator_spec.rb +12 -0
  116. data/spec/jira/auto/tool/performer/sprint_renamer/next_name_generator_spec.rb +129 -0
  117. data/spec/jira/auto/tool/performer/sprint_renamer_spec.rb +240 -0
  118. data/spec/jira/auto/tool/performer/sprint_time_in_dates_aligner_spec.rb +132 -0
  119. data/spec/jira/auto/tool/project/ticket_fields_spec.rb +390 -0
  120. data/spec/jira/auto/tool/project_spec.rb +31 -0
  121. data/spec/jira/auto/tool/rate_limited_jira_client_spec.rb +82 -0
  122. data/spec/jira/auto/tool/request_builder/field_context_fetcher_spec.rb +54 -0
  123. data/spec/jira/auto/tool/request_builder/field_option_fetcher_spec.rb +64 -0
  124. data/spec/jira/auto/tool/request_builder/get_spec.rb +40 -0
  125. data/spec/jira/auto/tool/request_builder/sprint_creator_spec.rb +179 -0
  126. data/spec/jira/auto/tool/request_builder/sprint_state_updater_spec.rb +31 -0
  127. data/spec/jira/auto/tool/request_builder_spec.rb +73 -0
  128. data/spec/jira/auto/tool/sprint/name_spec.rb +101 -0
  129. data/spec/jira/auto/tool/sprint/prefix_spec.rb +207 -0
  130. data/spec/jira/auto/tool/sprint_controller_spec.rb +406 -0
  131. data/spec/jira/auto/tool/sprint_spec.rb +309 -0
  132. data/spec/jira/auto/tool/team_spec.rb +21 -0
  133. data/spec/jira/auto/tool/team_sprint_prefix_mapper_spec.rb +97 -0
  134. data/spec/jira/auto/tool/team_sprint_ticket_dispatcher_spec.rb +232 -0
  135. data/spec/jira/auto/tool/ticket_spec.rb +116 -0
  136. data/spec/jira/auto/tool/until_date_spec.rb +80 -0
  137. data/spec/jira/auto/tool_spec.rb +458 -0
  138. data/spec/spec_helper.rb +42 -0
  139. metadata +368 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ac6ee2831ec7f2de7850faa2532efd3a540a77d65c9a1d76287efe71e6038854
4
+ data.tar.gz: f07a8214b09bee61511b64c287eb143ca8e451dadf9efa024b309464f5f28be1
5
+ SHA512:
6
+ metadata.gz: 0d4610a6ef47430063e336e1aeee4223313f44026265dde8aa5bec4d7815da7fb9bc4194ad8c123e5900351cc111d1780b7d4f4b39bb35c0c67b33b3b46291c1
7
+ data.tar.gz: cf986f3064959810cf26e3f524804ae5eb0f359055610b9e206a2ffd17ddff9c31f449b8145dcf873e004651db43da74e15b2dac2bf45e52217fd2c550fa0aec
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,291 @@
1
+ AllCops:
2
+ NewCops: enable
3
+
4
+ plugins:
5
+ - rubocop-rake
6
+ - rubocop-rspec
7
+
8
+ RSpec/ExampleLength:
9
+ Enabled: true
10
+ Max: 10
11
+
12
+ RSpec/MessageExpectation:
13
+ Description: Checks for consistent message expectation style.
14
+ Enabled: false
15
+ EnforcedStyle: allow
16
+ SupportedStyles:
17
+ - allow
18
+ - expect
19
+ -
20
+ RSpec/MessageSpies:
21
+ Description: Checks that message expectations are set using spies.
22
+ Enabled: false
23
+ EnforcedStyle: receive
24
+ SupportedStyles:
25
+ - have_received
26
+ - receive
27
+
28
+ RSpec/MultipleExpectations:
29
+ Description: Checks if examples contain too many `expect` calls.
30
+ Enabled: true
31
+ Max: 4
32
+
33
+ RSpec/MultipleMemoizedHelpers:
34
+ Max: 8
35
+
36
+ Metrics/ClassLength:
37
+ Max: 150
38
+
39
+ Metrics/MethodLength:
40
+ Max: 20
41
+
42
+ Style/Documentation:
43
+ Enabled: false # TODO - reenable
44
+
45
+ Layout/EndOfLine:
46
+ Enabled: false
47
+
48
+ Style/StringLiterals:
49
+ EnforcedStyle: double_quotes
50
+
51
+ Style/StringLiteralsInInterpolation:
52
+ EnforcedStyle: double_quotes
53
+
54
+ Gemspec/AddRuntimeDependency: # new in 1.65
55
+ Enabled: true
56
+ Gemspec/DeprecatedAttributeAssignment: # new in 1.30
57
+ Enabled: true
58
+ Gemspec/DevelopmentDependencies: # new in 1.44
59
+ Enabled: true
60
+ Gemspec/RequireMFA: # new in 1.23
61
+ Enabled: true
62
+ Layout/LineContinuationLeadingSpace: # new in 1.31
63
+ Enabled: true
64
+ Layout/LineContinuationSpacing: # new in 1.31
65
+ Enabled: true
66
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
67
+ Enabled: true
68
+ Layout/SpaceBeforeBrackets: # new in 1.7
69
+ Enabled: true
70
+ Lint/AmbiguousAssignment: # new in 1.7
71
+ Enabled: true
72
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
73
+ Enabled: true
74
+ Lint/AmbiguousRange: # new in 1.19
75
+ Enabled: true
76
+ Lint/ConstantOverwrittenInRescue: # new in 1.31
77
+ Enabled: true
78
+ Lint/DeprecatedConstants: # new in 1.8
79
+ Enabled: true
80
+ Lint/DuplicateBranch: # new in 1.3
81
+ Enabled: true
82
+ Lint/DuplicateMagicComment: # new in 1.37
83
+ Enabled: true
84
+ Lint/DuplicateMatchPattern: # new in 1.50
85
+ Enabled: true
86
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
87
+ Enabled: true
88
+ Lint/DuplicateSetElement: # new in 1.67
89
+ Enabled: true
90
+ Lint/EmptyBlock: # new in 1.1
91
+ Enabled: true
92
+ Lint/EmptyClass: # new in 1.3
93
+ Enabled: true
94
+ Lint/EmptyInPattern: # new in 1.16
95
+ Enabled: true
96
+ Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
97
+ Enabled: true
98
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
99
+ Enabled: true
100
+ Lint/ItWithoutArgumentsInBlock: # new in 1.59
101
+ Enabled: true
102
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
103
+ Enabled: true
104
+ Lint/LiteralAssignmentInCondition: # new in 1.58
105
+ Enabled: true
106
+ Lint/MixedCaseRange: # new in 1.53
107
+ Enabled: true
108
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
109
+ Enabled: true
110
+ Lint/NonAtomicFileOperation: # new in 1.31
111
+ Enabled: true
112
+ Lint/NumberedParameterAssignment: # new in 1.9
113
+ Enabled: true
114
+ Lint/NumericOperationWithConstantResult: # new in 1.69
115
+ Enabled: true
116
+ Lint/OrAssignmentToConstant: # new in 1.9
117
+ Enabled: true
118
+ Lint/RedundantDirGlobSort: # new in 1.8
119
+ Enabled: true
120
+ Lint/RedundantRegexpQuantifiers: # new in 1.53
121
+ Enabled: true
122
+ Lint/RefinementImportMethods: # new in 1.27
123
+ Enabled: true
124
+ Lint/RequireRangeParentheses: # new in 1.32
125
+ Enabled: true
126
+ Lint/RequireRelativeSelfPath: # new in 1.22
127
+ Enabled: true
128
+ Lint/SymbolConversion: # new in 1.9
129
+ Enabled: true
130
+ Lint/ToEnumArguments: # new in 1.1
131
+ Enabled: true
132
+ Lint/TripleQuotes: # new in 1.9
133
+ Enabled: true
134
+ Lint/UnescapedBracketInRegexp: # new in 1.68
135
+ Enabled: true
136
+ Lint/UnexpectedBlockArity: # new in 1.5
137
+ Enabled: true
138
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
139
+ Enabled: true
140
+ Lint/UselessDefined: # new in 1.69
141
+ Enabled: true
142
+ Lint/UselessNumericOperation: # new in 1.66
143
+ Enabled: true
144
+ Lint/UselessRescue: # new in 1.43
145
+ Enabled: true
146
+ Lint/UselessRuby2Keywords: # new in 1.23
147
+ Enabled: true
148
+ Metrics/CollectionLiteralLength: # new in 1.47
149
+ Enabled: true
150
+ Naming/BlockForwarding: # new in 1.24
151
+ Enabled: true
152
+ Security/CompoundHash: # new in 1.28
153
+ Enabled: true
154
+ Security/IoMethods: # new in 1.22
155
+ Enabled: true
156
+ Style/AmbiguousEndlessMethodDefinition: # new in 1.68
157
+ Enabled: true
158
+ Style/ArgumentsForwarding: # new in 1.1
159
+ Enabled: true
160
+ Style/ArrayIntersect: # new in 1.40
161
+ Enabled: true
162
+ Style/BitwisePredicate: # new in 1.68
163
+ Enabled: true
164
+ Style/CollectionCompact: # new in 1.2
165
+ Enabled: true
166
+ Style/CombinableDefined: # new in 1.68
167
+ Enabled: true
168
+ Style/ComparableClamp: # new in 1.44
169
+ Enabled: true
170
+ Style/ConcatArrayLiterals: # new in 1.41
171
+ Enabled: true
172
+ Style/DataInheritance: # new in 1.49
173
+ Enabled: true
174
+ Style/DigChain: # new in 1.69
175
+ Enabled: true
176
+ Style/DirEmpty: # new in 1.48
177
+ Enabled: true
178
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
179
+ Enabled: true
180
+ Style/EmptyHeredoc: # new in 1.32
181
+ Enabled: true
182
+ Style/EndlessMethod: # new in 1.8
183
+ Enabled: true
184
+ Style/EnvHome: # new in 1.29
185
+ Enabled: true
186
+ Style/ExactRegexpMatch: # new in 1.51
187
+ Enabled: true
188
+ Style/FetchEnvVar: # new in 1.28
189
+ Enabled: true
190
+ Style/FileEmpty: # new in 1.48
191
+ Enabled: true
192
+ Style/FileNull: # new in 1.69
193
+ Enabled: true
194
+ Style/FileRead: # new in 1.24
195
+ Enabled: true
196
+ Style/FileTouch: # new in 1.69
197
+ Enabled: true
198
+ Style/FileWrite: # new in 1.24
199
+ Enabled: true
200
+ Style/HashConversion: # new in 1.10
201
+ Enabled: true
202
+ Style/HashExcept: # new in 1.7
203
+ Enabled: true
204
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
205
+ Enabled: true
206
+ Style/InPatternThen: # new in 1.16
207
+ Enabled: true
208
+ Style/KeywordArgumentsMerging: # new in 1.68
209
+ Enabled: true
210
+ Style/MagicCommentFormat: # new in 1.35
211
+ Enabled: true
212
+ Style/MapCompactWithConditionalBlock: # new in 1.30
213
+ Enabled: true
214
+ Style/MapIntoArray: # new in 1.63
215
+ Enabled: true
216
+ Style/MapToHash: # new in 1.24
217
+ Enabled: true
218
+ Style/MapToSet: # new in 1.42
219
+ Enabled: true
220
+ Style/MinMaxComparison: # new in 1.42
221
+ Enabled: true
222
+ Style/MultilineInPatternThen: # new in 1.16
223
+ Enabled: true
224
+ Style/NegatedIfElseCondition: # new in 1.2
225
+ Enabled: true
226
+ Style/NestedFileDirname: # new in 1.26
227
+ Enabled: true
228
+ Style/NilLambda: # new in 1.3
229
+ Enabled: true
230
+ Style/NumberedParameters: # new in 1.22
231
+ Enabled: true
232
+ Style/NumberedParametersLimit: # new in 1.22
233
+ Enabled: true
234
+ Style/ObjectThen: # new in 1.28
235
+ Enabled: true
236
+ Style/OpenStructUse: # new in 1.23
237
+ Enabled: true
238
+ Style/OperatorMethodCall: # new in 1.37
239
+ Enabled: true
240
+ Style/QuotedSymbols: # new in 1.16
241
+ Enabled: true
242
+ Style/RedundantArgument: # new in 1.4
243
+ Enabled: true
244
+ Style/RedundantArrayConstructor: # new in 1.52
245
+ Enabled: true
246
+ Style/RedundantConstantBase: # new in 1.40
247
+ Enabled: true
248
+ Style/RedundantCurrentDirectoryInPath: # new in 1.53
249
+ Enabled: true
250
+ Style/RedundantDoubleSplatHashBraces: # new in 1.41
251
+ Enabled: true
252
+ Style/RedundantEach: # new in 1.38
253
+ Enabled: true
254
+ Style/RedundantFilterChain: # new in 1.52
255
+ Enabled: true
256
+ Style/RedundantHeredocDelimiterQuotes: # new in 1.45
257
+ Enabled: true
258
+ Style/RedundantInitialize: # new in 1.27
259
+ Enabled: true
260
+ Style/RedundantInterpolationUnfreeze: # new in 1.66
261
+ Enabled: true
262
+ Style/RedundantLineContinuation: # new in 1.49
263
+ Enabled: true
264
+ Style/RedundantRegexpArgument: # new in 1.53
265
+ Enabled: true
266
+ Style/RedundantRegexpConstructor: # new in 1.52
267
+ Enabled: true
268
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
269
+ Enabled: true
270
+ Style/RedundantStringEscape: # new in 1.37
271
+ Enabled: true
272
+ Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
273
+ Enabled: true
274
+ Style/SafeNavigationChainLength: # new in 1.68
275
+ Enabled: true
276
+ Style/SelectByRegexp: # new in 1.22
277
+ Enabled: true
278
+ Style/SendWithLiteralMethodName: # new in 1.64
279
+ Enabled: true
280
+ Style/SingleLineDoEndBlock: # new in 1.57
281
+ Enabled: true
282
+ Style/StringChars: # new in 1.12
283
+ Enabled: true
284
+ Style/SuperArguments: # new in 1.64
285
+ Enabled: true
286
+ Style/SuperWithArgsParentheses: # new in 1.58
287
+ Enabled: true
288
+ Style/SwapValues: # new in 1.1
289
+ Enabled: true
290
+ Style/YAMLFileRead: # new in 1.53
291
+ Enabled: true
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2024-12-13
4
+
5
+ - Initial release
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/Guardfile ADDED
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
4
+ # More info at https://github.com/guard/guard#readme
5
+
6
+ ## Uncomment and set this to only include directories you want to watch
7
+ # directories %w(app lib config test spec features) \
8
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
9
+
10
+ ## Note: if you are using the `directories` clause above and you are not
11
+ ## watching the project directory ('.'), then you will want to move
12
+ ## the Guardfile to a watched dir and symlink it back, e.g.
13
+ #
14
+ # $ mkdir config
15
+ # $ mv Guardfile config/
16
+ # $ ln -s config/Guardfile .
17
+ #
18
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
19
+
20
+ guard :bundler do
21
+ require "guard/bundler"
22
+ require "guard/bundler/verify"
23
+ helper = Guard::Bundler::Verify.new
24
+
25
+ files = ["Gemfile"]
26
+ files += Dir["*.gemspec"] if files.any? { |f| helper.uses_gemspec?(f) }
27
+
28
+ # Assume files are symlinked from somewhere
29
+ files.each { |file| watch(helper.real_path(file)) }
30
+ end
31
+
32
+ require "guard/rspec/dsl"
33
+
34
+ def guard_rspec
35
+ guard :rspec, cmd: "bundle exec rspec --format progress" do
36
+ dsl = Guard::RSpec::Dsl.new(self)
37
+
38
+ rspec = dsl.rspec
39
+ watch(rspec.spec_helper) { rspec.spec_dir }
40
+ watch(rspec.spec_support) { rspec.spec_dir }
41
+ watch(rspec.spec_files)
42
+ watch(%r{^(bin|lib)/.+$}) { rspec.spec_dir }
43
+
44
+ ruby = dsl.ruby
45
+ dsl.watch_spec_files_for(ruby.lib_files)
46
+ end
47
+ end
48
+
49
+ def guard_rubocop
50
+ guard :rubocop, cli: ["--format", "clang", "--autocorrect"] do
51
+ watch(/.+\.rb$/)
52
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
53
+ end
54
+ end
55
+
56
+ def cucumber_options
57
+ {
58
+ # Below are examples overriding defaults
59
+
60
+ # cmd: 'bin/cucumber',
61
+ cmd_additional_args: "--profile guard",
62
+
63
+ # all_after_pass: false,
64
+ # all_on_start: false,
65
+ # keep_failed: false,
66
+ # feature_sets: ['features/frontend', 'features/experimental'],
67
+
68
+ # run_all: { cmd_additional_args: '--profile guard_all' },
69
+ # focus_on: { 'wip' }, # @wip
70
+ notification: false
71
+ }
72
+ end
73
+
74
+ def cucumber_start_by_rerunning_failures_if_any
75
+ rerun_file = "rerun_failures.txt"
76
+
77
+ # If rerun file exists, rerun failed features first
78
+ if File.exist?(rerun_file) && !File.empty?(rerun_file)
79
+ # Return the failures to rerun them
80
+ ["@rerun", File.read(rerun_file).strip]
81
+ else
82
+ # Run full test suite if no recorded failures
83
+ :all
84
+ end
85
+ end
86
+
87
+ def guard_cucumber
88
+ guard "cucumber", cucumber_options do
89
+ watch(%r{^features/.+\.feature$}) { |_m| cucumber_start_by_rerunning_failures_if_any }
90
+
91
+ watch(%r{^features/support/.+$}) { "features" }
92
+ watch(%r{^(bin|lib)/.+$}) { "features" }
93
+ watch("cucumber.yml")
94
+
95
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
96
+ Dir[File.join("**/#{m[1]}.feature")][0] || "features"
97
+ end
98
+ end
99
+ end
100
+
101
+ group :red_green_refactor, halt_on_fail: true do
102
+ guard_rspec
103
+ guard_rubocop
104
+ guard_cucumber
105
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 TODO: Write your name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.