metanorma-utils 1.4.2 → 1.4.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 +4 -4
 - data/lib/utils/image.rb +1 -1
 - data/lib/utils/version.rb +1 -1
 - data/spec/img_spec.rb +18 -0
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 38d5284e3547876d1ad2385d81d10dc9defa3e3669412c30b311fa2dd89857c4
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: e4bf71c720f096a107f2f22e075bb7391d2bdd844e020eb304ac4dc3c0323f29
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0a992b7f1f3980ee4e57b74cd272b743acd197061e382089edd8fd948e629f5e182f0d66b38848a1efe7c2195c2da5d0dcd790ada393fc3a1bca31dc11fb2a61
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d085748cc3ac46d3a85861c2533e9d361ece9b4cd4c7f2f18b860e9d19e09abb5c353e612bfadd7a897a59ac1690a77eb8fb611d286194f471b372df7952a53a
         
     | 
    
        data/lib/utils/image.rb
    CHANGED
    
    
    
        data/lib/utils/version.rb
    CHANGED
    
    
    
        data/spec/img_spec.rb
    CHANGED
    
    | 
         @@ -2,6 +2,24 @@ require "spec_helper" 
     | 
|
| 
       2 
2 
     | 
    
         
             
            require "fileutils"
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
            RSpec.describe Metanorma::Utils do
         
     | 
| 
      
 5 
     | 
    
         
            +
              it "recognises data uris" do
         
     | 
| 
      
 6 
     | 
    
         
            +
                expect(Metanorma::Utils.datauri?("data:img/gif,base64,ABBC"))
         
     | 
| 
      
 7 
     | 
    
         
            +
                  .to eq true
         
     | 
| 
      
 8 
     | 
    
         
            +
                expect(Metanorma::Utils.datauri?("data1:img/gif,base64,ABBC"))
         
     | 
| 
      
 9 
     | 
    
         
            +
                  .to eq false
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              it "recognises uris" do
         
     | 
| 
      
 13 
     | 
    
         
            +
                expect(Metanorma::Utils.url?("mailto://ABC"))
         
     | 
| 
      
 14 
     | 
    
         
            +
                  .to eq true
         
     | 
| 
      
 15 
     | 
    
         
            +
                expect(Metanorma::Utils.url?("http://ABC"))
         
     | 
| 
      
 16 
     | 
    
         
            +
                  .to eq true
         
     | 
| 
      
 17 
     | 
    
         
            +
                expect(Metanorma::Utils.url?("D:/ABC"))
         
     | 
| 
      
 18 
     | 
    
         
            +
                  .to eq false
         
     | 
| 
      
 19 
     | 
    
         
            +
                expect(Metanorma::Utils.url?("/ABC"))
         
     | 
| 
      
 20 
     | 
    
         
            +
                  .to eq false
         
     | 
| 
      
 21 
     | 
    
         
            +
              end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
       5 
23 
     | 
    
         
             
              it "rewrites SVGs" do
         
     | 
| 
       6 
24 
     | 
    
         
             
                FileUtils.cp("spec/fixtures/action_schemaexpg1.svg",
         
     | 
| 
       7 
25 
     | 
    
         
             
                             "action_schemaexpg1.svg")
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: metanorma-utils
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.4.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Ribose Inc.
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022-09- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-09-13 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: asciidoctor
         
     |