wriggle 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -6,22 +6,22 @@ A simple directory crawler DSL.
6
6
 
7
7
  require 'wriggle'
8
8
 
9
- wriggle '/path/to/files' do
9
+ wriggle '/path/to/files' do |w|
10
10
 
11
11
  # Build an array of Ruby code files
12
12
  ruby_files = []
13
- file :rb do |path|
13
+ w.file :rb do |path|
14
14
  ruby_files << path
15
15
  end
16
16
 
17
17
  # Build an array of video files
18
18
  video_files = []
19
- file %w(mpg mpeg wmv avi mkv) do |path|
19
+ w.file %w(mpg mpeg wmv avi mkv) do |path|
20
20
  video_files << path
21
21
  end
22
22
 
23
23
  # Delete directories that are empty
24
- directory do |path|
24
+ w.directory do |path|
25
25
  Dir.rmdir(path) unless Dir.entries(path).length > 2
26
26
  end
27
27
  end
data/Rakefile CHANGED
@@ -9,28 +9,16 @@ begin
9
9
  gem.description = %Q{A simple directory crawler DSL.}
10
10
  gem.email = "rspeicher@gmail.com"
11
11
  gem.homepage = "http://github.com/tsigo/wriggle"
12
- gem.authors = ["rspeicher"]
13
- gem.add_development_dependency "rspec", "~> 1.3.0"
12
+ gem.authors = ["Robert Speicher"]
13
+ gem.add_development_dependency "rspec", "~> 2.0.0"
14
14
  end
15
15
  Jeweler::GemcutterTasks.new
16
16
  rescue LoadError
17
17
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
18
18
  end
19
19
 
20
- require 'spec/rake/spectask'
21
- Spec::Rake::SpecTask.new(:spec) do |spec|
22
- spec.libs << 'lib' << 'spec'
23
- spec.spec_files = FileList['spec/**/*_spec.rb']
24
- end
25
-
26
- Spec::Rake::SpecTask.new(:rcov) do |spec|
27
- spec.libs << 'lib' << 'spec'
28
- spec.pattern = 'spec/**/*_spec.rb'
29
- spec.rcov = true
30
- end
31
-
32
- task :spec => :check_dependencies
33
-
20
+ require 'rspec/core/rake_task'
21
+ RSpec::Core::RakeTask.new(:spec)
34
22
  task :default => :spec
35
23
 
36
24
  begin
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0
@@ -49,9 +49,9 @@ module Wriggle
49
49
  end
50
50
 
51
51
  def crawl(&block)
52
- Find.find(root) do |current|
53
- yield self
52
+ yield self
54
53
 
54
+ Find.find(root) do |current|
55
55
  if File.file?(current)
56
56
  dispatch_file(current)
57
57
  elsif File.directory?(current)
File without changes
@@ -1,8 +1,7 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
3
4
  require 'wriggle'
4
- require 'spec'
5
- require 'spec/autorun'
6
5
 
7
- Spec::Runner.configure do |config|
6
+ RSpec.configure do |config|
8
7
  end
@@ -33,7 +33,7 @@ describe Wriggle do
33
33
  end
34
34
  end
35
35
 
36
- actual.should include("#{valid_dir}/spec.opts")
36
+ actual.should include("#{valid_dir}/empty.txt")
37
37
  actual.should include("#{valid_dir}/wriggle_spec.rb")
38
38
  actual.should_not include("#{valid_dir}/spec")
39
39
  end
@@ -47,7 +47,7 @@ describe Wriggle do
47
47
  end
48
48
 
49
49
  actual.should include("#{valid_dir}/wriggle_spec.rb")
50
- actual.should_not include("#{valid_dir}/spec.opts")
50
+ actual.should_not include("#{valid_dir}/empty.txt")
51
51
  actual.should_not include("#{valid_dir}")
52
52
  end
53
53
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wriggle}
8
- s.version = "1.1.0"
8
+ s.version = "1.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["rspeicher"]
12
- s.date = %q{2010-10-09}
11
+ s.authors = ["Robert Speicher"]
12
+ s.date = %q{2010-12-14}
13
13
  s.description = %q{A simple directory crawler DSL.}
14
14
  s.email = %q{rspeicher@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  "Rakefile",
25
25
  "VERSION",
26
26
  "lib/wriggle.rb",
27
- "spec/spec.opts",
27
+ "spec/empty.txt",
28
28
  "spec/spec_helper.rb",
29
29
  "spec/wriggle_spec.rb",
30
30
  "wriggle.gemspec"
@@ -44,12 +44,12 @@ Gem::Specification.new do |s|
44
44
  s.specification_version = 3
45
45
 
46
46
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
- s.add_development_dependency(%q<rspec>, ["~> 1.3.0"])
47
+ s.add_development_dependency(%q<rspec>, ["~> 2.0.0"])
48
48
  else
49
- s.add_dependency(%q<rspec>, ["~> 1.3.0"])
49
+ s.add_dependency(%q<rspec>, ["~> 2.0.0"])
50
50
  end
51
51
  else
52
- s.add_dependency(%q<rspec>, ["~> 1.3.0"])
52
+ s.add_dependency(%q<rspec>, ["~> 2.0.0"])
53
53
  end
54
54
  end
55
55
 
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wriggle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 1.1.0
10
+ version: 1.2.0
11
11
  platform: ruby
12
12
  authors:
13
- - rspeicher
13
+ - Robert Speicher
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-09 00:00:00 -04:00
18
+ date: 2010-12-14 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 27
29
+ hash: 15
30
30
  segments:
31
- - 1
32
- - 3
31
+ - 2
32
+ - 0
33
33
  - 0
34
- version: 1.3.0
34
+ version: 2.0.0
35
35
  type: :development
36
36
  version_requirements: *id001
37
37
  description: A simple directory crawler DSL.
@@ -51,7 +51,7 @@ files:
51
51
  - Rakefile
52
52
  - VERSION
53
53
  - lib/wriggle.rb
54
- - spec/spec.opts
54
+ - spec/empty.txt
55
55
  - spec/spec_helper.rb
56
56
  - spec/wriggle_spec.rb
57
57
  - wriggle.gemspec
@@ -1,2 +0,0 @@
1
- --color
2
- --format=progress