TwP-bones 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,4 +1,16 @@
1
- == 2.3.0 / 2009-01-
1
+ == 2.4.0 / 2009-02-01
2
+
3
+ * 1 minor enhancement
4
+ - ruby 1.9 compatability
5
+ * 1 bug fix
6
+ - directory creation error when freezing a repository
7
+
8
+ == 2.3.1 / 2009-01-28
9
+
10
+ * 1 bug fix
11
+ - glob patterns were not being handled correctly in the .bnsignore file
12
+
13
+ == 2.3.0 / 2009-01-25
2
14
 
3
15
  * 1 minor enhancement
4
16
  - removed the need for a Manifest.txt file
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ PROJ.authors = 'Tim Pease'
9
9
  PROJ.email = 'tim.pease@gmail.com'
10
10
  PROJ.url = 'http://codeforpeople.rubyforge.org/bones'
11
11
  PROJ.version = Bones::VERSION
12
- PROJ.release_name = 'Distal Phalanges'
12
+ PROJ.release_name = 'Zygomatic'
13
13
  PROJ.ruby_opts = %w[-W0]
14
14
  PROJ.readme_file = 'README.rdoc'
15
15
  PROJ.ignore_file = '.gitignore'
@@ -34,18 +34,7 @@ PROJ.gem.extras[:post_install_message] = <<-MSG
34
34
  MSG
35
35
 
36
36
  PROJ.ann.paragraphs = %w[install synopsis features requirements]
37
- PROJ.ann.text = <<-ANN
38
- == FUN FACT
39
-
40
- "Tom Sawyer" was the first novel written on a typewriter.
41
-
42
- == POST SCRIPT
43
-
44
- Blessings,
45
- TwP
46
-
47
- #{PROJ.gem.extras[:post_install_message]}
48
- ANN
37
+ PROJ.ann.text = PROJ.gem.extras[:post_install_message]
49
38
 
50
39
  task :default => 'spec:specdoc'
51
40
  task 'ann:prereqs' do
data/data/.bnsignore CHANGED
@@ -10,3 +10,7 @@
10
10
  # exclude patterns (uncomment them if you want to use them):
11
11
  # *.[oa]
12
12
  # *~
13
+ announcement.txt
14
+ coverage
15
+ doc
16
+ pkg
data/data/lib/NAME.rb.bns CHANGED
@@ -29,7 +29,7 @@ module <%= classname %>
29
29
  args.empty? ? PATH : ::File.join(PATH, args.flatten)
30
30
  end
31
31
 
32
- # Utility method used to rquire all files ending in .rb that lie in the
32
+ # Utility method used to require all files ending in .rb that lie in the
33
33
  # directory below this file that has the same name as the filename passed
34
34
  # in. Optionally, a specific _directory_ name can be passed in such that
35
35
  # the _filename_ does not have to be equivalent to the directory.
data/lib/bones.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  module Bones
3
3
 
4
4
  # :stopdoc:
5
- VERSION = '2.3.0'
5
+ VERSION = '2.4.0'
6
6
  PATH = File.expand_path(File.join(File.dirname(__FILE__), '..'))
7
7
  WIN32 = %r/win32/ =~ RUBY_PLATFORM
8
8
  DEV_NULL = WIN32 ? 'NUL:' : '/dev/null'
@@ -124,14 +124,13 @@ class FileManager
124
124
  obj = Object.new
125
125
  class << obj
126
126
  alias :__binding__ :binding
127
- instance_methods.each do |m|
128
- undef_method m unless m[%r/^__/]
127
+ instance_methods.each {|m| undef_method m unless m[%r/^(__|object_id)/]}
128
+ def binding(name)
129
+ classname = name.tr('-','_').split('_').map {|x| x.capitalize}.join
130
+ __binding__
129
131
  end
130
- attr_accessor :name, :classname
131
132
  end
132
- obj.name = name
133
- obj.classname = name.tr('-','_').split('_').map {|x| x.capitalize}.join
134
- obj.__send__(:__binding__)
133
+ obj.binding name
135
134
  end
136
135
 
137
136
  # Returns a list of the files to copy from the source directory to
@@ -59,6 +59,7 @@ class FreezeCommand < Command
59
59
  # reposiory using the name passed in on the command line.
60
60
  #
61
61
  def freeze_to_repository
62
+ FileUtils.mkdir_p(File.dirname(output_dir))
62
63
  File.open(output_dir, 'w') {|fd| fd.puts repository}
63
64
  @out.puts "Project skeleton #{name.inspect} " <<
64
65
  "has been frozen to #{repository.inspect}"
@@ -262,12 +262,16 @@ def manifest
262
262
 
263
263
  # process the ignore file and add the items there to the exclude list
264
264
  if test(?f, PROJ.ignore_file)
265
- ary = File.readlines(PROJ.ignore_file).map do |line|
265
+ ary = []
266
+ File.readlines(PROJ.ignore_file).each do |line|
266
267
  next if line =~ comment
267
- line.chomp.strip
268
+ line.chomp!
269
+ line.strip!
270
+ next if line.nil? or line.empty?
271
+
272
+ glob = line =~ %r/\*\./ ? File.join('**', line) : line
273
+ Dir.glob(glob).each {|fn| ary << "^#{Regexp.escape(fn)}"}
268
274
  end
269
- ary.compact!
270
- ary.delete ''
271
275
  exclude.concat ary
272
276
  end
273
277
 
@@ -15,7 +15,7 @@ describe Bones::App do
15
15
  end
16
16
 
17
17
  before :each do
18
- @runner = Runner.new
18
+ @runner = ::Runner.new
19
19
  @app = Bones::App.new(@out, @err)
20
20
 
21
21
  Bones::App::CreateCommand.stub!(:new).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TwP-bones
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pease
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-13 00:00:00 -08:00
12
+ date: 2009-02-01 00:00:00 -08:00
13
13
  default_executable: bones
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency