melon 0.7 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ === 0.8.0 2014-02-04
2
+ * Major improvements
3
+ * 'add' commmand now follows up to two symlinks when used recursively
4
+
1
5
  === 0.7.0 2012-09-12
2
6
  * Major improvements
3
7
  * Added 'remove' command
@@ -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 "melon -d test.db add test_file"
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 "melon -d test.db add test_file"
20
- And I run "melon -d test.db add test_file"
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 "melon -d test.db add testo"
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 "melon -d test.db add nonexistant_file"
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 "melon -d test.db add -r dir test_file"
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 "melon -d test.db add -q test_file"
70
- When I run "melon -d test.db add -u test2 test_file"
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 "ln -s test_file link"
76
- When I run "melon -d test.db add link"
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 "ln -s test_file link"
82
- When I run "melon -d test.db add -p link"
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
 
@@ -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 "melon -d test.db check test_file"
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 "melon -d test.db add -q test_file"
19
- And I run "melon -d test.db check test_file"
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 "melon -d test.db check nonexistant_file"
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 "melon -d test.db check -r dir"
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"
@@ -5,15 +5,15 @@ Feature: Edge cases
5
5
  """
6
6
  This file is a test file
7
7
  """
8
- When I run "cp test_file test_file_2"
9
- And I run "melon -d test.db add test_file test_file_2"
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 "melon whizzle bang"
16
+ When I run `melon whizzle bang`
17
17
  Then it should fail with:
18
18
  """
19
19
  melon: unrecognized command: whizzle
@@ -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 "melon help"
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 "melon help add"
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:"
@@ -12,23 +12,23 @@ Feature: List
12
12
  """
13
13
  Test file 2
14
14
  """
15
- And I run "melon -d test.db add -q test_file file_test"
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 "melon -d test.db list"
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 "melon -d test.db list -p"
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 "melon -d test.db list -c"
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
@@ -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 "melon -d test.db add -q test_file"
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 "melon -d test.db remove test_file"
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 "melon -d test.db remove same_file"
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 "melon -d test.db remove different_file"
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
 
@@ -8,20 +8,20 @@ Feature: Show
8
8
  """
9
9
  This file is a test file
10
10
  """
11
- And I run "cp dir/test_file ."
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 "melon -d test.db show test_file"
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 "melon -d test.db add -q dir/test_file"
19
- And I run "melon -d test.db show test_file"
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 "melon -d test.db show nonexistant_file"
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
@@ -49,7 +49,8 @@ module Melon
49
49
  def recursively_expand(filelist)
50
50
  filelist.collect do |arg|
51
51
  if File.directory?(arg)
52
- Dir["#{arg}/**/*"]
52
+ # follow 0,1,2 symlinks
53
+ Dir.glob("#{arg}/**{,/*/**,/*/**/*/**}/*")
53
54
  else
54
55
  arg
55
56
  end
@@ -1,6 +1,6 @@
1
1
  module Melon
2
2
  def self.version
3
- "0.7"
3
+ "0.8"
4
4
  end
5
5
 
6
6
  def self.version_string
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
- prerelease: false
5
- segments:
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
- date: 2012-09-12 00:00:00 -04:00
17
- default_executable: melon
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
- prerelease: false
22
- requirement: &id001 !ruby/object:Gem::Requirement
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
- requirement: &id002 !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 0
42
- version: "0"
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
- requirement: &id003 !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- segments:
53
- - 0
54
- version: "0"
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
- version_requirements: *id003
57
- description: A tool for tracking files based on content, aiming to scale to arbitrarily large files without slowing down
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
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- segments:
118
- - 0
119
- version: "0"
120
- required_rubygems_version: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- segments:
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.3.6
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