code-ruby 3.1.2 → 4.0.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/VERSION +1 -1
- data/bin/code +97 -20
- data/lib/code/concerns/shared.rb +331 -15
- data/lib/code/format.rb +15 -1
- data/lib/code/network.rb +87 -0
- data/lib/code/node/call.rb +79 -2
- data/lib/code/node/call_argument.rb +14 -0
- data/lib/code/node/code.rb +5 -4
- data/lib/code/node/function_parameter.rb +7 -4
- data/lib/code/node/list.rb +29 -1
- data/lib/code/object/base_64.rb +132 -6
- data/lib/code/object/boolean.rb +60 -0
- data/lib/code/object/class.rb +138 -2
- data/lib/code/object/code.rb +111 -3
- data/lib/code/object/context.rb +57 -1
- data/lib/code/object/cryptography.rb +63 -0
- data/lib/code/object/date.rb +13339 -462
- data/lib/code/object/decimal.rb +1725 -0
- data/lib/code/object/dictionary.rb +1790 -11
- data/lib/code/object/duration.rb +28 -0
- data/lib/code/object/function.rb +261 -23
- data/lib/code/object/global.rb +534 -1
- data/lib/code/object/html.rb +179 -7
- data/lib/code/object/http.rb +244 -14
- data/lib/code/object/ics.rb +75 -13
- data/lib/code/object/identifier_list.rb +17 -2
- data/lib/code/object/integer.rb +1937 -2
- data/lib/code/object/json.rb +75 -1
- data/lib/code/object/list.rb +3383 -10
- data/lib/code/object/nothing.rb +53 -0
- data/lib/code/object/number.rb +110 -0
- data/lib/code/object/parameter.rb +140 -0
- data/lib/code/object/range.rb +576 -14
- data/lib/code/object/smtp.rb +95 -12
- data/lib/code/object/string.rb +944 -3
- data/lib/code/object/super.rb +10 -1
- data/lib/code/object/time.rb +13358 -498
- data/lib/code/object/url.rb +65 -0
- data/lib/code/object.rb +543 -0
- data/lib/code/parser.rb +161 -24
- data/lib/code-ruby.rb +3 -0
- data/lib/code.rb +30 -3
- metadata +135 -84
- data/.github/dependabot.yml +0 -15
- data/.github/workflows/ci.yml +0 -38
- data/.gitignore +0 -30
- data/.node-version +0 -1
- data/.npm-version +0 -1
- data/.prettierignore +0 -2
- data/.rspec +0 -1
- data/.rubocop.yml +0 -140
- data/.ruby-version +0 -1
- data/.tool-versions +0 -3
- data/AGENTS.md +0 -43
- data/Gemfile +0 -22
- data/Gemfile.lock +0 -292
- data/Rakefile +0 -5
- data/bin/bundle +0 -123
- data/bin/bundle-audit +0 -31
- data/bin/bundler-audit +0 -31
- data/bin/dorian +0 -31
- data/bin/rspec +0 -31
- data/bin/rubocop +0 -31
- data/bin/test +0 -5
- data/code-ruby.gemspec +0 -34
- data/docs/precedence.txt +0 -36
- data/package-lock.json +0 -14
- data/package.json +0 -7
- data/spec/bin/code_spec.rb +0 -48
- data/spec/code/format_spec.rb +0 -153
- data/spec/code/node/call_spec.rb +0 -11
- data/spec/code/object/boolean_spec.rb +0 -18
- data/spec/code/object/cryptography_spec.rb +0 -25
- data/spec/code/object/decimal_spec.rb +0 -50
- data/spec/code/object/dictionary_spec.rb +0 -98
- data/spec/code/object/function_spec.rb +0 -268
- data/spec/code/object/http_spec.rb +0 -33
- data/spec/code/object/ics_spec.rb +0 -50
- data/spec/code/object/integer_spec.rb +0 -42
- data/spec/code/object/list_spec.rb +0 -22
- data/spec/code/object/nothing_spec.rb +0 -14
- data/spec/code/object/range_spec.rb +0 -23
- data/spec/code/object/string_spec.rb +0 -26
- data/spec/code/parser/boolean_spec.rb +0 -11
- data/spec/code/parser/chained_call_spec.rb +0 -16
- data/spec/code/parser/dictionary_spec.rb +0 -18
- data/spec/code/parser/function_spec.rb +0 -16
- data/spec/code/parser/group_spec.rb +0 -11
- data/spec/code/parser/if_modifier_spec.rb +0 -18
- data/spec/code/parser/list_spec.rb +0 -17
- data/spec/code/parser/number_spec.rb +0 -11
- data/spec/code/parser/string_spec.rb +0 -20
- data/spec/code/parser_spec.rb +0 -52
- data/spec/code/type_spec.rb +0 -21
- data/spec/code_spec.rb +0 -717
- data/spec/spec_helper.rb +0 -21
- data/spec/zeitwerk/loader_spec.rb +0 -7
data/AGENTS.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Repository Guidelines
|
|
2
|
-
|
|
3
|
-
## Project Structure & Module Organization
|
|
4
|
-
|
|
5
|
-
- `lib/` — Core source. Classes live under the `Code` namespace and mirror paths (e.g., `lib/code/object/http.rb` → `Code::Object::Http`). Entry files: `lib/code.rb`, `lib/code-ruby.rb`.
|
|
6
|
-
- `bin/` — Executables and tooling shims: `bin/code` (CLI), `bin/rspec`, `bin/rubocop`, `bin/bundle`, `bin/bundler-audit`.
|
|
7
|
-
- `spec/` — RSpec tests. Shared setup in `spec/spec_helper.rb` (WebMock + Sinatra test app). File names end with `_spec.rb`.
|
|
8
|
-
- `docs/` — Reference docs (e.g., operator precedence).
|
|
9
|
-
- Root — `Gemfile`, `code-ruby.gemspec`, `Rakefile` (RSpec default), `.rubocop.yml`, `VERSION`.
|
|
10
|
-
|
|
11
|
-
## Build, Test, and Development Commands
|
|
12
|
-
|
|
13
|
-
- Install: `bundle install`
|
|
14
|
-
- Run all tests: `bundle exec rake` or `bin/rspec`
|
|
15
|
-
- Run one file/example: `bin/rspec spec/code_spec.rb:42`
|
|
16
|
-
- Lint: `bin/rubocop` (auto-fix: `bin/rubocop -A`)
|
|
17
|
-
- Security audit: `bin/bundler-audit update && bin/bundler-audit check`
|
|
18
|
-
- Build gem: `gem build code-ruby.gemspec`
|
|
19
|
-
- CLI examples: `bin/code -h`, `bin/code -p '1+2'`, `bin/code -t 2 'loop { }'`
|
|
20
|
-
|
|
21
|
-
## Coding Style & Naming Conventions
|
|
22
|
-
|
|
23
|
-
- Ruby 3.4.5; 2-space indentation; keep `# frozen_string_literal: true`.
|
|
24
|
-
- Follow `.rubocop.yml`; prefer small, single-responsibility classes under `lib/code/...` reflecting their constants.
|
|
25
|
-
- File names: snake_case; tests mirror source paths under `spec/` with `_spec.rb` suffix.
|
|
26
|
-
|
|
27
|
-
## Testing Guidelines
|
|
28
|
-
|
|
29
|
-
- Framework: RSpec. Network calls are disabled via WebMock; use the provided `FakeHttpBin` rack app for HTTP behavior.
|
|
30
|
-
- Add focused specs near the feature (e.g., parser under `spec/code/parser/*`, objects under `spec/code/object/*`).
|
|
31
|
-
- For language-level behaviors, extend `spec/code_spec.rb` with input → output examples.
|
|
32
|
-
- Ensure new behavior has at least one positive and one edge/failure case.
|
|
33
|
-
|
|
34
|
-
## Commit & Pull Request Guidelines
|
|
35
|
-
|
|
36
|
-
- Commits: short, imperative subjects (e.g., "fix parser whitespace"). Version bumps (`VERSION`, `vX.Y.Z`) are handled by maintainers.
|
|
37
|
-
- PRs: include a clear description, reproduction or CLI examples, and links to issues. Update docs in `docs/` when grammar/precedence changes.
|
|
38
|
-
- Keep diffs minimal and focused; include tests and run `bin/rubocop` before submitting.
|
|
39
|
-
|
|
40
|
-
## Security & Configuration Tips
|
|
41
|
-
|
|
42
|
-
- Tooling versions: see `.tool-versions`, `.ruby-version`, `.node-version`, `.npm-version`.
|
|
43
|
-
- Tests must not reach the network; rely on stubs/fixtures. Prefer timeouts (`-t/--timeout`) when evaluating untrusted input with `bin/code`.
|
data/Gemfile
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
gemspec
|
|
6
|
-
|
|
7
|
-
ruby "3.4.5"
|
|
8
|
-
|
|
9
|
-
gem "bundler-audit"
|
|
10
|
-
gem "dorian"
|
|
11
|
-
gem "rake"
|
|
12
|
-
gem "rspec"
|
|
13
|
-
gem "rubocop-capybara"
|
|
14
|
-
gem "rubocop-factory_bot"
|
|
15
|
-
gem "rubocop-performance"
|
|
16
|
-
gem "rubocop-rails"
|
|
17
|
-
gem "rubocop-rake"
|
|
18
|
-
gem "rubocop-rspec"
|
|
19
|
-
gem "rubocop-rspec_rails"
|
|
20
|
-
gem "ruby-prof"
|
|
21
|
-
gem "sinatra"
|
|
22
|
-
gem "webmock"
|
data/Gemfile.lock
DELETED
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
code-ruby (3.1.2)
|
|
5
|
-
activesupport
|
|
6
|
-
base64
|
|
7
|
-
bigdecimal
|
|
8
|
-
did-you-mean
|
|
9
|
-
dorian-arguments
|
|
10
|
-
icalendar
|
|
11
|
-
json
|
|
12
|
-
language-ruby
|
|
13
|
-
mail
|
|
14
|
-
net-http
|
|
15
|
-
net-smtp
|
|
16
|
-
nokogiri
|
|
17
|
-
uri
|
|
18
|
-
zeitwerk
|
|
19
|
-
|
|
20
|
-
GEM
|
|
21
|
-
remote: https://rubygems.org/
|
|
22
|
-
specs:
|
|
23
|
-
activesupport (8.1.3)
|
|
24
|
-
base64
|
|
25
|
-
bigdecimal
|
|
26
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
27
|
-
connection_pool (>= 2.2.5)
|
|
28
|
-
drb
|
|
29
|
-
i18n (>= 1.6, < 2)
|
|
30
|
-
json
|
|
31
|
-
logger (>= 1.4.2)
|
|
32
|
-
minitest (>= 5.1)
|
|
33
|
-
securerandom (>= 0.3)
|
|
34
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
35
|
-
uri (>= 0.13.1)
|
|
36
|
-
addressable (2.9.0)
|
|
37
|
-
public_suffix (>= 2.0.2, < 8.0)
|
|
38
|
-
ast (2.4.3)
|
|
39
|
-
base64 (0.3.0)
|
|
40
|
-
bigdecimal (4.1.2)
|
|
41
|
-
bundler-audit (0.9.3)
|
|
42
|
-
bundler (>= 1.2.0)
|
|
43
|
-
thor (~> 1.0)
|
|
44
|
-
cmdparse (3.0.7)
|
|
45
|
-
concurrent-ruby (1.3.6)
|
|
46
|
-
connection_pool (3.0.2)
|
|
47
|
-
crack (1.0.1)
|
|
48
|
-
bigdecimal
|
|
49
|
-
rexml
|
|
50
|
-
csv (3.3.5)
|
|
51
|
-
date (3.5.1)
|
|
52
|
-
did-you-mean (0.1.1)
|
|
53
|
-
levenshtein (>= 0.2.0)
|
|
54
|
-
diff-lcs (1.6.2)
|
|
55
|
-
dorian (2.6.8)
|
|
56
|
-
csv
|
|
57
|
-
dorian-arguments
|
|
58
|
-
dorian-eval
|
|
59
|
-
dorian-progress
|
|
60
|
-
dorian-to_struct
|
|
61
|
-
git
|
|
62
|
-
hexapdf
|
|
63
|
-
json
|
|
64
|
-
mini_racer
|
|
65
|
-
ostruct
|
|
66
|
-
parallel
|
|
67
|
-
syntax_tree
|
|
68
|
-
syntax_tree-haml
|
|
69
|
-
syntax_tree-xml
|
|
70
|
-
terminal-table
|
|
71
|
-
w_syntax_tree-erb
|
|
72
|
-
yaml
|
|
73
|
-
dorian-arguments (1.2.2)
|
|
74
|
-
bigdecimal
|
|
75
|
-
dorian-eval (1.5.0)
|
|
76
|
-
yaml
|
|
77
|
-
dorian-progress (1.1.2)
|
|
78
|
-
ruby-progressbar
|
|
79
|
-
dorian-to_struct (2.0.2)
|
|
80
|
-
drb (2.2.3)
|
|
81
|
-
geom2d (0.4.1)
|
|
82
|
-
git (4.3.2)
|
|
83
|
-
activesupport (>= 5.0)
|
|
84
|
-
addressable (~> 2.8)
|
|
85
|
-
process_executer (~> 4.0)
|
|
86
|
-
rchardet (~> 1.9)
|
|
87
|
-
haml (7.2.0)
|
|
88
|
-
temple (>= 0.8.2)
|
|
89
|
-
thor
|
|
90
|
-
tilt
|
|
91
|
-
hashdiff (1.2.1)
|
|
92
|
-
hexapdf (1.8.0)
|
|
93
|
-
cmdparse (~> 3.0, >= 3.0.3)
|
|
94
|
-
geom2d (~> 0.4, >= 0.4.1)
|
|
95
|
-
openssl (>= 2.2.1)
|
|
96
|
-
strscan (>= 3.1.2)
|
|
97
|
-
i18n (1.14.8)
|
|
98
|
-
concurrent-ruby (~> 1.0)
|
|
99
|
-
icalendar (2.12.3)
|
|
100
|
-
base64
|
|
101
|
-
ice_cube (~> 0.16)
|
|
102
|
-
logger
|
|
103
|
-
ostruct
|
|
104
|
-
ice_cube (0.17.0)
|
|
105
|
-
json (2.19.5)
|
|
106
|
-
language-ruby (1.2.0)
|
|
107
|
-
dorian-arguments
|
|
108
|
-
zeitwerk
|
|
109
|
-
language_server-protocol (3.17.0.5)
|
|
110
|
-
levenshtein (0.2.2)
|
|
111
|
-
libv8-node (24.12.0.1-arm64-darwin)
|
|
112
|
-
libv8-node (24.12.0.1-x86_64-linux)
|
|
113
|
-
lint_roller (1.1.0)
|
|
114
|
-
logger (1.7.0)
|
|
115
|
-
mail (2.9.0)
|
|
116
|
-
logger
|
|
117
|
-
mini_mime (>= 0.1.1)
|
|
118
|
-
net-imap
|
|
119
|
-
net-pop
|
|
120
|
-
net-smtp
|
|
121
|
-
mini_mime (1.1.5)
|
|
122
|
-
mini_racer (0.21.0)
|
|
123
|
-
libv8-node (~> 24.12.0.1)
|
|
124
|
-
minitest (6.0.6)
|
|
125
|
-
drb (~> 2.0)
|
|
126
|
-
prism (~> 1.5)
|
|
127
|
-
mustermann (3.1.1)
|
|
128
|
-
net-http (0.9.1)
|
|
129
|
-
uri (>= 0.11.1)
|
|
130
|
-
net-imap (0.6.4)
|
|
131
|
-
date
|
|
132
|
-
net-protocol
|
|
133
|
-
net-pop (0.1.2)
|
|
134
|
-
net-protocol
|
|
135
|
-
net-protocol (0.2.2)
|
|
136
|
-
timeout
|
|
137
|
-
net-smtp (0.5.1)
|
|
138
|
-
net-protocol
|
|
139
|
-
nokogiri (1.19.3-arm64-darwin)
|
|
140
|
-
racc (~> 1.4)
|
|
141
|
-
nokogiri (1.19.3-x86_64-linux-gnu)
|
|
142
|
-
racc (~> 1.4)
|
|
143
|
-
openssl (4.0.2)
|
|
144
|
-
ostruct (0.6.3)
|
|
145
|
-
parallel (2.1.0)
|
|
146
|
-
parser (3.3.11.1)
|
|
147
|
-
ast (~> 2.4.1)
|
|
148
|
-
racc
|
|
149
|
-
prettier_print (1.2.1)
|
|
150
|
-
prism (1.9.0)
|
|
151
|
-
process_executer (4.0.4)
|
|
152
|
-
track_open_instances (~> 0.1)
|
|
153
|
-
public_suffix (7.0.5)
|
|
154
|
-
racc (1.8.1)
|
|
155
|
-
rack (3.2.6)
|
|
156
|
-
rack-protection (4.2.1)
|
|
157
|
-
base64 (>= 0.1.0)
|
|
158
|
-
logger (>= 1.6.0)
|
|
159
|
-
rack (>= 3.0.0, < 4)
|
|
160
|
-
rack-session (2.1.2)
|
|
161
|
-
base64 (>= 0.1.0)
|
|
162
|
-
rack (>= 3.0.0)
|
|
163
|
-
rainbow (3.1.1)
|
|
164
|
-
rake (13.4.2)
|
|
165
|
-
rchardet (1.10.0)
|
|
166
|
-
regexp_parser (2.12.0)
|
|
167
|
-
rexml (3.4.4)
|
|
168
|
-
rspec (3.13.2)
|
|
169
|
-
rspec-core (~> 3.13.0)
|
|
170
|
-
rspec-expectations (~> 3.13.0)
|
|
171
|
-
rspec-mocks (~> 3.13.0)
|
|
172
|
-
rspec-core (3.13.6)
|
|
173
|
-
rspec-support (~> 3.13.0)
|
|
174
|
-
rspec-expectations (3.13.5)
|
|
175
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
176
|
-
rspec-support (~> 3.13.0)
|
|
177
|
-
rspec-mocks (3.13.8)
|
|
178
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
179
|
-
rspec-support (~> 3.13.0)
|
|
180
|
-
rspec-support (3.13.7)
|
|
181
|
-
rubocop (1.86.2)
|
|
182
|
-
json (~> 2.3)
|
|
183
|
-
language_server-protocol (~> 3.17.0.2)
|
|
184
|
-
lint_roller (~> 1.1.0)
|
|
185
|
-
parallel (>= 1.10)
|
|
186
|
-
parser (>= 3.3.0.2)
|
|
187
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
188
|
-
regexp_parser (>= 2.9.3, < 3.0)
|
|
189
|
-
rubocop-ast (>= 1.49.0, < 2.0)
|
|
190
|
-
ruby-progressbar (~> 1.7)
|
|
191
|
-
unicode-display_width (>= 2.4.0, < 4.0)
|
|
192
|
-
rubocop-ast (1.49.1)
|
|
193
|
-
parser (>= 3.3.7.2)
|
|
194
|
-
prism (~> 1.7)
|
|
195
|
-
rubocop-capybara (2.23.0)
|
|
196
|
-
lint_roller (~> 1.1)
|
|
197
|
-
rubocop (~> 1.81)
|
|
198
|
-
rubocop-factory_bot (2.28.0)
|
|
199
|
-
lint_roller (~> 1.1)
|
|
200
|
-
rubocop (~> 1.72, >= 1.72.1)
|
|
201
|
-
rubocop-performance (1.26.1)
|
|
202
|
-
lint_roller (~> 1.1)
|
|
203
|
-
rubocop (>= 1.75.0, < 2.0)
|
|
204
|
-
rubocop-ast (>= 1.47.1, < 2.0)
|
|
205
|
-
rubocop-rails (2.35.0)
|
|
206
|
-
activesupport (>= 4.2.0)
|
|
207
|
-
lint_roller (~> 1.1)
|
|
208
|
-
rack (>= 1.1)
|
|
209
|
-
rubocop (>= 1.75.0, < 2.0)
|
|
210
|
-
rubocop-ast (>= 1.44.0, < 2.0)
|
|
211
|
-
rubocop-rake (0.7.1)
|
|
212
|
-
lint_roller (~> 1.1)
|
|
213
|
-
rubocop (>= 1.72.1)
|
|
214
|
-
rubocop-rspec (3.9.0)
|
|
215
|
-
lint_roller (~> 1.1)
|
|
216
|
-
rubocop (~> 1.81)
|
|
217
|
-
rubocop-rspec_rails (2.32.0)
|
|
218
|
-
lint_roller (~> 1.1)
|
|
219
|
-
rubocop (~> 1.72, >= 1.72.1)
|
|
220
|
-
rubocop-rspec (~> 3.5)
|
|
221
|
-
ruby-prof (2.0.4)
|
|
222
|
-
base64
|
|
223
|
-
ostruct
|
|
224
|
-
ruby-progressbar (1.13.0)
|
|
225
|
-
securerandom (0.4.1)
|
|
226
|
-
sinatra (4.2.1)
|
|
227
|
-
logger (>= 1.6.0)
|
|
228
|
-
mustermann (~> 3.0)
|
|
229
|
-
rack (>= 3.0.0, < 4)
|
|
230
|
-
rack-protection (= 4.2.1)
|
|
231
|
-
rack-session (>= 2.0.0, < 3)
|
|
232
|
-
tilt (~> 2.0)
|
|
233
|
-
strscan (3.1.8)
|
|
234
|
-
syntax_tree (6.3.0)
|
|
235
|
-
prettier_print (>= 1.2.0)
|
|
236
|
-
syntax_tree-haml (4.0.3)
|
|
237
|
-
haml (>= 5.2)
|
|
238
|
-
prettier_print (>= 1.2.1)
|
|
239
|
-
syntax_tree (>= 6.0.0)
|
|
240
|
-
syntax_tree-xml (0.1.0)
|
|
241
|
-
prettier_print
|
|
242
|
-
syntax_tree (>= 2.0.1)
|
|
243
|
-
temple (0.10.4)
|
|
244
|
-
terminal-table (4.0.0)
|
|
245
|
-
unicode-display_width (>= 1.1.1, < 4)
|
|
246
|
-
thor (1.5.0)
|
|
247
|
-
tilt (2.7.0)
|
|
248
|
-
timeout (0.6.1)
|
|
249
|
-
track_open_instances (0.1.15)
|
|
250
|
-
tzinfo (2.0.6)
|
|
251
|
-
concurrent-ruby (~> 1.0)
|
|
252
|
-
unicode-display_width (3.2.0)
|
|
253
|
-
unicode-emoji (~> 4.1)
|
|
254
|
-
unicode-emoji (4.2.0)
|
|
255
|
-
uri (1.1.1)
|
|
256
|
-
w_syntax_tree-erb (0.12.0)
|
|
257
|
-
prettier_print (~> 1.2, >= 1.2.0)
|
|
258
|
-
syntax_tree (~> 6.1, >= 6.1.1)
|
|
259
|
-
webmock (3.26.2)
|
|
260
|
-
addressable (>= 2.8.0)
|
|
261
|
-
crack (>= 0.3.2)
|
|
262
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
|
263
|
-
yaml (0.4.0)
|
|
264
|
-
zeitwerk (2.7.5)
|
|
265
|
-
|
|
266
|
-
PLATFORMS
|
|
267
|
-
arm64-darwin-23
|
|
268
|
-
arm64-darwin-24
|
|
269
|
-
x86_64-linux
|
|
270
|
-
|
|
271
|
-
DEPENDENCIES
|
|
272
|
-
bundler-audit
|
|
273
|
-
code-ruby!
|
|
274
|
-
dorian
|
|
275
|
-
rake
|
|
276
|
-
rspec
|
|
277
|
-
rubocop-capybara
|
|
278
|
-
rubocop-factory_bot
|
|
279
|
-
rubocop-performance
|
|
280
|
-
rubocop-rails
|
|
281
|
-
rubocop-rake
|
|
282
|
-
rubocop-rspec
|
|
283
|
-
rubocop-rspec_rails
|
|
284
|
-
ruby-prof
|
|
285
|
-
sinatra
|
|
286
|
-
webmock
|
|
287
|
-
|
|
288
|
-
RUBY VERSION
|
|
289
|
-
ruby 3.4.5p51
|
|
290
|
-
|
|
291
|
-
BUNDLED WITH
|
|
292
|
-
2.7.2
|
data/Rakefile
DELETED
data/bin/bundle
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'bundle' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
require "rubygems"
|
|
12
|
-
|
|
13
|
-
m =
|
|
14
|
-
Module.new do
|
|
15
|
-
module_function
|
|
16
|
-
|
|
17
|
-
def invoked_as_script?
|
|
18
|
-
File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def env_var_version
|
|
22
|
-
ENV.fetch("BUNDLER_VERSION", nil)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def cli_arg_version
|
|
26
|
-
return unless invoked_as_script? # don't want to hijack other binstubs
|
|
27
|
-
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
|
28
|
-
|
|
29
|
-
bundler_version = nil
|
|
30
|
-
update_index = nil
|
|
31
|
-
ARGV.each_with_index do |a, i|
|
|
32
|
-
if update_index && update_index.succ == i &&
|
|
33
|
-
a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
|
|
34
|
-
bundler_version = a
|
|
35
|
-
end
|
|
36
|
-
unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
|
|
37
|
-
next
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
bundler_version = Regexp.last_match(1)
|
|
41
|
-
update_index = i
|
|
42
|
-
end
|
|
43
|
-
bundler_version
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def gemfile
|
|
47
|
-
gemfile = ENV.fetch("BUNDLE_GEMFILE", nil)
|
|
48
|
-
return gemfile if gemfile && !gemfile.empty?
|
|
49
|
-
|
|
50
|
-
File.expand_path("../Gemfile", __dir__)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def lockfile
|
|
54
|
-
lockfile =
|
|
55
|
-
case File.basename(gemfile)
|
|
56
|
-
when "gems.rb"
|
|
57
|
-
gemfile.sub(/\.rb$/, ".locked")
|
|
58
|
-
else
|
|
59
|
-
"#{gemfile}.lock"
|
|
60
|
-
end
|
|
61
|
-
File.expand_path(lockfile)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
def lockfile_version
|
|
65
|
-
return unless File.file?(lockfile)
|
|
66
|
-
|
|
67
|
-
lockfile_contents = File.read(lockfile)
|
|
68
|
-
unless lockfile_contents =~
|
|
69
|
-
/\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
|
|
70
|
-
return
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
Regexp.last_match(1)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def bundler_requirement
|
|
77
|
-
@bundler_requirement ||=
|
|
78
|
-
env_var_version || cli_arg_version ||
|
|
79
|
-
bundler_requirement_for(lockfile_version)
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
def bundler_requirement_for(version)
|
|
83
|
-
return "#{Gem::Requirement.default}.a" unless version
|
|
84
|
-
|
|
85
|
-
bundler_gem_version = Gem::Version.new(version)
|
|
86
|
-
|
|
87
|
-
bundler_gem_version.approximate_recommendation
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
def load_bundler!
|
|
91
|
-
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
|
92
|
-
|
|
93
|
-
activate_bundler
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
def activate_bundler
|
|
97
|
-
gem_error =
|
|
98
|
-
activation_error_handling { gem "bundler", bundler_requirement }
|
|
99
|
-
return if gem_error.nil?
|
|
100
|
-
|
|
101
|
-
require_error = activation_error_handling { require "bundler/version" }
|
|
102
|
-
if require_error.nil? &&
|
|
103
|
-
Gem::Requirement.new(bundler_requirement).satisfied_by?(
|
|
104
|
-
Gem::Version.new(Bundler::VERSION)
|
|
105
|
-
)
|
|
106
|
-
return
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
|
110
|
-
exit 42
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
def activation_error_handling
|
|
114
|
-
yield
|
|
115
|
-
nil
|
|
116
|
-
rescue StandardError, LoadError => e
|
|
117
|
-
e
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
m.load_bundler!
|
|
122
|
-
|
|
123
|
-
load Gem.bin_path("bundler", "bundle") if m.invoked_as_script?
|
data/bin/bundle-audit
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'bundle-audit' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
-
|
|
13
|
-
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
-
|
|
15
|
-
if File.file?(bundle_binstub)
|
|
16
|
-
if File.read(bundle_binstub, 300).include?(
|
|
17
|
-
"This file was generated by Bundler"
|
|
18
|
-
)
|
|
19
|
-
load(bundle_binstub)
|
|
20
|
-
else
|
|
21
|
-
abort(
|
|
22
|
-
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
23
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
require "rubygems"
|
|
29
|
-
require "bundler/setup"
|
|
30
|
-
|
|
31
|
-
load Gem.bin_path("bundler-audit", "bundle-audit")
|
data/bin/bundler-audit
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'bundler-audit' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
-
|
|
13
|
-
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
-
|
|
15
|
-
if File.file?(bundle_binstub)
|
|
16
|
-
if File.read(bundle_binstub, 300).include?(
|
|
17
|
-
"This file was generated by Bundler"
|
|
18
|
-
)
|
|
19
|
-
load(bundle_binstub)
|
|
20
|
-
else
|
|
21
|
-
abort(
|
|
22
|
-
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
23
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
require "rubygems"
|
|
29
|
-
require "bundler/setup"
|
|
30
|
-
|
|
31
|
-
load Gem.bin_path("bundler-audit", "bundler-audit")
|
data/bin/dorian
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'dorian' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
-
|
|
13
|
-
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
-
|
|
15
|
-
if File.file?(bundle_binstub)
|
|
16
|
-
if File.read(bundle_binstub, 300).include?(
|
|
17
|
-
"This file was generated by Bundler"
|
|
18
|
-
)
|
|
19
|
-
load(bundle_binstub)
|
|
20
|
-
else
|
|
21
|
-
abort(
|
|
22
|
-
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
23
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
require "rubygems"
|
|
29
|
-
require "bundler/setup"
|
|
30
|
-
|
|
31
|
-
load Gem.bin_path("dorian", "dorian")
|
data/bin/rspec
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'rspec' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
-
|
|
13
|
-
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
-
|
|
15
|
-
if File.file?(bundle_binstub)
|
|
16
|
-
if File.read(bundle_binstub, 300).include?(
|
|
17
|
-
"This file was generated by Bundler"
|
|
18
|
-
)
|
|
19
|
-
load(bundle_binstub)
|
|
20
|
-
else
|
|
21
|
-
abort(
|
|
22
|
-
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
23
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
require "rubygems"
|
|
29
|
-
require "bundler/setup"
|
|
30
|
-
|
|
31
|
-
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/rubocop
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'rubocop' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
-
|
|
13
|
-
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
-
|
|
15
|
-
if File.file?(bundle_binstub)
|
|
16
|
-
if File.read(bundle_binstub, 300).include?(
|
|
17
|
-
"This file was generated by Bundler"
|
|
18
|
-
)
|
|
19
|
-
load(bundle_binstub)
|
|
20
|
-
else
|
|
21
|
-
abort(
|
|
22
|
-
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
23
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
require "rubygems"
|
|
29
|
-
require "bundler/setup"
|
|
30
|
-
|
|
31
|
-
load Gem.bin_path("rubocop", "rubocop")
|
data/code-ruby.gemspec
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
Gem::Specification.new do |s|
|
|
4
|
-
s.name = "code-ruby"
|
|
5
|
-
s.version = File.read("VERSION").strip
|
|
6
|
-
s.summary = "a programming language for the internet"
|
|
7
|
-
s.description = s.summary
|
|
8
|
-
s.authors = ["Dorian Marié"]
|
|
9
|
-
s.email = "dorian@dorianmarie.com"
|
|
10
|
-
s.files = `git ls-files`.lines.map(&:strip)
|
|
11
|
-
s.require_paths = ["lib"]
|
|
12
|
-
s.homepage = "https://github.com/dorianmariecom/code-ruby"
|
|
13
|
-
s.license = "MIT"
|
|
14
|
-
s.executables = "code"
|
|
15
|
-
|
|
16
|
-
s.add_dependency "activesupport"
|
|
17
|
-
s.add_dependency "base64"
|
|
18
|
-
s.add_dependency "bigdecimal"
|
|
19
|
-
s.add_dependency "did-you-mean"
|
|
20
|
-
s.add_dependency "dorian-arguments"
|
|
21
|
-
s.add_dependency "icalendar"
|
|
22
|
-
s.add_dependency "json"
|
|
23
|
-
s.add_dependency "language-ruby"
|
|
24
|
-
s.add_dependency "mail"
|
|
25
|
-
s.add_dependency "net-http"
|
|
26
|
-
s.add_dependency "net-smtp"
|
|
27
|
-
s.add_dependency "nokogiri"
|
|
28
|
-
s.add_dependency "uri"
|
|
29
|
-
s.add_dependency "zeitwerk"
|
|
30
|
-
|
|
31
|
-
s.metadata["rubygems_mfa_required"] = "true"
|
|
32
|
-
|
|
33
|
-
s.required_ruby_version = ">= 3.0"
|
|
34
|
-
end
|