melon 0.7 → 0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/features/add.feature +12 -12
- data/features/check.feature +5 -5
- data/features/edges.feature +3 -3
- data/features/help.feature +2 -2
- data/features/list.feature +4 -4
- data/features/remove.feature +4 -4
- data/features/show.feature +5 -5
- data/lib/melon/helpers.rb +2 -1
- data/lib/melon/version.rb +1 -1
- metadata +67 -69
data/History.txt
CHANGED
data/features/add.feature
CHANGED
@@ -11,13 +11,13 @@ Feature: Adding files to the database
|
|
11
11
|
"""
|
12
12
|
|
13
13
|
Scenario: Adding files to a melon database
|
14
|
-
When I run
|
14
|
+
When I run `melon -d test.db add test_file`
|
15
15
|
Then the output should contain a hash
|
16
16
|
And the output should contain "test_file"
|
17
17
|
|
18
18
|
Scenario: Adding a file that already exists
|
19
|
-
When I run
|
20
|
-
And I run
|
19
|
+
When I run `melon -d test.db add test_file`
|
20
|
+
And I run `melon -d test.db add test_file`
|
21
21
|
Then it should fail with:
|
22
22
|
"""
|
23
23
|
melon: path already present in database
|
@@ -25,14 +25,14 @@ Feature: Adding files to the database
|
|
25
25
|
|
26
26
|
Scenario: Adding a directory itself
|
27
27
|
Given a directory named "testo"
|
28
|
-
When I run
|
28
|
+
When I run `melon -d test.db add testo`
|
29
29
|
Then it should fail with:
|
30
30
|
"""
|
31
31
|
directory
|
32
32
|
"""
|
33
33
|
|
34
34
|
Scenario: Adding a file that doesn't exist
|
35
|
-
When I run
|
35
|
+
When I run `melon -d test.db add nonexistant_file`
|
36
36
|
Then it should fail with:
|
37
37
|
"""
|
38
38
|
melon: no such file: nonexistant_file
|
@@ -55,7 +55,7 @@ Feature: Adding files to the database
|
|
55
55
|
"""
|
56
56
|
Test file that's not in the subfolder
|
57
57
|
"""
|
58
|
-
When I run
|
58
|
+
When I run `melon -d test.db add -r dir test_file`
|
59
59
|
Then the output should contain "dir/test1"
|
60
60
|
And the output should contain "dir/test2"
|
61
61
|
And the output should contain "dir/test/test3"
|
@@ -66,20 +66,20 @@ Feature: Adding files to the database
|
|
66
66
|
"""
|
67
67
|
Also a test file
|
68
68
|
"""
|
69
|
-
And I run
|
70
|
-
When I run
|
69
|
+
And I run `melon -d test.db add -q test_file`
|
70
|
+
When I run `melon -d test.db add -u test2 test_file`
|
71
71
|
Then the output should contain "test2"
|
72
72
|
And the output should not contain "test_file"
|
73
73
|
|
74
74
|
Scenario: Adding a symlinked file
|
75
|
-
Given I run
|
76
|
-
When I run
|
75
|
+
Given I run `ln -s test_file link`
|
76
|
+
When I run `melon -d test.db add link`
|
77
77
|
Then the output should contain "test_file"
|
78
78
|
And the output should not contain "link"
|
79
79
|
|
80
80
|
Scenario: Adding a symlinked file, preserving symlinks
|
81
|
-
Given I run
|
82
|
-
When I run
|
81
|
+
Given I run `ln -s test_file link`
|
82
|
+
When I run `melon -d test.db add -p link`
|
83
83
|
Then the output should not contain "test_file"
|
84
84
|
And the output should contain "link"
|
85
85
|
|
data/features/check.feature
CHANGED
@@ -10,17 +10,17 @@ Feature: Check
|
|
10
10
|
"""
|
11
11
|
|
12
12
|
Scenario: Checking a file that is not in the database
|
13
|
-
When I run
|
13
|
+
When I run `melon -d test.db check test_file`
|
14
14
|
Then the output should contain "test_file"
|
15
15
|
And the output should start with "/"
|
16
16
|
|
17
17
|
Scenario: Checking a file that is in the database:
|
18
|
-
When I run
|
19
|
-
And I run
|
18
|
+
When I run `melon -d test.db add -q test_file`
|
19
|
+
And I run `melon -d test.db check test_file`
|
20
20
|
Then the output should be empty
|
21
21
|
|
22
22
|
Scenario: Checking a file that doesn't exist
|
23
|
-
When I run
|
23
|
+
When I run `melon -d test.db check nonexistant_file`
|
24
24
|
Then it should fail with:
|
25
25
|
"""
|
26
26
|
melon: no such file: nonexistant_file
|
@@ -35,6 +35,6 @@ Feature: Check
|
|
35
35
|
"""
|
36
36
|
Nothing to see here, folks
|
37
37
|
"""
|
38
|
-
When I run
|
38
|
+
When I run `melon -d test.db check -r dir`
|
39
39
|
Then the output should contain "dir/test2"
|
40
40
|
And the output should contain "dir/sub/test3"
|
data/features/edges.feature
CHANGED
@@ -5,15 +5,15 @@ Feature: Edge cases
|
|
5
5
|
"""
|
6
6
|
This file is a test file
|
7
7
|
"""
|
8
|
-
When I run
|
9
|
-
And I run
|
8
|
+
When I run `cp test_file test_file_2`
|
9
|
+
And I run `melon -d test.db add test_file test_file_2`
|
10
10
|
Then it should fail with:
|
11
11
|
"""
|
12
12
|
melon: file exists elsewhere in the database
|
13
13
|
"""
|
14
14
|
|
15
15
|
Scenario: Unrecognized command
|
16
|
-
When I run
|
16
|
+
When I run `melon whizzle bang`
|
17
17
|
Then it should fail with:
|
18
18
|
"""
|
19
19
|
melon: unrecognized command: whizzle
|
data/features/help.feature
CHANGED
@@ -4,12 +4,12 @@ Feature: Getting help
|
|
4
4
|
I should be able to get help using melon
|
5
5
|
|
6
6
|
Scenario: General help
|
7
|
-
When I run
|
7
|
+
When I run `melon help`
|
8
8
|
Then the output should contain "Usage:"
|
9
9
|
And the output should contain "Commands:"
|
10
10
|
And the output should contain "Options:"
|
11
11
|
|
12
12
|
Scenario: Help with a particular command
|
13
|
-
When I run
|
13
|
+
When I run `melon help add`
|
14
14
|
Then the output should contain "Usage: melon add"
|
15
15
|
And the output should contain "Options:"
|
data/features/list.feature
CHANGED
@@ -12,23 +12,23 @@ Feature: List
|
|
12
12
|
"""
|
13
13
|
Test file 2
|
14
14
|
"""
|
15
|
-
And I run
|
15
|
+
And I run `melon -d test.db add -q test_file file_test`
|
16
16
|
|
17
17
|
|
18
18
|
Scenario: Listing files
|
19
|
-
When I run
|
19
|
+
When I run `melon -d test.db list`
|
20
20
|
Then the output should contain "test_file"
|
21
21
|
And the output should contain "file_test"
|
22
22
|
And the output should contain 2 hashes
|
23
23
|
|
24
24
|
Scenario: Listing paths only
|
25
|
-
When I run
|
25
|
+
When I run `melon -d test.db list -p`
|
26
26
|
Then the output should contain "test_file"
|
27
27
|
And the output should contain "file_test"
|
28
28
|
And the output should not contain a hash
|
29
29
|
|
30
30
|
Scenario: Listing hashes only
|
31
|
-
When I run
|
31
|
+
When I run `melon -d test.db list -c`
|
32
32
|
Then the output should not contain "test_file"
|
33
33
|
And the output should not contain "file_test"
|
34
34
|
And the output should contain 2 hashes
|
data/features/remove.feature
CHANGED
@@ -16,19 +16,19 @@ Feature: Remove file from the database
|
|
16
16
|
"""
|
17
17
|
I am a unique flower
|
18
18
|
"""
|
19
|
-
And I run
|
19
|
+
And I run `melon -d test.db add -q test_file`
|
20
20
|
|
21
21
|
Scenario: Removing a tracked file
|
22
|
-
When I run
|
22
|
+
When I run `melon -d test.db remove test_file`
|
23
23
|
Then the output should contain "test_file"
|
24
24
|
# TODO: demand empty list
|
25
25
|
|
26
26
|
Scenario: Removing a tracked file by hash
|
27
|
-
When I run
|
27
|
+
When I run `melon -d test.db remove same_file`
|
28
28
|
Then the output should contain "test_file"
|
29
29
|
|
30
30
|
Scenario: Attempting to removean untracked file
|
31
|
-
When I run
|
31
|
+
When I run `melon -d test.db remove different_file`
|
32
32
|
Then the output should contain "untracked file"
|
33
33
|
And the output should contain "different_file"
|
34
34
|
|
data/features/show.feature
CHANGED
@@ -8,20 +8,20 @@ Feature: Show
|
|
8
8
|
"""
|
9
9
|
This file is a test file
|
10
10
|
"""
|
11
|
-
And I run
|
11
|
+
And I run `cp dir/test_file .`
|
12
12
|
|
13
13
|
Scenario: Showing a file that is not in the database
|
14
|
-
When I run
|
14
|
+
When I run `melon -d test.db show test_file`
|
15
15
|
Then the output should be empty
|
16
16
|
|
17
17
|
Scenario: Showing a file that is in the database:
|
18
|
-
When I run
|
19
|
-
And I run
|
18
|
+
When I run `melon -d test.db add -q dir/test_file`
|
19
|
+
And I run `melon -d test.db show test_file`
|
20
20
|
Then the output should contain "dir/test_file"
|
21
21
|
And the output should start with "/"
|
22
22
|
|
23
23
|
Scenario: Showing a file that doesn't exist
|
24
|
-
When I run
|
24
|
+
When I run `melon -d test.db show nonexistant_file`
|
25
25
|
Then it should fail with:
|
26
26
|
"""
|
27
27
|
melon: no such file: nonexistant_file
|
data/lib/melon/helpers.rb
CHANGED
data/lib/melon/version.rb
CHANGED
metadata
CHANGED
@@ -1,68 +1,72 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: melon
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 7
|
8
|
-
version: "0.7"
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.8'
|
5
|
+
prerelease:
|
9
6
|
platform: ruby
|
10
|
-
authors:
|
7
|
+
authors:
|
11
8
|
- Andrew Roberts
|
12
9
|
autorequire:
|
13
10
|
bindir: bin
|
14
11
|
cert_chain: []
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
dependencies:
|
19
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
20
15
|
name: digestif
|
21
|
-
|
22
|
-
|
23
|
-
requirements:
|
24
|
-
- -
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
segments:
|
27
|
-
- 1
|
28
|
-
- 0
|
29
|
-
- 4
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
30
21
|
version: 1.0.4
|
31
22
|
type: :runtime
|
32
|
-
version_requirements: *id001
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: cucumber
|
35
23
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.0.4
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: cucumber
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
43
38
|
type: :development
|
44
|
-
version_requirements: *id002
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: aruba
|
47
39
|
prerelease: false
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: aruba
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
55
54
|
type: :development
|
56
|
-
|
57
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: A tool for tracking files based on content, aiming to scale to arbitrarily
|
63
|
+
large files without slowing down
|
58
64
|
email: adroberts@gmail.com
|
59
|
-
executables:
|
65
|
+
executables:
|
60
66
|
- melon
|
61
67
|
extensions: []
|
62
|
-
|
63
68
|
extra_rdoc_files: []
|
64
|
-
|
65
|
-
files:
|
69
|
+
files:
|
66
70
|
- .gitignore
|
67
71
|
- Gemfile
|
68
72
|
- History.txt
|
@@ -101,37 +105,31 @@ files:
|
|
101
105
|
- spec/melon/fingerprint_spec.rb
|
102
106
|
- spec/melon/parsed_arguments_spec.rb
|
103
107
|
- spec/spec_helper.rb
|
104
|
-
has_rdoc: true
|
105
108
|
homepage: http://github.com/aroberts/melon
|
106
109
|
licenses: []
|
107
|
-
|
108
110
|
post_install_message:
|
109
111
|
rdoc_options: []
|
110
|
-
|
111
|
-
require_paths:
|
112
|
+
require_paths:
|
112
113
|
- lib
|
113
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
requirements:
|
122
|
-
- -
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
|
125
|
-
- 0
|
126
|
-
version: "0"
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
127
126
|
requirements: []
|
128
|
-
|
129
127
|
rubyforge_project:
|
130
|
-
rubygems_version: 1.
|
128
|
+
rubygems_version: 1.8.24
|
131
129
|
signing_key:
|
132
130
|
specification_version: 3
|
133
131
|
summary: A media catalog
|
134
|
-
test_files:
|
132
|
+
test_files:
|
135
133
|
- features/add.feature
|
136
134
|
- features/check.feature
|
137
135
|
- features/edges.feature
|