rbr 0.3.3 → 0.3.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: ab31cff3afa8b99ab648f288eb4cde1a4f1fb3d1e179d3ebbb3a8aa9e8194ff5
4
- data.tar.gz: e931616ec1c7b986e0c1e12a8502824d1fb0ae45752f0cfd0f777cc9d93b99b3
3
+ metadata.gz: 5c0e7a109d2816ccffdfaae67030e2b2fdf05ec174f4eed9a3bddfee349a8f25
4
+ data.tar.gz: 19b465b803e994d549ba2eaa5944d7ca4548fccbe98b54fa917c622fa25a0354
5
5
  SHA512:
6
- metadata.gz: e6a834c85d5dc3b36da43af8fef2d6a59b93917a8799a6847d4d513223418514595d4ae2eabd7c40e4d4d20b4e21ff8ec63ea5dddcd0e383c336fa2ca1859c2e
7
- data.tar.gz: 34275c248ee52297ade6271822b5a04a742bb170e3cb9e7edd6a2eb534b645f51daed349834454c792443fb49eac2b8c26c6d0957e1e9a757356bd1c18ddfb78
6
+ metadata.gz: cb66285e2b739e5cfbb7531785c21d14aa0568a2a96fa1f991d7ab84e19fbc305dd5f89939e88641d2a39fbcf1de07218693db49572141b8404e59f8cc32fa95
7
+ data.tar.gz: 5ddc4afc2a09a1cd4ee462d2dded97a919609ad117f16c612868ea25e27e43ca25cbdb4090a05ee1d5b4816a07331bd220537766cc37040afd82a64e6ae1f176
data/.rubocop.yml CHANGED
@@ -5,7 +5,6 @@ require:
5
5
 
6
6
  AllCops:
7
7
  NewCops: enable
8
- TargetRubyVersion: 2.6
9
8
  Exclude:
10
9
  - "test/fixtures/*"
11
10
 
data/README.md CHANGED
@@ -50,7 +50,7 @@ This differs from a file contents search (like grep) in that rbr understands Rub
50
50
  test/fixtures/book.rb:50: book.send(:great_method)
51
51
  ```
52
52
 
53
- - Find all statements that update an ActiveRecord model attribute named `title`.
53
+ - Find statements that update an ActiveRecord model attribute named `title`.
54
54
 
55
55
  ```sh
56
56
  $ rbr ar_update :title test/fixtures/book.rb
@@ -59,6 +59,16 @@ This differs from a file contents search (like grep) in that rbr understands Rub
59
59
  test/fixtures/book.rb:31: book.send(:update_column, :title, "Great Title")
60
60
  ```
61
61
 
62
+ Note that this matcher is necessarily incomplete. For example, a parser alone cannot find situations like the following.
63
+
64
+ ```ruby
65
+ def update_record(attrs)
66
+ record.update(attrs)
67
+ end
68
+
69
+ update_record(title: "Great Author")
70
+ ```
71
+
62
72
  ### rbr is the *wrong tool* for the following situations:
63
73
 
64
74
  - Find all appearance of "author" in a codebase.
data/TODO CHANGED
@@ -1 +1,5 @@
1
- not_str matcher
1
+ new matchers:
2
+ not string
3
+ raw SQL updates
4
+ text in an if/unless condition
5
+ symbol or string
data/lib/rbr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rbr
4
- VERSION = "0.3.3"
4
+ VERSION = "0.3.4"
5
5
  end
data/rbr.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  # Specify which files should be added to the gem when it is released.
24
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
25
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|LICENSE)/}) }
27
27
  end
28
28
  spec.bindir = "exe"
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eddie Lebow
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2024-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.2.3
116
+ rubygems_version: 3.5.3
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Semantically-aware code search tool for Ruby