isobib 0.2.6 → 0.3.0
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 +4 -4
- data/Gemfile.lock +3 -3
- data/README.adoc +7 -0
- data/isobib.gemspec +1 -1
- data/lib/isobib/iso_bibliography.rb +1 -1
- data/lib/isobib/scrapper.rb +5 -3
- data/lib/isobib/version.rb +1 -1
- data/lib/relaton/processor.rb +2 -1
- metadata +4 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 42b9e332cc51cefe03ad7df9205e850e0c4dcbf944c9407858e9e8f6ddff7885
         | 
| 4 | 
            +
              data.tar.gz: 0dd1cbed8cfe1093e5f759f880096dbb05e90e7dd1cd3167807692eabf6f2b59
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 464dc9d088ca1d308ad010e7267b15d4833d79a171138a81fc6306b7dd0607f2fe1e2add27f16f58644037d2bd74e7d058d50956eef52295082f40ba759d28c7
         | 
| 7 | 
            +
              data.tar.gz: 05c60d9339d310fd5083988e476f71d78581451331e31c72738567cd1d1402d55737c6d1d67f36eb8e38e9b8449eb8ce3c32651b3319bbd9ddc8011ef2382d25
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,9 +1,9 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                isobib (0. | 
| 4 | 
            +
                isobib (0.3.0)
         | 
| 5 5 | 
             
                  algoliasearch
         | 
| 6 | 
            -
                  iso-bib-item (~> 0. | 
| 6 | 
            +
                  iso-bib-item (~> 0.3.0)
         | 
| 7 7 |  | 
| 8 8 | 
             
            GEM
         | 
| 9 9 | 
             
              remote: https://rubygems.org/
         | 
| @@ -18,7 +18,7 @@ GEM | |
| 18 18 | 
             
                equivalent-xml (0.6.0)
         | 
| 19 19 | 
             
                  nokogiri (>= 1.4.3)
         | 
| 20 20 | 
             
                httpclient (2.8.3)
         | 
| 21 | 
            -
                iso-bib-item (0. | 
| 21 | 
            +
                iso-bib-item (0.3.0)
         | 
| 22 22 | 
             
                  isoics (~> 0.1.6)
         | 
| 23 23 | 
             
                  nokogiri (~> 1.8.4)
         | 
| 24 24 | 
             
                  ruby_deep_clone (~> 0.8.0)
         | 
    
        data/README.adoc
    CHANGED
    
    | @@ -163,6 +163,13 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run | |
| 163 163 |  | 
| 164 164 | 
             
            To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
         | 
| 165 165 |  | 
| 166 | 
            +
             | 
| 167 | 
            +
            == Exceptional Citations
         | 
| 168 | 
            +
             | 
| 169 | 
            +
            This gem retrieves bibliographic descriptions of ISO documents by doing searches on the ISO website, http://www.iso.org, and screenscraping the document that matches the queried document identifier. The following documents are not returned as search results from the ISO website, and the gem returns manually generated references to them.
         | 
| 170 | 
            +
             | 
| 171 | 
            +
            * `IEV`: used in the metanorma-iso gem to reference Electropedia entries generically. Is resolved to an "all parts" reference to IEC 60050, which in turn is resolved into the specific documents cited by their top-level clause.
         | 
| 172 | 
            +
             | 
| 166 173 | 
             
            == Contributing
         | 
| 167 174 |  | 
| 168 175 | 
             
            Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/iso-bib-item.
         | 
    
        data/isobib.gemspec
    CHANGED
    
    
| @@ -83,7 +83,7 @@ module Isobib | |
| 83 83 | 
             
                      <bibitem type="international-standard" id="IEV">
         | 
| 84 84 | 
             
              <title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
         | 
| 85 85 | 
             
              <link type="src">http://www.electropedia.org</link>
         | 
| 86 | 
            -
              <docidentifier>#{code}</docidentifier>
         | 
| 86 | 
            +
              <docidentifier>#{code}:2011</docidentifier>
         | 
| 87 87 | 
             
              <date type="published"><on>2011</on></date>
         | 
| 88 88 | 
             
              <contributor>
         | 
| 89 89 | 
             
                <role type="publisher"/>
         | 
    
        data/lib/isobib/scrapper.rb
    CHANGED
    
    | @@ -193,9 +193,11 @@ module Isobib | |
| 193 193 | 
             
                  # @param doc [Nokogiri::HTML::Document]
         | 
| 194 194 | 
             
                  # @return [Hash]
         | 
| 195 195 | 
             
                  def fetch_docid(doc)
         | 
| 196 | 
            -
                    item_ref = doc.xpath("//strong[@id='itemReference']") | 
| 197 | 
            -
                       | 
| 198 | 
            -
                     | 
| 196 | 
            +
                    item_ref = doc.xpath("//strong[@id='itemReference']") or 
         | 
| 197 | 
            +
                      return { project_number: "?", part_number: "", prefix: nil, id: "?"}
         | 
| 198 | 
            +
                    m = item_ref.text.match(/^(.*?\d+)-?((?<=-)\d+|)/)
         | 
| 199 | 
            +
                    { project_number: m[1], part_number: m[2], prefix: nil, 
         | 
| 200 | 
            +
                      id: item_ref.text, type: "ISO" }
         | 
| 199 201 | 
             
                  end
         | 
| 200 202 |  | 
| 201 203 | 
             
                  # Fetch status.
         | 
    
        data/lib/isobib/version.rb
    CHANGED
    
    
    
        data/lib/relaton/processor.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: isobib
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.3.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: 2018-09- | 
| 11 | 
            +
            date: 2018-09-04 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -128,14 +128,14 @@ dependencies: | |
| 128 128 | 
             
                requirements:
         | 
| 129 129 | 
             
                - - "~>"
         | 
| 130 130 | 
             
                  - !ruby/object:Gem::Version
         | 
| 131 | 
            -
                    version: 0. | 
| 131 | 
            +
                    version: 0.3.0
         | 
| 132 132 | 
             
              type: :runtime
         | 
| 133 133 | 
             
              prerelease: false
         | 
| 134 134 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 135 135 | 
             
                requirements:
         | 
| 136 136 | 
             
                - - "~>"
         | 
| 137 137 | 
             
                  - !ruby/object:Gem::Version
         | 
| 138 | 
            -
                    version: 0. | 
| 138 | 
            +
                    version: 0.3.0
         | 
| 139 139 | 
             
            description: 'IsoBib: retrieve ISO Standards for bibliographic use using the BibliographicItem
         | 
| 140 140 | 
             
              model'
         | 
| 141 141 | 
             
            email:
         |