where_to 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzZlOWZjYjdhOWZkN2EyOTM2ZjIzYzU1MDUxODQ1OWIyN2MyY2UzMQ==
4
+ NDNiOTM2NjQyODFkODhhZGFiYzk1ZjkwM2E4YmU5MGYzNjBhNzE3YQ==
5
5
  data.tar.gz: !binary |-
6
- MDdlZGQ5MjQxNjY5MDQ1ZGNiZWU1NjA0MWNmOWUwYWM5YjRmMWMzZA==
6
+ YTdmM2RkODNhZWI0ZmU5NGU3YWU0YWNiOWRmZGQ4YmJlN2EzZjY5OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTIzMGY2ZjdjYWRhYzg1ZGQyMGU4ZDEwNWZmZDY3MmI5ZDI5YmVlM2E3OGJi
10
- Y2E5MDEwYzUyYTAyNGE0YTA5YjAyOGFjZGI1OWJmMmJhNmQ0ZWNiOTczNTg4
11
- YjE3MDdkYzc0ZTBmOTQ2MTUxYWIwYTA0NTJiZmViMDRkYzgzNjY=
9
+ ZjRlMDQ1YWZjMjUwY2Q2MjMzYzllOGI1NDRlMmY1MGViNmUxNjUxMDMyMGVl
10
+ YjIyZjM5MzhjNmU4MzgxZTRhNzViYjI4ZTdmY2QwNzcxZTZmMzFhZTU1Yjdi
11
+ MTMyMWUxN2Q2NDk3MjgzM2QzMjI5OTFkNGM4NjI3NDM2MTk0MGE=
12
12
  data.tar.gz: !binary |-
13
- NGFmYmRhMGNmOWYxOWQzZjg1MWU2ZmVlYTczZjk4ZTEzNjI2MTBmMjdiZTc4
14
- Yzg2MDg2MWVmZTk0NzBiZDc1YzRiYWZmYWQ3YmFkMTVmMWM1NzFlNTdlMzM5
15
- YTliMTZiMjZlNDhiODJjZDQ0ZDNhOWE0MzkwOTZkZTVkMmUzN2Q=
13
+ ZjM5ZWQwYzBmM2ZlNjk1YWJlNDQ1MzY1MzNkMmY1MmNjZjI5NDFjMDNlNWNl
14
+ MzhmMjg3MmViYzA4NDFmODBlYjY3OTRlYzk3YTI5YTFhYWU5MDc3MjFlZmZl
15
+ NGI2NWVhYjg4MzkzYTY2M2JlNmEzMWRlMTUzYTEyY2NjOTU1NGU=
data/bin/whereto CHANGED
@@ -65,9 +65,15 @@ command :organize do |cmd|
65
65
 
66
66
  @options = options
67
67
 
68
- Dir.chdir location
69
- files = Dir.glob "*#{options[:ext]}"
70
- raise WhereTo::NoFilesError.new(options[:ext], location) if files.none?
68
+ files = if File.directory?(location)
69
+ Dir.chdir location
70
+ files = Dir.glob "*#{options[:ext]}"
71
+ raise WhereTo::NoFilesError.new(options[:ext], location) if files.none?
72
+ files
73
+ else
74
+ Array(location)
75
+ end
76
+
71
77
  puts "I found the following files:"
72
78
  puts files
73
79
  puts ""
@@ -1,3 +1,3 @@
1
1
  module WhereTo
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where_to
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Toniazzo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-10 00:00:00.000000000 Z
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler