winreg 0.1.0 → 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.
metadata CHANGED
@@ -1,108 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winreg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ned
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
- dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: rake
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '13.0'
19
- type: :development
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: '13.0'
26
- - !ruby/object:Gem::Dependency
27
- name: rake-compiler
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '1.2'
33
- type: :development
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '1.2'
40
- - !ruby/object:Gem::Dependency
41
- name: minitest
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '5.0'
47
- type: :development
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '5.0'
54
- - !ruby/object:Gem::Dependency
55
- name: vcvars
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '0.1'
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: 0.1.1
64
- type: :development
65
- prerelease: false
66
- version_requirements: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - "~>"
69
- - !ruby/object:Gem::Version
70
- version: '0.1'
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: 0.1.1
74
- description: |
75
- winreg is a native extension exposing the Win32 registry through a typed,
76
- hard-to-misuse Ruby API: strict typed readers and writers for REG_SZ,
77
- REG_EXPAND_SZ (never auto-expanded), REG_MULTI_SZ (correct double-NUL wire
78
- format), REG_DWORD/REG_QWORD (range-checked), and REG_BINARY, with raw
79
- escape hatches for adversarial data; default-value access; 32/64-bit
80
- registry views as a first-class option applied consistently to child
81
- operations; least-privilege KEY_READ defaults; and RegNotifyChangeKeyValue
82
- change watching (thread-agnostic registrations, rearm-before-deliver) that
83
- blocks cooperatively under a Fiber scheduler and releases the GVL standalone.
84
- Windows MSVC (mswin) Ruby only.
11
+ dependencies: []
12
+ description: winreg is discontinued. This final release contains no code and exists
13
+ only so that installing winreg explains the discontinuation instead of building
14
+ an unmaintained native extension.
85
15
  executables: []
86
- extensions:
87
- - ext/winreg/extconf.rb
16
+ extensions: []
88
17
  extra_rdoc_files: []
89
18
  files:
90
- - CHANGELOG.md
91
19
  - LICENSE.txt
92
20
  - README.md
93
- - ext/winreg/extconf.rb
94
- - ext/winreg/winreg.c
95
21
  - lib/winreg.rb
96
- - lib/winreg/version.rb
97
- homepage: https://github.com/main-path/winreg
98
22
  licenses:
99
23
  - MIT
100
24
  metadata:
101
- homepage_uri: https://github.com/main-path/winreg
102
- source_code_uri: https://github.com/main-path/winreg
103
- changelog_uri: https://github.com/main-path/winreg/blob/main/CHANGELOG.md
104
- bug_tracker_uri: https://github.com/main-path/winreg/issues
105
25
  rubygems_mfa_required: 'true'
26
+ post_install_message: winreg is discontinued and this release contains no code. Use
27
+ win32-registry (Ruby's bundled `require "win32/registry"`) instead.
106
28
  rdoc_options: []
107
29
  require_paths:
108
30
  - lib
@@ -110,7 +32,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
32
  requirements:
111
33
  - - ">="
112
34
  - !ruby/object:Gem::Version
113
- version: '3.0'
35
+ version: '2.0'
114
36
  required_rubygems_version: !ruby/object:Gem::Requirement
115
37
  requirements:
116
38
  - - ">="
@@ -119,6 +41,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
41
  requirements: []
120
42
  rubygems_version: 3.6.9
121
43
  specification_version: 4
122
- summary: 'Typed Windows registry access for Ruby: exact wire formats, WOW64 views,
123
- least-privilege opens, and change notification.'
44
+ summary: Discontinued. Use win32-registry (Ruby's bundled `require "win32/registry"`)
45
+ instead.
124
46
  test_files: []
data/CHANGELOG.md DELETED
@@ -1,42 +0,0 @@
1
- # Changelog
2
-
3
- ## [0.1.0] - 2026-06-01
4
-
5
- Initial release.
6
-
7
- - **Typed reads** — strict `string`/`dword`/`qword`/`multi_string`/`binary`
8
- readers (and their `?` no-raise-on-missing variants) plus a generic
9
- `read`/`read?` returning `[type, value]`. REG_SZ/REG_EXPAND_SZ decode to UTF-8
10
- with at most one trailing NUL stripped (unterminated values round-trip);
11
- REG_EXPAND_SZ is never auto-expanded; REG_MULTI_SZ decodes to `Array<String>`
12
- tolerating missing/excess terminators; REG_DWORD/REG_QWORD are size-checked.
13
- - **Typed writes** — `write_string`, `write_expand_string`, `write_multi_string`
14
- (correct double-NUL wire format), range-checked `write_dword`/`write_qword`,
15
- `write_binary`, and the generic `write(name, type, value)`. Embedded NULs and
16
- empty REG_MULTI_SZ elements are rejected, so the gem never produces a malformed
17
- value.
18
- - **Raw escape hatches** — `raw`/`write_raw` move exact bytes under an arbitrary
19
- type tag, never decoding, for forensic and adversarial data.
20
- - **Default value** — `nil`/`""` addresses the unnamed default value for every
21
- read/write/delete/probe.
22
- - **WOW64 views** — `view: :v64`/`:v32` is a first-class constructor option,
23
- stored on the `Key` and re-applied consistently to every child open/create,
24
- `delete_key`, `key?` probe, and `Watch` handle; children cannot override it.
25
- - **Least-privilege opens** — `access: :read` is `KEY_READ`; writes demand an
26
- explicit `access: :read_write`; `KEY_ALL_ACCESS` appears nowhere.
27
- - **Enumeration & metadata** — `each_value`/`each_key`/`value_names`/`key_names`
28
- (16,383-char value names) and `info` (counts + 100ns-precision
29
- `last_write_time`).
30
- - **Subkeys** — handle-relative `open`/`create` and `delete_key`
31
- (`recursive: true` does a view-aware, interruptible, deepest-first walk).
32
- - **Change notification** — `Key#watch` returns a `Winreg::Watch` (or loops in
33
- block form); `wait` returns `:changed`/`:deleted`/`nil`. Registrations are
34
- `REG_NOTIFY_THREAD_AGNOSTIC` and rearmed before delivery (no final state is
35
- ever missed); waits release the GVL and are interruptible standalone, and run
36
- cooperatively under a fiber scheduler (winloop) via a worker-thread offload.
37
- - Error taxonomy under `Winreg::Error`: `OSError` (with `#code`) and its
38
- `NotFound`/`AccessDenied`/`KeyDeleted` subclasses, plus `TypeMismatch`,
39
- `MalformedValue`, and `Closed`.
40
-
41
- Pure C extension over advapi32 + kernel32 (`rb_raise`/longjmp-safe; every handle
42
- freed by a TypedData finalizer). Windows MSVC (mswin) Ruby only.
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
- #
3
- # extconf.rb for the winreg extension — typed Windows registry access and
4
- # change notification (RegNotifyChangeKeyValue).
5
-
6
- require "mkmf"
7
-
8
- unless RbConfig::CONFIG["target_os"] =~ /mswin/
9
- abort <<~MSG
10
- winreg requires a native Windows MSVC (mswin) Ruby — it binds the Win32
11
- registry (RegOpenKeyExW/RegSetValueExW/RegNotifyChangeKeyValue) and is
12
- built with cl.exe. Your Ruby is "#{RbConfig::CONFIG['arch']}".
13
- MSG
14
- end
15
-
16
- # System import libs (bare "NAME.lib" tokens on mswin):
17
- # advapi32 - registry APIs (RegOpenKeyExW/RegQueryValueExW/RegSetValueExW/
18
- # RegEnumValueW/RegEnumKeyExW/RegQueryInfoKeyW/RegDeleteKeyExW/
19
- # RegDeleteValueW/RegNotifyChangeKeyValue)
20
- # kernel32 (events, WaitForMultipleObjects, ExpandEnvironmentStringsW) is
21
- # linked by default. Pure C — no -EHsc, so rb_raise/longjmp is the normal,
22
- # safe error mechanism.
23
- $libs = [$libs, "advapi32.lib"].join(" ")
24
-
25
- create_makefile("winreg/winreg")