language-ruby 0.8.1 → 0.8.2

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: 71e2f7cddd1800cb39b051ed175133b40dc3e2babb8e2fba7ba0cfe7e88c48ce
4
- data.tar.gz: 5f4eee563d0b727911da3e198314b59ea298d8e34f8e58a5f0c98498ed912c43
3
+ metadata.gz: 43a946504125bb0ac3dd2c41c6eefac79a3ff27682192eb226c202efe689c794
4
+ data.tar.gz: 340526106f13765e4b4514d04a0482824caeab1db5a43ff853a5e47247097483
5
5
  SHA512:
6
- metadata.gz: 891c64d17f8cc944734999615f00eef51e96e18d3e181e02b53ca6f70ce9e1931cf53f3e75960cabe4b2f699d6e191c5d522d7251ce09f9aaf40e3bc71acefa4
7
- data.tar.gz: 4a5a42c6368a34f5e711f28b604fe772a173b6da2bff7a15c1d54287019d255ea31315d5bfb1be786b1d992fca774cfbebc654a58dd961d578b29c716f1aaed1
6
+ metadata.gz: 69d3868b5183ce342ab5e66fc3cd27346374d7c3e1b11e6f87c75bd9edfc6e39943a3a3a1d5e07dbd6f40d54ab26e22856fdb4b2287dde64017331fd31a83c27
7
+ data.tar.gz: 75e55fbe121bfdf4d08308c916243deb0b867448b3b0934a2895563f7304a88f19e9083a84a51816863e4e8d02cb4a321375bf71032027dc04a7c129357c36ee
@@ -0,0 +1,15 @@
1
+ ---
2
+ version: 2
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
@@ -0,0 +1,38 @@
1
+ name: CI
2
+ on: push
3
+ jobs:
4
+ bundler-audit:
5
+ name: Bundler Audit
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ - uses: ruby/setup-ruby@v1
10
+ with:
11
+ bundler-cache: true
12
+ - run: bin/bundler-audit check --update
13
+ rspec:
14
+ name: Test
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: 3.3.0
21
+ bundler-cache: true
22
+ - run: bin/test
23
+ rubocop:
24
+ name: Rubocop
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: ruby/setup-ruby@v1
29
+ with:
30
+ bundler-cache: true
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 CHANGED
@@ -7,3 +7,4 @@ gemspec
7
7
  ruby "3.3.0"
8
8
 
9
9
  gem "rspec"
10
+ gem "rubocop-rails-omakase"
data/Gemfile.lock CHANGED
@@ -1,13 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- language-ruby (0.8.1)
4
+ language-ruby (0.8.2)
5
5
  zeitwerk (~> 2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
+ activesupport (7.1.3.2)
11
+ base64
12
+ bigdecimal
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ connection_pool (>= 2.2.5)
15
+ drb
16
+ i18n (>= 1.6, < 2)
17
+ minitest (>= 5.1)
18
+ mutex_m
19
+ tzinfo (~> 2.0)
20
+ ast (2.4.2)
21
+ base64 (0.2.0)
22
+ bigdecimal (3.1.7)
23
+ concurrent-ruby (1.2.3)
24
+ connection_pool (2.4.1)
10
25
  diff-lcs (1.5.1)
26
+ drb (2.2.1)
27
+ i18n (1.14.4)
28
+ concurrent-ruby (~> 1.0)
29
+ json (2.7.1)
30
+ language_server-protocol (3.17.0.3)
31
+ minitest (5.22.3)
32
+ mutex_m (0.2.0)
33
+ parallel (1.24.0)
34
+ parser (3.3.0.5)
35
+ ast (~> 2.4.1)
36
+ racc
37
+ racc (1.7.3)
38
+ rack (3.0.10)
39
+ rainbow (3.1.1)
40
+ regexp_parser (2.9.0)
41
+ rexml (3.2.6)
11
42
  rspec (3.13.0)
12
43
  rspec-core (~> 3.13.0)
13
44
  rspec-expectations (~> 3.13.0)
@@ -21,6 +52,39 @@ GEM
21
52
  diff-lcs (>= 1.2.0, < 2.0)
22
53
  rspec-support (~> 3.13.0)
23
54
  rspec-support (3.13.1)
55
+ rubocop (1.62.1)
56
+ json (~> 2.3)
57
+ language_server-protocol (>= 3.17.0)
58
+ parallel (~> 1.10)
59
+ parser (>= 3.3.0.2)
60
+ rainbow (>= 2.2.2, < 4.0)
61
+ regexp_parser (>= 1.8, < 3.0)
62
+ rexml (>= 3.2.5, < 4.0)
63
+ rubocop-ast (>= 1.31.1, < 2.0)
64
+ ruby-progressbar (~> 1.7)
65
+ unicode-display_width (>= 2.4.0, < 3.0)
66
+ rubocop-ast (1.31.2)
67
+ parser (>= 3.3.0.4)
68
+ rubocop-minitest (0.35.0)
69
+ rubocop (>= 1.61, < 2.0)
70
+ rubocop-ast (>= 1.31.1, < 2.0)
71
+ rubocop-performance (1.21.0)
72
+ rubocop (>= 1.48.1, < 2.0)
73
+ rubocop-ast (>= 1.31.1, < 2.0)
74
+ rubocop-rails (2.24.1)
75
+ activesupport (>= 4.2.0)
76
+ rack (>= 1.1)
77
+ rubocop (>= 1.33.0, < 2.0)
78
+ rubocop-ast (>= 1.31.1, < 2.0)
79
+ rubocop-rails-omakase (1.0.0)
80
+ rubocop
81
+ rubocop-minitest
82
+ rubocop-performance
83
+ rubocop-rails
84
+ ruby-progressbar (1.13.0)
85
+ tzinfo (2.0.6)
86
+ concurrent-ruby (~> 1.0)
87
+ unicode-display_width (2.5.0)
24
88
  zeitwerk (2.6.13)
25
89
 
26
90
  PLATFORMS
@@ -30,9 +94,10 @@ PLATFORMS
30
94
  DEPENDENCIES
31
95
  language-ruby!
32
96
  rspec
97
+ rubocop-rails-omakase
33
98
 
34
99
  RUBY VERSION
35
100
  ruby 3.3.0p0
36
101
 
37
102
  BUNDLED WITH
38
- 2.5.6
103
+ 2.5.7
data/bin/rspec ADDED
@@ -0,0 +1,31 @@
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/test ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ bin/rspec
@@ -30,7 +30,7 @@ class Language
30
30
  minimum = @minimum.zero? ? "" : @minimum.to_s
31
31
  maximum = @maximum.nil? ? "" : ", #{@maximum}"
32
32
  parenthesis =
33
- (minimum.empty? && maximum.empty?) ? "" : "(#{minimum}#{maximum})"
33
+ minimum.empty? && maximum.empty? ? "" : "(#{minimum}#{maximum})"
34
34
 
35
35
  @parent ? "(#{@parent}).repeat#{parenthesis}" : "repeat#{parenthesis}"
36
36
  end
@@ -2,4 +2,4 @@
2
2
 
3
3
  require_relative "../language"
4
4
 
5
- Language::Version = Gem::Version.new("0.8.1")
5
+ Language::Version = Gem::Version.new("0.8.2")
@@ -20,15 +20,16 @@ class Code
20
20
 
21
21
  class ThenWithBufferTransformed < Language
22
22
  def root
23
- any.repeat(1).then { |buffer| buffer.upcase }
23
+ any.repeat(1).then(&:upcase)
24
24
  end
25
25
  end
26
26
 
27
27
  class ThenWithOutput < Language
28
28
  def root
29
- any.repeat(1).aka(:something).then do |output|
30
- output[:something].upcase
31
- end
29
+ any
30
+ .repeat(1)
31
+ .aka(:something)
32
+ .then { |output| output[:something].upcase }
32
33
  end
33
34
  end
34
35
  end
@@ -40,11 +41,15 @@ RSpec.describe Language do
40
41
  end
41
42
 
42
43
  it "works with then with buffer" do
43
- expect(Code::Parser::ThenWithBuffer.parse("something")).to eq("something-else")
44
+ expect(Code::Parser::ThenWithBuffer.parse("something")).to eq(
45
+ "something-else"
46
+ )
44
47
  end
45
48
 
46
49
  it "works with then with buffer transformed" do
47
- expect(Code::Parser::ThenWithBufferTransformed.parse("something")).to eq("SOMETHING")
50
+ expect(Code::Parser::ThenWithBufferTransformed.parse("something")).to eq(
51
+ "SOMETHING"
52
+ )
48
53
  end
49
54
 
50
55
  it "works with then with output" do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rspec"
3
4
  require_relative "../lib/language-ruby"
data/yarn.lock ADDED
@@ -0,0 +1,4 @@
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: language-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
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-09 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: zeitwerk
@@ -30,6 +30,8 @@ executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
+ - ".github/dependabot.yml"
34
+ - ".github/workflows/ci.yml"
33
35
  - ".gitignore"
34
36
  - ".rspec"
35
37
  - ".ruby-version"
@@ -37,6 +39,8 @@ files:
37
39
  - Gemfile
38
40
  - Gemfile.lock
39
41
  - README.md
42
+ - bin/rspec
43
+ - bin/test
40
44
  - language-ruby.gemspec
41
45
  - lib/language-ruby.rb
42
46
  - lib/language.rb
@@ -63,6 +67,7 @@ files:
63
67
  - lib/language/version.rb
64
68
  - spec/language_spec.rb
65
69
  - spec/spec_helper.rb
70
+ - yarn.lock
66
71
  homepage: https://github.com/dorianmariecom/language-ruby
67
72
  licenses:
68
73
  - MIT