trash 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -14,7 +14,7 @@ class Trash
14
14
  File.directory? @trashcan
15
15
  end
16
16
 
17
- def throw_out(paths)
17
+ def throw_out(*paths)
18
18
  paths.each do |path|
19
19
  path = File.expand_path(path)
20
20
  if File.exist? path
@@ -33,7 +33,7 @@ describe "Trash" do
33
33
  it "moves multiple files to the trash" do
34
34
  `echo 'default text first' > /tmp/testing.txt`
35
35
  `echo 'default text second' > /tmp/testing2.txt`
36
- Trash.new.throw_out(["/tmp/testing.txt", "/tmp/testing2.txt"])
36
+ Trash.new.throw_out(*["/tmp/testing.txt", "/tmp/testing2.txt"])
37
37
  tmp_should_not_contain "testing.txt"
38
38
  tmp_should_not_contain "testing2.txt"
39
39
  trash_should_contain "testing.txt"
@@ -102,7 +102,7 @@ describe "Trash" do
102
102
 
103
103
  it "moves multiple directories to the trash" do
104
104
  dirs = `mkdir -p /tmp/testdir01 /tmp/testdir02`
105
- Trash.new.throw_out(["/tmp/testdir01", "/tmp/testdir02"])
105
+ Trash.new.throw_out(*["/tmp/testdir01", "/tmp/testdir02"])
106
106
  tmp_should_not_contain "testdir01"
107
107
  tmp_should_not_contain "testdir02"
108
108
  trash_should_contain_directory "testdir01"
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{trash}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.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"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lee Jones