wikiwiki 0.5.0 → 0.6.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 -0
- data/README.ja.md +93 -3
- data/README.md +93 -3
- data/exe/wikiwiki +8 -0
- data/lib/wikiwiki/api.rb +38 -6
- data/lib/wikiwiki/auth/token.rb +23 -0
- data/lib/wikiwiki/auth.rb +6 -0
- data/lib/wikiwiki/cli/commands/attachment/delete.rb +48 -0
- data/lib/wikiwiki/cli/commands/attachment/get.rb +45 -0
- data/lib/wikiwiki/cli/commands/attachment/list.rb +37 -0
- data/lib/wikiwiki/cli/commands/attachment/put.rb +60 -0
- data/lib/wikiwiki/cli/commands/attachment/show.rb +44 -0
- data/lib/wikiwiki/cli/commands/auth.rb +32 -0
- data/lib/wikiwiki/cli/commands/base.rb +64 -0
- data/lib/wikiwiki/cli/commands/page/get.rb +46 -0
- data/lib/wikiwiki/cli/commands/page/list.rb +36 -0
- data/lib/wikiwiki/cli/commands/page/put.rb +40 -0
- data/lib/wikiwiki/cli/commands/page/show.rb +44 -0
- data/lib/wikiwiki/cli/formatter/json.rb +18 -0
- data/lib/wikiwiki/cli.rb +51 -0
- data/lib/wikiwiki/rate_limiter.rb +4 -12
- data/lib/wikiwiki/sliding_window.rb +1 -3
- data/lib/wikiwiki/version.rb +1 -1
- data/lib/wikiwiki/wiki.rb +7 -2
- data/lib/wikiwiki.rb +1 -1
- data/sig/dry/cli.rbs +9 -0
- data/sig/wikiwiki/api.rbs +5 -3
- data/sig/wikiwiki/auth/token.rbs +9 -0
- data/sig/wikiwiki/auth.rbs +2 -0
- data/sig/wikiwiki/cli/commands/attachment.rbs +96 -0
- data/sig/wikiwiki/cli/commands/auth.rbs +9 -0
- data/sig/wikiwiki/cli/commands/base.rbs +27 -0
- data/sig/wikiwiki/cli/commands/page.rbs +67 -0
- data/sig/wikiwiki/cli/formatter/json.rbs +9 -0
- data/sig/wikiwiki/cli.rbs +11 -0
- data/sig/wikiwiki/wiki.rbs +3 -1
- metadata +59 -8
- data/LICENSE.txt +0 -21
- data/mise.toml +0 -6
- data/rbs_collection.yaml +0 -12
data/sig/wikiwiki/wiki.rbs
CHANGED
|
@@ -2,7 +2,9 @@ module Wikiwiki
|
|
|
2
2
|
class Wiki
|
|
3
3
|
attr_reader logger: Logger
|
|
4
4
|
|
|
5
|
-
def initialize: (wiki_id: String, auth: Auth::Password | Auth::ApiKey, ?rate_limiter: RateLimiter, ?logger: Logger) -> void
|
|
5
|
+
def initialize: (wiki_id: String, auth: Auth::Password | Auth::ApiKey | Auth::Token, ?rate_limiter: RateLimiter, ?logger: Logger) -> void
|
|
6
|
+
|
|
7
|
+
def token: () -> String
|
|
6
8
|
|
|
7
9
|
def url: () -> URI::HTTPS
|
|
8
10
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wikiwiki
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OZAWA Sakuro
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -24,6 +24,34 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0.3'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: dry-cli
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.2'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.2'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: jwt
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '3.0'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '3.0'
|
|
27
55
|
- !ruby/object:Gem::Dependency
|
|
28
56
|
name: zeitwerk
|
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -38,36 +66,59 @@ dependencies:
|
|
|
38
66
|
- - "~>"
|
|
39
67
|
- !ruby/object:Gem::Version
|
|
40
68
|
version: '2.7'
|
|
41
|
-
description:
|
|
69
|
+
description: |
|
|
70
|
+
A Ruby gem providing both a client library and command-line interface for interacting with Wikiwiki.jp REST API.
|
|
71
|
+
Supports page and attachment operations with authentication via password or API key.
|
|
42
72
|
email:
|
|
43
73
|
- 10973+sakuro@users.noreply.github.com
|
|
44
|
-
executables:
|
|
74
|
+
executables:
|
|
75
|
+
- wikiwiki
|
|
45
76
|
extensions: []
|
|
46
77
|
extra_rdoc_files: []
|
|
47
78
|
files:
|
|
48
79
|
- CHANGELOG.md
|
|
49
|
-
- LICENSE.txt
|
|
50
80
|
- README.ja.md
|
|
51
81
|
- README.md
|
|
82
|
+
- exe/wikiwiki
|
|
52
83
|
- lib/wikiwiki.rb
|
|
53
84
|
- lib/wikiwiki/api.rb
|
|
54
85
|
- lib/wikiwiki/attachment.rb
|
|
55
86
|
- lib/wikiwiki/auth.rb
|
|
56
87
|
- lib/wikiwiki/auth/api_key.rb
|
|
57
88
|
- lib/wikiwiki/auth/password.rb
|
|
89
|
+
- lib/wikiwiki/auth/token.rb
|
|
90
|
+
- lib/wikiwiki/cli.rb
|
|
91
|
+
- lib/wikiwiki/cli/commands/attachment/delete.rb
|
|
92
|
+
- lib/wikiwiki/cli/commands/attachment/get.rb
|
|
93
|
+
- lib/wikiwiki/cli/commands/attachment/list.rb
|
|
94
|
+
- lib/wikiwiki/cli/commands/attachment/put.rb
|
|
95
|
+
- lib/wikiwiki/cli/commands/attachment/show.rb
|
|
96
|
+
- lib/wikiwiki/cli/commands/auth.rb
|
|
97
|
+
- lib/wikiwiki/cli/commands/base.rb
|
|
98
|
+
- lib/wikiwiki/cli/commands/page/get.rb
|
|
99
|
+
- lib/wikiwiki/cli/commands/page/list.rb
|
|
100
|
+
- lib/wikiwiki/cli/commands/page/put.rb
|
|
101
|
+
- lib/wikiwiki/cli/commands/page/show.rb
|
|
102
|
+
- lib/wikiwiki/cli/formatter/json.rb
|
|
58
103
|
- lib/wikiwiki/page.rb
|
|
59
104
|
- lib/wikiwiki/rate_limiter.rb
|
|
60
105
|
- lib/wikiwiki/sliding_window.rb
|
|
61
106
|
- lib/wikiwiki/version.rb
|
|
62
107
|
- lib/wikiwiki/wiki.rb
|
|
63
|
-
-
|
|
64
|
-
- rbs_collection.yaml
|
|
108
|
+
- sig/dry/cli.rbs
|
|
65
109
|
- sig/wikiwiki.rbs
|
|
66
110
|
- sig/wikiwiki/api.rbs
|
|
67
111
|
- sig/wikiwiki/attachment.rbs
|
|
68
112
|
- sig/wikiwiki/auth.rbs
|
|
69
113
|
- sig/wikiwiki/auth/api_key.rbs
|
|
70
114
|
- sig/wikiwiki/auth/password.rbs
|
|
115
|
+
- sig/wikiwiki/auth/token.rbs
|
|
116
|
+
- sig/wikiwiki/cli.rbs
|
|
117
|
+
- sig/wikiwiki/cli/commands/attachment.rbs
|
|
118
|
+
- sig/wikiwiki/cli/commands/auth.rbs
|
|
119
|
+
- sig/wikiwiki/cli/commands/base.rbs
|
|
120
|
+
- sig/wikiwiki/cli/commands/page.rbs
|
|
121
|
+
- sig/wikiwiki/cli/formatter/json.rbs
|
|
71
122
|
- sig/wikiwiki/page.rbs
|
|
72
123
|
- sig/wikiwiki/rate_limiter.rbs
|
|
73
124
|
- sig/wikiwiki/sliding_window.rbs
|
|
@@ -98,5 +149,5 @@ requirements: []
|
|
|
98
149
|
rubygems_version: 3.4.19
|
|
99
150
|
signing_key:
|
|
100
151
|
specification_version: 4
|
|
101
|
-
summary:
|
|
152
|
+
summary: Ruby client library and CLI for Wikiwiki REST API
|
|
102
153
|
test_files: []
|
data/LICENSE.txt
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 OZAWA Sakuro
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
data/mise.toml
DELETED
data/rbs_collection.yaml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Download sources
|
|
2
|
-
sources:
|
|
3
|
-
- type: stdlib
|
|
4
|
-
|
|
5
|
-
# A directory to install the downloaded RBSs
|
|
6
|
-
path: .gem_rbs_collection
|
|
7
|
-
|
|
8
|
-
# A directory to install the downloaded RBSs
|
|
9
|
-
gems:
|
|
10
|
-
# Use standard library type definitions
|
|
11
|
-
- name: net-http
|
|
12
|
-
- name: uri
|