code-ruby 0.14.3 → 0.14.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +12 -12
- data/.github/workflows/ci.yml +9 -2
- data/Gemfile.lock +4 -4
- data/README.md +1 -1
- data/bin/test +5 -0
- data/code-ruby.gemspec +2 -0
- data/lib/code/object/json.rb +3 -5
- data/lib/code/version.rb +1 -1
- data/spec/code_spec.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca7e071ecb2a9384f362dbe6d1ed1eb96cc04229eba98bde433d48311f517aa9
|
4
|
+
data.tar.gz: 386cae4a34c3272cf6195d3d05ebc0904fd27efc3d91c17bd44f1d762fd3ac66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b04cff3ff4c89d2d787bd44691da3653e8a605626d01279eb35b69ce3e935a9e527fc7c5759ab3a967a6ecd9915594357a4bf8495b2791128a45befd9d4e650
|
7
|
+
data.tar.gz: c2c6cfe67769c9229fa2d57ea01cc14abab69a383aaa4908a0f263000beb5a96e332014a0ae5d824b3063de93af2287e9433e3303e6636c632b59356e50c1d7a
|
data/.github/dependabot.yml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
version: 2
|
3
3
|
updates:
|
4
|
-
- directory: "/"
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
- directory: "/"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
- directory: "/"
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
data/.github/workflows/ci.yml
CHANGED
@@ -11,7 +11,7 @@ jobs:
|
|
11
11
|
bundler-cache: true
|
12
12
|
- run: bin/bundler-audit check --update
|
13
13
|
rspec:
|
14
|
-
name:
|
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/
|
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.
|
4
|
+
code-ruby (0.14.5)
|
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.
|
85
|
+
rubocop-performance (1.21.0)
|
86
86
|
rubocop (>= 1.48.1, < 2.0)
|
87
|
-
rubocop-ast (>= 1.
|
88
|
-
rubocop-rails (2.24.
|
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
data/code-ruby.gemspec
CHANGED
data/lib/code/object/json.rb
CHANGED
@@ -8,11 +8,9 @@ class Code
|
|
8
8
|
json
|
9
9
|
elsif json.is_a?(::Hash)
|
10
10
|
Dictionary.new(
|
11
|
-
json
|
12
|
-
Json.to_code(key)
|
13
|
-
|
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
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
|
-
[
|
276
|
+
%w[1&.even? false],
|
277
277
|
["nothing&.even? || 1", "1"],
|
278
278
|
["nothing&.even? && 1", "nothing"],
|
279
|
-
[
|
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.
|
4
|
+
version: 0.14.5
|
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
|
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
|
@@ -254,7 +255,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
254
255
|
requirements:
|
255
256
|
- - ">="
|
256
257
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
258
|
+
version: 3.3.0
|
258
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
259
260
|
requirements:
|
260
261
|
- - ">="
|