file-utils 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
@@ -3,3 +3,4 @@
3
3
  coverage
4
4
  rdoc
5
5
  pkg
6
+ *.gem
data/README.md CHANGED
@@ -8,18 +8,25 @@ A better-looking wrapper for some common uses of FileUtils.
8
8
 
9
9
  require 'file/utils'
10
10
 
11
+ # Create a file
11
12
  File::Utils.create '/some/file.rb'
13
+
14
+ # Create a file and write to it
12
15
  File::Utils.create '/some/other/file.rb' do |f|
13
16
  f.write "Hello world!"
14
17
  end
18
+
19
+ # Replace the contents of a file
15
20
  File::Utils.rewrite '/some/other/file.rb', 'New contents'
21
+
22
+ # Delete some files
16
23
  File::Utils.destroy ['/some/file.rb', '/some/other/file.rb']
17
24
 
18
25
  See the docs in <tt>lib/file/utils.rb</tt> for more usage examples.
19
26
 
20
27
  ## Contributing
21
28
 
22
- I write this to wrap some common FileUtils patterns I found myself using over and over. If there are patterns that you use repeatedly (and which involve FileUtils methods), please suggest an addition :)
29
+ I wrote this to wrap some common FileUtils patterns I found myself using over and over. If there are patterns that you use repeatedly (and which involve FileUtils methods), please suggest an addition :)
23
30
 
24
31
  ## To Do
25
32
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -0,0 +1,53 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{file-utils}
5
+ s.version = "0.1.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["jameswilding"]
9
+ s.date = %q{2010-01-16}
10
+ s.description = %q{file-utils makes using FileUtils easier}
11
+ s.email = %q{james@jameswilding.net}
12
+ s.extra_rdoc_files = [
13
+ "LICENSE",
14
+ "README.md"
15
+ ]
16
+ s.files = [
17
+ ".document",
18
+ ".gitignore",
19
+ "LICENSE",
20
+ "README.md",
21
+ "Rakefile",
22
+ "VERSION",
23
+ "file-utils.gemspec",
24
+ "lib/file/utils.rb",
25
+ "test/file_utils_test.rb",
26
+ "test/test_helper.rb"
27
+ ]
28
+ s.homepage = %q{http://github.com/jameswilding/file-utils}
29
+ s.rdoc_options = ["--charset=UTF-8"]
30
+ s.require_paths = ["lib"]
31
+ s.rubygems_version = %q{1.3.5}
32
+ s.summary = %q{A beautiful wrapper for FileUtils}
33
+ s.test_files = [
34
+ "test/file_utils_test.rb",
35
+ "test/test_helper.rb"
36
+ ]
37
+
38
+ if s.respond_to? :specification_version then
39
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
40
+ s.specification_version = 3
41
+
42
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
43
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
44
+ s.add_development_dependency(%q<redgreen>, [">= 0"])
45
+ else
46
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
47
+ s.add_dependency(%q<redgreen>, [">= 0"])
48
+ end
49
+ else
50
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
51
+ s.add_dependency(%q<redgreen>, [">= 0"])
52
+ end
53
+ end
data/lib/file/utils.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'fileutils'
2
+
1
3
  class File #:nodoc:
2
4
  module Utils
3
5
  extend self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jameswilding
@@ -48,6 +48,7 @@ files:
48
48
  - README.md
49
49
  - Rakefile
50
50
  - VERSION
51
+ - file-utils.gemspec
51
52
  - lib/file/utils.rb
52
53
  - test/file_utils_test.rb
53
54
  - test/test_helper.rb