fast 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
File without changes
data/Gemfile CHANGED
File without changes
File without changes
data/Rakefile CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,7 +3,8 @@ module Fast
3
3
  def self.dir path = nil
4
4
  unless path.nil?
5
5
  the_dir = Fast::Dir.new path
6
- the_dir.list
6
+ the_dir.list if the_dir.exist?
7
+ the_dir
7
8
  else
8
9
  Fast::Dir.new
9
10
  end
@@ -18,7 +19,8 @@ module Fast
18
19
  def self.file path = nil
19
20
  if path
20
21
  the_file = Fast::File.new path
21
- the_file.read
22
+ the_file.read if the_file.exist?
23
+ the_file
22
24
  else
23
25
  Fast::File.new
24
26
  end
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module Fast
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
File without changes
File without changes
@@ -6,14 +6,19 @@ describe Fast do
6
6
  Fast.dir.should be_a Fast::Dir
7
7
  end
8
8
 
9
- context "a path to a dir is passed" do
9
+ context "a path to a dir is passed and the dir exists" do
10
10
  it "should call #list on that instance" do
11
+ Fast.dir! :demo
11
12
  module Fast
12
13
  Dir.any_instance.should_receive :list
13
14
  end
14
15
 
15
16
  Fast.dir :demo
16
17
  end
18
+
19
+ after :each do
20
+ ::Dir.unlink "demo"
21
+ end
17
22
  end
18
23
  end
19
24
 
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-12 00:00:00.000000000 Z
12
+ date: 2011-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: metafun
16
- requirement: &15252960 !ruby/object:Gem::Requirement
16
+ requirement: &76535500 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *15252960
24
+ version_requirements: *76535500
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &15252120 !ruby/object:Gem::Requirement
27
+ requirement: &76534920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *15252120
35
+ version_requirements: *76534920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: zucker
38
- requirement: &15251420 !ruby/object:Gem::Requirement
38
+ requirement: &76534240 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *15251420
46
+ version_requirements: *76534240
47
47
  description: DSL for file system interaction
48
48
  email:
49
49
  - xavierviacanel@gmail.com
@@ -92,4 +92,3 @@ signing_key:
92
92
  specification_version: 3
93
93
  summary: DSL for file system interaction
94
94
  test_files: []
95
- has_rdoc: