github_diff_parser 1.1.0 → 1.1.1
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/lib/github_diff_parser/diff.rb +5 -5
- data/lib/github_diff_parser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bbbd5c441839124ce3eeb13013dfc941bc6bfda629c3245b0a1bd635acfc0b6
|
4
|
+
data.tar.gz: 8e4432858065cdf8aeee7516d7cf220381ed312b801434f31ab80cb0cefe2e6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 419ac34a1e4ceb31c909fa1e5d17f886fb53cbc3d3024272de7eb9676e6f5c834315eec0c6066415282fc4da847a770364fe78d1f097000301618ef5f11f436a
|
7
|
+
data.tar.gz: a9272715bc0593ca15662852a7a83b1d2aad2619414ce975905ed424330719f9ef5a103c777b4d7b6c8f3615b43fc05b6e29f017b3e59679a7d605927bb45b08
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## Unreleased
|
8
8
|
|
9
|
+
## [1.1.1] - 2024-2-21
|
10
|
+
### Fixed
|
11
|
+
- `GithubDiffParser::Diff#new_mode?` and ``GithubDiffParser::Diff#deleted_mode?` would raise
|
12
|
+
an error with this kind of diff:
|
13
|
+
|
14
|
+
```diff
|
15
|
+
diff --git a/blabla.rb b/app/my_file.rb
|
16
|
+
similarity index 100%
|
17
|
+
rename from blabla.rb
|
18
|
+
rename to app/my_file.rb
|
19
|
+
```
|
20
|
+
|
9
21
|
## [1.1.0] - 2024-2-21
|
10
22
|
### Added
|
11
23
|
- Github Diff Parser parses the permissions bits and you now have have access to various method
|
data/Gemfile.lock
CHANGED
@@ -78,7 +78,7 @@ module GithubDiffParser
|
|
78
78
|
#
|
79
79
|
# @return [Boolean]
|
80
80
|
def deleted_mode?
|
81
|
-
@mode
|
81
|
+
@mode&.operation == "deleted"
|
82
82
|
end
|
83
83
|
|
84
84
|
# Check if this Diff is set to new mode.
|
@@ -94,7 +94,7 @@ module GithubDiffParser
|
|
94
94
|
#
|
95
95
|
# @return [Boolean]
|
96
96
|
def new_mode?
|
97
|
-
@mode
|
97
|
+
@mode&.operation == "new"
|
98
98
|
end
|
99
99
|
|
100
100
|
# Check if this Diff is set to rename mode.
|
@@ -112,17 +112,17 @@ module GithubDiffParser
|
|
112
112
|
|
113
113
|
# @return [Boolean] True if this diff applies to a regular file.
|
114
114
|
def normal_file?
|
115
|
-
@mode
|
115
|
+
@mode&.bits == "100644"
|
116
116
|
end
|
117
117
|
|
118
118
|
# @return [Boolean] True if this diff applies to an executable.
|
119
119
|
def executable?
|
120
|
-
@mode
|
120
|
+
@mode&.bits == "100755"
|
121
121
|
end
|
122
122
|
|
123
123
|
# @return [Boolean] True if this diff applies to a symlink.
|
124
124
|
def symlink?
|
125
|
-
@mode
|
125
|
+
@mode&.bits == "120000"
|
126
126
|
end
|
127
127
|
|
128
128
|
# @return [String] The source of the symlink
|