eco-helpers 3.3.0 → 3.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c1f4723827d6dabfa094fd943b573a00bfe19c6d16b4ea0cb528c01d23d74d0
4
- data.tar.gz: 6cb1e6109c1d4150f2a52c0359941b02be893065cc6b732932af117ad6bbd08c
3
+ metadata.gz: 573a9ed21173c949849363f9e92875fc79981e410144a6c3fe101fdfcd4b9062
4
+ data.tar.gz: c12a639bb7775e0d43459c5bfe534fae12552c760d608b2192c052b12c1828a0
5
5
  SHA512:
6
- metadata.gz: 515a129e3e75c42d0c16de5154a0e06e7d5854b65e766cf7e144b7097b6e55f2d2db5130ee05828f3c672da57f443517198816df18523ff952aefd8d93f9a645
7
- data.tar.gz: aa5c685e34346dfe3bc41c006c89790eba83470327d950eeb531b0416b14228616d8cee57ba6d9f82d351db5ef3d4d6aa6a45aa147c6702821a1454a730fe879
6
+ metadata.gz: a3fb82eb08b5421db3bcca403257eb694aaf4844ed11c82c2e2a66211b9a13d14ae4b7941c42a720b74e5b5e09df39f8846223ed777cf21095d42d0086a73f89
7
+ data.tar.gz: c51eb9e14c75aedb26e68562d15801de0bbaf376983254d809ed0024968c1a4117de12e2f6444647ad75ce51f50847d684d5261d3b10e6897bd8454f6e7ef9af
data/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [3.3.1] - 2026-08-13
6
+
7
+ ### Fixed
8
+
9
+ - `Eco::Data::Files::Encoding#get_file_content_with_encoding` read files in **text mode**, which on
10
+ Windows silently translates `\r\n` to bare `\n` while loading — callers never see the file's
11
+ actual bytes. Both read branches (BOM and plain) now use binary mode (`mode: 'rb'`), preserving
12
+ the bytes exactly; BOM stripping is unchanged. Linux behaviour is identical before and after
13
+ (text mode never translated anything there) — this makes Windows match Linux. Surfaced by Travis
14
+ on the mns EPT-1607 tooltip CSV (multi-org-idle `BLOCKED-TR-04`).
15
+
16
+ **Precision note (2026-08-13, verified against the motivating file before this version was
17
+ tagged):** the earlier draft of this entry claimed `Eco::CSV.read` raised
18
+ `CSV::MalformedCSVError` on that CSV. It does not — `Eco::CSV.read` parses the collapsed
19
+ *string*, and a fully collapsed LF-only file with quoted embedded newlines is still legal CSV
20
+ (502 rows parse fine on 3.3.0). The `MalformedCSVError` in the BLOCKED-TR-04 report came from
21
+ stdlib `::CSV.read(path)`, whose own IO/row-sep handling is a different code path. The fix here
22
+ is byte-fidelity hardening: text-mode reads silently *altered data* (any consumer comparing,
23
+ hashing, or round-tripping file content got different bytes on Windows than on Linux), and
24
+ partial/mixed line-ending inputs remain genuinely parse-hazardous under translation.
25
+
5
26
  ## [3.3.0] - 2026-08-13
6
27
 
7
28
  Adopts **`ecoportal-api-graphql` 2.0.0** (published 2026-08-13): floor raised from
@@ -19,8 +40,39 @@ signature change to warn anyone. **Re-verify it on a sandbox org before trusting
19
40
  run.** Also newly live via the gem: the page-level `executeWorkflowCommands` bus, File-field
20
41
  attach writes, `updatePresetView` column edits, viewable-field management and Date-field renewals.
21
42
 
22
- Consumers pinned to `~> 3.2` do not pick this up automatically, so adopting graphql 2.0.0 stays a
23
- deliberate per-repo decision.
43
+ **CORRECTION (2026-08-13, after publication).** The published 3.3.0 changelog claimed:
44
+ *"Consumers pinned to `~> 3.2` do not pick this up automatically, so adopting graphql 2.0.0 stays a
45
+ deliberate per-repo decision."* **That is wrong** and cannot be edited in the published gem, so it
46
+ is corrected here.
47
+
48
+ `~> 3.2` means `>= 3.2, < 4.0`, so **3.3.0 is in range** — it is not gated. What actually happens
49
+ depends on whether the consumer also declares graphql directly:
50
+
51
+ - A consumer declaring **only** `eco-helpers '~> 3.2'` adopts 3.3.0 on its next `bundle update`,
52
+ and reaches **graphql 2.0.0 transitively**.
53
+ - A consumer declaring **both** `eco-helpers '~> 3.2'` and `ecoportal-api-graphql '~> 1.3'` (which
54
+ is the case for `multi_org_api` and `multi-org-idle`) does **not** silently adopt — it **fails to
55
+ resolve**, because 3.3.0 requires graphql `~> 2.0`.
56
+
57
+ So the "2.0.0 gates adoption for free" argument only ever covered **direct** graphql dependencies.
58
+ Both consumers were pinned deliberately on 2026-08-13 rather than left to discover this.
59
+
60
+ ★ **`3.2.20` was tagged but deliberately NEVER PUBLISHED.** rubygems goes 3.2.19 → 3.3.0. The tag
61
+ marks real history (the point where the 3.2.19 hotfix line rejoined master) but the gem was not
62
+ pushed, and **must not be**: it predates the `spec.files` allowlist fix below and would ship
63
+ internal `.ai-assistance/` and `docs/` content to rubygems. Its content is not lost — 3.3.0
64
+ descends from it. Anything needing the `Eco::API::Custom::Cli` reunification must use **3.3.0**,
65
+ not a `~> 3.2.0` pin.
66
+
67
+ ★ **KNOWN AND APPROVED EXCEPTION — `OozeRedirect` ships unverified** (Oscar, 2026-08-13).
68
+ The force path never worked before graphql 1.3.15 and therefore **starts really writing** on this
69
+ release. It was **not** re-verified on a sandbox org before publishing. Approved deliberately:
70
+ the risk is **usage-gated** — `OozeRedirect` lives under `lib/eco/api/usecases/graphql/compat/` and
71
+ is opt-in per use case; nothing invokes it automatically on load or upgrade, so an unused install
72
+ cannot trigger it. Few paths use it, and shipping was judged more important than blocking on the
73
+ check.
74
+ **Revision note:** Travis to verify on a sandbox org **after** release. Until that verification is
75
+ recorded, treat any `OozeRedirect` run against customer data as unproven — dry-run first.
24
76
 
25
77
  ★ **The published gem is now `lib/` only.** `spec.files` excluded just `test|spec|features`, so
26
78
  every top-level directory added since shipped by default — `.ai-assistance/` internal notes,
@@ -26,12 +26,15 @@ module Eco
26
26
  puts msg
27
27
  end
28
28
 
29
+ # Binary mode: text mode on Windows silently translates "\r\n" to "\n",
30
+ # which corrupts files whose row terminators must be distinguished from
31
+ # bare "\n" inside quoted CSV fields (and diverges from Linux behaviour).
29
32
  bom_enc = encoding && encoding.split('|')[0] == 'bom'
30
33
  if bom?(file) || bom_enc
31
- content = remove_bom(File.read(file, encoding: 'utf-8'))
34
+ content = remove_bom(File.read(file, mode: 'rb', encoding: 'utf-8'))
32
35
  encoding = 'utf-8'
33
36
  else
34
- content = File.read(file, encoding: encoding)
37
+ content = File.read(file, mode: 'rb', encoding: encoding)
35
38
  end
36
39
 
37
40
  return unless content
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = '3.3.0'.freeze
2
+ VERSION = '3.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura