dressmaker 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,9 +20,9 @@ And you're done! If you need to pass in options at generate time, simply pass ge
20
20
  Inside the template directory is a file, called Pattern. Here is a typical Pattern:
21
21
 
22
22
  desc "make executable"
23
- directory '/bin' do |dir|
24
- dir.for('*') { |f|
25
- File.chmod(0755, f)
23
+ directory.matches('/bin') do |dir|
24
+ dir.all { |f|
25
+ f.make_executable!
26
26
  }
27
27
  end
28
28
 
data/Rakefile CHANGED
@@ -11,10 +11,6 @@ begin
11
11
  s.rubyforge_project = 'dressmaker'
12
12
  end
13
13
  Jeweler::GemcutterTasks.new
14
- Jeweler::RubyforgeTasks.new do |rubyforge|
15
- rubyforge.doc_task = "rdoc"
16
- rubyforge.remote_doc_path = ''
17
- end
18
14
  rescue LoadError
19
15
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
20
16
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -23,6 +23,11 @@ class Dressmaker
23
23
  def make_executable!
24
24
  chmod(0755)
25
25
  end
26
+
27
+ def append!(header)
28
+ contents = File.read(self.path)
29
+ File.open(self.path, 'w') {|f| f << header << contents }
30
+ end
26
31
  end
27
32
 
28
33
  def self.with(target)
@@ -1,6 +1,7 @@
1
1
  desc "make executable"
2
2
  directory.matches('/bin') do |dir|
3
3
  dir.for('*') { |f|
4
+ f.append!('i love you')
4
5
  f.make_executable!
5
6
  }
6
7
  end
@@ -17,7 +17,7 @@ describe 'Dressmaker' do
17
17
  File.exist?(File.expand_path(File.join(File.dirname(__FILE__), 'output', 'template-test', 'bin', 'runner'))).should be_true
18
18
  File.executable?(File.expand_path(File.join(File.dirname(__FILE__), 'output', 'template-test', 'bin', 'runner'))).should be_true
19
19
  File.executable?(File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'template-test', 'bin', 'runner'))).should be_false
20
- File.read(File.expand_path(File.join(File.dirname(__FILE__), 'output', 'template-test', 'bin', 'runner'))).should == "this is my everyone for lovin'"
20
+ File.read(File.expand_path(File.join(File.dirname(__FILE__), 'output', 'template-test', 'bin', 'runner'))).should == "i love youthis is my everyone for lovin'"
21
21
  end
22
22
  end
23
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dressmaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hull
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-16 00:00:00 -05:00
12
+ date: 2009-12-01 00:00:00 -05:00
13
13
  default_executable: dressmaker
14
14
  dependencies: []
15
15
 
@@ -24,7 +24,6 @@ extra_rdoc_files:
24
24
  files:
25
25
  - README.rdoc
26
26
  - Rakefile
27
- - Rakefile2
28
27
  - VERSION
29
28
  - lib/dressmaker.rb
30
29
  - lib/dressmaker/configuration.rb
data/Rakefile2 DELETED
@@ -1,53 +0,0 @@
1
- libdir = File.expand_path("lib")
2
- $:.unshift(libdir) unless $:.include?(libdir)
3
-
4
- require 'usher'
5
-
6
- begin
7
- require 'jeweler'
8
- Jeweler::Tasks.new do |s|
9
- s.name = "usher"
10
- s.description = s.summary = "A general purpose routing library"
11
- s.email = "joshbuddy@gmail.com"
12
- s.homepage = "http://github.com/joshbuddy/usher"
13
- s.authors = ["Joshua Hull"]
14
- s.files = FileList["[A-Z]*", "{lib,spec,rails}/**/*"]
15
- s.add_dependency 'fuzzyhash', '>=0.0.9'
16
- s.rubyforge_project = 'joshbuddy-usher'
17
- end
18
- Jeweler::GemcutterTasks.new
19
- Jeweler::RubyforgeTasks.new do |rubyforge|
20
- rubyforge.doc_task = "rdoc"
21
- rubyforge.remote_doc_path = ''
22
- end
23
- rescue LoadError
24
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
25
- end
26
-
27
- require 'spec'
28
- require 'spec/rake/spectask'
29
- task :spec => 'spec:all'
30
- namespace(:spec) do
31
- Spec::Rake::SpecTask.new(:all) do |t|
32
- t.spec_opts ||= []
33
- t.spec_opts << "-rubygems"
34
- t.spec_opts << "--options" << "spec/spec.opts"
35
- t.spec_files = FileList['spec/**/*_spec.rb']
36
- end
37
-
38
- end
39
-
40
- desc "Run all examples with RCov"
41
- Spec::Rake::SpecTask.new('spec_with_rcov') do |t|
42
- t.spec_files = FileList['spec/**/*.rb']
43
- t.rcov = true
44
- t.rcov_opts = ['--exclude', 'spec']
45
- end
46
-
47
- require 'rake/rdoctask'
48
- desc "Generate documentation"
49
- Rake::RDocTask.new do |rd|
50
- rd.main = "README.rdoc"
51
- rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
52
- rd.rdoc_dir = 'rdoc'
53
- end