fontist 1.9.2 → 1.9.3

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: ec379d37ecb9239452d66b8aa021461c964bce56e6015eba86a15a1069300e49
4
- data.tar.gz: 2106b76aca75123fc12435cd2b248d0ac39054024cce87d715483e6f5550e2aa
3
+ metadata.gz: e2cce6f6f02c9c70f594e7b6084ac854a74b903f27b49252047e898d47137a1f
4
+ data.tar.gz: d9cb729ca432229c90bf2cb0da204cf0cc401f997e1cd915e853e240613e35ea
5
5
  SHA512:
6
- metadata.gz: 14a2206e5c36b7957189bf02ea96e3bf07c3912a9ea4439358fbec6a0b3505d8cc50ee17480fc1cd01f62b68b1a5435eaaf08575b4b96855e8860f78100d5acb
7
- data.tar.gz: c2253d10aff19bd03c620e019fab3027b1005bac46d27fa547e3746acc409a47f147333cfcd8385bddd4defeaac709a2cdc896889ad0bbb386ab18f417ca4691
6
+ metadata.gz: 6a5f1250db7da8b327716fcb1a22abf71c2ab3c57f58b4954efc82b2273f7e880c3d8519693925b13d3c3adf81fb5f261a912b13d95e69f0711b5716bd349d53
7
+ data.tar.gz: 293524c79e1be4ebbc8ef6db50a7de91e195d5921abd9e8fd1791597bfd80616bfe4d8d82eada54e71fcbdfaeab1baf6d72659e334111cf460b84c0d5193be1a
@@ -2,7 +2,7 @@ name: metanorma
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ main ]
5
+ branches: [ main, v1.9.x ]
6
6
  pull_request:
7
7
 
8
8
  jobs:
@@ -2,7 +2,7 @@ name: rspec
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ main ]
5
+ branches: [ main, v1.9.x ]
6
6
  pull_request:
7
7
 
8
8
  jobs:
@@ -1,7 +1,13 @@
1
1
  module Fontist
2
2
  class Update
3
+ BRANCH = "master".freeze
4
+
3
5
  def self.call
4
- new.call
6
+ new(BRANCH).call
7
+ end
8
+
9
+ def initialize(branch = "main")
10
+ @branch = branch
5
11
  end
6
12
 
7
13
  def call
@@ -17,13 +23,21 @@ module Fontist
17
23
  dir = File.dirname(Fontist.formulas_repo_path)
18
24
  FileUtils.mkdir_p(dir) unless File.exist?(dir)
19
25
 
20
- if Dir.exist?(Fontist.formulas_repo_path)
21
- Git.open(Fontist.formulas_repo_path).pull
22
- else
23
- Git.clone(Fontist.formulas_repo_url,
24
- Fontist.formulas_repo_path,
25
- depth: 1)
26
+ unless Dir.exist?(Fontist.formulas_repo_path)
27
+ return Git.clone(Fontist.formulas_repo_url,
28
+ Fontist.formulas_repo_path,
29
+ branch: @branch,
30
+ depth: 1)
26
31
  end
32
+
33
+ git = Git.open(Fontist.formulas_repo_path)
34
+ return git.pull("origin", @branch) if git.current_branch == @branch
35
+
36
+ git.config("remote.origin.fetch",
37
+ "+refs/heads/#{@branch}:refs/remotes/origin/#{@branch}")
38
+ git.fetch
39
+ git.checkout(@branch)
40
+ git.pull("origin", @branch)
27
41
  end
28
42
 
29
43
  def update_private_repos
@@ -1,3 +1,3 @@
1
1
  module Fontist
2
- VERSION = "1.9.2".freeze
2
+ VERSION = "1.9.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fontist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 1.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-03 00:00:00.000000000 Z
11
+ date: 2021-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: down