isodoc 0.9.8 → 0.9.9

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: 76840b2da951a6a5c1ae745cf16f8a50c1c75d74519bc6e9b407847cc91276dd
4
- data.tar.gz: 20ee7aa9917bf072e8a8244fc2af47c5585d56394e4bcae5ec1b2d601cde30c5
3
+ metadata.gz: fd17ce9e2842e1e5407c0be58735af16398e4ab1a73d6cd93bfc5fb3d85039cc
4
+ data.tar.gz: 271c0ac77d8d5b4d87524b4905716ca01445921039b13758aea8e2279cc0f929
5
5
  SHA512:
6
- metadata.gz: ac3ba122ef2440b18487f6448f9a6e607180f8c461d339babb96178f318ce0e0483dbe87b55378c37f6a04cba48db824692d47feda0a2ccfd01ab53f092a3607
7
- data.tar.gz: 9f264b5c08e2d426a43b115bc8b217a132a15a1ff2bee2aa0cd07c84db4fdba2096b502f6632bdf339f9303cbe32808f4a9e23b3c8af8c6d5c5a8aabe615d1e9
6
+ metadata.gz: 06a8d496129ea43dc7ef263466801ff47710c824e6ca3cdc9d9038d8408febecb04672f851d1c7be187736813ea6ac92d5241d809e93577abc538bcd9c8f76a7
7
+ data.tar.gz: 0ec8c4fc83f1fe12dfe02f58b0f3e3f96d03ee616bc26ab8558f946e2db107e5aba7814cd426edafe79e100ba2a856db46b31487b1631e4b5be6efe0dea024ee
@@ -3,13 +3,8 @@
3
3
  # All project-specific additions and overrides should be specified in this file.
4
4
 
5
5
  inherit_from:
6
- # Thoughtbot's style guide from: https://github.com/thoughtbot/guides
7
- - ".rubocop.tb.yml"
8
- # Overrides from Ribose
9
- - ".rubocop.ribose.yml"
6
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
10
7
  AllCops:
11
- DisplayCopNames: false
12
- StyleGuideCopsOnly: false
13
- TargetRubyVersion: 2.4
8
+ TargetRubyVersion: 2.3
14
9
  Rails:
15
10
  Enabled: true
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- isodoc (0.9.8)
4
+ isodoc (0.9.9)
5
5
  asciimath
6
6
  html2doc (~> 0.8.6)
7
7
  htmlentities (~> 4.3.4)
@@ -62,7 +62,7 @@ GEM
62
62
  ruby_dep (~> 1.2)
63
63
  lumberjack (1.0.13)
64
64
  metanorma (0.3.0)
65
- method_source (0.9.1)
65
+ method_source (0.9.2)
66
66
  mime-types (3.2.2)
67
67
  mime-types-data (~> 3.2015)
68
68
  mime-types-data (3.2018.0812)
@@ -77,7 +77,7 @@ GEM
77
77
  parser (2.5.3.0)
78
78
  ast (~> 2.4.0)
79
79
  powerpack (0.1.2)
80
- pry (0.12.0)
80
+ pry (0.12.1)
81
81
  coderay (~> 1.1.0)
82
82
  method_source (~> 0.9.0)
83
83
  rainbow (3.0.0)
@@ -110,7 +110,7 @@ GEM
110
110
  ruby-progressbar (1.10.0)
111
111
  ruby-xslt (0.9.10)
112
112
  ruby_dep (1.5.0)
113
- sass (3.7.1)
113
+ sass (3.7.2)
114
114
  sass-listen (~> 4.0.0)
115
115
  sass-listen (4.0.0)
116
116
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -124,7 +124,7 @@ GEM
124
124
  json (>= 1.8, < 3)
125
125
  simplecov-html (~> 0.10.0)
126
126
  simplecov-html (0.10.2)
127
- thor (0.20.0)
127
+ thor (0.20.3)
128
128
  thread_safe (0.3.6)
129
129
  timecop (0.9.1)
130
130
  unicode-display_width (1.4.0)
@@ -106,11 +106,10 @@ module IsoDoc::Function
106
106
  h = h.to_s.gsub(%r{<br/>}, " ").sub(/<\/?h[12][^>]*>/, "")
107
107
  h1 = to_xhtml_fragment(h.dup)
108
108
  h1.traverse do |x|
109
+ x.replace(" ") if x.name == "span" && /mso-tab-count/.match(x["style"])
109
110
  x.remove if x.name == "span" && x["class"] == "MsoCommentReference"
110
111
  x.remove if x.name == "a" && x["epub:type"] == "footnote"
111
- if x.name == "a"
112
- x.replace(x.children)
113
- end
112
+ x.replace(x.children) if x.name == "a"
114
113
  end
115
114
  from_xhtml(h1)
116
115
  end
@@ -111,16 +111,6 @@ module IsoDoc
111
111
  set(:agency, agency.sub(%r{/$}, ""))
112
112
  end
113
113
 
114
- def docnumber(isoxml)
115
- docnumber = isoxml.at(ns("//bibdata/docidentifier/project-number"))
116
- partnumber = isoxml.at(ns("//bibdata/docidentifier/project-number/@part"))
117
- subpartnumber = isoxml.at(ns("//bibdata/docidentifier/project-number/@subpart"))
118
- dn = docnumber&.text || ""
119
- dn += "-#{partnumber.text}" if partnumber
120
- dn += "-#{subpartnumber.text}" if subpartnumber
121
- dn
122
- end
123
-
124
114
  def docstatus(isoxml, _out)
125
115
  docstatus = isoxml.at(ns("//bibdata/status"))
126
116
  if docstatus
@@ -133,12 +123,8 @@ module IsoDoc
133
123
  end
134
124
 
135
125
  def docid(isoxml, _out)
136
- dn = docnumber(isoxml)
137
- docstatus = get[:status]
138
- if docstatus && docstatus != "Published"
139
- dn = "#{dn} #{docstatus}"
140
- end
141
- set(:docnumber, dn)
126
+ dn = isoxml.at(ns("//bibdata/docidentifier"))
127
+ set(:docnumber, dn&.text)
142
128
  end
143
129
 
144
130
  def draftinfo(draft, revdate)
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "0.9.8".freeze
2
+ VERSION = "0.9.9".freeze
3
3
  end
@@ -12,10 +12,8 @@ RSpec.describe IsoDoc do
12
12
  <bibdata type="international-standard">
13
13
  <title>The Incredible Mr Ripley</title>
14
14
  <title language="en">Cereals and pulses</title>
15
- <docidentifier>
16
- <project-number part="1">17301</project-number>
17
- <tc-document-number>17301</tc-document-number>
18
- </docidentifier>
15
+ <docidentifier>17301-1</docidentifier>
16
+ <docnumber>17301</docnumber>
19
17
  <date type="published"><on>2011</on></date>
20
18
  <date type="accessed"><on>2012</on></date>
21
19
  <date type="created"><from>2010</from><to>2011</to></date>
@@ -57,7 +55,7 @@ RSpec.describe IsoDoc do
57
55
  </version>
58
56
  </iso-standard>
59
57
  INPUT
60
- {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :confirmeddate=>"XXX", :createddate=>"2010&ndash;2011", :docnumber=>"17301-1 Committee draft", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :status=>"Committee draft", :tc=>"TC 34", :updateddate=>"XXX", :wg=>"WG 3"}
58
+ {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :confirmeddate=>"XXX", :createddate=>"2010&ndash;2011", :docnumber=>"17301-1", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :status=>"Committee draft", :tc=>"TC 34", :updateddate=>"XXX", :wg=>"WG 3"}
61
59
  OUTPUT
62
60
  end
63
61
 
@@ -71,10 +69,8 @@ OUTPUT
71
69
  <bibdata type="international-standard">
72
70
  <title language="fr" format="text/plain">Céréales et légumineuses</ti>
73
71
  <title language="en" format="text/plain">Cereals and pulses</title>
74
- <docidentifier>
75
- <project-number part="1" subpart="3">17301</project-number>
76
- <tc-document-number>17301</tc-document-number>
77
- </docidentifier>
72
+ <docidentifier>17301-1-3</docidentifier>
73
+ <docnumber>17301</docnumber>
78
74
  <contributor>
79
75
  <role type="author"/>
80
76
  <organization>
@@ -370,8 +370,8 @@ Content-Location: file:///C:/Doc/test_files/header.html
370
370
  Content-Transfer-Encoding: base64
371
371
  Content-Type: text/html charset="utf-8"
372
372
 
373
- Ci8qIGFuIGVtcHR5IGhlYWRlciAqLwoKU1RBUlQgRE9DIElEOiAxMDAwLTE6IEVORCBET0MgSUQK
374
- CkZJTEVOQU1FOiB0ZXN0Cgo=
373
+ Ci8qIGFuIGVtcHR5IGhlYWRlciAqLwoKU1RBUlQgRE9DIElEOiAKICAgICAgICAgICAxMDAwCiAg
374
+ ICAgICAgIDogRU5EIERPQyBJRAoKRklMRU5BTUU6IHRlc3QKCg==
375
375
 
376
376
  OUTPUT
377
377
  end
@@ -406,7 +406,7 @@ CkZJTEVOQU1FOiB0ZXN0Cgo=
406
406
  <p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes">&#xA0;</span>TOC
407
407
  \o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
408
408
  <span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
409
- <a href="#_Toc">1.<span style="mso-tab-count:1">&#xA0; </span>Clause 4<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
409
+ <a href="#_Toc">1. Clause 4<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
410
410
  <span style="mso-tab-count:1 dotted">. </span>
411
411
  </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
412
412
  <span style="mso-element:field-begin"></span></span>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-08 00:00:00.000000000 Z
11
+ date: 2018-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath