plan_my_stuff 0.4.0 → 0.5.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea3a8ca1126f0be8286e82ef98774da81ea78bc771d27bc2006e18f926c97f1d
4
- data.tar.gz: 412880ac9fccf6bd35e35b276854c53f267384bae8a56d9f57520f9683f45a5b
3
+ metadata.gz: a70108268136db83554f3bda05e5ab384b1d2c6f1d8d05f4554cef037eeee8a8
4
+ data.tar.gz: 5c713eca795782628fab95c61c3d5876934d22b04e0c539e26d35369a376491b
5
5
  SHA512:
6
- metadata.gz: fa973f02a46eab0d5385e59f8d8a667e1549c2bbd3fd0108edb0f3cc4d09d5a9f73f6d64f1760cc6dbc568237d7508df15d727958159eab2ea8b317fe0cd10e6
7
- data.tar.gz: 4a5a4a24c661a32d5b8866882b41c71fb52991cb83d3cf92b7a7c7d442b86c13fb2881db781fd0aa393e8335a3679937a829325ea75402c8a32d2c65e0d1ceb4
6
+ metadata.gz: 253f04b4c10e8d1557d5915daa1a757d5678c717cd4b7b97d50450ed4e8417c05f044bbf97c235de17328a4fd3ee27f8a08bbaf1b874ce0dccd294760f370114
7
+ data.tar.gz: 331d2a9b48418722eb3049099817e390095c07deb70e59670ead47cbf98555bb2c44e12b1cdc9824abd28fd6795c80fa8aac124ea5779dd9262323a7bc96c10a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Added
6
+
7
+ - `post_install_message` in gemspec listing available rake tasks and generators
8
+ - `rake plan_my_stuff:install` and `rake plan_my_stuff:views` aliases for the Rails generators
9
+
10
+ ### Fixed
11
+
12
+ - `TestingProjectItem.create!` left new items with a blank Test Status; now defaults to `Todo`
13
+ - `TestingProjectItem.create!` left new items with no Pass Mode; now defaults to `all`
14
+
3
15
  ## 0.4.0
4
16
 
5
17
  - Full feature set release before PR
@@ -56,6 +56,14 @@ PMS.configure do |config|
56
56
  # config.support_method = :support?
57
57
  # config.support_method = ->(user) { user.role.in?(%w[support admin]) }
58
58
 
59
+ # Map of app user id (whatever `user_id_method` returns) to GitHub login.
60
+ # Used by the "Take" UI flow to assign the GitHub user when a support
61
+ # user claims an issue.
62
+ # config.github_login_for = {
63
+ # 1 => 'some_username',
64
+ # 2 => 'octocat',
65
+ # }
66
+
59
67
  # --------------------------------------------------------------------------
60
68
  # Engine authentication
61
69
  # --------------------------------------------------------------------------
@@ -72,6 +80,16 @@ PMS.configure do |config|
72
80
  # :commonmarker (default) or :redcarpet -- the chosen gem must be in your Gemfile.
73
81
  # config.markdown_renderer = :commonmarker
74
82
 
83
+ # Default options passed to the markdown renderer. Per-call options merge on top.
84
+ # For :commonmarker -- passed as `options:` to `Commonmarker.to_html`:
85
+ # config.markdown_options = { render: { hardbreaks: true } }
86
+ # For :redcarpet -- :render_options and :renderer are extracted for the HTML
87
+ # renderer; remaining keys are extensions passed to `Redcarpet::Markdown.new`:
88
+ # config.markdown_options = {
89
+ # render_options: { hard_wrap: true, no_styles: true },
90
+ # autolink: true,
91
+ # }
92
+
75
93
  # --------------------------------------------------------------------------
76
94
  # URL prefix
77
95
  # --------------------------------------------------------------------------
@@ -118,6 +136,12 @@ PMS.configure do |config|
118
136
  # Comment-only fields (merged on top of shared, context wins on conflicts):
119
137
  # config.comment_custom_fields = {}
120
138
 
139
+ # Project-only fields (merged on top of shared, context wins on conflicts):
140
+ # config.project_custom_fields = {}
141
+
142
+ # Testing-project-only fields (merged on top of shared, context wins on conflicts):
143
+ # config.testing_custom_fields = {}
144
+
121
145
  # --------------------------------------------------------------------------
122
146
  # Release pipeline
123
147
  # --------------------------------------------------------------------------
@@ -204,6 +228,16 @@ PMS.configure do |config|
204
228
  # config.sns_verifier_class = Aws::SNS::MessageVerifier
205
229
  # config.sns_verifier_error = Aws::SNS::MessageVerifier::VerificationError
206
230
 
231
+ # --------------------------------------------------------------------------
232
+ # Caching
233
+ # --------------------------------------------------------------------------
234
+ # ETag-based HTTP caching of GitHub reads via Rails.cache. Defaults to true.
235
+ # config.cache_enabled = true
236
+
237
+ # Opaque version string baked into every PMS cache key. Bump it to invalidate
238
+ # all cached entries from the consuming app's side (e.g. after a deploy).
239
+ # config.cache_version = Rails.configuration.x.image_tag
240
+
207
241
  # --------------------------------------------------------------------------
208
242
  # Route mounting
209
243
  # --------------------------------------------------------------------------
@@ -4,6 +4,38 @@ module PlanMyStuff
4
4
  # A project item belonging to a TestingProject. Extends BaseProjectItem with
5
5
  # testing-specific field updaters and pass/fail sign-off logic.
6
6
  class TestingProjectItem < PlanMyStuff::BaseProjectItem
7
+ # Default "Test Status" applied to newly-created testing items so they do
8
+ # not land in GitHub's blank-status lane.
9
+ DEFAULT_STATUS = 'Todo'
10
+
11
+ # Default "Pass Mode" applied to newly-created testing items so sign-off
12
+ # semantics are defined up front (every tester must pass).
13
+ DEFAULT_PASS_MODE = 'all'
14
+
15
+ class << self
16
+ # @see super
17
+ #
18
+ # Sets Test Status to +DEFAULT_STATUS+ on the new item so it lands in
19
+ # the Todo column rather than the blank-status lane. Uses +move_item+
20
+ # directly (not +item.move_to!+) so the initial status does not fire
21
+ # a spurious +project_item.status_changed+ event.
22
+ #
23
+ # Also seeds Pass Mode to +DEFAULT_PASS_MODE+ so sign-off semantics
24
+ # are defined from item creation forward.
25
+ #
26
+ def create!(issue_or_title, draft: false, body: nil, project_number: nil, user: nil)
27
+ item = super
28
+ move_item(project_number: item.project.number, item_id: item.id, status: DEFAULT_STATUS)
29
+ update_single_select_field!(
30
+ project_number: item.project.number,
31
+ item_id: item.id,
32
+ field_name: 'Pass Mode',
33
+ value: DEFAULT_PASS_MODE,
34
+ )
35
+ item
36
+ end
37
+ end
38
+
7
39
  # Updates the Pass Mode single-select field on this testing project item.
8
40
  #
9
41
  # @param value [String] "all" or "any"
@@ -3,7 +3,7 @@
3
3
  module PlanMyStuff
4
4
  module VERSION
5
5
  MAJOR = 0
6
- MINOR = 4
6
+ MINOR = 5
7
7
  TINY = 0
8
8
 
9
9
  # Set PRE to nil unless it's a pre-release (beta, rc, etc.)
@@ -1,6 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  namespace :plan_my_stuff do
4
+ desc 'Run the plan_my_stuff install generator (alias for `rails g plan_my_stuff:install`)'
5
+ task install: :environment do
6
+ require 'rails/generators'
7
+
8
+ require 'generators/plan_my_stuff/install/install_generator'
9
+ PlanMyStuff::Generators::InstallGenerator.start([])
10
+ end
11
+
12
+ desc 'Copy plan_my_stuff view templates (alias for `rails g plan_my_stuff:views`)'
13
+ task views: :environment do
14
+ require 'rails/generators'
15
+
16
+ require 'generators/plan_my_stuff/views/views_generator'
17
+ PlanMyStuff::Generators::ViewsGenerator.start([])
18
+ end
19
+
4
20
  namespace :webhooks do
5
21
  desc 'Create an organization webhook (URL=... [EVENTS=ev1,ev2])'
6
22
  task create_org: :environment do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plan_my_stuff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
@@ -158,7 +158,33 @@ metadata:
158
158
  homepage_uri: https://github.com/brandsinsurance/PlanMyStuff/
159
159
  source_code_uri: https://github.com/brandsinsurance/PlanMyStuff
160
160
  changelog_uri: https://github.com/brandsinsurance/PlanMyStuff/blob/main/CHANGELOG.md
161
- post_install_message:
161
+ post_install_message: |
162
+ Thanks for installing plan_my_stuff!
163
+
164
+ Getting started:
165
+
166
+ rake plan_my_stuff:install
167
+ Generates config/initializers/plan_my_stuff.rb and mounts the engine
168
+
169
+ rake plan_my_stuff:views
170
+ Copies view templates to app/views/plan_my_stuff/ (optional)
171
+
172
+ Available rake tasks:
173
+
174
+ plan_my_stuff:verify
175
+ Verify token, org, repos, and project access
176
+
177
+ plan_my_stuff:webhooks:create_org URL=... [EVENTS=...]
178
+ plan_my_stuff:webhooks:create_repo URL=... [REPO=owner/name] [EVENTS=...]
179
+ plan_my_stuff:webhooks:replay ENDPOINT_URL=... WEBHOOK_URL=... [SCOPE=org|repo]
180
+ plan_my_stuff:webhooks:listen ENDPOINT_URL=... [ORG_WEBHOOK_URL=...] [REPO_WEBHOOK_URL=... REPO=...]
181
+ plan_my_stuff:webhooks:simulate_aws ENDPOINT_URL=... [EVENT=...]
182
+
183
+ plan_my_stuff:reminders:sweep [REPO=<key>]
184
+
185
+ plan_my_stuff:testing:create_template [TITLE=...]
186
+
187
+ Run `rake -D plan_my_stuff` for full descriptions.
162
188
  rdoc_options: []
163
189
  require_paths:
164
190
  - lib