oo7-rb 1.0.0-arm64-darwin
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 +7 -0
- data/CHANGELOG.md +46 -0
- data/LICENSE +200 -0
- data/NOTICE +43 -0
- data/README.md +92 -0
- data/lib/oo7/3.3/oo7.bundle +0 -0
- data/lib/oo7/3.4/oo7.bundle +0 -0
- data/lib/oo7/4.0/oo7.bundle +0 -0
- data/lib/oo7/version.rb +8 -0
- data/lib/oo7/version.rb.erb +8 -0
- data/lib/oo7-rb.rb +13 -0
- data/lib/oo7.rb +23 -0
- metadata +103 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 2bd69af125c51c853140fefbb45cf9bdd206a6dcc8919995604d570268a64655
|
|
4
|
+
data.tar.gz: a2e1204e02736e28b90d7f284bf54e253ef51d1cd62adbca2bbe8d90589831dc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: bd6f6016cdd828b348194c8c8feb15c47abeac3606c8b7ebb2e874f95924992f0c59d79b58d6ee253e140e6f46f3f25863994b72dc16462fc534c87256b16656
|
|
7
|
+
data.tar.gz: 12ef5ed1333e2cb293b08091af9f5fd7cd57208a5f51b352c88622c64f57e732cabc75fbf3b101f80dd982063620a6de83582c9a20c680305735db8c86e5dac3
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.0] - 2026-11-02
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `Oo7::Keyring`, the collection: `new`, `unlock`, `lock`, `locked?`, `items`,
|
|
15
|
+
`search(attributes)`, `create(label, attributes, secret, replace)` and
|
|
16
|
+
`delete(attributes)`.
|
|
17
|
+
- `Oo7::Item`, one stored secret: `label`, `label=`, `attributes`,
|
|
18
|
+
`attributes=`, `secret`, `secret=`, `locked?`, `lock`, `unlock`, `delete`,
|
|
19
|
+
`created` and `modified`.
|
|
20
|
+
- A magnus native extension over the `oo7` crate (0.6), built with
|
|
21
|
+
`native_crypto` and `tokio` and no default features, so the object links
|
|
22
|
+
`libc`, `libgcc_s` and `libm` and nothing else. Neither libsecret, libgcr nor
|
|
23
|
+
libgcrypt is in the address space -- which is the reason this gem exists,
|
|
24
|
+
since a fault in those is not a caller's to fix.
|
|
25
|
+
- Precompiled platform gems for Linux (gnu and musl, x86_64/aarch64/arm) and
|
|
26
|
+
Darwin (x86_64/arm64), cross-compiled in CI.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- The gem is published as `oo7-rb` rather than `oo7`. RubyGems holds `oo7` for
|
|
31
|
+
an unrelated `OO7` with indexed versions, and it refuses a name that differs
|
|
32
|
+
from an existing one only in case. The library, the module and the require
|
|
33
|
+
path are all still `oo7`; `require "oo7-rb"` is a shim onto it so that
|
|
34
|
+
`Bundler.require` resolves.
|
|
35
|
+
- Every method is synchronous. The crate's API is async throughout; each
|
|
36
|
+
binding drives it to completion on a Tokio runtime owned by the extension.
|
|
37
|
+
The runtime is multi-threaded with one worker rather than current-thread,
|
|
38
|
+
because zbus spawns its own socket reader task and the runtime has to keep
|
|
39
|
+
driving it while a call waits.
|
|
40
|
+
|
|
41
|
+
### Removed
|
|
42
|
+
|
|
43
|
+
- Windows is not a supported platform and is excluded from the cross-compile
|
|
44
|
+
matrix. The Secret Service is a freedesktop D-Bus API, and `ashpd` -- which
|
|
45
|
+
oo7 uses to ask whether the process is sandboxed -- is Unix-only, so the
|
|
46
|
+
dependency does not compile there.
|
data/LICENSE
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. Please also get an
|
|
186
|
+
individualized contributor license agreement from each contributor.
|
|
187
|
+
|
|
188
|
+
Copyright 2026 General Intelligence Systems
|
|
189
|
+
|
|
190
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
191
|
+
you may not use this file except in compliance with the License.
|
|
192
|
+
You may obtain a copy of the License at
|
|
193
|
+
|
|
194
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
195
|
+
|
|
196
|
+
Unless required by applicable law or agreed to in writing, software
|
|
197
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
198
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
199
|
+
See the License for the specific language governing permissions and
|
|
200
|
+
limitations under the License.
|
data/NOTICE
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Oo7 for Ruby
|
|
2
|
+
Copyright 2026 General Intelligence Systems
|
|
3
|
+
|
|
4
|
+
--------------------------------------------------------------------------------
|
|
5
|
+
oo7
|
|
6
|
+
--------------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
The native extension under ext/oo7 links oo7, the Rust implementation of the
|
|
9
|
+
freedesktop Secret Service API. This gem is bindings for it and nothing else:
|
|
10
|
+
every class it defines wraps a type of that crate.
|
|
11
|
+
|
|
12
|
+
https://github.com/bilelmoussaoui/oo7
|
|
13
|
+
Copyright 2022-2026 Bilal Elmoussaoui and the oo7 contributors
|
|
14
|
+
Licensed under the MIT License
|
|
15
|
+
|
|
16
|
+
The MIT License permits this use and asks that its notice travel with the
|
|
17
|
+
software, which this file carries on its behalf. oo7 ships no NOTICE file of
|
|
18
|
+
its own.
|
|
19
|
+
|
|
20
|
+
--------------------------------------------------------------------------------
|
|
21
|
+
Secret Service
|
|
22
|
+
--------------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
The protocol these bindings speak is the freedesktop Secret Service
|
|
25
|
+
specification. It is a specification rather than code, and nothing of it is
|
|
26
|
+
included here.
|
|
27
|
+
|
|
28
|
+
https://specifications.freedesktop.org/secret-service-spec/
|
|
29
|
+
|
|
30
|
+
--------------------------------------------------------------------------------
|
|
31
|
+
On Fractal
|
|
32
|
+
--------------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
Fractal is a GTK Matrix client, and the reason this binding exists: it drives
|
|
35
|
+
oo7 rather than libsecret, and reading it shows which operations a session
|
|
36
|
+
store needs -- unlock the collection, search by attribute, unlock each item.
|
|
37
|
+
|
|
38
|
+
It appears in no part of this product. It is licensed GPL-3.0-or-later, which
|
|
39
|
+
is incompatible with the Apache License this work is distributed under, so no
|
|
40
|
+
code or comment may be copied from it. Reading it to learn which operations a
|
|
41
|
+
flow needs is fine; carrying its expression across is not.
|
|
42
|
+
|
|
43
|
+
https://gitlab.gnome.org/World/fractal
|
data/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# oo7-rb
|
|
2
|
+
|
|
3
|
+
Ruby bindings for [oo7](https://github.com/bilelmoussaoui/oo7), the Rust
|
|
4
|
+
implementation of the freedesktop [Secret
|
|
5
|
+
Service](https://specifications.freedesktop.org/secret-service-spec/) — the
|
|
6
|
+
API behind GNOME Keyring and KWallet.
|
|
7
|
+
|
|
8
|
+
## Why not libsecret
|
|
9
|
+
|
|
10
|
+
libsecret reaches the keyring through gnome-keyring's client library and
|
|
11
|
+
libgcr, whose `gcr_secret_exchange` carries a secret back from an unlock
|
|
12
|
+
prompt. oo7 speaks the D-Bus protocol itself and does its own cryptography, so
|
|
13
|
+
a caller here loads neither.
|
|
14
|
+
|
|
15
|
+
That matters when a bug in those libraries is not yours to fix. A plain
|
|
16
|
+
`OpenSession` should not be able to abort the process that made it, or the
|
|
17
|
+
shell that prompted for it, but when it can, the way out is to stop going
|
|
18
|
+
through them.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
gem "oo7-rb"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The gem is `oo7-rb`; the library is `oo7`. RubyGems holds the name `oo7` for an
|
|
27
|
+
unrelated `OO7`, and a name differing only in case cannot be taken once the
|
|
28
|
+
other has indexed versions -- so the gem took the repository's name instead.
|
|
29
|
+
`require "oo7"` is the one to write, and `require "oo7-rb"` also works so that
|
|
30
|
+
`Bundler.require` needs no `require:` of its own.
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```ruby
|
|
35
|
+
require "oo7"
|
|
36
|
+
|
|
37
|
+
keyring = Oo7::Keyring.new
|
|
38
|
+
keyring.unlock
|
|
39
|
+
|
|
40
|
+
keyring.create("My app: nathan on example.com", {
|
|
41
|
+
"xdg:schema" => "com.example.App",
|
|
42
|
+
"server" => "example.com",
|
|
43
|
+
"user" => "nathan",
|
|
44
|
+
}, "the-secret", true)
|
|
45
|
+
|
|
46
|
+
item = keyring.search({"xdg:schema" => "com.example.App", "user" => "nathan"}).first
|
|
47
|
+
item.secret # => "the-secret"
|
|
48
|
+
item.label # => "My app: nathan on example.com"
|
|
49
|
+
item.attributes # => {"xdg:schema" => "com.example.App", ...}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`create`'s last argument replaces any item with the same attributes, which is
|
|
53
|
+
what keeps a rotated secret one item rather than a pile of them.
|
|
54
|
+
|
|
55
|
+
### Keyring
|
|
56
|
+
|
|
57
|
+
`new`, `unlock`, `lock`, `locked?`, `items`, `search(attributes)`,
|
|
58
|
+
`create(label, attributes, secret, replace)`, `delete(attributes)`.
|
|
59
|
+
|
|
60
|
+
`Keyring.new` picks the backend the way the crate does: the file backend when
|
|
61
|
+
the process is sandboxed, the D-Bus Secret Service otherwise.
|
|
62
|
+
|
|
63
|
+
### Item
|
|
64
|
+
|
|
65
|
+
`label`, `label=`, `attributes`, `attributes=`, `secret`, `secret=`, `locked?`,
|
|
66
|
+
`lock`, `unlock`, `delete`, `created`, `modified`.
|
|
67
|
+
|
|
68
|
+
## Blocking
|
|
69
|
+
|
|
70
|
+
Every method on the crate is async. Each binding drives it to completion on a
|
|
71
|
+
Tokio runtime owned by the extension and returns the result, so the Ruby API is
|
|
72
|
+
ordinary and synchronous.
|
|
73
|
+
|
|
74
|
+
The calling thread blocks and the GVL is held while it waits. A call that may
|
|
75
|
+
raise a prompt therefore belongs on a Ruby thread rather than on a GTK main
|
|
76
|
+
loop — otherwise the loop that owes the prompt a reply is the one being
|
|
77
|
+
blocked.
|
|
78
|
+
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
bin/test # compile the extension, run the suite
|
|
83
|
+
bin/test --skip-compile # suite only
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The suite runs against the session's real Secret Service and skips itself when
|
|
87
|
+
there isn't one. Items are written under an `xdg:schema` of `oo7-rb-test` with
|
|
88
|
+
a per-run marker, and removed afterwards.
|
|
89
|
+
|
|
90
|
+
## Licence
|
|
91
|
+
|
|
92
|
+
Apache-2.0. The oo7 crate itself is MIT.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/oo7/version.rb
ADDED
data/lib/oo7-rb.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the Apache License, Version 2.0.
|
|
4
|
+
# Copyright, 2026, by General Intelligence Systems.
|
|
5
|
+
|
|
6
|
+
# The gem is `oo7-rb` because RubyGems holds `oo7` for an unrelated `OO7`, and
|
|
7
|
+
# a name differing only in case cannot be taken once the other has indexed
|
|
8
|
+
# versions. The library is still `oo7`: `require "oo7"` is the one to write.
|
|
9
|
+
#
|
|
10
|
+
# This file exists so that `gem "oo7-rb"` in a Gemfile needs no `require:` of
|
|
11
|
+
# its own -- Bundler.require derives the path from the gem name, and would
|
|
12
|
+
# otherwise look for a file that is not here.
|
|
13
|
+
require_relative "oo7"
|
data/lib/oo7.rb
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the Apache License, Version 2.0.
|
|
4
|
+
# Copyright, 2026, by General Intelligence Systems.
|
|
5
|
+
|
|
6
|
+
require_relative "oo7/version"
|
|
7
|
+
|
|
8
|
+
# The native extension, which is where every class in this module is defined.
|
|
9
|
+
#
|
|
10
|
+
# A precompiled platform gem carries one object per Ruby ABI, which rake-compiler puts under lib/oo7/3.3, 3.4 and so on. The source gem compiles one object and installs it beside the library, which is also where `rake compile` puts it.
|
|
11
|
+
begin
|
|
12
|
+
require_relative "oo7/#{RUBY_VERSION[/\d+\.\d+/]}/oo7"
|
|
13
|
+
rescue LoadError
|
|
14
|
+
require_relative "oo7/oo7"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Ruby bindings for oo7, the Rust Secret Service and keyring implementation.
|
|
18
|
+
#
|
|
19
|
+
# The crate speaks the freedesktop Secret Service D-Bus protocol itself and does its own crypto, so a caller here never loads libsecret, gnome-keyring's client library or libgcr.
|
|
20
|
+
#
|
|
21
|
+
# Every method is synchronous. The crate's API is async throughout; the extension drives it on a Tokio runtime of its own and blocks the calling thread, which is what a Ruby caller expects. The GVL is held while it waits, so a call that may prompt belongs on a Ruby thread rather than on a GTK main loop.
|
|
22
|
+
module Oo7
|
|
23
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: oo7-rb
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: arm64-darwin
|
|
6
|
+
authors:
|
|
7
|
+
- Nathan Kidd
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-11-02 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: gem_kit
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0.2'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0.2'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake-compiler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.3'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.3'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: lefthook
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '2.2'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '2.2'
|
|
55
|
+
description: The freedesktop Secret Service for Ruby, over the oo7 crate. Keyrings,
|
|
56
|
+
items, attribute search, lock and unlock -- speaking the D-Bus protocol directly,
|
|
57
|
+
with its own crypto, so neither libsecret nor libgcr is in the picture.
|
|
58
|
+
email:
|
|
59
|
+
- nathankidd@hey.com
|
|
60
|
+
executables: []
|
|
61
|
+
extensions: []
|
|
62
|
+
extra_rdoc_files: []
|
|
63
|
+
files:
|
|
64
|
+
- CHANGELOG.md
|
|
65
|
+
- LICENSE
|
|
66
|
+
- NOTICE
|
|
67
|
+
- README.md
|
|
68
|
+
- lib/oo7-rb.rb
|
|
69
|
+
- lib/oo7.rb
|
|
70
|
+
- lib/oo7/3.3/oo7.bundle
|
|
71
|
+
- lib/oo7/3.4/oo7.bundle
|
|
72
|
+
- lib/oo7/4.0/oo7.bundle
|
|
73
|
+
- lib/oo7/version.rb
|
|
74
|
+
- lib/oo7/version.rb.erb
|
|
75
|
+
homepage: https://github.com/n-at-han-k/oo7-rb
|
|
76
|
+
licenses:
|
|
77
|
+
- Apache-2.0
|
|
78
|
+
metadata:
|
|
79
|
+
source_code_uri: https://github.com/n-at-han-k/oo7-rb
|
|
80
|
+
documentation_uri: https://n-at-han-k.github.io/oo7-rb/
|
|
81
|
+
post_install_message:
|
|
82
|
+
rdoc_options: []
|
|
83
|
+
require_paths:
|
|
84
|
+
- lib
|
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '3.3'
|
|
90
|
+
- - "<"
|
|
91
|
+
- !ruby/object:Gem::Version
|
|
92
|
+
version: 4.1.dev
|
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
|
+
requirements:
|
|
95
|
+
- - ">="
|
|
96
|
+
- !ruby/object:Gem::Version
|
|
97
|
+
version: '0'
|
|
98
|
+
requirements: []
|
|
99
|
+
rubygems_version: 3.5.23
|
|
100
|
+
signing_key:
|
|
101
|
+
specification_version: 4
|
|
102
|
+
summary: Ruby bindings for oo7, the Rust Secret Service and keyring implementation.
|
|
103
|
+
test_files: []
|