rjgit 5.8.1.0 → 5.12.0.0
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/Gemfile +1 -1
- data/README.md +1 -0
- data/lib/blob.rb +1 -1
- data/lib/git.rb +1 -0
- data/lib/java/jars/bcpg-jdk15on-168.jar +0 -0
- data/lib/java/jars/bcpkix-jdk15on-168.jar +0 -0
- data/lib/java/jars/bcprov-jdk15on-168.jar +0 -0
- data/lib/java/jars/{org.eclipse.jgit-5.8.1.202007141445-r.jar → org.eclipse.jgit-5.12.0.202106070339-r.jar} +0 -0
- data/lib/java/jars/org.eclipse.jgit.ssh.jsch-5.12.0.202106070339-r.jar +0 -0
- data/lib/rjgit.rb +29 -6
- data/lib/version.rb +1 -1
- metadata +11 -12
- data/lib/java/jars/bcpg-jdk15on-161.jar +0 -0
- data/lib/java/jars/bcpkix-jdk15on-161.jar +0 -0
- data/lib/java/jars/bcprov-jdk15on-161.jar +0 -0
- data/lib/java/jars/org.eclipse.jgit.ssh.jsch-5.8.0.202006091008-r.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54384e6f16f3ff592ec542112a76f27c471fc40c1771db2eb0ffb129083e78c7
|
4
|
+
data.tar.gz: 850d0074d269bd8b544c8b033a61aa7545b8034cf6348da5b6ba3e5ff9e3c859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c838a02a71b409b1e64b173b04d22076badc254f1cf73f7bcbd3594a897ef194879ec08015400fd832d49ab6be513d11a6074953552f40ed43dfa408a228d269
|
7
|
+
data.tar.gz: 3cf033bf925bc0c6c19cc9c776614be8b290127bd84495c9dd577e3247bcfccec8b33c36b210c18fe123a24c7f7a69928e7306a78e970703ee107b88f62f29a1
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -6,6 +6,7 @@ RJGit
|
|
6
6
|
[](https://travis-ci.org/repotag/rjgit)
|
7
7
|
[](https://coveralls.io/r/repotag/rjgit)
|
8
8
|
[](http://badge.fury.io/rb/rjgit)
|
9
|
+
[](https://dometto-cuttingedge.herokuapp.com/github/repotag/rjgit/info)
|
9
10
|
|
10
11
|
Summary
|
11
12
|
-------
|
data/lib/blob.rb
CHANGED
data/lib/git.rb
CHANGED
@@ -185,6 +185,7 @@ module RJGit
|
|
185
185
|
if (SSH_TRANSPORTS.include? transport_protocol.to_s) || (options[:transport_protocol] == :ssh) || options[:private_key_file]
|
186
186
|
command.set_transport_config_callback(RJGitSSHConfigCallback.new(options))
|
187
187
|
elsif (HTTP_TRANSPORTS.include? transport_protocol.to_s) || options[:username]
|
188
|
+
options[:password] = '' unless options[:password]
|
188
189
|
command.set_credentials_provider(UsernamePasswordCredentialsProvider.new(options[:username], options[:password]))
|
189
190
|
end
|
190
191
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/rjgit.rb
CHANGED
@@ -56,10 +56,11 @@ module RJGit
|
|
56
56
|
|
57
57
|
# http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg00558.html
|
58
58
|
def self.cat_file(repository, blob)
|
59
|
+
mode = blob.mode if blob.respond_to?(:mode)
|
59
60
|
jrepo = RJGit.repository_type(repository)
|
60
61
|
jblob = RJGit.blob_type(blob)
|
61
62
|
# Try to resolve symlinks; return nil otherwise
|
62
|
-
mode
|
63
|
+
mode ||= RJGit.get_file_mode(jrepo, jblob)
|
63
64
|
if mode == SYMLINK_TYPE
|
64
65
|
symlink_source = jrepo.open(jblob.id).get_bytes.to_a.pack('c*').force_encoding('UTF-8')
|
65
66
|
blob = Blob.find_blob(jrepo, symlink_source)
|
@@ -209,15 +210,37 @@ module RJGit
|
|
209
210
|
|
210
211
|
query = Regexp.new(query.source, query.options | Regexp::IGNORECASE) if case_insensitive
|
211
212
|
|
212
|
-
|
213
|
-
|
214
|
-
|
213
|
+
# We optimize below by first grepping the entire file, and then, if a match is found, then identifying the individual line.
|
214
|
+
# To avoid missing full-line matches during the optimization, we first convert multiline anchors to single-line anchors.
|
215
|
+
query = Regexp.new(query.source.gsub(/\A\\A/, '^').gsub(/\\z\z/, '$'), query.options)
|
215
216
|
|
216
|
-
|
217
|
+
ref = options.fetch(:ref, 'HEAD')
|
218
|
+
files_to_scan = ls_tree(repo, nil, ref, ls_tree_options)
|
219
|
+
|
220
|
+
files_to_scan.each_with_object({}) do |file, result|
|
221
|
+
id = if file[:mode] == SYMLINK_TYPE
|
222
|
+
symlink_source = repo.open(ObjectId.from_string(file[:id])).get_bytes.to_a.pack('c*').force_encoding('UTF-8')
|
223
|
+
unless symlink_source[File::SEPARATOR]
|
224
|
+
dir = file[:path].split(File::SEPARATOR)
|
225
|
+
dir[-1] = symlink_source
|
226
|
+
symlink_source = File.join(dir)
|
227
|
+
end
|
228
|
+
Blob.find_blob(repo, symlink_source, ref).jblob.id
|
229
|
+
else
|
230
|
+
ObjectId.from_string(file[:id])
|
231
|
+
end
|
232
|
+
bytes = repo.open(id).get_bytes
|
233
|
+
|
234
|
+
next if RawText.is_binary(bytes)
|
235
|
+
|
236
|
+
file_contents = bytes.to_s
|
237
|
+
next unless query.match(file_contents)
|
238
|
+
|
239
|
+
rows = file_contents.split("\n")
|
217
240
|
data = rows.grep(query)
|
218
241
|
next if data.empty?
|
219
242
|
|
220
|
-
result[
|
243
|
+
result[file[:path]] = data
|
221
244
|
end
|
222
245
|
end
|
223
246
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rjgit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.12.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maarten Engelen
|
@@ -12,22 +12,22 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2021-08-30 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
20
|
- - "~>"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '3.3'
|
23
23
|
name: mime-types
|
24
|
-
prerelease: false
|
25
24
|
type: :runtime
|
25
|
+
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: '
|
30
|
+
version: '3.3'
|
31
31
|
description: JRuby wrapper around the JGit library for manipulating git repositories
|
32
32
|
in code.
|
33
33
|
email: repotag-dev@googlegroups.com
|
@@ -45,12 +45,12 @@ files:
|
|
45
45
|
- lib/config.rb
|
46
46
|
- lib/constants.rb
|
47
47
|
- lib/git.rb
|
48
|
-
- lib/java/jars/bcpg-jdk15on-
|
49
|
-
- lib/java/jars/bcpkix-jdk15on-
|
50
|
-
- lib/java/jars/bcprov-jdk15on-
|
48
|
+
- lib/java/jars/bcpg-jdk15on-168.jar
|
49
|
+
- lib/java/jars/bcpkix-jdk15on-168.jar
|
50
|
+
- lib/java/jars/bcprov-jdk15on-168.jar
|
51
51
|
- lib/java/jars/jsch-0.1.54.jar
|
52
|
-
- lib/java/jars/org.eclipse.jgit-5.
|
53
|
-
- lib/java/jars/org.eclipse.jgit.ssh.jsch-5.
|
52
|
+
- lib/java/jars/org.eclipse.jgit-5.12.0.202106070339-r.jar
|
53
|
+
- lib/java/jars/org.eclipse.jgit.ssh.jsch-5.12.0.202106070339-r.jar
|
54
54
|
- lib/java/jars/slf4j-api-1.7.2.jar
|
55
55
|
- lib/java/jars/slf4j-simple-1.7.12.jar
|
56
56
|
- lib/repo.rb
|
@@ -81,8 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
|
-
|
85
|
-
rubygems_version: 2.6.13
|
84
|
+
rubygems_version: 3.0.9
|
86
85
|
signing_key:
|
87
86
|
specification_version: 4
|
88
87
|
summary: JRuby wrapper around the JGit library.
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|