code-ruby 0.14.3 → 0.14.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 233f0dfedc9a65226d48e1ed04141b5f8a0ddfc59dde5fc3d25aea8dc724ac70
4
- data.tar.gz: 89f47760f80263b9e8628feb171daf966f419db4d913a712ec798f010c39b99e
3
+ metadata.gz: 7a52b2959095228434649a676508dbbf549a6a466363ca25b3ce95c1d5a13de9
4
+ data.tar.gz: ad2e7947f6d959923e36cecc48816586575f1caee9bfdbbc2da44ca1de9c284a
5
5
  SHA512:
6
- metadata.gz: 7483f8c33f580dfbab367f51aee7fa8a7c881140da892e4f0b88fa24de74eab7d0f95196f7410f598641e5493b5a472f45eded18a341bb9cbac525998520ab7f
7
- data.tar.gz: 422a8bd841bd6451be58a4e8127af024fd01ae1605eddcb9aa63c6737a18a8d2bd15ba9c838a90ba69456d216779e179e78811c1fe49768c3eaba8cf61e64662
6
+ metadata.gz: 6516b0072e0958d93bec52c9c43e138298d03a594f606598ca5572ecf2c02f8343f90b8834287c9a1d6651c8cea350791acbb29df9e57c0c0cdad0bb1e71e06d
7
+ data.tar.gz: d9ae4f2cca4194d68215c547d632bc21ac64a99d968d511e502a8efce7a6b435dfb2e7d877e3e431ed0320ccca256729121aee6805352588414d29544cc9f094
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  version: 2
3
3
  updates:
4
- - directory: "/"
5
- package-ecosystem: github-actions
6
- schedule:
7
- interval: daily
8
- - directory: "/"
9
- package-ecosystem: npm
10
- schedule:
11
- interval: daily
12
- - directory: "/"
13
- package-ecosystem: bundler
14
- schedule:
15
- interval: daily
4
+ - directory: "/"
5
+ package-ecosystem: github-actions
6
+ schedule:
7
+ interval: daily
8
+ - directory: "/"
9
+ package-ecosystem: npm
10
+ schedule:
11
+ interval: daily
12
+ - directory: "/"
13
+ package-ecosystem: bundler
14
+ schedule:
15
+ interval: daily
@@ -11,7 +11,7 @@ jobs:
11
11
  bundler-cache: true
12
12
  - run: bin/bundler-audit check --update
13
13
  rspec:
14
- name: RSpec
14
+ name: Test
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
17
  - uses: actions/checkout@v4
@@ -19,7 +19,7 @@ jobs:
19
19
  with:
20
20
  ruby-version: 3.3.0
21
21
  bundler-cache: true
22
- - run: bin/rspec
22
+ - run: bin/test
23
23
  rubocop:
24
24
  name: Rubocop
25
25
  runs-on: ubuntu-latest
@@ -29,3 +29,10 @@ jobs:
29
29
  with:
30
30
  bundler-cache: true
31
31
  - run: bin/rubocop
32
+ yarn-audit:
33
+ name: Yarn Audit
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+ - uses: actions/setup-node@v4
38
+ - run: yarn audit
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- code-ruby (0.14.3)
4
+ code-ruby (0.14.4)
5
5
  activesupport (~> 7)
6
6
  bigdecimal (~> 3)
7
7
  did-you-mean (~> 0)
@@ -82,10 +82,10 @@ GEM
82
82
  rubocop-minitest (0.35.0)
83
83
  rubocop (>= 1.61, < 2.0)
84
84
  rubocop-ast (>= 1.31.1, < 2.0)
85
- rubocop-performance (1.20.2)
85
+ rubocop-performance (1.21.0)
86
86
  rubocop (>= 1.48.1, < 2.0)
87
- rubocop-ast (>= 1.30.0, < 2.0)
88
- rubocop-rails (2.24.0)
87
+ rubocop-ast (>= 1.31.1, < 2.0)
88
+ rubocop-rails (2.24.1)
89
89
  activesupport (>= 4.2.0)
90
90
  rack (>= 1.1)
91
91
  rubocop (>= 1.33.0, < 2.0)
data/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # code-ruby
2
2
 
3
- A programming language, like `Code.evaluate("1 + 1") # => 2`
3
+ A programming language
data/bin/test ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ bin/rspec
@@ -8,11 +8,9 @@ class Code
8
8
  json
9
9
  elsif json.is_a?(::Hash)
10
10
  Dictionary.new(
11
- json.transform_keys do |key|
12
- Json.to_code(key)
13
- end.transform_values do |value|
14
- Json.to_code(value)
15
- end
11
+ json
12
+ .transform_keys { |key| Json.to_code(key) }
13
+ .transform_values { |value| Json.to_code(value) }
16
14
  )
17
15
  elsif json.is_a?(::Array)
18
16
  List.new(json.map { |element| Json.to_code(element) })
data/lib/code/version.rb CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  require_relative "../code"
4
4
 
5
- Code::Version = Gem::Version.new("0.14.3")
5
+ Code::Version = Gem::Version.new("0.14.4")
data/spec/code_spec.rb CHANGED
@@ -273,10 +273,10 @@ RSpec.describe Code do
273
273
  %w[1.1.to_json '"1.1"'],
274
274
  ["a = {} a.merge!(a: 1) a", "{a: 1}"],
275
275
  ["a = {} a.merge(a: 1) a", "{}"],
276
- ["1&.even?", "false"],
276
+ %w[1&.even? false],
277
277
  ["nothing&.even? || 1", "1"],
278
278
  ["nothing&.even? && 1", "nothing"],
279
- ["2&.even?", "true"],
279
+ %w[2&.even? true],
280
280
  ["a = 1 a&.even?", "false"],
281
281
  ["a = 2 a&.even?", "true"],
282
282
  ["a = nothing a&.even?", "nothing"],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.3
4
+ version: 0.14.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-23 00:00:00.000000000 Z
11
+ date: 2024-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -118,6 +118,7 @@ files:
118
118
  - bin/console
119
119
  - bin/rspec
120
120
  - bin/rubocop
121
+ - bin/test
121
122
  - code-ruby.gemspec
122
123
  - lib/code-ruby.rb
123
124
  - lib/code.rb