gollum-rugged_adapter 2.1.0 → 3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/lib/rugged_adapter/git_layer_rugged.rb +24 -6
- data/lib/rugged_adapter/version.rb +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: 5a7a4dc762df0ff1cb91195f8be624c1516945b5ed1d37271aa9791b609158cf
|
4
|
+
data.tar.gz: e167a14946f31bd07d751ae9dfb7bd5bf210beebb0cc69bf27d2179694c407bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c32be19c86ab9f0480ebf4786fcefa8ccf6b83af86a02127feaa130595203bc616ec08980bf8ea77d91d948300e2021942b5777cb5b4b627f00a51eb932d18f7
|
7
|
+
data.tar.gz: 737583e56222388d0a4657190636c2d37fb6a42ee2caa147c45b743949e27ebf45468671f9f99cd611360efb1624dcc883630248105619b8498ca83386e3ebff
|
data/Rakefile
CHANGED
@@ -90,7 +90,7 @@ task :release => :build do
|
|
90
90
|
Rake::Task[:changelog].execute
|
91
91
|
sh "git commit --allow-empty -a -m 'Release #{version}'"
|
92
92
|
sh "git pull --rebase origin master"
|
93
|
-
sh "git tag v#{version}"
|
93
|
+
sh "git tag v#{version} -m 'Release v#{version}'"
|
94
94
|
sh "git push origin master"
|
95
95
|
sh "git push origin v#{version}"
|
96
96
|
sh "gem push pkg/#{gem_file}"
|
@@ -179,4 +179,4 @@ task :changelog do
|
|
179
179
|
temp.close
|
180
180
|
`cat #{history_file} >> #{temp.path}`
|
181
181
|
`cat #{temp.path} > #{history_file}`
|
182
|
-
end
|
182
|
+
end
|
@@ -654,11 +654,7 @@ module Gollum
|
|
654
654
|
def lstree(sha, options = {})
|
655
655
|
results = []
|
656
656
|
@repo.lookup(sha).tree.walk(:postorder) do |root, entry|
|
657
|
-
|
658
|
-
entry[:mode] = entry[:filemode].to_s(8)
|
659
|
-
entry[:type] = entry[:type].to_s
|
660
|
-
entry[:path] = "#{root}#{entry[:name]}"
|
661
|
-
results << entry
|
657
|
+
results << ::Gollum::Git::Tree.tree_entry_from_rugged_hash(entry, root)
|
662
658
|
end
|
663
659
|
results
|
664
660
|
end
|
@@ -689,6 +685,16 @@ module Gollum
|
|
689
685
|
|
690
686
|
class Tree
|
691
687
|
|
688
|
+
def self.tree_entry_from_rugged_hash(entry, root = '')
|
689
|
+
{
|
690
|
+
sha: entry[:oid],
|
691
|
+
mode: entry[:filemode],
|
692
|
+
type: entry[:type].to_s,
|
693
|
+
name: entry[:name],
|
694
|
+
path: "#{root}#{entry[:name]}"
|
695
|
+
}
|
696
|
+
end
|
697
|
+
|
692
698
|
def initialize(tree)
|
693
699
|
@tree = tree
|
694
700
|
end
|
@@ -719,10 +725,22 @@ module Gollum
|
|
719
725
|
|
720
726
|
def blobs
|
721
727
|
blobs = []
|
722
|
-
@tree.each_blob {|blob| blobs <<
|
728
|
+
@tree.each_blob {|blob| blobs << blob_for_tree_entry(blob) }
|
723
729
|
blobs
|
724
730
|
end
|
725
731
|
|
732
|
+
def find_blob(&block)
|
733
|
+
return nil unless block_given?
|
734
|
+
blob = @tree.each_blob.find {|blob| yield blob[:name] }
|
735
|
+
blob ? blob_for_tree_entry(blob) : nil
|
736
|
+
end
|
737
|
+
|
738
|
+
private
|
739
|
+
|
740
|
+
def blob_for_tree_entry(blob)
|
741
|
+
Gollum::Git::Blob.new(@tree.owner.lookup(blob[:oid]), self.class.tree_entry_from_rugged_hash(blob))
|
742
|
+
end
|
743
|
+
|
726
744
|
end
|
727
745
|
|
728
746
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum-rugged_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '3.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bart Kamphorst, Dawa Ometto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
|
-
rubygems_version: 3.
|
89
|
+
rubygems_version: 3.2.3
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Adapter for Gollum to use Rugged (libgit2) at the backend.
|