code-ruby 1.6.3 → 1.6.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31de900f45b607432af42419aedea361f2a751aa6d635caaa01edced89a2a591
4
- data.tar.gz: 121236f92f037d3ba10b45a8d92dabd08972241262c588cfbe370ff60822f642
3
+ metadata.gz: f7e0e5e68e02bc2d39d083b3d418f06d18ebaef97c8475a7f7441925ee77c9a8
4
+ data.tar.gz: f385d46826c6063f6eecb43b6e462d9448174f2443c80e3cbef9fab9dac82106
5
5
  SHA512:
6
- metadata.gz: f3774304c7976b6295f49c6da4a9ccd473151cb0097f8e3848a58941498a8b3502c477f6095c148811d72b43bbbbbdf869848c4ceeac87515b47fc596a55d1aa
7
- data.tar.gz: edb7ff295ed91f0b555f2e8e8bab351a2002ff80db28aaaab037d4d7c22b42d55b3a41712e73a64855c872ad8d7579dee9d4dbe23119a37211c902c870adc165
6
+ metadata.gz: 3d4e3cd83f3a82185737a6a3af835cf03ccf8f51ee7866695605a717bfc805f73656dfb00156a3d9e9a4000e8451ff5d76bedf8b9fdbac2a666c63eea1ad80b8
7
+ data.tar.gz: 529095af1ef3d3c103dd891f3bd5cf39b30f62e0fb8f291a8fc6669471a308ea302b15b195821cf4fdc83b4d7cd8f1fffbf132962a96724dd002cdbefe3980e2
data/.node-version CHANGED
@@ -1 +1 @@
1
- 23.11.0
1
+ 24.4.1
data/.npm-version CHANGED
@@ -1 +1 @@
1
- 11.2.0
1
+ 11.4.2
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.2
1
+ 3.4.5
data/.tool-versions CHANGED
@@ -1,3 +1,3 @@
1
- ruby 3.4.2
1
+ ruby 3.4.5
2
2
  yarn 1.22.22
3
- nodejs 23.11.0
3
+ nodejs 24.4.1
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- ruby "3.4.2"
7
+ ruby "3.4.5"
8
8
 
9
9
  gem "bundler-audit"
10
10
  gem "dorian"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- code-ruby (1.6.3)
4
+ code-ruby (1.6.6)
5
5
  activesupport
6
6
  base64
7
7
  bigdecimal
@@ -35,9 +35,9 @@ GEM
35
35
  addressable (2.8.7)
36
36
  public_suffix (>= 2.0.2, < 7.0)
37
37
  ast (2.4.3)
38
- base64 (0.2.0)
39
- benchmark (0.4.0)
40
- bigdecimal (3.1.9)
38
+ base64 (0.3.0)
39
+ benchmark (0.4.1)
40
+ bigdecimal (3.2.2)
41
41
  bundler-audit (0.9.2)
42
42
  bundler (>= 1.2.0, < 3)
43
43
  thor (~> 1.0)
@@ -47,7 +47,7 @@ GEM
47
47
  crack (1.0.0)
48
48
  bigdecimal
49
49
  rexml
50
- csv (3.3.4)
50
+ csv (3.3.5)
51
51
  date (3.4.1)
52
52
  did-you-mean (0.1.1)
53
53
  levenshtein (>= 0.2.0)
@@ -77,18 +77,18 @@ GEM
77
77
  dorian-progress (1.1.2)
78
78
  ruby-progressbar
79
79
  dorian-to_struct (2.0.2)
80
- drb (2.2.1)
80
+ drb (2.2.3)
81
81
  geom2d (0.4.1)
82
- git (3.0.2)
82
+ git (4.0.4)
83
83
  activesupport (>= 5.0)
84
84
  addressable (~> 2.8)
85
- process_executer (~> 1.3)
85
+ process_executer (~> 4.0)
86
86
  rchardet (~> 1.9)
87
87
  haml (6.3.0)
88
88
  temple (>= 0.8.2)
89
89
  thor
90
90
  tilt
91
- hashdiff (1.1.2)
91
+ hashdiff (1.2.0)
92
92
  hexapdf (1.3.0)
93
93
  cmdparse (~> 3.0, >= 3.0.3)
94
94
  geom2d (~> 0.4, >= 0.4.1)
@@ -96,15 +96,14 @@ GEM
96
96
  strscan (>= 3.1.2)
97
97
  i18n (1.14.7)
98
98
  concurrent-ruby (~> 1.0)
99
- json (2.12.0)
99
+ json (2.13.0)
100
100
  language-ruby (1.2.0)
101
101
  dorian-arguments
102
102
  zeitwerk
103
103
  language_server-protocol (3.17.0.5)
104
104
  levenshtein (0.2.2)
105
- libv8-node (23.6.1.0)
106
- libv8-node (23.6.1.0-arm64-darwin)
107
- libv8-node (23.6.1.0-x86_64-linux)
105
+ libv8-node (24.1.0.0-arm64-darwin)
106
+ libv8-node (24.1.0.0-x86_64-linux)
108
107
  lint_roller (1.1.0)
109
108
  logger (1.7.0)
110
109
  mail (2.8.1)
@@ -113,14 +112,14 @@ GEM
113
112
  net-pop
114
113
  net-smtp
115
114
  mini_mime (1.1.5)
116
- mini_racer (0.18.1)
117
- libv8-node (~> 23.6.1.0)
115
+ mini_racer (0.19.0)
116
+ libv8-node (~> 24.1.0.0)
118
117
  minitest (5.25.5)
119
118
  mustermann (3.0.3)
120
119
  ruby2_keywords (~> 0.0.1)
121
120
  net-http (0.6.0)
122
121
  uri
123
- net-imap (0.5.8)
122
+ net-imap (0.5.9)
124
123
  date
125
124
  net-protocol
126
125
  net-pop (0.1.2)
@@ -129,22 +128,23 @@ GEM
129
128
  timeout
130
129
  net-smtp (0.5.1)
131
130
  net-protocol
132
- nokogiri (1.18.8-arm64-darwin)
131
+ nokogiri (1.18.9-arm64-darwin)
133
132
  racc (~> 1.4)
134
- nokogiri (1.18.8-x86_64-linux-gnu)
133
+ nokogiri (1.18.9-x86_64-linux-gnu)
135
134
  racc (~> 1.4)
136
135
  openssl (3.3.0)
137
- ostruct (0.6.1)
136
+ ostruct (0.6.3)
138
137
  parallel (1.27.0)
139
138
  parser (3.3.8.0)
140
139
  ast (~> 2.4.1)
141
140
  racc
142
141
  prettier_print (1.2.1)
143
142
  prism (1.4.0)
144
- process_executer (1.3.0)
143
+ process_executer (4.0.0)
144
+ track_open_instances (~> 0.1)
145
145
  public_suffix (6.0.2)
146
146
  racc (1.8.1)
147
- rack (3.1.14)
147
+ rack (3.1.16)
148
148
  rack-protection (4.1.1)
149
149
  base64 (>= 0.1.0)
150
150
  logger (>= 1.6.0)
@@ -153,24 +153,24 @@ GEM
153
153
  base64 (>= 0.1.0)
154
154
  rack (>= 3.0.0)
155
155
  rainbow (3.1.1)
156
- rake (13.2.1)
156
+ rake (13.3.0)
157
157
  rchardet (1.9.0)
158
158
  regexp_parser (2.10.0)
159
159
  rexml (3.4.1)
160
- rspec (3.13.0)
160
+ rspec (3.13.1)
161
161
  rspec-core (~> 3.13.0)
162
162
  rspec-expectations (~> 3.13.0)
163
163
  rspec-mocks (~> 3.13.0)
164
- rspec-core (3.13.3)
164
+ rspec-core (3.13.5)
165
165
  rspec-support (~> 3.13.0)
166
- rspec-expectations (3.13.4)
166
+ rspec-expectations (3.13.5)
167
167
  diff-lcs (>= 1.2.0, < 2.0)
168
168
  rspec-support (~> 3.13.0)
169
- rspec-mocks (3.13.4)
169
+ rspec-mocks (3.13.5)
170
170
  diff-lcs (>= 1.2.0, < 2.0)
171
171
  rspec-support (~> 3.13.0)
172
- rspec-support (3.13.3)
173
- rubocop (1.75.6)
172
+ rspec-support (3.13.4)
173
+ rubocop (1.78.0)
174
174
  json (~> 2.3)
175
175
  language_server-protocol (~> 3.17.0.2)
176
176
  lint_roller (~> 1.1.0)
@@ -178,10 +178,10 @@ GEM
178
178
  parser (>= 3.3.0.2)
179
179
  rainbow (>= 2.2.2, < 4.0)
180
180
  regexp_parser (>= 2.9.3, < 3.0)
181
- rubocop-ast (>= 1.44.0, < 2.0)
181
+ rubocop-ast (>= 1.45.1, < 2.0)
182
182
  ruby-progressbar (~> 1.7)
183
183
  unicode-display_width (>= 2.4.0, < 4.0)
184
- rubocop-ast (1.44.1)
184
+ rubocop-ast (1.46.0)
185
185
  parser (>= 3.3.7.2)
186
186
  prism (~> 1.4)
187
187
  rubocop-capybara (2.22.1)
@@ -194,12 +194,12 @@ GEM
194
194
  lint_roller (~> 1.1)
195
195
  rubocop (>= 1.75.0, < 2.0)
196
196
  rubocop-ast (>= 1.38.0, < 2.0)
197
- rubocop-rails (2.31.0)
197
+ rubocop-rails (2.32.0)
198
198
  activesupport (>= 4.2.0)
199
199
  lint_roller (~> 1.1)
200
200
  rack (>= 1.1)
201
201
  rubocop (>= 1.75.0, < 2.0)
202
- rubocop-ast (>= 1.38.0, < 2.0)
202
+ rubocop-ast (>= 1.44.0, < 2.0)
203
203
  rubocop-rake (0.7.1)
204
204
  lint_roller (~> 1.1)
205
205
  rubocop (>= 1.72.1)
@@ -210,7 +210,8 @@ GEM
210
210
  lint_roller (~> 1.1)
211
211
  rubocop (~> 1.72, >= 1.72.1)
212
212
  rubocop-rspec (~> 3.5)
213
- ruby-prof (1.7.1)
213
+ ruby-prof (1.7.2)
214
+ base64
214
215
  ruby-progressbar (1.13.0)
215
216
  ruby2_keywords (0.0.5)
216
217
  securerandom (0.4.1)
@@ -222,7 +223,7 @@ GEM
222
223
  rack-session (>= 2.0.0, < 3)
223
224
  tilt (~> 2.0)
224
225
  strscan (3.1.5)
225
- syntax_tree (6.2.0)
226
+ syntax_tree (6.3.0)
226
227
  prettier_print (>= 1.2.0)
227
228
  syntax_tree-haml (4.0.3)
228
229
  haml (>= 5.2)
@@ -234,9 +235,10 @@ GEM
234
235
  temple (0.10.3)
235
236
  terminal-table (4.0.0)
236
237
  unicode-display_width (>= 1.1.1, < 4)
237
- thor (1.3.2)
238
- tilt (2.6.0)
238
+ thor (1.4.0)
239
+ tilt (2.6.1)
239
240
  timeout (0.4.3)
241
+ track_open_instances (0.1.15)
240
242
  tzinfo (2.0.6)
241
243
  concurrent-ruby (~> 1.0)
242
244
  unicode-display_width (3.1.4)
@@ -251,7 +253,7 @@ GEM
251
253
  crack (>= 0.3.2)
252
254
  hashdiff (>= 0.4.0, < 2.0.0)
253
255
  yaml (0.4.0)
254
- zeitwerk (2.7.2)
256
+ zeitwerk (2.7.3)
255
257
 
256
258
  PLATFORMS
257
259
  arm64-darwin-23
@@ -276,7 +278,7 @@ DEPENDENCIES
276
278
  webmock
277
279
 
278
280
  RUBY VERSION
279
- ruby 3.4.2p28
281
+ ruby 3.4.5p51
280
282
 
281
283
  BUNDLED WITH
282
- 2.6.7
284
+ 2.7.1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.3
1
+ 1.6.6
@@ -18,7 +18,6 @@ class Code
18
18
  elsif parent?
19
19
  parent.code_lookup!(code_identifier)
20
20
  else
21
- binding.irb
22
21
  raise Error, "#{code_identifier} is not defined"
23
22
  end
24
23
  end
@@ -56,16 +56,16 @@ class Code
56
56
  .raw
57
57
  .select { |code_argument| code_argument.is_a?(Dictionary) }
58
58
  .detect do |code_dictionary|
59
- code_dictionary.code_has_value?(parameter.code_name).truthy?
59
+ code_dictionary.code_has_key?(code_parameter.code_name).truthy?
60
60
  end
61
- &.code_get(parameter.code_name)
61
+ &.code_get(code_parameter.code_name)
62
62
  .to_code
63
63
  else
64
64
  code_arguments.raw[index].to_code
65
65
  end
66
66
 
67
67
  if code_argument.nothing?
68
- code_argument = code_parameter.code_evaluate(**globals)
68
+ code_argument = code_parameter.code_default
69
69
  end
70
70
 
71
71
  code_context.code_set(code_parameter.code_name, code_argument)
@@ -43,10 +43,6 @@ class Code
43
43
  code_get(:default).to_code
44
44
  end
45
45
 
46
- def code_evaluate(...)
47
- code_default.code_evaluate(...)
48
- end
49
-
50
46
  def required?
51
47
  code_required?.truthy?
52
48
  end
@@ -172,7 +172,7 @@ class Code
172
172
 
173
173
  def root
174
174
  (
175
- special_name |
175
+ (special_name << separator.ignore) |
176
176
  (
177
177
  (keyword << separator).absent << special_characters.absent <<
178
178
  character.repeat(1)
data/package-lock.json CHANGED
@@ -6,8 +6,8 @@
6
6
  "": {
7
7
  "license": "MIT",
8
8
  "engines": {
9
- "node": "23.11.0",
10
- "npm": "11.2.0"
9
+ "node": "24.4.1",
10
+ "npm": "11.4.2"
11
11
  }
12
12
  }
13
13
  }
data/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "license": "MIT",
3
3
  "engines": {
4
- "node": "23.11.0",
5
- "npm": "11.2.0"
4
+ "node": "24.4.1",
5
+ "npm": "11.4.2"
6
6
  }
7
7
  }
data/spec/code_spec.rb CHANGED
@@ -13,6 +13,8 @@ RSpec.describe Code do
13
13
  "Object.new !== Object.new"
14
14
  ] +
15
15
  %w[
16
+ 1..3
17
+ 1...3
16
18
  :abc.size
17
19
  Date.new.change
18
20
  {}.zero?
@@ -422,4 +424,15 @@ RSpec.describe Code do
422
424
  end
423
425
  INPUT
424
426
  end
427
+
428
+ it "doesn't crash with functions" do
429
+ described_class.evaluate(<<~INPUT)
430
+ send! = (subject:) => { subject }
431
+
432
+ send!(subject: "pomodoro start")
433
+ send!(subject: "pomodoro break")
434
+ send!(subject: "pomodoro start")
435
+ send!(subject: "pomodoro break")
436
+ INPUT
437
+ end
425
438
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-06-25 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport
@@ -375,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
375
375
  - !ruby/object:Gem::Version
376
376
  version: '0'
377
377
  requirements: []
378
- rubygems_version: 3.6.2
378
+ rubygems_version: 3.6.9
379
379
  specification_version: 4
380
380
  summary: a programming language for the internet
381
381
  test_files: []