relaton-cen 1.14.1 → 1.16.0

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: 97f7e94eea61650c826d444f99d41dd11b0a506b9b5f26b552034db3c5790e69
4
- data.tar.gz: 6490ba9f131c3411b1c3b891a9fd7c9b254d6bfafcfc999d47c0405d53ad2eae
3
+ metadata.gz: b5f0cd6a09da357f5ca19fe9d38430f7880d9b9658ee89bbcdf56a7c081342f1
4
+ data.tar.gz: c3645683652f184f5d037de48065b3e31dc173e84230de6f00d1f253f607febf
5
5
  SHA512:
6
- metadata.gz: a6fd2c4264184ee2f48a305307234dc7a9d4ccdf8ad5d2073676dd2813868b40996069664231618a1ad791e91e7f715b3084e765746480584eab9cc4f8a42c0c
7
- data.tar.gz: 2fc22a3cbf50790f86fc567eb116344dc0a447f5a476fcc11eb3d61ab451e054efb92906aa46c594ea36d1825d7d146db793f51796d7b8e32c93335fcbb8cfb6
6
+ metadata.gz: 71f1f8971c40519883ead3fcd2a436a05c7d3826be5d1e1e3d3eae3e7d095a4b2c549228e918c18eff2df744fa4bd61297ec78a6c8481624b5106165aa7e8213
7
+ data.tar.gz: 13f632f4e026a41ebce994abbf3e9ca9505b51ecc551ed44bb325681427aae678305b7ed9b955db674dd6a8c3dc132971408060c51bf269262df33ad3b9f7248
@@ -5,6 +5,7 @@ name: rake
5
5
  on:
6
6
  push:
7
7
  branches: [ master, main ]
8
+ tags: [ v* ]
8
9
  pull_request:
9
10
 
10
11
  jobs:
@@ -7,7 +7,8 @@ on:
7
7
  inputs:
8
8
  next_version:
9
9
  description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
10
+ Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
11
+ Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
11
12
  required: true
12
13
  default: 'skip'
13
14
  repository_dispatch:
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /vendor/
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
data/README.adoc CHANGED
@@ -10,7 +10,7 @@ RelatonCen is a Ruby gem that implements the https://github.com/metanorma/metano
10
10
 
11
11
  == Installation
12
12
 
13
- Add this line to your application's Gemfile:
13
+ Add this line to your application's `Gemfile`:
14
14
 
15
15
  [source,ruby]
16
16
  ----
@@ -19,11 +19,17 @@ gem 'relaton-cen'
19
19
 
20
20
  And then execute:
21
21
 
22
- $ bundle install
22
+ [source,sh]
23
+ ----
24
+ $ bundle install
25
+ ----
23
26
 
24
27
  Or install it yourself as:
25
28
 
26
- $ gem install relaton-cen
29
+ [source,sh]
30
+ ----
31
+ $ gem install relaton-cen
32
+ ----
27
33
 
28
34
  == Usage
29
35
 
@@ -42,7 +48,22 @@ item = hit_collection[0].fetch
42
48
  ...
43
49
  ----
44
50
 
51
+ [source,ruby]
52
+ ----
53
+ > RelatonCen::CenBibliography.get "CEN/CLC Guide 6"
54
+ [relaton-cen] ("CEN/CLC Guide 6") fetching...
55
+ [isoics] code   not found in ICS list
56
+ [relaton-cen] ("CEN/CLC Guide 6") found CEN/CLC Guide 6:2014
57
+ =>
58
+ #<RelatonCen::BibliographicItem:0x000000011371cb90
59
+ @abstract=
60
+ [#<RelatonBib::FormattedString:0x000000011371c5f0
61
+ @content=
62
+ "ISO/IEC Guide 71:2014 provides guidance to standards..."
63
+ ----
64
+
45
65
  === XML serialization
66
+
46
67
  [source,ruby]
47
68
  ----
48
69
  item.to_xml
@@ -53,7 +74,9 @@ item.to_xml
53
74
  </bibitem>"
54
75
  ----
55
76
 
56
- With `bibdata: true` option XML output wrapped with `bibdata` element and `ext` element added.
77
+ With `bibdata: true` option XML output wrapped with `bibdata` element and `ext`
78
+ element added.
79
+
57
80
  [source,ruby]
58
81
  ----
59
82
  item.to_xml bibdata: true
@@ -79,6 +102,7 @@ item.link
79
102
  ----
80
103
 
81
104
  === Get code, and year
105
+
82
106
  [source,ruby]
83
107
  ----
84
108
  RelatonCen::CenBibliography.get "CEN ISO/TS 21003-7:2019"
@@ -95,6 +119,7 @@ RelatonCen::CenBibliography.get "CEN ISO/TS 21003-7", "2019"
95
119
  ----
96
120
 
97
121
  === Create bibliographic item form YAML
122
+
98
123
  [source,ruby]
99
124
  ----
100
125
  hash = YAML.load_file 'spec/fixtures/bibdata.yaml'
@@ -107,6 +132,7 @@ hash = YAML.load_file 'spec/fixtures/bibdata.yaml'
107
132
  ----
108
133
 
109
134
  === Create bibliographic item from XML
135
+
110
136
  [source,ruby]
111
137
  ----
112
138
  RelatonCen::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml", encoding: "UTF-8")
@@ -114,6 +140,7 @@ RelatonCen::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml", encoding:
114
140
  ...
115
141
  ----
116
142
 
143
+
117
144
  == Development
118
145
 
119
146
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/grammars/biblio.rng CHANGED
@@ -1283,7 +1283,7 @@
1283
1283
  <value>mergedInto</value>
1284
1284
  <value>splits</value>
1285
1285
  <value>splitInto</value>
1286
- <value>instance</value>
1286
+ <value>instanceOf</value>
1287
1287
  <value>hasInstance</value>
1288
1288
  <value>exemplarOf</value>
1289
1289
  <value>hasExemplar</value>
@@ -22,7 +22,7 @@ module RelatonCen
22
22
  search_page = agent.get "#{DOMAIN}f?p=205:105:0:::::"
23
23
  form = search_page.at "//form[@id='wwvFlowForm']"
24
24
  skip_inputs = %w[f11 essentialCookies]
25
- req_body = form.xpath(".//input").map do |f|
25
+ req_body = form.xpath(".//input").filter_map do |f|
26
26
  next if f[:name].empty? || skip_inputs.include?(f[:name])
27
27
 
28
28
  val = case f[:value]
@@ -39,7 +39,7 @@ module RelatonCen
39
39
  else
40
40
  "#{f[:name]}=#{val}"
41
41
  end
42
- end.compact.join("&")
42
+ end.join("&")
43
43
  resp = agent.post form[:action], req_body
44
44
  @array = hits resp
45
45
  sort
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonCen
4
- VERSION = "1.14.1"
4
+ VERSION = "1.16.0"
5
5
  end
data/relaton_cen.gemspec CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.require_paths = ["lib"]
33
33
 
34
34
  spec.add_dependency "mechanize", "~> 2.8.0"
35
- spec.add_dependency "relaton-iso-bib", "~> 1.14.0"
35
+ spec.add_dependency "relaton-iso-bib", "~> 1.16.0"
36
36
 
37
37
  # For more information and examples about making a new gem, checkout our
38
38
  # guide at: https://bundler.io/guides/creating_gem.html
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-cen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.1
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-20 00:00:00.000000000 Z
11
+ date: 2023-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.14.0
33
+ version: 1.16.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.14.0
40
+ version: 1.16.0
41
41
  description: 'RelatonCen: retrieve Cenelec Standards for bibliographic use using the
42
42
  IsoBibliographicItem model'
43
43
  email: