path_expander 1.0.2 → 1.0.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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +6 -0
- data/lib/path_expander.rb +3 -2
- data/test/test_path_expander.rb +7 -0
- metadata +13 -14
- metadata.gz.sig +0 -0
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 2 | 
            +
            SHA256:
         | 
| 3 | 
            +
              metadata.gz: 4ec7c57457d6cf828c608a367e073b7c689c15c5dbc3808621fc57ff53431d08
         | 
| 4 | 
            +
              data.tar.gz: 829d40e46dc078546f0bf00dde8e40f2c1df6b22535882a9e64863fe684a4077
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 263d65b97f69b4f586888532cc374659889bb707c6ca2502c6cef9e8f5f446c6d3023b2a7930689a34a416e47ab7aa11c482f4ba2c0d66aebd66f9fabad4e7f2
         | 
| 7 | 
            +
              data.tar.gz: 60f9b4ef1107c2d61f646c72635e09f7f46032aed00c5110852d23ce6b026d6e52ae3ed464a639c1855339c6ca9b6e97202951a0e454198dd0de0f7813f59be9
         | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | Binary file | 
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        data/History.rdoc
    CHANGED
    
    
    
        data/lib/path_expander.rb
    CHANGED
    
    | @@ -13,7 +13,7 @@ | |
| 13 13 | 
             
            # PathExpander.
         | 
| 14 14 |  | 
| 15 15 | 
             
            class PathExpander
         | 
| 16 | 
            -
              VERSION = "1.0. | 
| 16 | 
            +
              VERSION = "1.0.3" # :nodoc:
         | 
| 17 17 |  | 
| 18 18 | 
             
              ##
         | 
| 19 19 | 
             
              # The args array to process.
         | 
| @@ -88,7 +88,8 @@ class PathExpander | |
| 88 88 | 
             
                      flags << arg
         | 
| 89 89 | 
             
                    end
         | 
| 90 90 | 
             
                  else
         | 
| 91 | 
            -
                     | 
| 91 | 
            +
                    root_path = File.expand_path(arg) == "/" # eg: -n /./
         | 
| 92 | 
            +
                    if File.exist? arg and not root_path then
         | 
| 92 93 | 
             
                      pos_files += expand_dirs_to_files(arg)
         | 
| 93 94 | 
             
                    else
         | 
| 94 95 | 
             
                      flags << arg
         | 
    
        data/test/test_path_expander.rb
    CHANGED
    
    | @@ -142,6 +142,13 @@ class TestPathExpander < Minitest::Test | |
| 142 142 | 
             
                                    "42")
         | 
| 143 143 | 
             
              end
         | 
| 144 144 |  | 
| 145 | 
            +
              def test_process_args_root
         | 
| 146 | 
            +
                assert_process_args(%w[],
         | 
| 147 | 
            +
                                    %w[-n /./],
         | 
| 148 | 
            +
                                    "-n",
         | 
| 149 | 
            +
                                    "/./")
         | 
| 150 | 
            +
              end
         | 
| 151 | 
            +
             | 
| 145 152 | 
             
              def test_process_flags
         | 
| 146 153 | 
             
                exp = %w[a b c]
         | 
| 147 154 | 
             
                act = expander.process_flags %w[a b c]
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: path_expander
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Ryan Davis
         | 
| @@ -10,9 +10,9 @@ bindir: bin | |
| 10 10 | 
             
            cert_chain:
         | 
| 11 11 | 
             
            - |
         | 
| 12 12 | 
             
              -----BEGIN CERTIFICATE-----
         | 
| 13 | 
            -
               | 
| 13 | 
            +
              MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
         | 
| 14 14 | 
             
              ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
         | 
| 15 | 
            -
               | 
| 15 | 
            +
              GRYDY29tMB4XDTE3MTEyMTIxMTExMFoXDTE4MTEyMTIxMTExMFowRTETMBEGA1UE
         | 
| 16 16 | 
             
              AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
         | 
| 17 17 | 
             
              JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
         | 
| 18 18 | 
             
              b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
         | 
| @@ -20,17 +20,16 @@ cert_chain: | |
| 20 20 | 
             
              oOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh
         | 
| 21 21 | 
             
              GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
         | 
| 22 22 | 
             
              qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
         | 
| 23 | 
            -
              gBEfoTEGr7Zii72cx+ | 
| 24 | 
            -
               | 
| 25 | 
            -
               | 
| 26 | 
            -
               | 
| 27 | 
            -
               | 
| 28 | 
            -
               | 
| 29 | 
            -
               | 
| 30 | 
            -
               | 
| 31 | 
            -
              fO6tdKQc/5RfA8oQEkg8hrxA5PQSz4TOFJGLpFvIapEk6tMruQ0bHgkhr9auXg==
         | 
| 23 | 
            +
              gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
         | 
| 24 | 
            +
              HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
         | 
| 25 | 
            +
              AQAfAXSQpsW7YSxd1csRtA/M4Zt0AMXFMd76GJ8Lgtg8G0+VFbdChRyDuDb0kPlW
         | 
| 26 | 
            +
              h9QQX/YABfCW8vxmssbMGrP+VGBAn7BbdTcfTlgCWrvMX1uL5aRL74nA4urKXqdW
         | 
| 27 | 
            +
              a0nP70K4958P3GffBdtE3KGkU5xstFnXGajxuBRnL66E15KU0BNehVxdG258bdPu
         | 
| 28 | 
            +
              EKN6MqBPftFiev3tuwqDV11r2GquDpniYcT+Mi8/PgeAgVT/afBeVgbB3KaZeTRR
         | 
| 29 | 
            +
              AhXhF6Wi2GTMezlj5jlI5XV7WsJUSwTp/YiVvcmT74ZaCRvexm6EnNhkrvJJ1Xeu
         | 
| 30 | 
            +
              V+HB+LYYhXWitInO/eXxDrFB
         | 
| 32 31 | 
             
              -----END CERTIFICATE-----
         | 
| 33 | 
            -
            date:  | 
| 32 | 
            +
            date: 2018-03-16 00:00:00.000000000 Z
         | 
| 34 33 | 
             
            dependencies:
         | 
| 35 34 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 36 35 | 
             
              name: rdoc
         | 
| @@ -113,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 113 112 | 
             
                  version: '0'
         | 
| 114 113 | 
             
            requirements: []
         | 
| 115 114 | 
             
            rubyforge_project: 
         | 
| 116 | 
            -
            rubygems_version: 2. | 
| 115 | 
            +
            rubygems_version: 2.7.3
         | 
| 117 116 | 
             
            signing_key: 
         | 
| 118 117 | 
             
            specification_version: 4
         | 
| 119 118 | 
             
            summary: PathExpander helps pre-process command-line arguments expanding directories
         | 
    
        metadata.gz.sig
    CHANGED
    
    | Binary file |