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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bdbce54e2c9a4776e5f86ca0a2b549d35e3be6d816afb83e3ac028af24b9756
4
- data.tar.gz: 5373306b3d9279ab924eede20362ea9ee9aea96f875a1b17f0bbc31d9cd936f4
3
+ metadata.gz: a8320bee3de062a2a2766b026cb4604a070bc335eb3a5caaec00da60ae1afe18
4
+ data.tar.gz: 859167265d4a159c42b659bb9d96aadfaf9169923c8df059154a34355c71a111
5
5
  SHA512:
6
- metadata.gz: 7467a015e62e23f710f0fe8e9e6e0a2a9e9216966cb9a57d2883d95ee000ae35087932624495e6a76569a849981f3523d62d4f4ae13776a5564b467f652f1216
7
- data.tar.gz: 4f0b0910be9ecf5767a65a99f730c609062b8bedda96759c7dc27d80f8c07035aa143e26938544feb5404c808927af1e101fc02fab27554fae77223354ba6ba3
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
- [![Build Status](https://travis-ci.org/gollum/rjgit_adapter.svg?branch=master)](https://travis-ci.org/gollum/rjgit_adapter)
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/#{name}-#{version}-java.gem"
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
@@ -1,7 +1,7 @@
1
1
  module Gollum
2
2
  module Lib
3
3
  module Git
4
- VERSION = '1.0'
4
+ VERSION = '1.1'
5
5
  end
6
6
  end
7
7
  end
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.0'
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: 2022-09-12 00:00:00.000000000 Z
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.2.29
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.