plan_my_stuff 1.1.2 → 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 +12 -8
- data/README.md +0 -3
- data/lib/plan_my_stuff/attachment_uploader.rb +22 -2
- 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,15 @@
|
|
|
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
|
+
|
|
3
13
|
## 1.1.2
|
|
4
14
|
|
|
5
15
|
### Fixed
|
|
@@ -422,7 +432,7 @@ Official release.
|
|
|
422
432
|
|
|
423
433
|
### Documented
|
|
424
434
|
|
|
425
|
-
-
|
|
435
|
+
- Issue #9 documents the design pivot from inline-base64 (body
|
|
426
436
|
size capped) through sibling-repo (rejected) to the chosen
|
|
427
437
|
side-branch approach.
|
|
428
438
|
|
|
@@ -495,7 +505,7 @@ Official release.
|
|
|
495
505
|
|
|
496
506
|
### Breaking
|
|
497
507
|
|
|
498
|
-
- `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
|
|
499
509
|
|
|
500
510
|
### Added
|
|
501
511
|
|
|
@@ -582,12 +592,6 @@ Official release.
|
|
|
582
592
|
- Items at `Ready for Release`, `Release in Progress`, or `Completed` are no longer removed when an unassign webhook fires
|
|
583
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
|
|
584
594
|
|
|
585
|
-
### Documented
|
|
586
|
-
|
|
587
|
-
- `designs/pipeline_cleanup/plan.md` — full design + bug-to-fix mapping
|
|
588
|
-
- `requirements/08_release_pipeline.md` updated to reflect the new flow
|
|
589
|
-
- `requirements/tasks.md` — T-PC-001 added under Phase 14
|
|
590
|
-
|
|
591
595
|
## 0.5.1
|
|
592
596
|
|
|
593
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).
|
|
@@ -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.
|
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-07-
|
|
11
|
+
date: 2026-07-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|