gollum-rjgit_adapter 1.0-java → 1.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/Rakefile +58 -2
- data/lib/rjgit_adapter/git_layer_rjgit.rb +8 -0
- data/lib/rjgit_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: a8320bee3de062a2a2766b026cb4604a070bc335eb3a5caaec00da60ae1afe18
|
4
|
+
data.tar.gz: 859167265d4a159c42b659bb9d96aadfaf9169923c8df059154a34355c71a111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7d23fa515e68a8bc97de2c893b7ab6a916025bdb10627db826b314be34d872629bd79304747294520d8ffd348e3e080c63df3b962b2b6790fc5e2adf50b42cb
|
7
|
+
data.tar.gz: 7e89aaf1c081f2532c949c84d6044450b0b375dceeb6d82942122070b47f6ceb293988bbf338b93d24e607e37e1e84d7136d4d4b1325b39ac068fdccdb9c30c5
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
gollum-lib_rjgit_adapter
|
2
2
|
========================
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/gollum-rjgit_adapter.svg)](http://badge.fury.io/rb/gollum-rjgit_adapter)
|
4
|
-
|
4
|
+
![Build Status](https://github.com/gollum/rjgit_adapter/actions/workflows/test.yml/badge.svg)
|
5
|
+
[![Cutting Edge Dependency Status](https://cuttingedge.onrender.com/github/gollum/rjgit_adapter/svg 'Cutting Edge Dependency Status')](https://cuttingedge.onrender.com/github/gollum/rjgit_adapter/info)
|
5
6
|
|
6
7
|
Adapter for Gollum to use [RJGit](https://github.com/repotag/rjgit) at the backend. The adapter requires using [JRuby](https://www.jruby.org/). This adapter is the default when your platform is JRuby, so you need only to `gem install gollum` and then use gollum normally.
|
data/Rakefile
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'date'
|
4
|
+
require 'tempfile'
|
2
5
|
|
3
6
|
task :default => :rspec
|
4
7
|
|
@@ -8,6 +11,18 @@ def name
|
|
8
11
|
"rjgit_adapter"
|
9
12
|
end
|
10
13
|
|
14
|
+
def date
|
15
|
+
Time.now.strftime("%Y-%m-%d")
|
16
|
+
end
|
17
|
+
|
18
|
+
def latest_changes_file
|
19
|
+
'LATEST_CHANGES.md'
|
20
|
+
end
|
21
|
+
|
22
|
+
def history_file
|
23
|
+
'HISTORY.md'
|
24
|
+
end
|
25
|
+
|
11
26
|
def version
|
12
27
|
line = File.read("lib/rjgit_adapter/version.rb")[/^\s*VERSION\s*=\s*.*/]
|
13
28
|
line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
|
@@ -72,12 +87,13 @@ task :release => :build do
|
|
72
87
|
puts "You must be on the master branch to release!"
|
73
88
|
exit!
|
74
89
|
end
|
90
|
+
Rake::Task[:changelog].execute
|
75
91
|
sh "git commit --allow-empty -a -m 'Release #{version}'"
|
76
92
|
sh "git pull --rebase origin master"
|
77
|
-
sh "git tag v#{version}"
|
93
|
+
sh "git tag v#{version} -m 'Release v#{version}'"
|
78
94
|
sh "git push origin master"
|
79
95
|
sh "git push origin v#{version}"
|
80
|
-
sh "gem push pkg/#{
|
96
|
+
sh "gem push pkg/#{gem_file}"
|
81
97
|
end
|
82
98
|
|
83
99
|
desc 'Publish to rubygems. Same as release'
|
@@ -123,4 +139,44 @@ task :validate do
|
|
123
139
|
puts "Directory `lib` should only contain a `#{name}.rb` file and `#{name}` dir."
|
124
140
|
exit!
|
125
141
|
end
|
142
|
+
end
|
143
|
+
|
144
|
+
desc 'Build changlog'
|
145
|
+
task :changelog do
|
146
|
+
[latest_changes_file, history_file].each do |f|
|
147
|
+
unless File.exist?(f)
|
148
|
+
puts "#{f} does not exist but is required to build a new release."
|
149
|
+
exit!
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
latest_changes = File.open(latest_changes_file)
|
154
|
+
version_pattern = "# #{version}"
|
155
|
+
|
156
|
+
if !`grep "#{version_pattern}" #{history_file}`.empty?
|
157
|
+
puts "#{version} is already described in #{history_file}"
|
158
|
+
exit!
|
159
|
+
end
|
160
|
+
|
161
|
+
begin
|
162
|
+
unless latest_changes.readline.chomp! =~ %r{#{version_pattern}}
|
163
|
+
puts "#{latest_changes_file} should begin with '#{version_pattern}'"
|
164
|
+
exit!
|
165
|
+
end
|
166
|
+
rescue EOFError
|
167
|
+
puts "#{latest_changes_file} is empty!"
|
168
|
+
exit!
|
169
|
+
end
|
170
|
+
|
171
|
+
body = latest_changes.read
|
172
|
+
body.scan(/\s*#\s+\d\.\d.*/) do |match|
|
173
|
+
puts "#{latest_changes_file} may not contain multiple markdown headers!"
|
174
|
+
exit!
|
175
|
+
end
|
176
|
+
|
177
|
+
temp = Tempfile.new
|
178
|
+
temp.puts("#{version_pattern} / #{date}\n#{body}\n\n")
|
179
|
+
temp.close
|
180
|
+
`cat #{history_file} >> #{temp.path}`
|
181
|
+
`cat #{temp.path} > #{history_file}`
|
126
182
|
end
|
@@ -188,6 +188,14 @@ module Gollum
|
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
191
|
+
def note(ref='refs/notes/commits')
|
192
|
+
result = @commit.note(ref)
|
193
|
+
result ? result.to_s : nil
|
194
|
+
end
|
195
|
+
|
196
|
+
def note=(msg, ref='refs/notes/commits')
|
197
|
+
@commit.send(:note=,msg,ref)
|
198
|
+
end
|
191
199
|
end
|
192
200
|
|
193
201
|
class Git
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum-rjgit_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Bart Kamphorst, Dawa Ometto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
|
-
rubygems_version: 3.
|
74
|
+
rubygems_version: 3.3.25
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Adapter for Gollum to use RJGit at the backend.
|