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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fd96e76cafc6a288cb5df13b2480059aa408abefab74c4fa10932d67d5f955f
4
- data.tar.gz: e4a96eb5322a6782fe3dc2983c59789f60226a61c6b79e7e88c3805137e1cf67
3
+ metadata.gz: 6fbe425b94572358cfdd552e9e3167739344b05bee8d7348744fc2a7402d670c
4
+ data.tar.gz: ab127357057f5ce2e23fd3a8625e19ef68f70d6328f6cdd6b76ef80e656a84b4
5
5
  SHA512:
6
- metadata.gz: 064f9537855fc01eeb0a584db2627518d6e49de21f6a057682ec18730afff08ea2abc8d1a61a5d47a812b442be711f6afca41c0cd88f381f7cd447ca8a7c03f4
7
- data.tar.gz: 04d6c3383940faccfb95696b77fa97eaf5483b1c3c9dd579b022d2d4018e23857c081dc66aae6f3626f47fc13e22486c3e5acaaedfd8d80be68cc073383466e3
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}}"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rfix (1.1.1.pre)
4
+ rfix (1.1.4.pre)
5
5
  cri (~> 2.15.10)
6
6
  listen (~> 3.0)
7
7
  rainbow (~> 3.0)
@@ -1,3 +1,5 @@
1
+ require_relative "base"
2
+
1
3
  module Rfix
2
4
  class Branch::Head < Branch::Base
3
5
  def resolve(with:)
@@ -1,4 +1,5 @@
1
1
  require "rugged"
2
+ require_relative "base"
2
3
 
3
4
  module Rfix
4
5
  class Branch::Main < Branch::Base
@@ -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}}}")
@@ -1,3 +1,5 @@
1
+ require_relative "base"
2
+
1
3
  module Rfix
2
4
  class Branch::Reference < Branch::Base
3
5
  attr_reader :reference
@@ -1,3 +1,5 @@
1
+ require_relative "base"
2
+
1
3
  module Rfix
2
4
  class Branch::Upstream < Branch::Base
3
5
  def resolve(with:)
@@ -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 = File.expand_path(File.join(__dir__, "../../.."))
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rfix
4
- VERSION = "1.1.1.pre"
4
+ VERSION = "1.1.4.pre"
5
5
  end
@@ -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
@@ -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
@@ -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
@@ -42,6 +42,10 @@ namespace :bundle do
42
42
 
43
43
  sh "git init"
44
44
  sh "git add .gitignore"
45
+
46
+ sh "git config user.email 'you@example.com'"
47
+ sh "git config user.name 'Your Name'"
48
+
45
49
  sh "git commit -m 'A Commit Message'"
46
50
 
47
51
  sh "git config push.default current"
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.1.pre
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