etwin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +11 -0
  5. data/.travis.yml +6 -0
  6. data/Gemfile +9 -0
  7. data/Gemfile.lock +82 -0
  8. data/README.md +30 -0
  9. data/Rakefile +8 -0
  10. data/bin/console +15 -0
  11. data/bin/setup +8 -0
  12. data/etwin.gemspec +37 -0
  13. data/lib/etwin.rb +27 -0
  14. data/lib/etwin/_auth.rb +4 -0
  15. data/lib/etwin/auth.rb +14 -0
  16. data/lib/etwin/auth/_auth_context.rb +30 -0
  17. data/lib/etwin/auth/auth_context.rb +9 -0
  18. data/lib/etwin/auth/auth_scope.rb +25 -0
  19. data/lib/etwin/auth/auth_type.rb +26 -0
  20. data/lib/etwin/auth/guest_auth_context.rb +71 -0
  21. data/lib/etwin/auth/user_auth_context.rb +83 -0
  22. data/lib/etwin/client.rb +11 -0
  23. data/lib/etwin/client/auth.rb +66 -0
  24. data/lib/etwin/client/etwin_client.rb +17 -0
  25. data/lib/etwin/client/http_etwin_client.rb +36 -0
  26. data/lib/etwin/core.rb +10 -0
  27. data/lib/etwin/core/object_type.rb +35 -0
  28. data/lib/etwin/hammerfest.rb +13 -0
  29. data/lib/etwin/hammerfest/hammerfest_server.rb +27 -0
  30. data/lib/etwin/hammerfest/hammerfest_user_id.rb +57 -0
  31. data/lib/etwin/hammerfest/hammerfest_username.rb +57 -0
  32. data/lib/etwin/hammerfest/short_hammerfest_user.rb +103 -0
  33. data/lib/etwin/link.rb +15 -0
  34. data/lib/etwin/link/hammerfest_link.rb +106 -0
  35. data/lib/etwin/link/link_action.rb +93 -0
  36. data/lib/etwin/link/twinoid_link.rb +106 -0
  37. data/lib/etwin/link/versioned_hammerfest_link.rb +93 -0
  38. data/lib/etwin/link/versioned_links.rb +123 -0
  39. data/lib/etwin/link/versioned_twinoid_link.rb +93 -0
  40. data/lib/etwin/twinoid.rb +12 -0
  41. data/lib/etwin/twinoid/short_twinoid_user.rb +93 -0
  42. data/lib/etwin/twinoid/twinoid_user_display_name.rb +57 -0
  43. data/lib/etwin/twinoid/twinoid_user_id.rb +57 -0
  44. data/lib/etwin/user.rb +15 -0
  45. data/lib/etwin/user/short_user.rb +93 -0
  46. data/lib/etwin/user/user.rb +123 -0
  47. data/lib/etwin/user/user_display_name.rb +57 -0
  48. data/lib/etwin/user/user_display_name_version.rb +83 -0
  49. data/lib/etwin/user/user_display_name_versions.rb +83 -0
  50. data/lib/etwin/user/user_id.rb +57 -0
  51. data/lib/etwin/version.rb +6 -0
  52. data/sorbet/config +2 -0
  53. data/sorbet/rbi/gems/ast.rbi +48 -0
  54. data/sorbet/rbi/gems/debase.rbi +67 -0
  55. data/sorbet/rbi/gems/irb.rbi +352 -0
  56. data/sorbet/rbi/gems/parallel.rbi +83 -0
  57. data/sorbet/rbi/gems/parser.rbi +1405 -0
  58. data/sorbet/rbi/gems/rainbow.rbi +118 -0
  59. data/sorbet/rbi/gems/rake.rbi +644 -0
  60. data/sorbet/rbi/gems/regexp_parser.rbi +914 -0
  61. data/sorbet/rbi/gems/reline.rbi +556 -0
  62. data/sorbet/rbi/gems/rexml.rbi +605 -0
  63. data/sorbet/rbi/gems/rspec-core.rbi +1920 -0
  64. data/sorbet/rbi/gems/rspec-expectations.rbi +1148 -0
  65. data/sorbet/rbi/gems/rspec-mocks.rbi +1090 -0
  66. data/sorbet/rbi/gems/rspec-support.rbi +280 -0
  67. data/sorbet/rbi/gems/rspec.rbi +15 -0
  68. data/sorbet/rbi/gems/rubocop-ast.rbi +1338 -0
  69. data/sorbet/rbi/gems/rubocop.rbi +7491 -0
  70. data/sorbet/rbi/gems/ruby-debug-ide.rbi +608 -0
  71. data/sorbet/rbi/gems/ruby-progressbar.rbi +305 -0
  72. data/sorbet/rbi/gems/unicode-display_width.rbi +17 -0
  73. data/sorbet/rbi/hidden-definitions/errors.txt +4905 -0
  74. data/sorbet/rbi/hidden-definitions/hidden.rbi +9193 -0
  75. data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +276 -0
  76. data/sorbet/rbi/todo.rbi +7 -0
  77. metadata +220 -0
@@ -0,0 +1,276 @@
1
+ # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
+ # srb rbi sorbet-typed
3
+ #
4
+ # If you would like to make changes to this file, great! Please upstream any changes you make here:
5
+ #
6
+ # https://github.com/sorbet/sorbet-typed/edit/master/lib/rainbow/all/rainbow.rbi
7
+ #
8
+ # typed: strong
9
+
10
+ module Rainbow
11
+ sig { returns(T::Boolean) }
12
+ attr_accessor :enabled
13
+
14
+ class Color
15
+ sig { returns(Symbol) }
16
+ attr_reader :ground
17
+
18
+ sig do
19
+ params(
20
+ ground: Symbol,
21
+ values: T.any([Integer], [Integer, Integer, Integer])
22
+ ).returns(Color)
23
+ end
24
+ def self.build(ground, values); end
25
+
26
+ sig { params(hex: String).returns([Integer, Integer, Integer]) }
27
+ def self.parse_hex_color(hex); end
28
+
29
+ class Indexed < Color
30
+ sig { returns(Integer) }
31
+ attr_reader :num
32
+
33
+ sig { params(ground: Symbol, num: Integer).returns(Indexed) }
34
+ def initialize(ground, num); end
35
+
36
+ sig { returns(T::Array[Integer]) }
37
+ def codes; end
38
+ end
39
+
40
+ class Named < Indexed
41
+ NAMES = T.let(nil, T::Hash[Symbol, Integer])
42
+
43
+ sig { returns(T::Array[Symbol]) }
44
+ def self.color_names; end
45
+
46
+ sig { returns(String) }
47
+ def self.valid_names; end
48
+
49
+ sig { params(ground: Symbol, name: Symbol).returns(Named) }
50
+ def initialize(ground, name); end
51
+ end
52
+
53
+ class RGB < Indexed
54
+ sig { returns(Integer) }
55
+ attr_accessor :r, :g, :b
56
+
57
+ sig { params(value: Numeric).returns(Integer) }
58
+ def to_ansi_domain(value); end
59
+
60
+ sig { params(ground: Symbol, values: Integer).returns(RGB) }
61
+ def initialize(ground, *values); end
62
+
63
+ sig { returns(T::Array[Integer]) }
64
+ def codes; end
65
+ end
66
+
67
+ class X11Named < RGB
68
+ include X11ColorNames
69
+
70
+ sig { returns(T::Array[Symbol]) }
71
+ def self.color_names; end
72
+
73
+ sig { returns(String) }
74
+ def self.valid_names; end
75
+
76
+ sig { params(ground: Symbol, name: Symbol).returns(X11Named) }
77
+ def initialize(ground, name); end
78
+ end
79
+ end
80
+
81
+ sig { returns(Wrapper) }
82
+ def self.global; end
83
+
84
+ sig { returns(T::Boolean) }
85
+ def self.enabled; end
86
+
87
+ sig { params(value: T::Boolean).returns(T::Boolean) }
88
+ def self.enabled=(value); end
89
+
90
+ sig { params(string: String).returns(String) }
91
+ def self.uncolor(string); end
92
+
93
+ class NullPresenter < String
94
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
95
+ def color(*values); end
96
+
97
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
98
+ def foreground(*values); end
99
+
100
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
101
+ def fg(*values); end
102
+
103
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
104
+ def background(*values); end
105
+
106
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
107
+ def bg(*values); end
108
+
109
+ sig { returns(NullPresenter) }
110
+ def reset; end
111
+
112
+ sig { returns(NullPresenter) }
113
+ def bright; end
114
+
115
+ sig { returns(NullPresenter) }
116
+ def faint; end
117
+
118
+ sig { returns(NullPresenter) }
119
+ def italic; end
120
+
121
+ sig { returns(NullPresenter) }
122
+ def underline; end
123
+
124
+ sig { returns(NullPresenter) }
125
+ def blink; end
126
+
127
+ sig { returns(NullPresenter) }
128
+ def inverse; end
129
+
130
+ sig { returns(NullPresenter) }
131
+ def hide; end
132
+
133
+ sig { returns(NullPresenter) }
134
+ def cross_out; end
135
+
136
+ sig { returns(NullPresenter) }
137
+ def black; end
138
+
139
+ sig { returns(NullPresenter) }
140
+ def red; end
141
+
142
+ sig { returns(NullPresenter) }
143
+ def green; end
144
+
145
+ sig { returns(NullPresenter) }
146
+ def yellow; end
147
+
148
+ sig { returns(NullPresenter) }
149
+ def blue; end
150
+
151
+ sig { returns(NullPresenter) }
152
+ def magenta; end
153
+
154
+ sig { returns(NullPresenter) }
155
+ def cyan; end
156
+
157
+ sig { returns(NullPresenter) }
158
+ def white; end
159
+
160
+ sig { returns(NullPresenter) }
161
+ def bold; end
162
+
163
+ sig { returns(NullPresenter) }
164
+ def dark; end
165
+
166
+ sig { returns(NullPresenter) }
167
+ def strike; end
168
+ end
169
+
170
+ class Presenter < String
171
+ TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer])
172
+
173
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
174
+ def color(*values); end
175
+
176
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
177
+ def foreground(*values); end
178
+
179
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
180
+ def fg(*values); end
181
+
182
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
183
+ def background(*values); end
184
+
185
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
186
+ def bg(*values); end
187
+
188
+ sig { returns(Presenter) }
189
+ def reset; end
190
+
191
+ sig { returns(Presenter) }
192
+ def bright; end
193
+
194
+ sig { returns(Presenter) }
195
+ def faint; end
196
+
197
+ sig { returns(Presenter) }
198
+ def italic; end
199
+
200
+ sig { returns(Presenter) }
201
+ def underline; end
202
+
203
+ sig { returns(Presenter) }
204
+ def blink; end
205
+
206
+ sig { returns(Presenter) }
207
+ def inverse; end
208
+
209
+ sig { returns(Presenter) }
210
+ def hide; end
211
+
212
+ sig { returns(Presenter) }
213
+ def cross_out; end
214
+
215
+ sig { returns(Presenter) }
216
+ def black; end
217
+
218
+ sig { returns(Presenter) }
219
+ def red; end
220
+
221
+ sig { returns(Presenter) }
222
+ def green; end
223
+
224
+ sig { returns(Presenter) }
225
+ def yellow; end
226
+
227
+ sig { returns(Presenter) }
228
+ def blue; end
229
+
230
+ sig { returns(Presenter) }
231
+ def magenta; end
232
+
233
+ sig { returns(Presenter) }
234
+ def cyan; end
235
+
236
+ sig { returns(Presenter) }
237
+ def white; end
238
+
239
+ sig { returns(Presenter) }
240
+ def bold; end
241
+
242
+ sig { returns(Presenter) }
243
+ def dark; end
244
+
245
+ sig { returns(Presenter) }
246
+ def strike; end
247
+ end
248
+
249
+ class StringUtils
250
+ sig { params(string: String, codes: T::Array[Integer]).returns(String) }
251
+ def self.wrap_with_sgr(string, codes); end
252
+
253
+ sig { params(string: String).returns(String) }
254
+ def uncolor(string); end
255
+ end
256
+
257
+ VERSION = T.let(nil, String)
258
+
259
+ class Wrapper
260
+ sig { returns(T::Boolean) }
261
+ attr_accessor :enabled
262
+
263
+ sig { params(enabled: T::Boolean).returns(Wrapper) }
264
+ def initialize(enabled = true); end
265
+
266
+ sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) }
267
+ def wrap(string); end
268
+ end
269
+
270
+ module X11ColorNames
271
+ NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]])
272
+ end
273
+ end
274
+
275
+ sig { params(string: String).returns(Rainbow::Presenter) }
276
+ def Rainbow(string); end
@@ -0,0 +1,7 @@
1
+ # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
+ # srb rbi todo
3
+
4
+ # typed: strong
5
+ module T::Private::Final::NoInherit; end
6
+ module T::Private::Methods::MethodHooks; end
7
+ module T::Private::Methods::SingletonMethodHooks; end
metadata ADDED
@@ -0,0 +1,220 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: etwin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Charles Samborski
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-11-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 13.0.1
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 13.0.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.10.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.10.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.3.1
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.3.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-sorbet
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.5.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.5.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: sorbet
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.5.6076
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.5.6076
83
+ - !ruby/object:Gem::Dependency
84
+ name: faraday
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.1.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.1.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: sorbet-runtime
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.5.6076
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.5.6076
111
+ description: Ruby client for the Eternal-Twin API. Defines Etwin domain types and
112
+ HTTP client.
113
+ email:
114
+ - demurgos@demurgos.net
115
+ executables: []
116
+ extensions: []
117
+ extra_rdoc_files: []
118
+ files:
119
+ - ".gitignore"
120
+ - ".rspec"
121
+ - ".rubocop.yml"
122
+ - ".travis.yml"
123
+ - Gemfile
124
+ - Gemfile.lock
125
+ - README.md
126
+ - Rakefile
127
+ - bin/console
128
+ - bin/setup
129
+ - etwin.gemspec
130
+ - lib/etwin.rb
131
+ - lib/etwin/_auth.rb
132
+ - lib/etwin/auth.rb
133
+ - lib/etwin/auth/_auth_context.rb
134
+ - lib/etwin/auth/auth_context.rb
135
+ - lib/etwin/auth/auth_scope.rb
136
+ - lib/etwin/auth/auth_type.rb
137
+ - lib/etwin/auth/guest_auth_context.rb
138
+ - lib/etwin/auth/user_auth_context.rb
139
+ - lib/etwin/client.rb
140
+ - lib/etwin/client/auth.rb
141
+ - lib/etwin/client/etwin_client.rb
142
+ - lib/etwin/client/http_etwin_client.rb
143
+ - lib/etwin/core.rb
144
+ - lib/etwin/core/object_type.rb
145
+ - lib/etwin/hammerfest.rb
146
+ - lib/etwin/hammerfest/hammerfest_server.rb
147
+ - lib/etwin/hammerfest/hammerfest_user_id.rb
148
+ - lib/etwin/hammerfest/hammerfest_username.rb
149
+ - lib/etwin/hammerfest/short_hammerfest_user.rb
150
+ - lib/etwin/link.rb
151
+ - lib/etwin/link/hammerfest_link.rb
152
+ - lib/etwin/link/link_action.rb
153
+ - lib/etwin/link/twinoid_link.rb
154
+ - lib/etwin/link/versioned_hammerfest_link.rb
155
+ - lib/etwin/link/versioned_links.rb
156
+ - lib/etwin/link/versioned_twinoid_link.rb
157
+ - lib/etwin/twinoid.rb
158
+ - lib/etwin/twinoid/short_twinoid_user.rb
159
+ - lib/etwin/twinoid/twinoid_user_display_name.rb
160
+ - lib/etwin/twinoid/twinoid_user_id.rb
161
+ - lib/etwin/user.rb
162
+ - lib/etwin/user/short_user.rb
163
+ - lib/etwin/user/user.rb
164
+ - lib/etwin/user/user_display_name.rb
165
+ - lib/etwin/user/user_display_name_version.rb
166
+ - lib/etwin/user/user_display_name_versions.rb
167
+ - lib/etwin/user/user_id.rb
168
+ - lib/etwin/version.rb
169
+ - sorbet/config
170
+ - sorbet/rbi/gems/ast.rbi
171
+ - sorbet/rbi/gems/debase.rbi
172
+ - sorbet/rbi/gems/irb.rbi
173
+ - sorbet/rbi/gems/parallel.rbi
174
+ - sorbet/rbi/gems/parser.rbi
175
+ - sorbet/rbi/gems/rainbow.rbi
176
+ - sorbet/rbi/gems/rake.rbi
177
+ - sorbet/rbi/gems/regexp_parser.rbi
178
+ - sorbet/rbi/gems/reline.rbi
179
+ - sorbet/rbi/gems/rexml.rbi
180
+ - sorbet/rbi/gems/rspec-core.rbi
181
+ - sorbet/rbi/gems/rspec-expectations.rbi
182
+ - sorbet/rbi/gems/rspec-mocks.rbi
183
+ - sorbet/rbi/gems/rspec-support.rbi
184
+ - sorbet/rbi/gems/rspec.rbi
185
+ - sorbet/rbi/gems/rubocop-ast.rbi
186
+ - sorbet/rbi/gems/rubocop.rbi
187
+ - sorbet/rbi/gems/ruby-debug-ide.rbi
188
+ - sorbet/rbi/gems/ruby-progressbar.rbi
189
+ - sorbet/rbi/gems/unicode-display_width.rbi
190
+ - sorbet/rbi/hidden-definitions/errors.txt
191
+ - sorbet/rbi/hidden-definitions/hidden.rbi
192
+ - sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi
193
+ - sorbet/rbi/todo.rbi
194
+ homepage: https://gitlab.com/eternal-twin/etwin
195
+ licenses:
196
+ - AGPL-3.0-or-later
197
+ metadata:
198
+ homepage_uri: https://gitlab.com/eternal-twin/etwin
199
+ source_code_uri: https://gitlab.com/eternal-twin/etwin
200
+ changelog_uri: https://gitlab.com/eternal-twin/etwin
201
+ post_install_message:
202
+ rdoc_options: []
203
+ require_paths:
204
+ - lib
205
+ required_ruby_version: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: 2.7.0
210
+ required_rubygems_version: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
215
+ requirements: []
216
+ rubygems_version: 3.1.4
217
+ signing_key:
218
+ specification_version: 4
219
+ summary: Ruby client for the Eternal-Twin API.
220
+ test_files: []