path_expander 1.0.2 → 1.0.3

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
- SHA1:
3
- metadata.gz: '078794a2686ec79aee95140d174dd05ea1ccbd8c'
4
- data.tar.gz: 2fb711acd045afc03765cfccb572ea5ca8154a9b
2
+ SHA256:
3
+ metadata.gz: 4ec7c57457d6cf828c608a367e073b7c689c15c5dbc3808621fc57ff53431d08
4
+ data.tar.gz: 829d40e46dc078546f0bf00dde8e40f2c1df6b22535882a9e64863fe684a4077
5
5
  SHA512:
6
- metadata.gz: a22db0c268baed2eef264cc30650ba7c3d750db464c3652037161831df613dce7266c307b47ee5cc11d3b6885d753f57e0100c41d9ac4b6d347d657a8e9a0bbd
7
- data.tar.gz: 274a8cb6da20b77e9c2180ab3759d1bc5f942bef0503883153793f7823e2aafc7519b65c6b9830f43a05fef47bf6fa0ca71160f3e97bdc23062d12afb8326c71
6
+ metadata.gz: 263d65b97f69b4f586888532cc374659889bb707c6ca2502c6cef9e8f5f446c6d3023b2a7930689a34a416e47ab7aa11c482f4ba2c0d66aebd66f9fabad4e7f2
7
+ data.tar.gz: 60f9b4ef1107c2d61f646c72635e09f7f46032aed00c5110852d23ce6b026d6e52ae3ed464a639c1855339c6ca9b6e97202951a0e454198dd0de0f7813f59be9
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ === 1.0.3 / 2018-03-16
2
+
3
+ * 1 bug fix:
4
+
5
+ * Don't process files if path expands to root directory. Prevents -n /./ from hanging.
6
+
1
7
  === 1.0.2 / 2017-05-09
2
8
 
3
9
  * 1 bug fix:
@@ -13,7 +13,7 @@
13
13
  # PathExpander.
14
14
 
15
15
  class PathExpander
16
- VERSION = "1.0.2" # :nodoc:
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
- if File.exist? arg then
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
@@ -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.2
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
- MIIDijCCAnKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE2MDkyNjAxNTczNVoXDTE3MDkyNjAxNTczNVowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE3MTEyMTIxMTExMFoXDTE4MTEyMTIxMTExMFowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -20,17 +20,16 @@ cert_chain:
20
20
  oO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gCWrvMX1uL5aRL74nA4urKXqdW
27
+ a0nP70K4958P3GffBdtE3KGkU5xstFnXGajxuBRnL66E15KU0BNehVxdG258bdPu
28
+ EKN6MqBPftFiev3tuwqDV11r2GquDpniYcT+Mi8/PgeAgVT/afBeVgbB3KaZeTRR
29
+ AhXhF6Wi2GTMezlj5jlI5XV7WsJUSwTp/YiVvcmT74ZaCRvexm6EnNhkrvJJ1Xeu
30
+ V+HB+LYYhXWitInO/eXxDrFB
32
31
  -----END CERTIFICATE-----
33
- date: 2017-05-09 00:00:00.000000000 Z
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.6.8
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