preval 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +1 -1
- data/docs/server.rb +1 -1
- data/lib/preval/version.rb +1 -1
- data/lib/preval/visitors/attr_accessor.rb +7 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a68492a84d002ce1287b7494fdeb2f7da2c1bf40f9001830c189b012679fff82
|
4
|
+
data.tar.gz: ee652180924518b7c95ecc4dd3d1453ad05bc72b87f550c8921b765fc1b17418
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79755ecb9e6b832a030d31052ffac72eccf86620562b7e82ec1b0f16a0dd5a9009e89c4c219ebad42a03984e144fbce042bd603b269b6970cdaf847e5c2969f4
|
7
|
+
data.tar.gz: 974140ac97093237681db2d8369a9ef295001bc6135dd6802ab55f35888627dbd571c4935a2d8091d6d2a6db17136eb9b3e5e55c1ac379c5388ceffc7c0d9ac7
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.4.1] - 2019-04-20
|
10
|
+
### Changed
|
11
|
+
- Support `attr_writer` transformations even if there is a void statement at the beginning of the method.
|
12
|
+
|
9
13
|
## [0.4.0] - 2019-04-19
|
10
14
|
### Added
|
11
15
|
- Replace `def foo=(value); @foo = value; end` with `attr_writer :foo`
|
@@ -36,7 +40,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
36
40
|
### Added
|
37
41
|
- Initial release. 🎉
|
38
42
|
|
39
|
-
[Unreleased]: https://github.com/kddeisz/preval/compare/v0.4.
|
43
|
+
[Unreleased]: https://github.com/kddeisz/preval/compare/v0.4.1...HEAD
|
44
|
+
[0.4.1]: https://github.com/kddeisz/preval/compare/v0.4.0...v0.4.1
|
40
45
|
[0.4.0]: https://github.com/kddeisz/preval/compare/v0.3.0...v0.4.0
|
41
46
|
[0.3.0]: https://github.com/kddeisz/preval/compare/v0.2.0...v0.3.0
|
42
47
|
[0.2.0]: https://github.com/kddeisz/preval/compare/v0.1.0...v0.2.0
|
data/Gemfile.lock
CHANGED
data/docs/server.rb
CHANGED
data/lib/preval/version.rb
CHANGED
@@ -29,10 +29,13 @@ module Preval
|
|
29
29
|
# there is exactly one required param
|
30
30
|
node[1, 0].body[1..-1].none? &&
|
31
31
|
# there are no other params
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
(
|
33
|
+
node[2, 0].type_match?(:stmts_new, :assign) || (
|
34
|
+
node[2, 0, 0].type_match?(:stmts_new, :void_stmt) &&
|
35
|
+
node[2, 0].type_match?(:stmts_add, :assign)
|
36
|
+
)
|
37
|
+
) &&
|
38
|
+
# there is only one statement in the body and it's an assignment
|
36
39
|
node[2, 0, 1].type_match?(:var_field, :var_ref) &&
|
37
40
|
# assigning a variable
|
38
41
|
node[2, 0, 1, 0, 0].is?(:@ivar) &&
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: preval
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Deisz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|