bones 2.0.3 → 2.1.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 +11 -0
- data/Manifest.txt +20 -25
- data/README.txt +114 -83
- data/Rakefile +7 -6
- data/data/Rakefile.erb +7 -1
- data/data/bin/NAME.erb +1 -1
- data/data/lib/NAME.rb.erb +4 -11
- data/data/spec/NAME_spec.rb.erb +0 -1
- data/data/spec/spec_helper.rb.erb +0 -1
- data/lib/bones.rb +21 -8
- data/lib/bones/annotation_extractor.rb +1 -2
- data/lib/bones/debug.rb +0 -1
- data/lib/bones/main.rb +183 -109
- data/lib/bones/smtp_tls.rb +0 -1
- data/{data → lib/bones}/tasks/ann.rake +0 -1
- data/{data → lib/bones}/tasks/bones.rake +0 -1
- data/lib/bones/tasks/gem.rake +192 -0
- data/{data → lib/bones}/tasks/git.rake +0 -1
- data/{data → lib/bones}/tasks/manifest.rake +3 -4
- data/{data → lib/bones}/tasks/notes.rake +0 -1
- data/{data → lib/bones}/tasks/post_load.rake +2 -2
- data/{data → lib/bones}/tasks/rdoc.rake +0 -1
- data/{data → lib/bones}/tasks/rubyforge.rake +2 -4
- data/{data → lib/bones}/tasks/setup.rb +14 -3
- data/{data → lib/bones}/tasks/spec.rake +1 -2
- data/{data → lib/bones}/tasks/svn.rake +0 -1
- data/{data → lib/bones}/tasks/test.rake +3 -1
- data/spec/bones/main_spec.rb +157 -0
- data/spec/bones_spec.rb +18 -0
- data/spec/data/data/README.txt +0 -0
- data/spec/data/data/Rakefile +0 -0
- data/spec/data/foo/README.txt +0 -0
- data/spec/data/foo/Rakefile +0 -0
- data/spec/spec_helper.rb +22 -0
- data/tasks/ann.rake +0 -1
- data/tasks/bones.rake +0 -1
- data/tasks/gem.rake +98 -32
- data/tasks/git.rake +0 -1
- data/tasks/manifest.rake +3 -4
- data/tasks/notes.rake +0 -1
- data/tasks/post_load.rake +2 -2
- data/tasks/rdoc.rake +0 -1
- data/tasks/rubyforge.rake +2 -4
- data/tasks/setup.rb +14 -3
- data/tasks/spec.rake +1 -2
- data/tasks/svn.rake +47 -0
- data/tasks/test.rake +3 -1
- metadata +40 -17
- data/data/tasks/gem.rake +0 -126
data/History.txt
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
== 2.1.0 / 2008-10-15
|
2
|
+
|
3
|
+
* 1 major enhancement
|
4
|
+
- tasks can be used from the bones gem without having to create a
|
5
|
+
"tasks" folder in each project you create
|
6
|
+
* 2 minor enhancements
|
7
|
+
- revmoved SVN $Id$ turds
|
8
|
+
- Mr Bones is now included by default as a development dependency
|
9
|
+
* 1 bug fix
|
10
|
+
- changed the namespacing for the facets ANSICode class
|
11
|
+
|
1
12
|
== 2.0.3 / 2008-07-02
|
2
13
|
|
3
14
|
* 1 bug fix
|
data/Manifest.txt
CHANGED
@@ -11,34 +11,29 @@ data/bin/NAME.erb
|
|
11
11
|
data/lib/NAME.rb.erb
|
12
12
|
data/spec/NAME_spec.rb.erb
|
13
13
|
data/spec/spec_helper.rb.erb
|
14
|
-
data/tasks/ann.rake
|
15
|
-
data/tasks/bones.rake
|
16
|
-
data/tasks/gem.rake
|
17
|
-
data/tasks/git.rake
|
18
|
-
data/tasks/manifest.rake
|
19
|
-
data/tasks/notes.rake
|
20
|
-
data/tasks/post_load.rake
|
21
|
-
data/tasks/rdoc.rake
|
22
|
-
data/tasks/rubyforge.rake
|
23
|
-
data/tasks/setup.rb
|
24
|
-
data/tasks/spec.rake
|
25
|
-
data/tasks/svn.rake
|
26
|
-
data/tasks/test.rake
|
27
14
|
data/test/test_NAME.rb
|
28
15
|
lib/bones.rb
|
29
16
|
lib/bones/annotation_extractor.rb
|
30
17
|
lib/bones/debug.rb
|
31
18
|
lib/bones/main.rb
|
32
19
|
lib/bones/smtp_tls.rb
|
33
|
-
tasks/ann.rake
|
34
|
-
tasks/bones.rake
|
35
|
-
tasks/gem.rake
|
36
|
-
tasks/git.rake
|
37
|
-
tasks/manifest.rake
|
38
|
-
tasks/notes.rake
|
39
|
-
tasks/post_load.rake
|
40
|
-
tasks/rdoc.rake
|
41
|
-
tasks/rubyforge.rake
|
42
|
-
tasks/setup.rb
|
43
|
-
tasks/spec.rake
|
44
|
-
tasks/
|
20
|
+
lib/bones/tasks/ann.rake
|
21
|
+
lib/bones/tasks/bones.rake
|
22
|
+
lib/bones/tasks/gem.rake
|
23
|
+
lib/bones/tasks/git.rake
|
24
|
+
lib/bones/tasks/manifest.rake
|
25
|
+
lib/bones/tasks/notes.rake
|
26
|
+
lib/bones/tasks/post_load.rake
|
27
|
+
lib/bones/tasks/rdoc.rake
|
28
|
+
lib/bones/tasks/rubyforge.rake
|
29
|
+
lib/bones/tasks/setup.rb
|
30
|
+
lib/bones/tasks/spec.rake
|
31
|
+
lib/bones/tasks/svn.rake
|
32
|
+
lib/bones/tasks/test.rake
|
33
|
+
spec/bones/main_spec.rb
|
34
|
+
spec/bones_spec.rb
|
35
|
+
spec/data/data/README.txt
|
36
|
+
spec/data/data/Rakefile
|
37
|
+
spec/data/foo/README.txt
|
38
|
+
spec/data/foo/Rakefile
|
39
|
+
spec/spec_helper.rb
|
data/README.txt
CHANGED
@@ -10,73 +10,32 @@ ease the management and deployment of your source code. Mr Bones is not
|
|
10
10
|
viral -- all the code your project needs is included in the skeleton (no
|
11
11
|
gem dependency required).
|
12
12
|
|
13
|
-
== VERSION 2.
|
13
|
+
== VERSION 2.1.0 CHANGES:
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
With my Mr Bones projects, I found myself constantly updating the tasks as new
|
16
|
+
versions of Mr Bones were released. This quickly became annoying. Why not use
|
17
|
+
the tasks from the Mr Bones gem and only copy those tasks to my own projects
|
18
|
+
when they are packaged and released? That is the goal of this release of Mr
|
19
|
+
Bones.
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
The following .rake files have been renamed in Mr Bones 2.0.0 (the old
|
24
|
-
name is on the left and the new name is on the right). You will need to
|
25
|
-
delete the old version and use only the new version.
|
21
|
+
Version 2.1.0 of Mr Bones allows your projects to use the rake tasks found
|
22
|
+
in the Mr Bones gem but still remain independent from Mr Bones when
|
23
|
+
deployed. This is accomplished by copying the rake tasks into your project
|
24
|
+
only when it is packaged into a gem (or zip file or tarball).
|
26
25
|
|
27
|
-
|
28
|
-
|
26
|
+
You still have the option of copy the tasks to your local project when it is
|
27
|
+
created. Or you can add tasks to your project at a later time.
|
29
28
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
names on the left and new names on the right).
|
29
|
+
So, if you have an exsiting project and you want to use the Mr Bones tasks,
|
30
|
+
simply delete your "tasks" folder and put the following at the top of your
|
31
|
+
Rakefile:
|
34
32
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
test_file => test.file
|
42
|
-
test_opts => test.opts
|
43
|
-
|
44
|
-
rcov_dir => rcov.dir
|
45
|
-
rcov_opts => rcov.opts
|
46
|
-
rcov_threshold => rcov.threshold
|
47
|
-
rcov_threshold_exact => rcov.threshold_exact
|
48
|
-
|
49
|
-
rdoc_opts => rdoc.opts
|
50
|
-
rdoc_include => rdoc.include
|
51
|
-
rdoc_exclude => rdoc.exclude
|
52
|
-
rdoc_main => rdoc.main
|
53
|
-
rdoc_dir => rdoc.dir
|
54
|
-
rdoc_remote_dir => rdoc.remote_dir
|
55
|
-
|
56
|
-
dependencies => gem.dependencies
|
57
|
-
executables => gem.executables
|
58
|
-
extensions => gem.extensions
|
59
|
-
files => gem.files
|
60
|
-
need_tar => gem.need_tar
|
61
|
-
need_zip => gem.need_zip
|
62
|
-
post_install_message => gem.extras['post_install_message']
|
63
|
-
|
64
|
-
annotation_exclude => notes.exclude
|
65
|
-
annotation_extensions => notes.extensions
|
66
|
-
annotation_tags => notes.tags
|
67
|
-
|
68
|
-
svn => svn.path
|
69
|
-
svn_root => svn.root
|
70
|
-
svn_trunk => svn.trunk
|
71
|
-
svn_tags => svn.tags
|
72
|
-
svn_branches => svn.branches
|
73
|
-
|
74
|
-
ann_file => ann.file
|
75
|
-
ann_text => ann.text
|
76
|
-
ann_paragraphs => ann.paragraphs
|
77
|
-
ann_email => ann.email
|
78
|
-
|
79
|
-
And of course, each name should be prepended with PROJ in your Rakefile.
|
33
|
+
begin
|
34
|
+
require 'bones'
|
35
|
+
Bones.setup
|
36
|
+
rescue LoadError
|
37
|
+
load 'tasks/setup.rb' # this line should already be there
|
38
|
+
end
|
80
39
|
|
81
40
|
== FEATURES:
|
82
41
|
|
@@ -94,9 +53,11 @@ Mr Bones provides the following rake tasks:
|
|
94
53
|
doc:rerdoc # Force a rebuild of the RDOC files
|
95
54
|
doc:ri # Generate ri locally for testing
|
96
55
|
gem # Alias to gem:package
|
56
|
+
gem:cleanup # Cleanup the gem
|
97
57
|
gem:debug # Show information about the gem
|
98
58
|
gem:install # Install the gem
|
99
|
-
gem:package # Build the
|
59
|
+
gem:package # Build all the packages
|
60
|
+
gem:reinstall # Reinstall the gem
|
100
61
|
gem:release # Package and upload to RubyForge
|
101
62
|
gem:repackage # Force a rebuild of the package files
|
102
63
|
gem:uninstall # Uninstall the gem
|
@@ -114,8 +75,6 @@ Mr Bones provides the following rake tasks:
|
|
114
75
|
spec:run # Run all specs with basic output
|
115
76
|
spec:specdoc # Run all specs with text output
|
116
77
|
spec:verify # Verify that rcov coverage is at least 90.0%
|
117
|
-
svn:create_tag # Create a new tag in the SVN repository
|
118
|
-
svn:show_tags # Show tags from the SVN repository
|
119
78
|
test # Alias to test:run
|
120
79
|
test:rcov # Run rcov on the unit tests
|
121
80
|
test:run # Run tests for run
|
@@ -129,12 +88,7 @@ To create a new "Get Fuzzy" project:
|
|
129
88
|
|
130
89
|
bones get_fuzzy
|
131
90
|
|
132
|
-
If
|
133
|
-
project will need to be updated:
|
134
|
-
|
135
|
-
bones --update get_fuzzy
|
136
|
-
|
137
|
-
And if you ever get confused about what Mr Bones can do:
|
91
|
+
If you ever get confused about what Mr Bones can do:
|
138
92
|
|
139
93
|
bones --help
|
140
94
|
|
@@ -160,7 +114,12 @@ rake files. These files are quite generic, and their functionality is
|
|
160
114
|
controlled by options configured in the top-level Rakefile. Take a look at
|
161
115
|
the Rakefile for the Mr Bones gem itself:
|
162
116
|
|
163
|
-
|
117
|
+
begin
|
118
|
+
require 'bones'
|
119
|
+
Bones.setup
|
120
|
+
rescue LoadError
|
121
|
+
load 'tasks/setup.rb'
|
122
|
+
end
|
164
123
|
|
165
124
|
ensure_in_path 'lib'
|
166
125
|
require 'bones'
|
@@ -210,7 +169,7 @@ Rakefile to declare the dependency. If you do not specify a version, the
|
|
210
169
|
most current version number for the installed gem is used.
|
211
170
|
|
212
171
|
depend_on 'logging'
|
213
|
-
depend_on 'rake', '0.
|
172
|
+
depend_on 'rake', '0.8.2'
|
214
173
|
|
215
174
|
=== Freezing a Skeleton
|
216
175
|
|
@@ -226,28 +185,31 @@ Typical uses of this feature would be to fill in user specific data like the
|
|
226
185
|
author, e-mail address, etc. You can also add more default code to the skeleton
|
227
186
|
project or your own ".rake" task files.
|
228
187
|
|
229
|
-
|
188
|
+
You can have multiple skeletons with different names. Your projects can be
|
189
|
+
instantiated from any of these skeletons. Just supply a name when freezing:
|
230
190
|
|
231
|
-
|
232
|
-
version of Mr Bones comes out with better features. Updating a frozen skeleton
|
233
|
-
will only modify the tasks. All other files in the skeleton remain untouched.
|
191
|
+
bones --freeze foo
|
234
192
|
|
235
|
-
|
193
|
+
You can instantiate a project from the "foo" skeleton:
|
236
194
|
|
237
|
-
|
238
|
-
|
239
|
-
"
|
240
|
-
|
195
|
+
bones --skeleton foo get_fuzzy
|
196
|
+
|
197
|
+
The default skeleton name is "data". If no skeleton name is provided, then this
|
198
|
+
is the skeleton that will be used.
|
241
199
|
|
242
200
|
==== Unfreezing a Skeleton
|
243
201
|
|
244
202
|
Unfreezing a skeleton will remove your customized project skeleton from the
|
245
203
|
".mrbones" directory. The default Mr Bones project skeleton will be used
|
246
|
-
instead. A copy of your custom skeleton is
|
204
|
+
instead. A copy of your custom skeleton is stored in an archive directory of
|
247
205
|
the ".mrbones" directory before it is removed.
|
248
206
|
|
249
207
|
bones --unfreeze
|
250
208
|
|
209
|
+
You can unfreeze named skeletons, too:
|
210
|
+
|
211
|
+
bones --unfreeze foo
|
212
|
+
|
251
213
|
==== Custom Modifications
|
252
214
|
|
253
215
|
Mr Bones will perform a limited set of substitutions on the files in the
|
@@ -310,3 +272,72 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
310
272
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
311
273
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
312
274
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
275
|
+
|
276
|
+
|
277
|
+
== VERSION 2.0.0 CHANGES:
|
278
|
+
|
279
|
+
Version 2.0.0 of Mr Bones introduces backwards incompatibilities. Here is
|
280
|
+
what you need to update in order for your current projects to work with
|
281
|
+
this latest release.
|
282
|
+
|
283
|
+
Perform an update the tasks in your project directory:
|
284
|
+
|
285
|
+
bones -u your/project/directory
|
286
|
+
|
287
|
+
The following .rake files have been renamed in Mr Bones 2.0.0 (the old
|
288
|
+
name is on the left and the new name is on the right). You will need to
|
289
|
+
delete the old version and use only the new version.
|
290
|
+
|
291
|
+
doc.rake => rdoc.rake
|
292
|
+
annotations.rake => notes.rake
|
293
|
+
|
294
|
+
The PROJ openstruct has been amended to contain a collection of nested
|
295
|
+
openstructs. This will affect any settings you might have in the
|
296
|
+
top-level Rakefile for your project. Here is the translation key (old
|
297
|
+
names on the left and new names on the right).
|
298
|
+
|
299
|
+
rubyforge_name => rubyforge.name
|
300
|
+
|
301
|
+
specs => spec.files
|
302
|
+
spec_opts => spec.opts
|
303
|
+
|
304
|
+
tests => test.files
|
305
|
+
test_file => test.file
|
306
|
+
test_opts => test.opts
|
307
|
+
|
308
|
+
rcov_dir => rcov.dir
|
309
|
+
rcov_opts => rcov.opts
|
310
|
+
rcov_threshold => rcov.threshold
|
311
|
+
rcov_threshold_exact => rcov.threshold_exact
|
312
|
+
|
313
|
+
rdoc_opts => rdoc.opts
|
314
|
+
rdoc_include => rdoc.include
|
315
|
+
rdoc_exclude => rdoc.exclude
|
316
|
+
rdoc_main => rdoc.main
|
317
|
+
rdoc_dir => rdoc.dir
|
318
|
+
rdoc_remote_dir => rdoc.remote_dir
|
319
|
+
|
320
|
+
dependencies => gem.dependencies
|
321
|
+
executables => gem.executables
|
322
|
+
extensions => gem.extensions
|
323
|
+
files => gem.files
|
324
|
+
need_tar => gem.need_tar
|
325
|
+
need_zip => gem.need_zip
|
326
|
+
post_install_message => gem.extras['post_install_message']
|
327
|
+
|
328
|
+
annotation_exclude => notes.exclude
|
329
|
+
annotation_extensions => notes.extensions
|
330
|
+
annotation_tags => notes.tags
|
331
|
+
|
332
|
+
svn => svn.path
|
333
|
+
svn_root => svn.root
|
334
|
+
svn_trunk => svn.trunk
|
335
|
+
svn_tags => svn.tags
|
336
|
+
svn_branches => svn.branches
|
337
|
+
|
338
|
+
ann_file => ann.file
|
339
|
+
ann_text => ann.text
|
340
|
+
ann_paragraphs => ann.paragraphs
|
341
|
+
ann_email => ann.email
|
342
|
+
|
343
|
+
And of course, each name should be prepended with PROJ in your Rakefile.
|
data/Rakefile
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
# $Id$
|
2
1
|
|
3
2
|
$:.unshift('lib')
|
4
3
|
|
5
|
-
load 'tasks/setup.rb'
|
6
4
|
require 'bones'
|
5
|
+
Bones.setup
|
7
6
|
|
8
7
|
PROJ.name = 'bones'
|
9
8
|
PROJ.authors = 'Tim Pease'
|
10
9
|
PROJ.email = 'tim.pease@gmail.com'
|
11
10
|
PROJ.url = 'http://codeforpeople.rubyforge.org/bones'
|
12
11
|
PROJ.version = Bones::VERSION
|
13
|
-
PROJ.release_name = '
|
12
|
+
PROJ.release_name = 'Palimpsest'
|
13
|
+
PROJ.ruby_opts = %w[-W0]
|
14
14
|
|
15
15
|
PROJ.rubyforge.name = 'codeforpeople'
|
16
16
|
|
@@ -34,8 +34,7 @@ PROJ.ann.paragraphs = %w[install synopsis features requirements]
|
|
34
34
|
PROJ.ann.text = <<-ANN
|
35
35
|
== FUN FACT
|
36
36
|
|
37
|
-
|
38
|
-
if it's not solving your problem then you are not using enough of it.
|
37
|
+
A hen will lay one egg every 24 to 48 hours.
|
39
38
|
|
40
39
|
== POST SCRIPT
|
41
40
|
|
@@ -45,12 +44,14 @@ TwP
|
|
45
44
|
#{PROJ.gem.extras[:post_install_message]}
|
46
45
|
ANN
|
47
46
|
|
48
|
-
task :default => 'spec:
|
47
|
+
task :default => 'spec:specdoc'
|
49
48
|
task 'gem:package' => 'manifest:assert'
|
50
49
|
task 'ann:prereqs' do
|
51
50
|
PROJ.name = 'Mr Bones'
|
52
51
|
end
|
53
52
|
|
53
|
+
PROJ.gem.development_dependencies.clear
|
54
|
+
|
54
55
|
depend_on 'rake'
|
55
56
|
|
56
57
|
# EOF
|
data/data/Rakefile.erb
CHANGED
@@ -2,7 +2,12 @@
|
|
2
2
|
# configured in this Rakefile. The .rake files in the tasks directory
|
3
3
|
# are where the options are used.
|
4
4
|
|
5
|
-
|
5
|
+
begin
|
6
|
+
require 'bones'
|
7
|
+
Bones.setup
|
8
|
+
rescue LoadError
|
9
|
+
load 'tasks/setup.rb'
|
10
|
+
end
|
6
11
|
|
7
12
|
ensure_in_path 'lib'
|
8
13
|
require '<%= name %>'
|
@@ -13,6 +18,7 @@ PROJ.name = '<%= name %>'
|
|
13
18
|
PROJ.authors = 'FIXME (who is writing this software)'
|
14
19
|
PROJ.email = 'FIXME (your e-mail)'
|
15
20
|
PROJ.url = 'FIXME (project homepage)'
|
21
|
+
PROJ.version = <%= classname %>::VERSION
|
16
22
|
PROJ.rubyforge.name = '<%= name %>'
|
17
23
|
|
18
24
|
PROJ.spec.opts << '--color'
|
data/data/bin/NAME.erb
CHANGED
data/data/lib/NAME.rb.erb
CHANGED
@@ -1,8 +1,3 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
# Equivalent to a header guard in C/C++
|
4
|
-
# Used to prevent the class/module from being loaded more than once
|
5
|
-
unless defined? <%= classname %>
|
6
1
|
|
7
2
|
module <%= classname %>
|
8
3
|
|
@@ -23,7 +18,7 @@ module <%= classname %>
|
|
23
18
|
# <tt>File.join</tt>.
|
24
19
|
#
|
25
20
|
def self.libpath( *args )
|
26
|
-
args.empty? ? LIBPATH : ::File.join(LIBPATH,
|
21
|
+
args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
|
27
22
|
end
|
28
23
|
|
29
24
|
# Returns the lpath for the module. If any arguments are given,
|
@@ -31,7 +26,7 @@ module <%= classname %>
|
|
31
26
|
# <tt>File.join</tt>.
|
32
27
|
#
|
33
28
|
def self.path( *args )
|
34
|
-
args.empty? ? PATH : ::File.join(PATH,
|
29
|
+
args.empty? ? PATH : ::File.join(PATH, args.flatten)
|
35
30
|
end
|
36
31
|
|
37
32
|
# Utility method used to rquire all files ending in .rb that lie in the
|
@@ -42,15 +37,13 @@ module <%= classname %>
|
|
42
37
|
def self.require_all_libs_relative_to( fname, dir = nil )
|
43
38
|
dir ||= ::File.basename(fname, '.*')
|
44
39
|
search_me = ::File.expand_path(
|
45
|
-
::File.join(::File.dirname(fname), dir, '
|
40
|
+
::File.join(::File.dirname(fname), dir, '*', '*.rb'))
|
46
41
|
|
47
42
|
Dir.glob(search_me).sort.each {|rb| require rb}
|
48
43
|
end
|
49
44
|
|
50
45
|
end # module <%= classname %>
|
51
46
|
|
52
|
-
<%= classname %>.require_all_libs_relative_to
|
53
|
-
|
54
|
-
end # unless defined?
|
47
|
+
<%= classname %>.require_all_libs_relative_to(__FILE__)
|
55
48
|
|
56
49
|
# EOF
|