plan_my_stuff 1.1.1 → 1.2.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 +4 -4
- data/CHANGELOG.md +20 -8
- data/README.md +0 -3
- data/lib/generators/plan_my_stuff/install/templates/initializer.rb +3 -3
- data/lib/plan_my_stuff/attachment_uploader.rb +22 -2
- data/lib/plan_my_stuff/configuration.rb +4 -4
- data/lib/plan_my_stuff/issue.rb +3 -3
- data/lib/plan_my_stuff/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bacd3474e480b36db577d70c215ad0bd440c6b2384319644047ca18f25385324
|
|
4
|
+
data.tar.gz: 68f011246630794f39094af3a6d09287fc58c35d68082bedb724a0e9c7cd264a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae377f254278d231a437f6ab882c739f372bda399927c8adb1e1df7fa0858a648bf7d7a4c604acddc0471d6eb16b99113e21d811c71fbe374b6e7bf609e99cc6
|
|
7
|
+
data.tar.gz: '0498c86327fc8423021e1f5be08409303f4ba12f328cdf7df705f8b3b6d68456ac885c20befc38d50ef12512a42dd48a589ee8df59b84791ccf835f4e77a509b'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Add support for using IO when uploading files
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Fix docs in `PlanMyStuff::Issue.update!` for `:issue_type` to allow passing of a `Symbol`
|
|
12
|
+
|
|
13
|
+
## 1.1.2
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Incorrect default for `config.eager_load_controllers_on_boot` (should be `false` not `true`)
|
|
18
|
+
- `Configuration#repo_nickname_for` no longer produces a space for underscored `config.repos` keys (e.g. `:some_name`
|
|
19
|
+
now resolves to `"SomeName"` instead of `"Some Name"`), which previously broke URL routing
|
|
20
|
+
|
|
3
21
|
## 1.1.1
|
|
4
22
|
|
|
5
23
|
### Fixed
|
|
@@ -414,7 +432,7 @@ Official release.
|
|
|
414
432
|
|
|
415
433
|
### Documented
|
|
416
434
|
|
|
417
|
-
-
|
|
435
|
+
- Issue #9 documents the design pivot from inline-base64 (body
|
|
418
436
|
size capped) through sibling-repo (rejected) to the chosen
|
|
419
437
|
side-branch approach.
|
|
420
438
|
|
|
@@ -487,7 +505,7 @@ Official release.
|
|
|
487
505
|
|
|
488
506
|
### Breaking
|
|
489
507
|
|
|
490
|
-
- `config.should_send_request` and `config.job_classes` accessors — declared but never wired up. The request gateway that would honor them is deferred (
|
|
508
|
+
- `config.should_send_request` and `config.job_classes` accessors — declared but never wired up. The request gateway that would honor them is deferred (tracked in issue #12); they will return when the gateway lands
|
|
491
509
|
|
|
492
510
|
### Added
|
|
493
511
|
|
|
@@ -574,12 +592,6 @@ Official release.
|
|
|
574
592
|
- Items at `Ready for Release`, `Release in Progress`, or `Completed` are no longer removed when an unassign webhook fires
|
|
575
593
|
- Pending-approvals guard runs before `ProjectItem.create!` in the assignment flow so the webhook no longer leaves orphan items when `Pipeline.take!`'s approval guard would otherwise raise
|
|
576
594
|
|
|
577
|
-
### Documented
|
|
578
|
-
|
|
579
|
-
- `designs/pipeline_cleanup/plan.md` — full design + bug-to-fix mapping
|
|
580
|
-
- `requirements/08_release_pipeline.md` updated to reflect the new flow
|
|
581
|
-
- `requirements/tasks.md` — T-PC-001 added under Phase 14
|
|
582
|
-
|
|
583
595
|
## 0.5.1
|
|
584
596
|
|
|
585
597
|
### Fixed
|
data/README.md
CHANGED
|
@@ -713,9 +713,6 @@ On a successful AWS deployment the gem completes each matching item individually
|
|
|
713
713
|
(release-notes mailer, Slack summary, changelog generator) get one clean "deployment finished" signal
|
|
714
714
|
without debouncing the per-item events.
|
|
715
715
|
|
|
716
|
-
See `designs/release_cycle/plan.md` for the full design, including the `projects_v2_item` path that fires
|
|
717
|
-
`Pipeline.take!` when a human drags an item to Started on github.com.
|
|
718
|
-
|
|
719
716
|
### "Take" button
|
|
720
717
|
|
|
721
718
|
The mounted UI exposes a **Take** button on pipeline issues that calls `Pipeline.take!` and assigns the current user. Your app's user-id -> GitHub login mapping is provided by `config.github_login_for` (a hash keyed by user id).
|
|
@@ -26,8 +26,8 @@ PlanMyStuff.configure do |config|
|
|
|
26
26
|
|
|
27
27
|
# Human-readable prefix used as the `Issue#to_param` so URLs read
|
|
28
28
|
# `/issues/Element-1234` instead of `/issues/1234`. Missing keys fall back
|
|
29
|
-
# to `key.to_s.titleize`; only repos whose key doesn't titleize
|
|
30
|
-
# need an entry.
|
|
29
|
+
# to `key.to_s.titleize.delete(' ')`; only repos whose key doesn't titleize
|
|
30
|
+
# cleanly need an entry.
|
|
31
31
|
# config.repo_nicknames = { safety: 'Compliance' }
|
|
32
32
|
|
|
33
33
|
# --------------------------------------------------------------------------
|
|
@@ -222,7 +222,7 @@ PlanMyStuff.configure do |config|
|
|
|
222
222
|
# the constant. Opt in if the host app probes engine controllers via
|
|
223
223
|
# `defined?` in dev mode.
|
|
224
224
|
#
|
|
225
|
-
# config.eager_load_controllers_on_boot =
|
|
225
|
+
# config.eager_load_controllers_on_boot = false
|
|
226
226
|
|
|
227
227
|
# --------------------------------------------------------------------------
|
|
228
228
|
# Release pipeline
|
|
@@ -30,8 +30,9 @@ module PlanMyStuff
|
|
|
30
30
|
# @param repo [PlanMyStuff::Repo] source issues repo (used to namespace the path)
|
|
31
31
|
# @param issue_number [Integer]
|
|
32
32
|
# @param files [Array] mix of already-uploaded +PlanMyStuff::Attachment+ instances, uploaded-file objects
|
|
33
|
-
# responding to +#path+ and +#original_filename+ (e.g. Rails +ActionDispatch::Http::UploadedFile+),
|
|
34
|
-
# String/Pathname paths to local files
|
|
33
|
+
# responding to +#path+ and +#original_filename+ (e.g. Rails +ActionDispatch::Http::UploadedFile+),
|
|
34
|
+
# String/Pathname paths to local files, and +{filename:, io:}+ Hashes wrapping an already in-memory
|
|
35
|
+
# readable (e.g. an S3 SDK response body)
|
|
35
36
|
#
|
|
36
37
|
# @return [Array<PlanMyStuff::Attachment>]
|
|
37
38
|
#
|
|
@@ -83,11 +84,30 @@ module PlanMyStuff
|
|
|
83
84
|
[leaf_filename(entry.original_filename), File.binread(entry.path)]
|
|
84
85
|
elsif entry.is_a?(String) || entry.is_a?(Pathname)
|
|
85
86
|
[File.basename(entry), File.binread(entry)]
|
|
87
|
+
elsif entry.is_a?(Hash) && entry[:io].present?
|
|
88
|
+
[leaf_filename(entry[:filename]), read_io(entry[:io])]
|
|
86
89
|
else
|
|
87
90
|
raise(ArgumentError, "Unsupported attachment entry: #{entry.inspect}")
|
|
88
91
|
end
|
|
89
92
|
end
|
|
90
93
|
|
|
94
|
+
# Rewinds +io+ first (if possible) so callers who already read from it for another purpose (e.g.
|
|
95
|
+
# content-type sniffing) still get the full bytes.
|
|
96
|
+
#
|
|
97
|
+
# @raise [ArgumentError] If the IO object doesn't respond to `:read`
|
|
98
|
+
#
|
|
99
|
+
# @param io [#read]
|
|
100
|
+
#
|
|
101
|
+
# @return [String] raw bytes
|
|
102
|
+
#
|
|
103
|
+
def read_io(io)
|
|
104
|
+
raise(ArgumentError, 'Attachment IO must respond to `#read`') unless io.respond_to?(:read)
|
|
105
|
+
|
|
106
|
+
io.rewind if io.respond_to?(:rewind)
|
|
107
|
+
|
|
108
|
+
io.read
|
|
109
|
+
end
|
|
110
|
+
|
|
91
111
|
# Strips directory components (both POSIX and Windows separators) from a browser-supplied filename so
|
|
92
112
|
# values like +"../../secret.txt"+ or +"C:\\fakepath\\photo.jpg"+ cannot leak into stored metadata or
|
|
93
113
|
# later download paths.
|
|
@@ -367,8 +367,8 @@ module PlanMyStuff
|
|
|
367
367
|
attr_accessor :repos
|
|
368
368
|
|
|
369
369
|
# Human-readable repo names used as the +to_param+ prefix on +PlanMyStuff::Issue+ instances. Symbol-keyed
|
|
370
|
-
# against +repos+ -- missing keys fall back to +key.to_s.titleize+, so only entries that diverge
|
|
371
|
-
# +titleize+ of the key (e.g. +:safety+ -> +"Compliance"+) need to be listed.
|
|
370
|
+
# against +repos+ -- missing keys fall back to +key.to_s.titleize.delete(' ')+, so only entries that diverge
|
|
371
|
+
# from a simple +titleize+ of the key (e.g. +:safety+ -> +"Compliance"+) need to be listed.
|
|
372
372
|
#
|
|
373
373
|
# @return [Hash{Symbol => String}]
|
|
374
374
|
#
|
|
@@ -520,14 +520,14 @@ module PlanMyStuff
|
|
|
520
520
|
end
|
|
521
521
|
|
|
522
522
|
# Human-readable nickname for a repo key, used as the +to_param+ prefix on +PlanMyStuff::Issue+ instances. Falls
|
|
523
|
-
# back to +key.to_s.titleize+ when no explicit entry exists in +repo_nicknames+.
|
|
523
|
+
# back to +key.to_s.titleize.delete(' ')+ when no explicit entry exists in +repo_nicknames+.
|
|
524
524
|
#
|
|
525
525
|
# @param key [Symbol, String]
|
|
526
526
|
#
|
|
527
527
|
# @return [String]
|
|
528
528
|
#
|
|
529
529
|
def repo_nickname_for(key)
|
|
530
|
-
repo_nicknames[key&.to_sym] || key.to_s.titleize
|
|
530
|
+
repo_nicknames[key&.to_sym] || key.to_s.titleize.delete(' ')
|
|
531
531
|
end
|
|
532
532
|
|
|
533
533
|
private
|
data/lib/plan_my_stuff/issue.rb
CHANGED
|
@@ -209,9 +209,9 @@ module PlanMyStuff
|
|
|
209
209
|
# @param labels [Array<String>, nil]
|
|
210
210
|
# @param state [Symbol, nil] :open or :closed
|
|
211
211
|
# @param assignees [Array<String>, String, nil] GitHub logins
|
|
212
|
-
# @param issue_type [String, nil] GitHub issue type name. Pass a String to set, +nil+ to clear, or omit
|
|
213
|
-
# kwarg to leave the current type untouched. (+nil+-vs-omitted is differentiated by the private
|
|
214
|
-
# +ISSUE_TYPE_UNCHANGED+ sentinel.)
|
|
212
|
+
# @param issue_type [String, Symbol, nil] GitHub issue type name. Pass a String to set, +nil+ to clear, or omit
|
|
213
|
+
# the kwarg to leave the current type untouched. (+nil+-vs-omitted is differentiated by the private
|
|
214
|
+
# +ISSUE_TYPE_UNCHANGED+ sentinel.). A `Symbol` will map shortcut names to the proper GitHub name.
|
|
215
215
|
# @param issue_fields [Hash{String,Symbol => Object,nil}, nil] GitHub Issue Field values to apply after the
|
|
216
216
|
# PATCH (or instead of it, when no other attrs are provided). Delegates to +#set_issue_fields!+, so the same
|
|
217
217
|
# coercion rules and +IssueFieldsNotEnabledError+ behavior apply. +nil+ or an empty hash is a no-op.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: plan_my_stuff
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brands Insurance
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|