where_to 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/bin/whereto +4 -2
- data/lib/where_to/error/no_files_error.rb +7 -0
- data/lib/where_to/version.rb +1 -1
- data/lib/where_to.rb +11 -1
- data/lib/where_to_cli/helpers.rb +9 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmViZGMxMGNjYjRiZTMxMjM2OGFjZmUxMDgzYTgzMWQ2ZDg5MGFjZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTcwMjIyYzMzN2ZiN2FiMTJiM2U2ZDhkZTIwM2M5MWY0NWMzY2M3Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Njk0ZTMyMmViZjk4Y2Y3MTM4MTMzMGNjNTQ1MDQyYjgyYjJmN2FjNDJmZjYz
|
10
|
+
NjhkNWRlODU1YjNmYjY2ODkxZDE1ZjA5N2U1OWU3MzdhNWI2NDYyZGYwZDI1
|
11
|
+
ODY3YWNiN2ZjZTg2NzZlMzQ0OWJmMGE2YjBjOGZmZDc1NmQwYzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmUzOTUzMzcwMTZmYWNkOTYzMWUxYWQyZDg3NDJiYTBhYWQ0ZjdkZDI5NjI3
|
14
|
+
OTA1OWM5OGY4YmZhYTM5NmJjZWM4NGQyNzlmYmM1MDEyODljM2JkNzQ3MWJj
|
15
|
+
ZGY3ZDQ2YTg0ZjJiOTg5ZDE2ZWI3MzZmZTE1MmEwMTZiY2IzOWU=
|
data/.gitignore
CHANGED
data/bin/whereto
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'gli'
|
3
3
|
require_relative '../lib/where_to'
|
4
|
+
require_relative '../lib/where_to_cli/helpers'
|
4
5
|
|
5
6
|
include GLI::App
|
7
|
+
include WhereToCLI
|
6
8
|
|
7
9
|
PROMPT_DESCRIPTORS = Hash.new do |hash, key|
|
8
10
|
hash[key] = "a #{key}"
|
@@ -55,13 +57,13 @@ command :organize do |cmd|
|
|
55
57
|
|
56
58
|
cmd.action do |global_options, options, args|
|
57
59
|
puts ''
|
58
|
-
location = args
|
59
|
-
raise "The location '#{location}' does not exist" unless File.exist? location
|
60
|
+
location = Helpers::check_location!(args.first)
|
60
61
|
|
61
62
|
@options = options
|
62
63
|
|
63
64
|
Dir.chdir location
|
64
65
|
files = Dir.glob "*#{options[:ext]}"
|
66
|
+
raise WhereTo::NoFilesError.new(options[:ext], location) if files.none?
|
65
67
|
puts "I found the following files:"
|
66
68
|
files.each { |file| puts file }
|
67
69
|
puts ''
|
data/lib/where_to/version.rb
CHANGED
data/lib/where_to.rb
CHANGED
@@ -1,7 +1,17 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
# Require all the libraries!
|
4
|
-
|
4
|
+
require_files = %w(
|
5
|
+
configuration
|
6
|
+
episode_formatter
|
7
|
+
location
|
8
|
+
locator
|
9
|
+
tvdb
|
10
|
+
version
|
11
|
+
error/no_files_error
|
12
|
+
).each do |require_file|
|
13
|
+
require_relative "where_to/#{require_file}"
|
14
|
+
end
|
5
15
|
|
6
16
|
module WhereTo
|
7
17
|
class << self
|
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.
|
4
|
+
version: 1.0.1
|
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
|
+
date: 2015-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,10 +142,12 @@ files:
|
|
142
142
|
- lib/where_to.rb
|
143
143
|
- lib/where_to/configuration.rb
|
144
144
|
- lib/where_to/episode_formatter.rb
|
145
|
+
- lib/where_to/error/no_files_error.rb
|
145
146
|
- lib/where_to/location.rb
|
146
147
|
- lib/where_to/locator.rb
|
147
148
|
- lib/where_to/tvdb.rb
|
148
149
|
- lib/where_to/version.rb
|
150
|
+
- lib/where_to_cli/helpers.rb
|
149
151
|
- where_to.gemspec
|
150
152
|
homepage: https://github.com/jutonz/where_to
|
151
153
|
licenses:
|