rfix 1.1.1.pre → 1.1.4.pre
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/.github/workflows/main.yml +38 -0
- data/Gemfile.lock +1 -1
- data/lib/rfix/branches/head.rb +2 -0
- data/lib/rfix/branches/main.rb +1 -0
- data/lib/rfix/branches/name.rb +3 -1
- data/lib/rfix/branches/reference.rb +2 -0
- data/lib/rfix/branches/upstream.rb +2 -0
- data/lib/rfix/rake/paths.rb +2 -2
- data/lib/rfix/version.rb +1 -1
- data/rfix.gemspec +2 -0
- data/tasks/execute.rake +38 -0
- data/tasks/libgit2.rake +33 -0
- data/tasks/simple.rake +4 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fbe425b94572358cfdd552e9e3167739344b05bee8d7348744fc2a7402d670c
|
4
|
+
data.tar.gz: ab127357057f5ce2e23fd3a8625e19ef68f70d6328f6cdd6b76ef80e656a84b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03d86c10e9160006bb3a0bedc1d04dffa975666105c229ac961d50452781f6cdb039b392b98566bc75c27f97f3afe0880e5b6a13c00c021d36b69813bd1567b
|
7
|
+
data.tar.gz: bb6237ef9601094acc513b17121ed7047c3dfa049835d562782a0f52ebea35e9b33001fd6939e105b0e2f9450c4d18295152b5f9ef1d486af98c30f673a92722
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
name: pre-release
|
3
|
+
on: [push]
|
4
|
+
env:
|
5
|
+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
6
|
+
GITHUB_API_TOKEN: ${{secrets.API_KEY}}
|
7
|
+
jobs:
|
8
|
+
setup:
|
9
|
+
container: ruby:2.7
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
|
14
|
+
- run: apt-get update -y
|
15
|
+
- run: apt-get install -y bash git libffi-dev build-essential wget cmake
|
16
|
+
|
17
|
+
- run: gem install bundler
|
18
|
+
- run: bundle config build.rugged --use-system-libraries
|
19
|
+
- run: bundle config build.ffi --use-system-libraries
|
20
|
+
- run: gem install rake rspec colorize
|
21
|
+
- run: rake libgit2:install
|
22
|
+
|
23
|
+
- run: bundle install --path vendor/bundle
|
24
|
+
- run: rake execute:local execute:origin execute:lint execute:branch
|
25
|
+
|
26
|
+
- run: git config user.email "linus@oleander.io"
|
27
|
+
- run: git config user.name "Linus Oleander"
|
28
|
+
|
29
|
+
- name: Publish to RubyGems
|
30
|
+
run: |
|
31
|
+
mkdir -p $HOME/.gem
|
32
|
+
touch $HOME/.gem/credentials
|
33
|
+
chmod 0600 $HOME/.gem/credentials
|
34
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
35
|
+
gem build *.gemspec
|
36
|
+
gem push *.gem
|
37
|
+
env:
|
38
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.RUBYGEMS_API_KEY}}"
|
data/Gemfile.lock
CHANGED
data/lib/rfix/branches/head.rb
CHANGED
data/lib/rfix/branches/main.rb
CHANGED
data/lib/rfix/branches/name.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative "base"
|
2
|
+
|
1
3
|
module Rfix
|
2
4
|
class Branch::Name < Branch::Base
|
3
5
|
attr_reader :name
|
@@ -10,7 +12,7 @@ module Rfix
|
|
10
12
|
unless branch = with.branches[name]
|
11
13
|
raise Branch::UnknownBranchError.new("Could not find branch {{error:#{name}}}")
|
12
14
|
end
|
13
|
-
|
15
|
+
|
14
16
|
with.lookup(with.merge_base(branch.target_id, with.head.target_id))
|
15
17
|
rescue Rugged::ReferenceError
|
16
18
|
raise Branch::UnknownBranchError.new("Could not find branch {{error:#{name}}}")
|
data/lib/rfix/rake/paths.rb
CHANGED
@@ -8,11 +8,11 @@ end
|
|
8
8
|
module Bundle
|
9
9
|
INSTALL = "bundle:install".freeze
|
10
10
|
ADD = "bundle:git:add".freeze
|
11
|
-
CONFIG = File.join(__dir__, "../../../.rubocop.yml")
|
12
11
|
TAG = "rally-point".freeze
|
13
12
|
REBUILD = "bundle:rebuild".freeze
|
14
13
|
BUILD = "bundle:build".freeze
|
15
|
-
ROOT =
|
14
|
+
ROOT = Dir.getwd
|
15
|
+
CONFIG = File.join(ROOT, ".rubocop.yml")
|
16
16
|
DIR = File.join(ROOT, "spec/fixtures")
|
17
17
|
TMP = File.join(ROOT, "tmp")
|
18
18
|
|
data/lib/rfix/version.rb
CHANGED
data/rfix.gemspec
CHANGED
@@ -11,6 +11,8 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
if ENV["TRAVIS"]
|
13
13
|
spec.version = "#{Rfix::VERSION}-#{ENV.fetch('TRAVIS_BUILD_NUMBER')}"
|
14
|
+
elseif ENV["GITHUB_RUN_ID"]
|
15
|
+
spec.version = "#{Rfix::VERSION}-#{ENV.fetch('GITHUB_RUN_ID')}"
|
14
16
|
else
|
15
17
|
# rubocop:disable Gemspec/DuplicatedAssignment
|
16
18
|
spec.version = Rfix::VERSION
|
data/tasks/execute.rake
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require "rake/clean"
|
2
|
+
require "tmpdir"
|
3
|
+
require "pathname"
|
4
|
+
|
5
|
+
repo_path = Pathname.new(Dir.mktmpdir)
|
6
|
+
|
7
|
+
CLEAN.include(repo_path)
|
8
|
+
|
9
|
+
namespace :execute do
|
10
|
+
task local: [repo_path, :install] do
|
11
|
+
chdir(repo_path) do
|
12
|
+
sh "rfix local"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
task branch: [repo_path, :install] do
|
17
|
+
chdir(repo_path) do
|
18
|
+
sh "rfix branch master"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
task origin: [repo_path, :install] do
|
23
|
+
chdir(repo_path) do
|
24
|
+
sh "rfix origin"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
task lint: [repo_path, :install] do
|
29
|
+
chdir(repo_path) do
|
30
|
+
sh "rfix lint"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
file repo_path => :rebuild do
|
35
|
+
sh "git clone spec/fixtures/complex.bundle #{repo_path} --branch master"
|
36
|
+
sh "git --work-tree=#{repo_path} branch --set-upstream-to origin/master"
|
37
|
+
end
|
38
|
+
end
|
data/tasks/libgit2.rake
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require "rake/clean"
|
2
|
+
require "tmpdir"
|
3
|
+
require "pathname"
|
4
|
+
|
5
|
+
root_path = Pathname.new(Dir.mktmpdir)
|
6
|
+
# root_path = Pathname.new(__dir__).join("../tmp")
|
7
|
+
libgit2_gz_path = root_path.join("v1.0.1.tar.gz")
|
8
|
+
libgit2_path = root_path.join("libgit2-1.0.1")
|
9
|
+
|
10
|
+
CLEAN.include(root_path)
|
11
|
+
|
12
|
+
namespace :libgit2 do
|
13
|
+
task build: libgit2_path do
|
14
|
+
chdir(libgit2_path) do
|
15
|
+
sh "cmake ."
|
16
|
+
sh "make"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
task install: :build do
|
21
|
+
chdir(libgit2_path) do
|
22
|
+
sh "make install"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
file libgit2_gz_path do
|
27
|
+
sh "wget -O #{libgit2_gz_path} https://github.com/libgit2/libgit2/archive/v1.0.1.tar.gz"
|
28
|
+
end
|
29
|
+
|
30
|
+
file libgit2_path => libgit2_gz_path do
|
31
|
+
sh "tar xzf #{libgit2_gz_path} -C #{root_path}"
|
32
|
+
end
|
33
|
+
end
|
data/tasks/simple.rake
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rfix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Linus Oleander
|
@@ -205,6 +205,7 @@ executables:
|
|
205
205
|
extensions: []
|
206
206
|
extra_rdoc_files: []
|
207
207
|
files:
|
208
|
+
- ".github/workflows/main.yml"
|
208
209
|
- ".gitignore"
|
209
210
|
- ".rspec"
|
210
211
|
- ".rubocop.yml"
|
@@ -289,6 +290,8 @@ files:
|
|
289
290
|
- tasks/bump.rake
|
290
291
|
- tasks/bundle.rake
|
291
292
|
- tasks/complex.rake
|
293
|
+
- tasks/execute.rake
|
294
|
+
- tasks/libgit2.rake
|
292
295
|
- tasks/simple.rake
|
293
296
|
- tasks/travis.rake
|
294
297
|
- tasks/vendor.rake
|