rbr 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -1
- data/README.md +11 -1
- data/TODO +5 -1
- data/lib/rbr/version.rb +1 -1
- data/rbr.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c0e7a109d2816ccffdfaae67030e2b2fdf05ec174f4eed9a3bddfee349a8f25
|
4
|
+
data.tar.gz: 19b465b803e994d549ba2eaa5944d7ca4548fccbe98b54fa917c622fa25a0354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb66285e2b739e5cfbb7531785c21d14aa0568a2a96fa1f991d7ab84e19fbc305dd5f89939e88641d2a39fbcf1de07218693db49572141b8404e59f8cc32fa95
|
7
|
+
data.tar.gz: 5ddc4afc2a09a1cd4ee462d2dded97a919609ad117f16c612868ea25e27e43ca25cbdb4090a05ee1d5b4816a07331bd220537766cc37040afd82a64e6ae1f176
|
data/.rubocop.yml
CHANGED
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
|
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
data/lib/rbr/version.rb
CHANGED
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.
|
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:
|
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.
|
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
|