rxfhelper 0.9.2 → 1.0.2
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rxfhelper.rb +77 -2
- metadata +53 -34
- metadata.gz.sig +0 -0
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b3c65e20595f63007371c48c8a6c3dec5da0224d339f072fcc31e9574d94493c
         | 
| 4 | 
            +
              data.tar.gz: 2f4b6e8820bf0513e1c248d1b866adc2be5b39f73abc5fa3ffa7c75efa91a4f4
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 6fa85e0747f6c5dc533fbeb6a1a02085ebd3e092bbdef74338cf0534bca854ba56d23e03bc4144eb5fb316a6a492bb9c4896288751425612cc1e0be26474958d
         | 
| 7 | 
            +
              data.tar.gz: 87eb2233f2c1b164082027e785589147897196ba3d35b930df5d708ac8f8a6149a3983c891ea58b5fbc76140084a1e70454b887029e377c2402426c30b5a12cf
         | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | Binary file | 
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        data/lib/rxfhelper.rb
    CHANGED
    
    | @@ -6,14 +6,37 @@ require 'rsc' | |
| 6 6 | 
             
            #require 'gpd-request'
         | 
| 7 7 | 
             
            require 'drb_fileclient'
         | 
| 8 8 | 
             
            require 'remote_dwsregistry'
         | 
| 9 | 
            +
            require 'drb_reg_client'
         | 
| 9 10 |  | 
| 10 11 |  | 
| 12 | 
            +
            # Setup: Add a local DNS entry called *reg.lookup* if you are planning on 
         | 
| 13 | 
            +
            #        using the Registry feaure to look up objects automatically.
         | 
| 14 | 
            +
             | 
| 11 15 | 
             
            module RXFHelperModule
         | 
| 12 16 |  | 
| 13 17 | 
             
              class FileX
         | 
| 14 18 |  | 
| 15 19 | 
             
                def self.chdir(s)  RXFHelper.chdir(s)   end
         | 
| 16 20 |  | 
| 21 | 
            +
                def self.directory?(filename)
         | 
| 22 | 
            +
                  
         | 
| 23 | 
            +
                  type = self.filetype(filename)
         | 
| 24 | 
            +
                  
         | 
| 25 | 
            +
                  filex = case type
         | 
| 26 | 
            +
                  when :file
         | 
| 27 | 
            +
                    File
         | 
| 28 | 
            +
                  when :dfs
         | 
| 29 | 
            +
                    DfsFile
         | 
| 30 | 
            +
                  else
         | 
| 31 | 
            +
                    nil
         | 
| 32 | 
            +
                  end
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                  return nil unless filex
         | 
| 35 | 
            +
                  
         | 
| 36 | 
            +
                  filex.directory? filename
         | 
| 37 | 
            +
                  
         | 
| 38 | 
            +
                end
         | 
| 39 | 
            +
                
         | 
| 17 40 | 
             
                def self.exists?(filename)
         | 
| 18 41 |  | 
| 19 42 | 
             
                  type = self.filetype(filename)
         | 
| @@ -98,6 +121,21 @@ class RXFHelper | |
| 98 121 |  | 
| 99 122 | 
             
              @fs = :local
         | 
| 100 123 |  | 
| 124 | 
            +
              def self.call(s)
         | 
| 125 | 
            +
                
         | 
| 126 | 
            +
                if s =~ /=/ then
         | 
| 127 | 
            +
                  
         | 
| 128 | 
            +
                  uri, val = s.split(/=/)
         | 
| 129 | 
            +
                  self.set uri, val
         | 
| 130 | 
            +
                  
         | 
| 131 | 
            +
                else
         | 
| 132 | 
            +
                  
         | 
| 133 | 
            +
                  self.get s
         | 
| 134 | 
            +
                  
         | 
| 135 | 
            +
                end
         | 
| 136 | 
            +
                
         | 
| 137 | 
            +
              end
         | 
| 138 | 
            +
              
         | 
| 101 139 | 
             
              def self.cp(s1, s2)
         | 
| 102 140 | 
             
                DfsFile.cp(s1, s2)
         | 
| 103 141 | 
             
              end
         | 
| @@ -119,7 +157,14 @@ class RXFHelper | |
| 119 157 | 
             
                raise RXFHelperException, 'nil found, expected a string' if x.nil?    
         | 
| 120 158 |  | 
| 121 159 | 
             
                if x[/^rse:\/\//] then
         | 
| 160 | 
            +
                  
         | 
| 122 161 | 
             
                  RSC.new.get x
         | 
| 162 | 
            +
                  
         | 
| 163 | 
            +
                elsif x[/^reg:\/\//] then
         | 
| 164 | 
            +
                    
         | 
| 165 | 
            +
                  r = DRbRegClient.new.get(x)
         | 
| 166 | 
            +
                  r.respond_to? :value ? r.value.to_s : r
         | 
| 167 | 
            +
                  
         | 
| 123 168 | 
             
                else
         | 
| 124 169 | 
             
                  [x, :unknown]
         | 
| 125 170 | 
             
                end
         | 
| @@ -165,7 +210,7 @@ class RXFHelper | |
| 165 210 | 
             
              def self.objectize(contents)
         | 
| 166 211 |  | 
| 167 212 | 
             
                doctype = contents.lines.first[/(?<=^<\?)\w+/]
         | 
| 168 | 
            -
                reg = RemoteDwsRegistry.new domain: 'reg', port: '9292'
         | 
| 213 | 
            +
                reg = RemoteDwsRegistry.new domain: 'reg.lookup', port: '9292'
         | 
| 169 214 | 
             
                r = reg.get_key 'hkey_gems/doctype/' + doctype
         | 
| 170 215 |  | 
| 171 216 | 
             
                return contents unless r
         | 
| @@ -223,12 +268,17 @@ class RXFHelper | |
| 223 268 |  | 
| 224 269 | 
             
                  elsif  x[/^dfs:\/\//] then
         | 
| 225 270 |  | 
| 226 | 
            -
                     | 
| 271 | 
            +
                    r = DfsFile.read(x)
         | 
| 272 | 
            +
                    [opt[:auto] ? objectize(r) : r, :dfs]        
         | 
| 227 273 |  | 
| 228 274 | 
             
                  elsif x[/^rse:\/\//] then
         | 
| 229 275 |  | 
| 230 276 | 
             
                     [RSC.new.get(x), :rse]
         | 
| 231 277 |  | 
| 278 | 
            +
                  elsif x[/^reg:\/\//] then
         | 
| 279 | 
            +
                    
         | 
| 280 | 
            +
                     [DRbRegClient.new.get(x).value.to_s, :reg]
         | 
| 281 | 
            +
                     
         | 
| 232 282 | 
             
                  elsif x[/^file:\/\//] or File.exists?(x) then
         | 
| 233 283 |  | 
| 234 284 | 
             
                    puts 'RXFHelper.read before File.read' if opt[:debug]
         | 
| @@ -270,6 +320,10 @@ class RXFHelper | |
| 270 320 | 
             
                when /^rse:\/\//
         | 
| 271 321 |  | 
| 272 322 | 
             
                  RSC.new.post(location, s)
         | 
| 323 | 
            +
             | 
| 324 | 
            +
                when /^reg:\/\//
         | 
| 325 | 
            +
                    
         | 
| 326 | 
            +
                  DRbRegClient.new.set(location, s)
         | 
| 273 327 |  | 
| 274 328 | 
             
                else
         | 
| 275 329 |  | 
| @@ -321,11 +375,32 @@ class RXFHelper | |
| 321 375 |  | 
| 322 376 | 
             
                if uri[/^rse:\/\//] then
         | 
| 323 377 | 
             
                  RSC.new.post uri, x
         | 
| 378 | 
            +
                  
         | 
| 379 | 
            +
                elsif uri[/^reg:\/\//]
         | 
| 380 | 
            +
                    
         | 
| 381 | 
            +
                  DRbRegClient.new.set(uri, x)      
         | 
| 324 382 | 
             
                else
         | 
| 325 383 | 
             
                  [uri, :unknown]
         | 
| 326 384 | 
             
                end
         | 
| 327 385 |  | 
| 328 386 | 
             
              end
         | 
| 387 | 
            +
              
         | 
| 388 | 
            +
              def self.set(uri, x=nil)   
         | 
| 389 | 
            +
             | 
| 390 | 
            +
                raise RXFHelperException, 'nil found, expected a string' if uri.nil?    
         | 
| 391 | 
            +
                puts 'uri: ' + uri.inspect
         | 
| 392 | 
            +
                      
         | 
| 393 | 
            +
                if uri[/^rse:\/\//] then
         | 
| 394 | 
            +
                  RSC.new.post uri, x
         | 
| 395 | 
            +
                  
         | 
| 396 | 
            +
                elsif uri[/^reg:\/\//]
         | 
| 397 | 
            +
                    
         | 
| 398 | 
            +
                  DRbRegClient.new.set(uri, x)      
         | 
| 399 | 
            +
                else
         | 
| 400 | 
            +
                  [uri, :unknown]
         | 
| 401 | 
            +
                end
         | 
| 402 | 
            +
             | 
| 403 | 
            +
              end  
         | 
| 329 404 |  | 
| 330 405 | 
             
              def self.zip(filename, a)
         | 
| 331 406 | 
             
                DfsFile.zip(filename, a)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rxfhelper
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 1.0.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - James Robertson
         | 
| @@ -11,31 +11,31 @@ cert_chain: | |
| 11 11 | 
             
            - |
         | 
| 12 12 | 
             
              -----BEGIN CERTIFICATE-----
         | 
| 13 13 | 
             
              MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
         | 
| 14 | 
            -
               | 
| 15 | 
            -
               | 
| 16 | 
            -
               | 
| 17 | 
            -
               | 
| 18 | 
            -
               | 
| 19 | 
            -
               | 
| 20 | 
            -
               | 
| 21 | 
            -
               | 
| 22 | 
            -
               | 
| 23 | 
            -
               | 
| 24 | 
            -
               | 
| 25 | 
            -
               | 
| 26 | 
            -
               | 
| 14 | 
            +
              YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjAwNjA4MjEzODA0WhcN
         | 
| 15 | 
            +
              MjEwNjA4MjEzODA0WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
         | 
| 16 | 
            +
              cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDWQmov
         | 
| 17 | 
            +
              AqYmuHk/CZu9teuGVYLNhzptyj60X8IkJoiHwxOJ6zZuZbABjPnugfUXSp6BWHZC
         | 
| 18 | 
            +
              V4oTccB75gyQj4Ll7seKsavlOyi5Ongnx9OQQF/OkHRh/h/NmXZDsoqCTit3rGWP
         | 
| 19 | 
            +
              8RvduvxRd75eGvDOh6SM5/1BN8TwffzBJ76oy4Ds3x/FbQM/1Q3PH2yadwlte3ms
         | 
| 20 | 
            +
              M/tOLGZcsTWGXQryxJ7b0tI6qlvZeeF0y9223iEi8lbc+2LTJsvueNdteskp/62/
         | 
| 21 | 
            +
              lyC8XKuH5rNsDcGYe0fLEToKt1ihm+h974HE2clgGBaHgyjqce8uajRfJ22Jv5Hw
         | 
| 22 | 
            +
              53QTFq0GkljEMBhCkdCCXBoCaAXxPtI1ddSspJwY/co0QLTkmW9D2pm11mdOYKH/
         | 
| 23 | 
            +
              pNNlfPCHBvPav/db0vWJFR9CzG9JF4OeuTM8GdD0YXJ9+36rw3+zKDzrqEr4R+B4
         | 
| 24 | 
            +
              Nqxn8ECkwgCYYrNoqOUqh+nglLwQcVRBkuFIh8HZLLqFeqD6VfqAXUWHti0CAwEA
         | 
| 25 | 
            +
              AaOBijCBhzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUYYjTrG21
         | 
| 26 | 
            +
              hWBRLARkj0MHpV5VMeAwJgYDVR0RBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
         | 
| 27 27 | 
             
              c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1hc3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
         | 
| 28 | 
            -
               | 
| 29 | 
            -
               | 
| 30 | 
            -
               | 
| 31 | 
            -
               | 
| 32 | 
            -
               | 
| 33 | 
            -
               | 
| 34 | 
            -
               | 
| 35 | 
            -
              + | 
| 36 | 
            -
               | 
| 28 | 
            +
              BgkqhkiG9w0BAQsFAAOCAYEAbFZxX9OnCmYMpYDx7687JBRHdse2aegPHz9ikdkq
         | 
| 29 | 
            +
              CY8aRsfKnomGy7tVz/Peb3o+CR7f4fZmxFL7H/eAx5clIaDnEYwoy9v5zEODp6rP
         | 
| 30 | 
            +
              l7pHGM+nOFZ8XBtuxobHeab20cmvWrsRhqU41+8TN5PTeiu+6YKzMIUDhquTLD4p
         | 
| 31 | 
            +
              7945EAFx5FR++oaAaQ8mvE1UaszulxRUYMD1fdhwmU0/MNyVmsxkA6Z73pnH5+9r
         | 
| 32 | 
            +
              vQg/xEWCISwNPDQ8QkREppd8R15YZoUK+McO0DKdJNKHvLeBpTAtzniHKhSJWIJs
         | 
| 33 | 
            +
              3Y7aVjx4ObmwUZSTacnTquQMf/TamZ/T0Ve4THAillF+cXFbXwmWGsoSQbAL7dnx
         | 
| 34 | 
            +
              qwgCPezsVLzI8dyGDAaKwdnIItN+vIp0EL3/bE1XUY1QwIKGbbI7inSO1Fs0IKFS
         | 
| 35 | 
            +
              jqz35QOVAJp+XW1qrnZM464OWlao2nDvKZrkO1pC9jbMUo+eLb8FgqycXd26ZpRf
         | 
| 36 | 
            +
              RXFUTIU85mvSCH+/CcNAooQi
         | 
| 37 37 | 
             
              -----END CERTIFICATE-----
         | 
| 38 | 
            -
            date:  | 
| 38 | 
            +
            date: 2020-08-28 00:00:00.000000000 Z
         | 
| 39 39 | 
             
            dependencies:
         | 
| 40 40 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 41 41 | 
             
              name: rsc
         | 
| @@ -46,7 +46,7 @@ dependencies: | |
| 46 46 | 
             
                    version: '0.4'
         | 
| 47 47 | 
             
                - - ">="
         | 
| 48 48 | 
             
                  - !ruby/object:Gem::Version
         | 
| 49 | 
            -
                    version: 0.4. | 
| 49 | 
            +
                    version: 0.4.4
         | 
| 50 50 | 
             
              type: :runtime
         | 
| 51 51 | 
             
              prerelease: false
         | 
| 52 52 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -56,27 +56,27 @@ dependencies: | |
| 56 56 | 
             
                    version: '0.4'
         | 
| 57 57 | 
             
                - - ">="
         | 
| 58 58 | 
             
                  - !ruby/object:Gem::Version
         | 
| 59 | 
            -
                    version: 0.4. | 
| 59 | 
            +
                    version: 0.4.4
         | 
| 60 60 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 61 61 | 
             
              name: drb_fileclient
         | 
| 62 62 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 63 63 | 
             
                requirements:
         | 
| 64 64 | 
             
                - - "~>"
         | 
| 65 65 | 
             
                  - !ruby/object:Gem::Version
         | 
| 66 | 
            -
                    version: '0. | 
| 66 | 
            +
                    version: '0.5'
         | 
| 67 67 | 
             
                - - ">="
         | 
| 68 68 | 
             
                  - !ruby/object:Gem::Version
         | 
| 69 | 
            -
                    version: 0. | 
| 69 | 
            +
                    version: 0.5.2
         | 
| 70 70 | 
             
              type: :runtime
         | 
| 71 71 | 
             
              prerelease: false
         | 
| 72 72 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 73 73 | 
             
                requirements:
         | 
| 74 74 | 
             
                - - "~>"
         | 
| 75 75 | 
             
                  - !ruby/object:Gem::Version
         | 
| 76 | 
            -
                    version: '0. | 
| 76 | 
            +
                    version: '0.5'
         | 
| 77 77 | 
             
                - - ">="
         | 
| 78 78 | 
             
                  - !ruby/object:Gem::Version
         | 
| 79 | 
            -
                    version: 0. | 
| 79 | 
            +
                    version: 0.5.2
         | 
| 80 80 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 81 81 | 
             
              name: remote_dwsregistry
         | 
| 82 82 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -86,7 +86,7 @@ dependencies: | |
| 86 86 | 
             
                    version: '0.4'
         | 
| 87 87 | 
             
                - - ">="
         | 
| 88 88 | 
             
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            -
                    version: 0.4. | 
| 89 | 
            +
                    version: 0.4.1
         | 
| 90 90 | 
             
              type: :runtime
         | 
| 91 91 | 
             
              prerelease: false
         | 
| 92 92 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -96,7 +96,27 @@ dependencies: | |
| 96 96 | 
             
                    version: '0.4'
         | 
| 97 97 | 
             
                - - ">="
         | 
| 98 98 | 
             
                  - !ruby/object:Gem::Version
         | 
| 99 | 
            -
                    version: 0.4. | 
| 99 | 
            +
                    version: 0.4.1
         | 
| 100 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 101 | 
            +
              name: drb_reg_client
         | 
| 102 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 103 | 
            +
                requirements:
         | 
| 104 | 
            +
                - - "~>"
         | 
| 105 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 106 | 
            +
                    version: '0.1'
         | 
| 107 | 
            +
                - - ">="
         | 
| 108 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 109 | 
            +
                    version: 0.1.4
         | 
| 110 | 
            +
              type: :runtime
         | 
| 111 | 
            +
              prerelease: false
         | 
| 112 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 113 | 
            +
                requirements:
         | 
| 114 | 
            +
                - - "~>"
         | 
| 115 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 116 | 
            +
                    version: '0.1'
         | 
| 117 | 
            +
                - - ">="
         | 
| 118 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 119 | 
            +
                    version: 0.1.4
         | 
| 100 120 | 
             
            description: 
         | 
| 101 121 | 
             
            email: james@jamesrobertson.eu
         | 
| 102 122 | 
             
            executables: []
         | 
| @@ -123,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 123 143 | 
             
                - !ruby/object:Gem::Version
         | 
| 124 144 | 
             
                  version: '0'
         | 
| 125 145 | 
             
            requirements: []
         | 
| 126 | 
            -
             | 
| 127 | 
            -
            rubygems_version: 2.7.6
         | 
| 146 | 
            +
            rubygems_version: 3.0.3
         | 
| 128 147 | 
             
            signing_key: 
         | 
| 129 148 | 
             
            specification_version: 4
         | 
| 130 149 | 
             
            summary: Helpful library for primarily reading the contents of a file either from
         | 
    
        metadata.gz.sig
    CHANGED
    
    | Binary file |