ripgrep 0.1.3 → 0.1.4

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: 44ff07d862f58d2af436d6291cf716bccd785bbcef2dd39cca34fca259feab1b
4
- data.tar.gz: 4e45c783a11cebb988198612c24df11f4f2c249302cf05b407ba1fca844d1a09
3
+ metadata.gz: 9ba2644f41a9b29af26272966cb2ae9c384d61b2a7edf570a039d270b6929274
4
+ data.tar.gz: 912cad6018f31c4b2cf81b921318bf431740120670ad04d758ccc41953aed726
5
5
  SHA512:
6
- metadata.gz: 400b3e1f6ac0a64238ec17920c35776fe90ef5a475d2dd4eb307a6c961619d2b8e50b63d7bf5d31c4eb57ba488609c2838452af52f655dc7546594eab5b321da
7
- data.tar.gz: 2aeeb1b384ba253a338b75e8a2114d79b267c7fb61105469c388423a0f28256169ac82f24df80677ba22656351aeb7ae9d67706c08f1571a548013694e15e775
6
+ metadata.gz: e44755d77bd7878ff258676dca2c091a283aeb05accaf500c9ebb4c41212c5fe95e357ad0a73b65345d58f537fbdcc1f273a422cce9223b6bc1c50db0c210ce4
7
+ data.tar.gz: 344b7795ba3667cf55a238416f4816ba1b84d6a9973170878f635ee8b4f159bf149a4b50f1680b36c21bab2030a54aa2b461391c811035ea8c1217d1d5272392
@@ -0,0 +1,35 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master, main ]
6
+ pull_request:
7
+ branches: [ master, main ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ ruby-version: ['3.2', '3.3', '3.4']
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Ruby ${{ matrix.ruby-version }}
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ bundler-cache: true
25
+
26
+ - name: Install ripgrep
27
+ run: |
28
+ sudo apt-get update
29
+ sudo apt-get install -y ripgrep
30
+
31
+ - name: Verify ripgrep installation
32
+ run: rg --version
33
+
34
+ - name: Run RSpec tests
35
+ run: bundle exec rspec
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.4.5
data/README.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  A Ruby wrapper around [ripgrep](https://github.com/BurntSushi/ripgrep)!
4
4
 
5
+ ## Requirements
6
+
7
+ - ripgrep (rg) must be installed separately on your system. See the official repository: https://github.com/BurntSushi/ripgrep
8
+
9
+ Verified on:
10
+ - ripgrep 14.1.0
11
+ - Ruby 3.2, 3.3, 3.4
12
+
5
13
  ## Installation
6
14
 
7
15
  Add this line to your application's Gemfile:
@@ -16,12 +16,23 @@ module Ripgrep
16
16
  opts = {}
17
17
  end
18
18
  verbose = opts[:verbose].nil? ? @verbose : !!opts[:verbose]
19
- cli_options = opts[:options]&.map do |key, val|
20
- next unless val
21
- val = '' if val.is_a? TrueClass
22
- val = val.join if val.is_a? Array
19
+ cli_options = opts[:options]&.flat_map do |key, val|
20
+ next [] unless val
23
21
  key = key.to_s.tr('_', '-')
24
- "--#{key} #{val}".strip
22
+
23
+ if val.is_a? Array
24
+ # For arrays, create multiple --key=val options
25
+ val.map { |v| "--#{key}=#{v}" }
26
+ elsif val.is_a? TrueClass
27
+ # For true, create --key option without value
28
+ ["--#{key}"]
29
+ elsif val.is_a? String
30
+ # For strings, always pass through (empty string becomes --key=)
31
+ ["--#{key}=#{val}"]
32
+ else
33
+ # For other values, convert to string
34
+ ["--#{key}=#{val}"]
35
+ end
25
36
  end&.compact || []
26
37
  puts "cli_options: #{cli_options}" if verbose
27
38
  cli_arguments = cli_options + args
@@ -1,3 +1,3 @@
1
1
  module Ripgrep
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
data/ripgrep.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 2.0"
26
- spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rake", ">= 12.3.3"
27
27
  spec.add_development_dependency "rspec", "~> 3.0"
28
28
  spec.add_development_dependency "pry"
29
29
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ripgrep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - motoki-shun
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2019-07-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -28,16 +27,16 @@ dependencies:
28
27
  name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - "~>"
30
+ - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '10.0'
32
+ version: 12.3.3
34
33
  type: :development
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
- - - "~>"
37
+ - - ">="
39
38
  - !ruby/object:Gem::Version
40
- version: '10.0'
39
+ version: 12.3.3
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: rspec
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -67,14 +66,14 @@ dependencies:
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0'
69
68
  description: A Ruby wrapper around ripgrep!
70
- email:
71
69
  executables: []
72
70
  extensions: []
73
71
  extra_rdoc_files: []
74
72
  files:
73
+ - ".github/workflows/ci.yml"
75
74
  - ".gitignore"
76
75
  - ".rspec"
77
- - ".ruby-version"
76
+ - ".tool-versions"
78
77
  - ".travis.yml"
79
78
  - Gemfile
80
79
  - LICENSE.txt
@@ -93,7 +92,6 @@ homepage: https://github.com/shuuuuun/ripgrep-ruby
93
92
  licenses:
94
93
  - MIT
95
94
  metadata: {}
96
- post_install_message:
97
95
  rdoc_options: []
98
96
  require_paths:
99
97
  - lib
@@ -108,8 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
106
  - !ruby/object:Gem::Version
109
107
  version: '0'
110
108
  requirements: []
111
- rubygems_version: 3.0.3
112
- signing_key:
109
+ rubygems_version: 3.6.9
113
110
  specification_version: 4
114
111
  summary: A Ruby wrapper around ripgrep!
115
112
  test_files: []
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.6.3