trash 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -17,5 +17,6 @@ tmtags
17
17
  coverage
18
18
  rdoc
19
19
  pkg
20
+ Gemfile.lock
20
21
 
21
22
  ## PROJECT::SPECIFIC
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -7,8 +7,10 @@ A simple command line utility to move files/folders to a "trash" folder before d
7
7
  == Usage
8
8
 
9
9
  From the command line:
10
-
10
+ trash [file/directory name(s)]
11
+ # example:
11
12
  trash potentially-important-file.txt
13
+ trash this-folder that-folder some-random-file.txt
12
14
 
13
15
  Handles multiple files with the same name
14
16
 
@@ -16,11 +18,21 @@ Handles multiple files with the same name
16
18
  trash ~/Documents/Christmas/shopping-list.txt
17
19
  trash ~/Documents/AutoParts/shopping-list.txt
18
20
 
19
- Trash folder will contain:
21
+ The trash will contain:
20
22
  * shopping-list.txt # originally ~/Documents/Groceries/shopping-list.txt
21
23
  * shopping-list01.txt # originally ~/Documents/Christmas/shopping-list.txt
22
24
  * shopping-list02.txt # originally ~/Documents/AutoParts/shopping-list.txt
23
25
 
26
+ You will find the files that you've trashed in ~/.Trash
27
+
28
+ == Installation
29
+
30
+ gem install trash
31
+
32
+ == Contributors
33
+
34
+ * ericmathison[https://github.com/ericmathison] (Eric Mathison)
35
+
24
36
  == Note on Patches/Pull Requests
25
37
 
26
38
  * Fork the project.
data/Rakefile CHANGED
@@ -6,12 +6,13 @@ begin
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "trash"
8
8
  gem.summary = %Q{trash can for the command line}
9
- gem.description = %Q{when its hard to say goodbye, and rm is just too much... use trash instead.}
9
+ gem.description = %Q{when it's hard to say goodbye, and rm is just too much... use trash instead.}
10
10
  gem.email = "scribblethink@gmail.com"
11
11
  gem.homepage = "http://github.com/leejones/trash"
12
12
  gem.authors = ["Lee Jones"]
13
- gem.add_development_dependency "rspec", ">= 1.2.9"
14
- gem.add_development_dependency "cucumber", ">= 0"
13
+ gem.add_development_dependency "rspec", "~> 1.2.9"
14
+ gem.add_development_dependency "rake", "~> 0.8.7"
15
+ gem.add_development_dependency "jeweler", "~> 1.4.0"
15
16
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
17
  end
17
18
  Jeweler::GemcutterTasks.new
@@ -32,18 +33,6 @@ Spec::Rake::SpecTask.new(:rcov) do |spec|
32
33
  end
33
34
 
34
35
  task :spec => :check_dependencies
35
-
36
- begin
37
- require 'cucumber/rake/task'
38
- Cucumber::Rake::Task.new(:features)
39
-
40
- task :features => :check_dependencies
41
- rescue LoadError
42
- task :features do
43
- abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
44
- end
45
- end
46
-
47
36
  task :default => :spec
48
37
 
49
38
  require 'rake/rdoctask'
data/TODO CHANGED
@@ -0,0 +1 @@
1
+ * Add command for emptying the trash
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -55,28 +55,28 @@ describe "Trash" do
55
55
  Trash.new.throw_out("/tmp/testing.txt")
56
56
  tmp_should_not_contain "testing.txt"
57
57
  trash_should_contain "testing.txt"
58
- original = File.new("/Users/leejones/.Trash/testing.txt", "r")
58
+ original = File.new("#{ENV['HOME']}/.Trash/testing.txt", "r")
59
59
  original.read.should == "default text\n"
60
60
 
61
61
  `echo 'testing different file with same name' > /tmp/testing.txt`
62
62
  Trash.new.throw_out("/tmp/testing.txt")
63
63
  tmp_should_not_contain "testing.txt"
64
64
  trash_should_contain "testing01.txt"
65
- third = File.new("/Users/leejones/.Trash/testing01.txt", "r")
65
+ third = File.new("#{ENV['HOME']}/.Trash/testing01.txt", "r")
66
66
  third.read.should == "testing different file with same name\n"
67
67
 
68
68
  `echo 'testing different file 2 with same name' > /tmp/testing.txt`
69
69
  Trash.new.throw_out("/tmp/testing.txt")
70
70
  tmp_should_not_contain "testing.txt"
71
71
  trash_should_contain "testing02.txt"
72
- fourth = File.new("/Users/leejones/.Trash/testing02.txt", "r")
72
+ fourth = File.new("#{ENV['HOME']}/.Trash/testing02.txt", "r")
73
73
  fourth.read.should == "testing different file 2 with same name\n"
74
74
 
75
75
  `echo 'testing different file 3 with same name' > /tmp/testing.txt`
76
76
  Trash.new.throw_out("/tmp/testing.txt")
77
77
  tmp_should_not_contain "testing.txt"
78
78
  trash_should_contain "testing03.txt"
79
- fifth = File.new("/Users/leejones/.Trash/testing03.txt", "r")
79
+ fifth = File.new("#{ENV['HOME']}/.Trash/testing03.txt", "r")
80
80
  fifth.read.should == "testing different file 3 with same name\n"
81
81
 
82
82
  delete_from_trash "testing.txt"
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{trash}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Lee Jones"]
12
- s.date = %q{2010-03-26}
12
+ s.date = %q{2013-09-11}
13
13
  s.default_executable = %q{trash}
14
- s.description = %q{when its hard to say goodbye, and rm is just too much... use trash instead.}
14
+ s.description = %q{when it's hard to say goodbye, and rm is just too much... use trash instead.}
15
15
  s.email = %q{scribblethink@gmail.com}
16
16
  s.executables = ["trash"]
17
17
  s.extra_rdoc_files = [
@@ -22,16 +22,13 @@ Gem::Specification.new do |s|
22
22
  s.files = [
23
23
  ".document",
24
24
  ".gitignore",
25
+ "Gemfile",
25
26
  "LICENSE",
26
27
  "README.rdoc",
27
28
  "Rakefile",
28
29
  "TODO",
29
30
  "VERSION",
30
31
  "bin/trash",
31
- "config/cucumber.yml",
32
- "features/step_definitions/trash_steps.rb",
33
- "features/support/env.rb",
34
- "features/trash.feature",
35
32
  "lib/trash.rb",
36
33
  "spec/spec.opts",
37
34
  "spec/spec_helper.rb",
@@ -41,7 +38,7 @@ Gem::Specification.new do |s|
41
38
  s.homepage = %q{http://github.com/leejones/trash}
42
39
  s.rdoc_options = ["--charset=UTF-8"]
43
40
  s.require_paths = ["lib"]
44
- s.rubygems_version = %q{1.3.6}
41
+ s.rubygems_version = %q{1.3.7}
45
42
  s.summary = %q{trash can for the command line}
46
43
  s.test_files = [
47
44
  "spec/spec_helper.rb",
@@ -52,16 +49,19 @@ Gem::Specification.new do |s|
52
49
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
50
  s.specification_version = 3
54
51
 
55
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
56
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
57
- s.add_development_dependency(%q<cucumber>, [">= 0"])
52
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
+ s.add_development_dependency(%q<rspec>, ["~> 1.2.9"])
54
+ s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
55
+ s.add_development_dependency(%q<jeweler>, ["~> 1.4.0"])
58
56
  else
59
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
60
- s.add_dependency(%q<cucumber>, [">= 0"])
57
+ s.add_dependency(%q<rspec>, ["~> 1.2.9"])
58
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
59
+ s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
61
60
  end
62
61
  else
63
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
64
- s.add_dependency(%q<cucumber>, [">= 0"])
62
+ s.add_dependency(%q<rspec>, ["~> 1.2.9"])
63
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
64
+ s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
65
65
  end
66
66
  end
67
67
 
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trash
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 21
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 2
8
- - 0
9
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Lee Jones
@@ -14,36 +15,58 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-26 00:00:00 -04:00
18
+ date: 2013-09-11 00:00:00 -05:00
18
19
  default_executable: trash
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
24
  requirements:
25
- - - ">="
25
+ - - ~>
26
26
  - !ruby/object:Gem::Version
27
+ hash: 13
27
28
  segments:
28
29
  - 1
29
30
  - 2
30
31
  - 9
31
32
  version: 1.2.9
33
+ requirement: *id001
34
+ name: rspec
35
+ prerelease: false
32
36
  type: :development
33
- version_requirements: *id001
34
37
  - !ruby/object:Gem::Dependency
35
- name: cucumber
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ hash: 49
44
+ segments:
45
+ - 0
46
+ - 8
47
+ - 7
48
+ version: 0.8.7
49
+ requirement: *id002
50
+ name: rake
36
51
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
52
+ type: :development
53
+ - !ruby/object:Gem::Dependency
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
55
+ none: false
38
56
  requirements:
39
- - - ">="
57
+ - - ~>
40
58
  - !ruby/object:Gem::Version
59
+ hash: 7
41
60
  segments:
61
+ - 1
62
+ - 4
42
63
  - 0
43
- version: "0"
64
+ version: 1.4.0
65
+ requirement: *id003
66
+ name: jeweler
67
+ prerelease: false
44
68
  type: :development
45
- version_requirements: *id002
46
- description: when its hard to say goodbye, and rm is just too much... use trash instead.
69
+ description: when it's hard to say goodbye, and rm is just too much... use trash instead.
47
70
  email: scribblethink@gmail.com
48
71
  executables:
49
72
  - trash
@@ -56,16 +79,13 @@ extra_rdoc_files:
56
79
  files:
57
80
  - .document
58
81
  - .gitignore
82
+ - Gemfile
59
83
  - LICENSE
60
84
  - README.rdoc
61
85
  - Rakefile
62
86
  - TODO
63
87
  - VERSION
64
88
  - bin/trash
65
- - config/cucumber.yml
66
- - features/step_definitions/trash_steps.rb
67
- - features/support/env.rb
68
- - features/trash.feature
69
89
  - lib/trash.rb
70
90
  - spec/spec.opts
71
91
  - spec/spec_helper.rb
@@ -81,23 +101,27 @@ rdoc_options:
81
101
  require_paths:
82
102
  - lib
83
103
  required_ruby_version: !ruby/object:Gem::Requirement
104
+ none: false
84
105
  requirements:
85
106
  - - ">="
86
107
  - !ruby/object:Gem::Version
108
+ hash: 3
87
109
  segments:
88
110
  - 0
89
111
  version: "0"
90
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
+ none: false
91
114
  requirements:
92
115
  - - ">="
93
116
  - !ruby/object:Gem::Version
117
+ hash: 3
94
118
  segments:
95
119
  - 0
96
120
  version: "0"
97
121
  requirements: []
98
122
 
99
123
  rubyforge_project:
100
- rubygems_version: 1.3.6
124
+ rubygems_version: 1.3.7
101
125
  signing_key:
102
126
  specification_version: 3
103
127
  summary: trash can for the command line
@@ -1 +0,0 @@
1
- default: --format profile features
File without changes
@@ -1,4 +0,0 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
2
- require 'trash'
3
-
4
- require 'spec/expectations'
@@ -1,9 +0,0 @@
1
- Feature: something something
2
- In order to something something
3
- A user something something
4
- something something something
5
-
6
- Scenario: something something
7
- Given inspiration
8
- When I create a sweet new gem
9
- Then everyone should see how awesome I am