relaton-itu 1.7.3 → 1.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +46 -0
- data/README.adoc +23 -0
- data/lib/relaton_itu/editorial_group.rb +1 -1
- data/lib/relaton_itu/hash_converter.rb +2 -2
- data/lib/relaton_itu/hit.rb +2 -0
- data/lib/relaton_itu/hit_collection.rb +21 -9
- data/lib/relaton_itu/itu_bibliography.rb +12 -10
- data/lib/relaton_itu/itu_group.rb +1 -1
- data/lib/relaton_itu/scrapper.rb +26 -15
- data/lib/relaton_itu/version.rb +1 -1
- data/lib/relaton_itu/xml_parser.rb +1 -1
- data/relaton-itu.gemspec +2 -2
- metadata +3 -33
- data/.github/workflows/macos.yml +0 -34
- data/.github/workflows/ubuntu.yml +0 -33
- data/.github/workflows/windows.yml +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd478e1103e026b9ff40937a19dccc0166da6f839fc2fb216a59ac306b4958f1
|
4
|
+
data.tar.gz: 12bc7a7304aadb7ea91df2bc618b49ef1333ea58d577c760e9273c955fd5fd01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4ee1c7e0c5ff26729f598b744035e8ebbf285703f04da910a978d38f3e3a9dc44f9e76d4bc17e6257e443b953c5dd218526305bd95106af410ddbcc667db83f
|
7
|
+
data.tar.gz: b10b5dc734cfed86b6653e8d0f56257ac52a4e06718c30a9256897eecd11a03642ded7820cf7d9797d2c3c7731ccc093035b6e7a7ab4477b6787f120449ca494
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: rake
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master, main ]
|
8
|
+
tags: [ v* ]
|
9
|
+
pull_request:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
rake:
|
13
|
+
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
|
14
|
+
runs-on: ${{ matrix.os }}
|
15
|
+
continue-on-error: ${{ matrix.experimental }}
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
20
|
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
|
+
experimental: [ false ]
|
22
|
+
include:
|
23
|
+
- ruby: '3.0'
|
24
|
+
os: 'ubuntu-latest'
|
25
|
+
experimental: true
|
26
|
+
- ruby: '3.0'
|
27
|
+
os: 'windows-latest'
|
28
|
+
experimental: true
|
29
|
+
- ruby: '3.0'
|
30
|
+
os: 'macos-latest'
|
31
|
+
experimental: true
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
with:
|
35
|
+
submodules: true
|
36
|
+
|
37
|
+
# https://github.com/ruby-debug/debase/issues/89#issuecomment-686827382
|
38
|
+
- if: matrix.os == 'macos-latest' && matrix.ruby == '2.5'
|
39
|
+
run: echo BUNDLE_BUILD__DEBASE="--with-cflags=\"-Wno-error=implicit-function-declaration\"" >> $GITHUB_ENV
|
40
|
+
|
41
|
+
- uses: ruby/setup-ruby@v1
|
42
|
+
with:
|
43
|
+
ruby-version: ${{ matrix.ruby }}
|
44
|
+
bundler-cache: true
|
45
|
+
|
46
|
+
- run: bundle exec rake
|
data/README.adoc
CHANGED
@@ -97,6 +97,29 @@ RelatonItu::ItuBibliography.get "ITU-T G.989.2/Amd 1"
|
|
97
97
|
...
|
98
98
|
----
|
99
99
|
|
100
|
+
=== Get ITU-R documents
|
101
|
+
|
102
|
+
[source,ruby]
|
103
|
+
----
|
104
|
+
RelatonItu::ItuBibliography.get "ITU-R REC-BO.600-1"
|
105
|
+
[relaton-itu] ("ITU-R REC-BO.600-1") fetching...
|
106
|
+
[relaton-itu] ("ITU-R REC-BO.600-1") found R-REC-BO.600-1
|
107
|
+
=> #<RelatonItu::ItuBibliographicItem:0x007f84e9930498
|
108
|
+
...
|
109
|
+
----
|
110
|
+
|
111
|
+
=== Get ITU-R Radio Regulations (RR)
|
112
|
+
|
113
|
+
[source,ruby]
|
114
|
+
----
|
115
|
+
RelatonItu::ItuBibliography.get 'ITU-R RR (2020)'
|
116
|
+
[relaton-itu] ("ITU-R RR") fetching...
|
117
|
+
[relaton-itu] WARNING: invalid doctype: publication
|
118
|
+
[relaton-itu] ("ITU-R RR") found ITU-R RR
|
119
|
+
=> #<RelatonItu::ItuBibliographicItem:0x007fb4b55eb660
|
120
|
+
...
|
121
|
+
----
|
122
|
+
|
100
123
|
=== Create bibliographic item form YAML
|
101
124
|
[source,ruby]
|
102
125
|
----
|
@@ -20,7 +20,7 @@ module RelatonItu
|
|
20
20
|
warn "[relaton-itu] WARNING: invalid bureau: #{bureau}"
|
21
21
|
end
|
22
22
|
@bureau = bureau
|
23
|
-
@group = group.is_a?(Hash) ? ItuGroup.new(group) : group
|
23
|
+
@group = group.is_a?(Hash) ? ItuGroup.new(**group) : group
|
24
24
|
@subgroup = subgroup.is_a?(Hash) ? ItuGroup.new(subgroup) : subgroup
|
25
25
|
@workgroup = workgroup.is_a?(Hash) ? ItuGroup.new(workgroup) : workgroup
|
26
26
|
end
|
@@ -7,7 +7,7 @@ module RelatonItu
|
|
7
7
|
eg = ret[:editorialgroup]
|
8
8
|
return unless eg
|
9
9
|
|
10
|
-
ret[:editorialgroup] = EditorialGroup.new eg
|
10
|
+
ret[:editorialgroup] = EditorialGroup.new **eg
|
11
11
|
end
|
12
12
|
|
13
13
|
# @param ret [Hash]
|
@@ -15,7 +15,7 @@ module RelatonItu
|
|
15
15
|
return unless ret[:structuredidentifier]
|
16
16
|
|
17
17
|
ret[:structuredidentifier] = StructuredIdentifier.new(
|
18
|
-
ret[:structuredidentifier]
|
18
|
+
**ret[:structuredidentifier]
|
19
19
|
)
|
20
20
|
end
|
21
21
|
end
|
data/lib/relaton_itu/hit.rb
CHANGED
@@ -14,23 +14,35 @@ module RelatonItu
|
|
14
14
|
|
15
15
|
# @param ref [String]
|
16
16
|
# @param year [String]
|
17
|
-
def initialize(ref, year = nil)
|
17
|
+
def initialize(ref, year = nil) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
18
18
|
text = ref.sub /(?<=\.)Imp\s?(?=\d)/, ""
|
19
19
|
super text, year
|
20
20
|
@gi_imp = /\.Imp\d/.match?(ref)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
if ref.match? /^(ITU-T|ITU-R\sRR)/
|
22
|
+
uri = URI "#{DOMAIN}/net4/ITU-T/search/GlobalSearch/Search"
|
23
|
+
data = { json: params.to_json }
|
24
|
+
resp = Net::HTTP.post(uri, data.to_json,
|
25
|
+
"Content-Type" => "application/json")
|
26
|
+
@array = hits JSON.parse(resp.body)
|
27
|
+
elsif ref.match? /^ITU-R/
|
28
|
+
rf = ref.sub(/^ITU-R\s/, "").upcase
|
29
|
+
url = "https://raw.githubusercontent.com/relaton/relaton-data-itu-r/master/data/#{rf}.yaml"
|
30
|
+
hash = YAML.safe_load Net::HTTP.get(URI(url))
|
31
|
+
item_hash = HashConverter.hash_to_bib(hash)
|
32
|
+
item = ItuBibliographicItem.new **item_hash
|
33
|
+
hit = Hit.new({ url: url }, self)
|
34
|
+
hit.fetch = item
|
35
|
+
@array = [hit]
|
36
|
+
end
|
26
37
|
end
|
27
38
|
|
28
39
|
private
|
29
40
|
|
30
41
|
# @return [String]
|
31
42
|
def group
|
32
|
-
@group ||=
|
33
|
-
|
43
|
+
@group ||= case text
|
44
|
+
when %r{OB|Operational Bulletin}, %r{^ITU-R\sRR} then "Publications"
|
45
|
+
when %r{^ITU-T} then "Recommendations"
|
34
46
|
end
|
35
47
|
end
|
36
48
|
|
@@ -46,7 +58,7 @@ module RelatonItu
|
|
46
58
|
"ExactPhrase" => false,
|
47
59
|
"CollectionName" => "General",
|
48
60
|
"CollectionGroup" => group,
|
49
|
-
"Sector" =>
|
61
|
+
"Sector" => text.match(/(?<=^ITU-)\w/).to_s.downcase,
|
50
62
|
"Criterias" => [{
|
51
63
|
"Name" => "Search in",
|
52
64
|
"Criterias" => [
|
@@ -32,7 +32,7 @@ module RelatonItu
|
|
32
32
|
# @return [String] Relaton XML serialisation of reference
|
33
33
|
def get(code, year = nil, opts = {}) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
34
34
|
if year.nil?
|
35
|
-
/^(?<code1>[^\s]+\s[^\s]+)\s\(\d{2}\/(?<year1>\d+)\)$/ =~ code
|
35
|
+
/^(?<code1>[^\s]+\s[^\s]+)\s\((\d{2}\/)?(?<year1>\d+)\)$/ =~ code
|
36
36
|
unless code1.nil?
|
37
37
|
code = code1
|
38
38
|
year = year1
|
@@ -54,9 +54,11 @@ module RelatonItu
|
|
54
54
|
id = year ? "#{code}:#{year}" : code
|
55
55
|
warn "[relaton-itu] WARNING: no match found online for #{id}. "\
|
56
56
|
"The code must be exactly like it is on the standards website."
|
57
|
-
|
58
|
-
"
|
59
|
-
|
57
|
+
unless missed_years.empty?
|
58
|
+
warn "[relaton-itu] (There was no match for #{year}, though there were matches "\
|
59
|
+
"found for #{missed_years.join(', ')}.)"
|
60
|
+
end
|
61
|
+
if /\d-\d/.match? code
|
60
62
|
warn "[relaton-itu] The provided document part may not exist, or the document "\
|
61
63
|
"may no longer be published in parts."
|
62
64
|
else
|
@@ -82,6 +84,8 @@ module RelatonItu
|
|
82
84
|
result = search(code)
|
83
85
|
code1.sub! /(?<=\.)Imp(?=\d)/, "" if result.gi_imp
|
84
86
|
result.select do |i|
|
87
|
+
next true unless i.hit[:code]
|
88
|
+
|
85
89
|
%r{
|
86
90
|
^(?<pref2>ITU)?(-(?<type2>\w))?\s?(?<code2>[\S]+)
|
87
91
|
(\s\(((?<month2>\d{2})\/)?(?<year2>\d{4})\))?
|
@@ -94,8 +98,6 @@ module RelatonItu
|
|
94
98
|
(!year || year == year2) && (!month1 || month1 == month2) &&
|
95
99
|
corr1 == corr2 && (!coryear1 || coryear1 == coryear2) &&
|
96
100
|
buldate1 == buldate2 && (!cormonth1 || cormonth1 == cormonth2)
|
97
|
-
# i.hit[:code] &&
|
98
|
-
# i.hit[:code].match(docidrx).to_s == c
|
99
101
|
end
|
100
102
|
end
|
101
103
|
|
@@ -108,10 +110,10 @@ module RelatonItu
|
|
108
110
|
def isobib_results_filter(result, year)
|
109
111
|
missed_years = []
|
110
112
|
result.each do |r|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
113
|
+
if !year || /\((\d{2}\/)?(?<pyear>\d{4})\)/ =~ r.hit[:code]
|
114
|
+
ret = r.fetch
|
115
|
+
return { ret: ret } if ret
|
116
|
+
end
|
115
117
|
|
116
118
|
missed_years << pyear
|
117
119
|
end
|
data/lib/relaton_itu/scrapper.rb
CHANGED
@@ -31,6 +31,8 @@ module RelatonItu
|
|
31
31
|
# @return [Hash]
|
32
32
|
def parse_page(hit_data, imp = false)
|
33
33
|
url, doc = get_page hit_data[:url]
|
34
|
+
return unless doc
|
35
|
+
|
34
36
|
if imp
|
35
37
|
a = doc.at "//span[contains(@id, 'tab_ig_uc_rec')]/a"
|
36
38
|
return unless a
|
@@ -69,17 +71,19 @@ module RelatonItu
|
|
69
71
|
# Fetch abstracts.
|
70
72
|
# @param doc [Nokigiri::HTML::Document]
|
71
73
|
# @return [Array<Array>]
|
72
|
-
def fetch_abstract(doc)
|
74
|
+
def fetch_abstract(doc) # rubocop:disable Metrics/AbcSize
|
73
75
|
abstract_url = doc.at('//table/tr/td/span[contains(@id, "lbl_dms")]/div')
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
content = if abstract_url
|
77
|
+
url = abstract_url[:onclick].match(/https?[^']+/).to_s
|
78
|
+
d = Nokogiri::HTML Net::HTTP.get(URI(url)).encode(undef: :replace, replace: "")
|
79
|
+
d.css("p.MsoNormal").text.gsub(/\r\n/, "").squeeze(" ").gsub(/\u00a0/, "")
|
80
|
+
elsif a = doc.at('//table/tr/td/span[contains(@class, "observation")]/text()')
|
81
|
+
a.text.strip
|
82
|
+
end
|
83
|
+
return [] unless content
|
80
84
|
|
81
85
|
[{
|
82
|
-
content:
|
86
|
+
content: content,
|
83
87
|
language: "en",
|
84
88
|
script: "Latn",
|
85
89
|
}]
|
@@ -92,6 +96,8 @@ module RelatonItu
|
|
92
96
|
uri = URI url
|
93
97
|
resp = Net::HTTP.get_response(uri)
|
94
98
|
until resp.code == "200"
|
99
|
+
return if resp["location"] == "/en/publications/pages/notfound.aspx"
|
100
|
+
|
95
101
|
uri = URI resp["location"] if resp.code.match? /^30/
|
96
102
|
resp = Net::HTTP.get_response(uri)
|
97
103
|
end
|
@@ -117,13 +123,13 @@ module RelatonItu
|
|
117
123
|
docids
|
118
124
|
end
|
119
125
|
|
120
|
-
def createdocid(text)
|
126
|
+
def createdocid(text) # rubocop:disable Metrics/MethodLength
|
121
127
|
%r{
|
122
128
|
^(?<code>((ITU-\w|ISO\/IEC)\s)?[^\(:]+)
|
123
|
-
(\(((?<
|
129
|
+
(\(((?<_month>\d{2})\/)?(?<_year>\d{4})\))?
|
124
130
|
(:[^\(]+\((?<buldate>\d{2}\.\w{1,4}\.\d{4})\))?
|
125
131
|
(\s(?<corr>(Amd|Cor)\.\s?\d+))?
|
126
|
-
# (\s\(((?<
|
132
|
+
# (\s\(((?<_cormonth>\d{2})\/)?(?<_coryear>\d{4})\))?
|
127
133
|
}x =~ text.squeeze(" ")
|
128
134
|
corr&.sub! /\.\s?/, " "
|
129
135
|
id = [code.sub(/[[:space:]]$/, ""), corr].compact.join "/"
|
@@ -204,13 +210,15 @@ module RelatonItu
|
|
204
210
|
# Fetch dates
|
205
211
|
# @param doc [Nokogiri::HTML::Document]
|
206
212
|
# @return [Array<Hash>]
|
207
|
-
def fetch_dates(doc) # rubocop:disable Metrics/CyclomaticComplexity
|
213
|
+
def fetch_dates(doc) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
208
214
|
dates = []
|
209
215
|
date = doc.at("//table/tr/td/span[contains(@id, 'Label5')]",
|
210
216
|
"//p[contains(.,'Approved in')]")
|
211
217
|
pdate = date&.text&.match(/\d{4}-\d{2}-\d{2}/).to_s || ob_date(doc)
|
212
218
|
if pdate && !pdate&.empty?
|
213
219
|
dates << { type: "published", on: pdate }
|
220
|
+
elsif pdate = ob_date(doc)
|
221
|
+
dates << { type: "published", on: pdate }
|
214
222
|
end
|
215
223
|
dates
|
216
224
|
end
|
@@ -222,7 +230,7 @@ module RelatonItu
|
|
222
230
|
pdate = doc.at('//table/tbody/tr/td[contains(text(), "Year:")]')
|
223
231
|
return unless pdate
|
224
232
|
|
225
|
-
roman_to_arabic pdate.text.match(%r{(?<=Year: )\d{2}.\w
|
233
|
+
roman_to_arabic pdate.text.match(%r{(?<=Year: )(\d{2}.\w+.)?\d{4}}).to_s
|
226
234
|
end
|
227
235
|
|
228
236
|
# Convert roman month number in string date to arabic number
|
@@ -230,8 +238,11 @@ module RelatonItu
|
|
230
238
|
# @return [String]
|
231
239
|
def roman_to_arabic(date)
|
232
240
|
%r{(?<rmonth>[IVX]+)} =~ date
|
233
|
-
|
234
|
-
|
241
|
+
if ROMAN_MONTHS.index(rmonth)
|
242
|
+
month = ROMAN_MONTHS.index(rmonth) + 1
|
243
|
+
Date.parse(date.sub(%r{[IVX]+}, month.to_s)).to_s
|
244
|
+
else date
|
245
|
+
end
|
235
246
|
end
|
236
247
|
|
237
248
|
# Fetch contributors
|
data/lib/relaton_itu/version.rb
CHANGED
data/relaton-itu.gemspec
CHANGED
@@ -26,12 +26,12 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.require_paths = ["lib"]
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
28
28
|
|
29
|
-
spec.add_development_dependency "debase"
|
29
|
+
# spec.add_development_dependency "debase"
|
30
30
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
31
31
|
spec.add_development_dependency "pry-byebug"
|
32
32
|
spec.add_development_dependency "rake", "~> 10.0"
|
33
33
|
spec.add_development_dependency "rspec", "~> 3.0"
|
34
|
-
spec.add_development_dependency "ruby-debug-ide"
|
34
|
+
# spec.add_development_dependency "ruby-debug-ide"
|
35
35
|
spec.add_development_dependency "ruby-jing"
|
36
36
|
spec.add_development_dependency "simplecov"
|
37
37
|
spec.add_development_dependency "vcr", "~> 5.0.0"
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.4
|
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-
|
11
|
+
date: 2021-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: debase
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: equivalent-xml
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +66,6 @@ dependencies:
|
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '3.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: ruby-debug-ide
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
69
|
- !ruby/object:Gem::Dependency
|
98
70
|
name: ruby-jing
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,9 +144,7 @@ executables: []
|
|
172
144
|
extensions: []
|
173
145
|
extra_rdoc_files: []
|
174
146
|
files:
|
175
|
-
- ".github/workflows/
|
176
|
-
- ".github/workflows/ubuntu.yml"
|
177
|
-
- ".github/workflows/windows.yml"
|
147
|
+
- ".github/workflows/rake.yml"
|
178
148
|
- ".gitignore"
|
179
149
|
- ".rspec"
|
180
150
|
- ".rubocop.yml"
|
data/.github/workflows/macos.yml
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: macos
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
branches: [ '**' ]
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
test-macos:
|
13
|
-
name: Test on Ruby ${{ matrix.ruby }} macOS
|
14
|
-
runs-on: macos-latest
|
15
|
-
strategy:
|
16
|
-
fail-fast: false
|
17
|
-
matrix:
|
18
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
-
steps:
|
20
|
-
- uses: actions/checkout@master
|
21
|
-
- name: Use Ruby
|
22
|
-
uses: actions/setup-ruby@v1
|
23
|
-
with:
|
24
|
-
ruby-version: ${{ matrix.ruby }}
|
25
|
-
architecture: 'x64'
|
26
|
-
- name: Update gems
|
27
|
-
run: |
|
28
|
-
sudo gem install bundler --force
|
29
|
-
ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
|
30
|
-
ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
|
31
|
-
bundle install --jobs 4 --retry 3
|
32
|
-
- name: Run specs
|
33
|
-
run: |
|
34
|
-
bundle exec rake
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: ubuntu
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
branches: [ '**' ]
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
test-linux:
|
13
|
-
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
14
|
-
runs-on: ubuntu-latest
|
15
|
-
strategy:
|
16
|
-
fail-fast: false
|
17
|
-
matrix:
|
18
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
-
steps:
|
20
|
-
- uses: actions/checkout@master
|
21
|
-
- name: Use Ruby
|
22
|
-
uses: actions/setup-ruby@v1
|
23
|
-
with:
|
24
|
-
ruby-version: ${{ matrix.ruby }}
|
25
|
-
architecture: 'x64'
|
26
|
-
- name: Update gems
|
27
|
-
run: |
|
28
|
-
gem install bundler
|
29
|
-
bundle install --jobs 4 --retry 3
|
30
|
-
- name: Run specs
|
31
|
-
run: |
|
32
|
-
unset JAVA_TOOL_OPTIONS
|
33
|
-
bundle exec rake
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: windows
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
branches: [ '**' ]
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
test-windows:
|
13
|
-
name: Test on Ruby ${{ matrix.ruby }} Windows
|
14
|
-
runs-on: windows-latest
|
15
|
-
strategy:
|
16
|
-
fail-fast: false
|
17
|
-
matrix:
|
18
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
-
steps:
|
20
|
-
- uses: actions/checkout@master
|
21
|
-
- name: Use Ruby
|
22
|
-
uses: actions/setup-ruby@v1
|
23
|
-
with:
|
24
|
-
ruby-version: ${{ matrix.ruby }}
|
25
|
-
architecture: 'x64'
|
26
|
-
- name: Update gems
|
27
|
-
shell: pwsh
|
28
|
-
run: |
|
29
|
-
gem install bundler
|
30
|
-
bundle config --local path vendor/bundle
|
31
|
-
bundle update
|
32
|
-
bundle install --jobs 4 --retry 3
|
33
|
-
- name: Run specs
|
34
|
-
run: |
|
35
|
-
bundle exec rake
|