dexter 0.0.2 → 0.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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dexter (0.0.1)
4
+ dexter (0.0.2)
5
5
  trollop
6
6
 
7
7
  GEM
@@ -14,6 +14,16 @@ Feature: Dexter organises series
14
14
  Then the following directories should exist:
15
15
  | Video/Dexter/S01 |
16
16
 
17
+ @announce
18
+ Scenario: Dexter tries to move a file that's already organized
19
+ Given a directory named "Dexter/S01"
20
+ And an empty file named "Dexter/Dexter S01E01.avi"
21
+ When I run "dexter"
22
+ Then the following directories should exist:
23
+ | Dexter/S01 |
24
+ And the following files should exist:
25
+ | Dexter/S01/Dexter S01E01.avi |
26
+
17
27
  @announce
18
28
  Scenario: Dexter organises using a custom format
19
29
  Given a directory named "Downloads"
@@ -130,8 +130,9 @@ module Dexter
130
130
 
131
131
  def organize!(path)
132
132
  output_path = File.dirname(output(path))
133
+ output_file = output(path)
133
134
  FileUtils.mkdir_p(output_path)
134
- FileUtils.mv(@filename, output(path))
135
+ FileUtils.mv(@filename, output_file) unless File.expand_path(@filename) == File.expand_path(output(path))
135
136
  return output(path)
136
137
  end
137
138
 
@@ -1,3 +1,3 @@
1
1
  module Dexter
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Josep Jaume Rey Peroy