TwP-bones 2.3.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.
Files changed (48) hide show
  1. data/History.txt +183 -0
  2. data/README.rdoc +370 -0
  3. data/Rakefile +59 -0
  4. data/bin/bones +7 -0
  5. data/data/.bnsignore +12 -0
  6. data/data/History.txt.bns +4 -0
  7. data/data/README.txt.bns +48 -0
  8. data/data/Rakefile.bns +30 -0
  9. data/data/bin/NAME.bns +8 -0
  10. data/data/lib/NAME.rb.bns +49 -0
  11. data/data/spec/NAME_spec.rb.bns +7 -0
  12. data/data/spec/spec_helper.rb.bns +16 -0
  13. data/data/test/test_NAME.rb +0 -0
  14. data/lib/bones/annotation_extractor.rb +111 -0
  15. data/lib/bones/app/command.rb +130 -0
  16. data/lib/bones/app/create_command.rb +86 -0
  17. data/lib/bones/app/file_manager.rb +176 -0
  18. data/lib/bones/app/freeze_command.rb +72 -0
  19. data/lib/bones/app/info_command.rb +58 -0
  20. data/lib/bones/app/unfreeze_command.rb +53 -0
  21. data/lib/bones/app/update_command.rb +47 -0
  22. data/lib/bones/app.rb +92 -0
  23. data/lib/bones/debug.rb +71 -0
  24. data/lib/bones/smtp_tls.rb +75 -0
  25. data/lib/bones/tasks/ann.rake +80 -0
  26. data/lib/bones/tasks/bones.rake +20 -0
  27. data/lib/bones/tasks/gem.rake +201 -0
  28. data/lib/bones/tasks/git.rake +40 -0
  29. data/lib/bones/tasks/notes.rake +27 -0
  30. data/lib/bones/tasks/post_load.rake +34 -0
  31. data/lib/bones/tasks/rdoc.rake +50 -0
  32. data/lib/bones/tasks/rubyforge.rake +55 -0
  33. data/lib/bones/tasks/setup.rb +296 -0
  34. data/lib/bones/tasks/spec.rake +54 -0
  35. data/lib/bones/tasks/svn.rake +47 -0
  36. data/lib/bones/tasks/test.rake +40 -0
  37. data/lib/bones.rb +62 -0
  38. data/spec/bones/app/file_manager_spec.rb +150 -0
  39. data/spec/bones/app_spec.rb +97 -0
  40. data/spec/bones_spec.rb +18 -0
  41. data/spec/data/data/NAME/NAME.rb.bns +5 -0
  42. data/spec/data/data/README.txt.bns +48 -0
  43. data/spec/data/data/Rakefile.bns +30 -0
  44. data/spec/data/data/lib/NAME.rb.bns +49 -0
  45. data/spec/data/foo/README.txt +0 -0
  46. data/spec/data/foo/Rakefile +0 -0
  47. data/spec/spec_helper.rb +44 -0
  48. metadata +126 -0
data/History.txt ADDED
@@ -0,0 +1,183 @@
1
+ == 2.3.0 / 2009-01-
2
+
3
+ * 1 minor enhancement
4
+ - removed the need for a Manifest.txt file
5
+
6
+ == 2.2.0 / 2009-01-01
7
+
8
+ * 4 minor enhancements
9
+ - projects can be instantiated from git or svn repositories
10
+ - added a task to generate a project gemspec for use on github [Sandro Turriate]
11
+ - Mr Bones erb translation is now applied to files with a
12
+ '.bns' extension instead of an '.erb' extension
13
+ - refactored the main bones application
14
+ * 1 bugfix
15
+ - Mr Bones tasks are only added to the gemspec when a package
16
+ is being built
17
+
18
+ == 2.1.1 / 2008-12-15
19
+
20
+ * 1 minor enhancement
21
+ - added '.rdoc' to the list of file extensions for rdoc and
22
+ notes takss [Avdi Grimm]
23
+ * 2 bug fixes
24
+ - default "from" field when e-mailing announcements
25
+ - fixed SMTP check_auth_args arity [Avdi Grimm]
26
+
27
+ == 2.1.0 / 2008-10-15
28
+
29
+ * 1 major enhancement
30
+ - tasks can be used from the bones gem without having to create a
31
+ "tasks" folder in each project you create
32
+ * 2 minor enhancements
33
+ - revmoved SVN $Id$ turds
34
+ - Mr Bones is now included by default as a development dependency
35
+ * 1 bug fix
36
+ - changed the namespacing for the facets ANSICode class
37
+
38
+ == 2.0.3 / 2008-07-02
39
+
40
+ * 1 bug fix
41
+ - Fixed the rubyforge tasks to be compatible with the
42
+ rubyforge 1.0.0 gem
43
+
44
+ == 2.0.2 / 2008-06-02
45
+
46
+ * 2 minor enhancements
47
+ - Added a gem cleanup rake task
48
+ - Tasks to support Git projects
49
+ * 2 bug fixes
50
+ - Check for Rakefile when creating a new project
51
+ - Failed dependency resolution when not using fully qualified task names
52
+
53
+ == 2.0.1 / 2008-04-15
54
+
55
+ * 1 minor enchancement
56
+ - Now compatible with RubyGems versions earlier than 1.1.0
57
+ (should work back to 0.9.4)
58
+
59
+ == 2.0.0 / 2008-04-07
60
+
61
+ * 2 major enhancements
62
+ - Reworked the PROJ open struct to use nested open struct
63
+ objects
64
+ - Renamed a few of the .rake files to match the namespaces
65
+ they define
66
+ * 4 minor enhancements
67
+ - Selectable project skeleton when creating a new project
68
+ - Added an empty 'prereqs' task to several of the namespaces
69
+ (can be used for running code before any of the
70
+ tasks in that namespace are invoked)
71
+ - Extra refinement on notes
72
+ rake notes TwP #=> all notes for TwP
73
+ rake notes:todo TwP #=> all todos for TwP
74
+ - Insalling a gem will no longer try to update the gem
75
+ sources from RubyForge
76
+ * 1 bug fix
77
+ - On some systems, the quiet method was not reopening
78
+ stdout and stderr correctly
79
+
80
+ == 1.3.5 / 2008-02-27
81
+
82
+ * 2 minor enhancements
83
+ - Added a bones:debug task to inspect the PROJ open struct or
84
+ a single attribute of the PROJ open struct
85
+ - Small adjustments to the gem and spec tasks
86
+ * 1 bug fix
87
+ - Project names can now contain dahes (my-proj)
88
+
89
+ == 1.3.4 / 2008-02-20
90
+
91
+ * 4 minor enhancements
92
+ - Added more RCov options and tasks to verify a coverage
93
+ threshold (RSpec only)
94
+ - Can specify exact dependency version requirement
95
+ - Added a command line option to specify the output directory for
96
+ a new project
97
+ - The history, readme, and manifest file names can be configured
98
+ in the Rakefile
99
+ * 1 bug fix
100
+ - Now including the default rake/clean tasks
101
+
102
+ == 1.3.3 / 2008-02-18
103
+
104
+ * 4 minor enhancements
105
+ - The annotation tags to search for can be specified by the user
106
+ in the Rakefile
107
+ - Directory names can be substituted during skeleton creation
108
+ - Support for the GEM post_install_message
109
+ - Support to generate an announcement text file and send the
110
+ announcement via e-mail
111
+ - Added a manifest:assert task that can be used when building the
112
+ gem to assert that the manifest is up to date
113
+ task 'gem:package' => 'manifest:assert'
114
+ * 1 bug fix
115
+ - Fixed a circular dependency in the gem creation tasks
116
+
117
+ == 1.3.2 / 2008-02-05
118
+
119
+ * 1 minor enhancement
120
+ - Added colorization to the manifest:check task
121
+
122
+ == 1.3.1 / 2008-02-01
123
+
124
+ * 4 minor enhancements
125
+ - Updated the "ensure_in_path" method to take more than one path
126
+ - Added an "in_directory" method for executing shell tasks in a
127
+ different directory
128
+ - Fleshed out a spec_helper and a better default project spec file
129
+ - By default the project changes, description, and summary will be
130
+ loaded from the History and README files
131
+ * 3 bug fixes
132
+ - RSpec tasks were not including the user defined project libraries
133
+ such as "ext" or anything besides "lib"
134
+ - Tweaked the gem install/uninstall tasks to remove installed binaries
135
+ and to install platform specific gem versions
136
+ - Fixed a bug where the RDoc task was ignore the PROJ.rdoc_opts
137
+
138
+ == 1.3.0 / 2008-01-04
139
+
140
+ * 2 minor enhancements
141
+ - Added a few more methods to the default framework
142
+ - Added tasks to support tagging releases in SVN
143
+ * 1 bug fix
144
+ - Fixed a nil value error for the remote rdoc directory
145
+ (patch supplied by Chris Shea)
146
+
147
+ == 1.2.1 / 2008-01-02
148
+
149
+ * 2 bug fixes
150
+ - With no arguments, the bones command was not showing the help message
151
+ - Freezing a second time was not updating all the skeleton tasks
152
+
153
+ == 1.2.0 / 2007-12-31
154
+
155
+ * 1 major enhancement
156
+ - Users can define their own skeletons to use (bones --freeze)
157
+ * 1 minor enhancement
158
+ - Show a list of the files a user needs to change after project creation
159
+
160
+ == 1.1.2 / 2007-12-31
161
+
162
+ * 2 minor enhancements
163
+ - The pkg and doc directories are now excluded from the manifest
164
+ - Added method to hide tasks from the rake task listing
165
+ * 1 bug fix
166
+ - Fixed typo in an abort message (thanks Bill Kleb)
167
+
168
+ == 1.1.1 / 2007-12-29
169
+
170
+ * 1 bug fix
171
+ - Fixed the bad interaction with RSpec gem
172
+
173
+ == 1.1.0 / 2007-12-29
174
+
175
+ * 3 minor enhancements
176
+ - Output message when files are created or updated
177
+ - Directory cleanup if project creation fails
178
+ - Pulled the rails source annotation extractor into Mr Bones
179
+
180
+ == 1.0.0 / 2007-12-28
181
+
182
+ * 1 major enhancement
183
+ - Birthday!
data/README.rdoc ADDED
@@ -0,0 +1,370 @@
1
+ Mr Bones
2
+ by Tim Pease
3
+ http://codeforpeople.rubyforge.org/bones
4
+
5
+ == DESCRIPTION:
6
+
7
+ Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.
8
+ The skeleton contains some starter code and a collection of rake tasks to
9
+ ease the management and deployment of your source code. Mr Bones is not
10
+ viral -- all the code your project needs is included in the skeleton (no
11
+ gem dependency required).
12
+
13
+ == FEATURES:
14
+
15
+ Mr Bones provides the following rake tasks:
16
+
17
+ ann # Alias to ann:announcement
18
+ ann:announcement # Create an announcement file
19
+ ann:email # Send an email announcement
20
+ bones:debug # Show the PROJ open struct
21
+ clean # Remove any temporary products.
22
+ clobber # Remove any generated file.
23
+ doc # Alias to doc:rdoc
24
+ doc:rdoc # Build the rdoc HTML Files
25
+ doc:release # Publish RDoc to RubyForge
26
+ doc:rerdoc # Force a rebuild of the RDOC files
27
+ doc:ri # Generate ri locally for testing
28
+ gem # Alias to gem:package
29
+ gem:cleanup # Cleanup the gem
30
+ gem:debug # Show information about the gem
31
+ gem:install # Install the gem
32
+ gem:package # Build all the packages
33
+ gem:reinstall # Reinstall the gem
34
+ gem:release # Package and upload to RubyForge
35
+ gem:repackage # Force a rebuild of the package files
36
+ gem:spec # Write the gemspec
37
+ gem:uninstall # Uninstall the gem
38
+ git:create_tag # Create a new tag in the Git repository
39
+ git:show_tags # Show tags from the Git repository
40
+ notes # Enumerate all annotations
41
+ notes:fixme # Enumerate all FIXME annotations
42
+ notes:optimize # Enumerate all OPTIMIZE annotations
43
+ notes:todo # Enumerate all TODO annotations
44
+ spec # Alias to spec:run
45
+ spec:rcov # Run all specs with RCov
46
+ spec:run # Run all specs with basic output
47
+ spec:specdoc # Run all specs with text output
48
+ spec:verify # Verify that rcov coverage is at least 90.0%
49
+ svn:create_tag # Create a new tag in the SVN repository
50
+ svn:show_tags # Show tags from the SVN repository
51
+ test # Alias to test:run
52
+ test:rcov # Run rcov on the unit tests
53
+ test:run # Run tests for run
54
+
55
+ The rake tasks in the Mr Bones framework can be found in the "tasks"
56
+ directory. Add your own tasks there when you need more functionality.
57
+
58
+ == SYNOPSIS:
59
+
60
+ To create a new "Get Fuzzy" project:
61
+
62
+ bones create get_fuzzy
63
+
64
+ If you ever get confused about what Mr Bones can do:
65
+
66
+ bones --help
67
+
68
+ == REQUIREMENTS:
69
+
70
+ Mr Bones does not have any "requirements", but if you do not have the
71
+ following gems installed you will not get all that Mr Bones has to offer.
72
+
73
+ * rubyforge - for easy gem publishing to rubyforge.org
74
+ * rcov - for code coverage testing
75
+ * rspec - if that's the way you roll
76
+ * facets - for pretty colors
77
+
78
+ Actually, you will need at least version 1.2.0 of rubygems installed to use
79
+ Mr Bones.
80
+
81
+ == INSTALL:
82
+
83
+ * sudo gem install bones
84
+
85
+ == MANUAL:
86
+
87
+ The +bones+ command line tool is used to create a skeleton for a Ruby
88
+ project. In that skeleton is a "tasks" directory that contains the Mr Bones
89
+ rake files. These files are quite generic, and their functionality is
90
+ controlled by options configured in the top-level Rakefile. Take a look at
91
+ the Rakefile for the Mr Bones gem itself:
92
+
93
+ begin
94
+ require 'bones'
95
+ Bones.setup
96
+ rescue LoadError
97
+ load 'tasks/setup.rb'
98
+ end
99
+
100
+ ensure_in_path 'lib'
101
+ require 'bones'
102
+
103
+ task :default => 'spec:run'
104
+
105
+ PROJ.name = 'bones'
106
+ PROJ.authors = 'Tim Pease'
107
+ PROJ.email = 'not.real@fake.com'
108
+ PROJ.url = 'http://codeforpeople.rubyforge.org/bones'
109
+ PROJ.version = Bones::VERSION
110
+ PROJ.rubyforge.name = 'codeforpeople'
111
+
112
+ PROJ.rdoc.remote_dir = 'bones'
113
+ PROJ.rdoc.exclude << '^data'
114
+
115
+ PROJ.notes.exclude = %w(^README\.txt$ ^data/)
116
+
117
+ PROJ.svn.path = 'bones'
118
+
119
+ PROJ.spec_opts << '--color'
120
+
121
+ # EOF
122
+
123
+ The +PROJ+ constant is an open struct that contains all the configuration
124
+ options for the project. The open struct is created in the "tasks/setup.rb"
125
+ file, and that is also where all the configurable options are defined. Take
126
+ a look in the "setup.rb" file to see what options are available, but always
127
+ make your changes in the Rakefile itself.
128
+
129
+ The Mr Bones rake system is based on a "Manifest.txt" file that contains a
130
+ list of all the files that will be used in the project. If a file does not
131
+ appear in the manifest, it will not be included in the gem. Use the
132
+ +manifest+ rake tasks to create and update the manifest as needed.
133
+
134
+ You can exclude files from being seen by the manifest -- the files are
135
+ invisible to the Mr Bones rake tasks. You would do this for any subversion
136
+ directories, backup files, or anything else you don't want gumming up the
137
+ works. The files to exclude are given as an array of regular expression
138
+ patterns; a file is excluded if it matches any of the patterns.
139
+
140
+ PROJ.exclude = %w(tmp$ bak$ ~$ CVS \.svn ^pkg ^doc)
141
+ PROJ.exclude << '^tags$'
142
+
143
+ If your project depends on other gems, use the +depend_on+ command in your
144
+ Rakefile to declare the dependency. If you do not specify a version, the
145
+ most current version number for the installed gem is used.
146
+
147
+ depend_on 'logging'
148
+ depend_on 'rake', '0.8.2'
149
+
150
+ === Freezing a Skeleton
151
+
152
+ Freezing allows you to define your own project skeleton to instantiate with Mr
153
+ Bones when you create a new project. The default Mr Bones project skeleton is
154
+ copied to the ".mrbones" directory in your home directory. From there, the
155
+ skeleton can be modified however you like (add new files and tasks, add new
156
+ directories, etc).
157
+
158
+ bones freeze
159
+
160
+ Typical uses of this feature would be to fill in user specific data like the
161
+ author, e-mail address, etc. You can also add more default code to the skeleton
162
+ project or your own ".rake" task files.
163
+
164
+ You can have multiple skeletons with different names. Your projects can be
165
+ instantiated from any of these skeletons. Just supply a name when freezing:
166
+
167
+ bones freeze foo
168
+
169
+ You can instantiate a project from the "foo" skeleton:
170
+
171
+ bones create --skeleton foo get_fuzzy
172
+
173
+ The default skeleton name is "data". If no skeleton name is provided, then this
174
+ is the skeleton that will be used.
175
+
176
+ ==== Unfreezing a Skeleton
177
+
178
+ Unfreezing a skeleton will remove your customized project skeleton from the
179
+ ".mrbones" directory. The default Mr Bones project skeleton will be used
180
+ instead. A copy of your custom skeleton is stored in an archive directory of
181
+ the ".mrbones" directory before it is removed.
182
+
183
+ bones unfreeze
184
+
185
+ You can unfreeze named skeletons, too:
186
+
187
+ bones unfreeze foo
188
+
189
+ ==== Repository Skeletons
190
+
191
+ You can instantiate a new project from a git or svn repository. For example,
192
+ if you would like to use the "bort" rails template from github, you can type
193
+ in the following:
194
+
195
+ bones create --repository git://github.com/fudgestudios/bort.git foo
196
+
197
+ Typing in the full path to the repository each time is tedious. You can
198
+ create an alias by freezing the repository and giving it an easy to remember
199
+ name.
200
+
201
+ bones freeze --repository git://github.com/fudgestudios/bort.git bort
202
+
203
+ This does not checkout a copy of the repository; it give us an easy to use
204
+ alias when we want to create a new proejct based on the repository. The
205
+ following command will use our new alias to instantiate a new project called
206
+ "foo":
207
+
208
+ bones create --skeleton bort foo
209
+
210
+ If the repository contains '.bns' files they will be filtered through the
211
+ ERb templating system. All the custom modifications described in the next
212
+ section apply to repository based skeletons as well.
213
+
214
+ ==== Custom Modifications
215
+
216
+ Mr Bones will perform a limited set of substitutions on the files in the
217
+ skeleton when it generates a new project. ERB is used to insert the project
218
+ name and the derived class name into template files. The file must end in an
219
+ ".bns" suffix for ERB substitutions to take place. The ".bns" suffix is
220
+ stripped from the file during project generation.
221
+
222
+ Only two values can be substituted into files using ERB -- the project name and
223
+ the derived class name.
224
+
225
+ <%= name %>
226
+ <%= classname %>
227
+
228
+ The project +name+ is passed in from the command line and used "as is" (with
229
+ the exception that spaces are converted to underscores). The +classname+ is
230
+ generated by camel casing the project name where the underscores occur.
231
+
232
+ get fuzzy => GetFuzzy
233
+ foo_bar => FooBar
234
+
235
+ Finally, file names can be modified by substituting in the project name. If a
236
+ file name contains the string "NAME" it is replaced with the project name. If
237
+ our project is call "get fuzzy" then the following transformations will take
238
+ place.
239
+
240
+ NAME.rb => get_fuzzy.rb
241
+ test_NAME.rb => test_get_fuzzy.rb
242
+ NAME_spec.rb => get_fuzzy_spec.rb
243
+
244
+ == ACKNOWLEDGEMENTS:
245
+
246
+ Ryan Davis and Eric Hodel and their Hoe gem (from which much of the Mr Bones
247
+ rake tasks have been stolen). The rails team and their source annotation
248
+ extractor. Bruce Williams for help in coming up with the project name. Ara T.
249
+ Howard for letting me squat in the codeforpeople rubyforge project.
250
+
251
+ == LICENSE:
252
+
253
+ MIT License
254
+ Copyright (c) 2007 - 2008
255
+
256
+ Permission is hereby granted, free of charge, to any person obtaining
257
+ a copy of this software and associated documentation files (the
258
+ 'Software'), to deal in the Software without restriction, including
259
+ without limitation the rights to use, copy, modify, merge, publish,
260
+ distribute, sub-license, and/or sell copies of the Software, and to
261
+ permit persons to whom the Software is furnished to do so, subject to
262
+ the following conditions:
263
+
264
+ The above copyright notice and this permission notice shall be
265
+ included in all copies or substantial portions of the Software.
266
+
267
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
268
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
269
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
270
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
271
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
272
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
273
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
274
+
275
+
276
+ == VERSION 2.0.0 CHANGES:
277
+
278
+ Version 2.0.0 of Mr Bones introduces backwards incompatibilities. Here is
279
+ what you need to update in order for your current projects to work with
280
+ this latest release.
281
+
282
+ Perform an update the tasks in your project directory:
283
+
284
+ bones -u your/project/directory
285
+
286
+ The following .rake files have been renamed in Mr Bones 2.0.0 (the old
287
+ name is on the left and the new name is on the right). You will need to
288
+ delete the old version and use only the new version.
289
+
290
+ doc.rake => rdoc.rake
291
+ annotations.rake => notes.rake
292
+
293
+ The PROJ openstruct has been amended to contain a collection of nested
294
+ openstructs. This will affect any settings you might have in the
295
+ top-level Rakefile for your project. Here is the translation key (old
296
+ names on the left and new names on the right).
297
+
298
+ rubyforge_name => rubyforge.name
299
+
300
+ specs => spec.files
301
+ spec_opts => spec.opts
302
+
303
+ tests => test.files
304
+ test_file => test.file
305
+ test_opts => test.opts
306
+
307
+ rcov_dir => rcov.dir
308
+ rcov_opts => rcov.opts
309
+ rcov_threshold => rcov.threshold
310
+ rcov_threshold_exact => rcov.threshold_exact
311
+
312
+ rdoc_opts => rdoc.opts
313
+ rdoc_include => rdoc.include
314
+ rdoc_exclude => rdoc.exclude
315
+ rdoc_main => rdoc.main
316
+ rdoc_dir => rdoc.dir
317
+ rdoc_remote_dir => rdoc.remote_dir
318
+
319
+ dependencies => gem.dependencies
320
+ executables => gem.executables
321
+ extensions => gem.extensions
322
+ files => gem.files
323
+ need_tar => gem.need_tar
324
+ need_zip => gem.need_zip
325
+ post_install_message => gem.extras['post_install_message']
326
+
327
+ annotation_exclude => notes.exclude
328
+ annotation_extensions => notes.extensions
329
+ annotation_tags => notes.tags
330
+
331
+ svn => svn.path
332
+ svn_root => svn.root
333
+ svn_trunk => svn.trunk
334
+ svn_tags => svn.tags
335
+ svn_branches => svn.branches
336
+
337
+ ann_file => ann.file
338
+ ann_text => ann.text
339
+ ann_paragraphs => ann.paragraphs
340
+ ann_email => ann.email
341
+
342
+ And of course, each name should be prepended with PROJ in your Rakefile.
343
+
344
+ == VERSION 2.1.0 CHANGES:
345
+
346
+ With my Mr Bones projects, I found myself constantly updating the tasks as new
347
+ versions of Mr Bones were released. This quickly became annoying. Why not use
348
+ the tasks from the Mr Bones gem and only copy those tasks to my own projects
349
+ when they are packaged and released? That is the goal of this release of Mr
350
+ Bones.
351
+
352
+ Version 2.1.0 of Mr Bones allows your projects to use the rake tasks found
353
+ in the Mr Bones gem but still remain independent from Mr Bones when
354
+ deployed. This is accomplished by copying the rake tasks into your project
355
+ only when it is packaged into a gem (or zip file or tarball).
356
+
357
+ You still have the option of copy the tasks to your local project when it is
358
+ created. Or you can add tasks to your project at a later time.
359
+
360
+ So, if you have an exsiting project and you want to use the Mr Bones tasks,
361
+ simply delete your "tasks" folder and put the following at the top of your
362
+ Rakefile:
363
+
364
+ begin
365
+ require 'bones'
366
+ Bones.setup
367
+ rescue LoadError
368
+ load 'tasks/setup.rb' # this line should already be there
369
+ end
370
+
data/Rakefile ADDED
@@ -0,0 +1,59 @@
1
+
2
+ $:.unshift('lib')
3
+
4
+ require 'bones'
5
+ Bones.setup
6
+
7
+ PROJ.name = 'bones'
8
+ PROJ.authors = 'Tim Pease'
9
+ PROJ.email = 'tim.pease@gmail.com'
10
+ PROJ.url = 'http://codeforpeople.rubyforge.org/bones'
11
+ PROJ.version = Bones::VERSION
12
+ PROJ.release_name = 'Distal Phalanges'
13
+ PROJ.ruby_opts = %w[-W0]
14
+ PROJ.readme_file = 'README.rdoc'
15
+ PROJ.ignore_file = '.gitignore'
16
+ PROJ.exclude << 'bones.gemspec'
17
+
18
+ PROJ.rubyforge.name = 'codeforpeople'
19
+
20
+ PROJ.rdoc.remote_dir = 'bones'
21
+ PROJ.rdoc.exclude << '^data/'
22
+ PROJ.notes.exclude = %w(^README\.txt$ ^data/ ^tasks/setup.rb$)
23
+
24
+ PROJ.spec.opts << '--color'
25
+
26
+ PROJ.ann.email[:server] = 'smtp.gmail.com'
27
+ PROJ.ann.email[:port] = 587
28
+ PROJ.ann.email[:from] = 'Tim Pease'
29
+
30
+ PROJ.gem.extras[:post_install_message] = <<-MSG
31
+ --------------------------
32
+ Keep rattlin' dem bones!
33
+ --------------------------
34
+ MSG
35
+
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
49
+
50
+ task :default => 'spec:specdoc'
51
+ task 'ann:prereqs' do
52
+ PROJ.name = 'Mr Bones'
53
+ end
54
+
55
+ PROJ.gem.development_dependencies.clear
56
+
57
+ depend_on 'rake'
58
+
59
+ # EOF
data/bin/bones ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(
4
+ File.join(File.dirname(__FILE__), '..', 'lib', 'bones'))
5
+ Bones::App.run ARGV
6
+
7
+ # EOF
data/data/.bnsignore ADDED
@@ -0,0 +1,12 @@
1
+ # The list of files that should be ignored by Mr Bones.
2
+ # Lines that start with '#' are comments.
3
+ #
4
+ # A .gitignore file can be used instead by setting it as the ignore
5
+ # file in your Rakefile:
6
+ #
7
+ # PROJ.ignore_file = '.gitignore'
8
+ #
9
+ # For a project with a C extension, the following would be a good set of
10
+ # exclude patterns (uncomment them if you want to use them):
11
+ # *.[oa]
12
+ # *~
@@ -0,0 +1,4 @@
1
+ == 1.0.0 / <%= Time.now.strftime("%Y-%m-%d") %>
2
+
3
+ * 1 major enhancement
4
+ * Birthday!
@@ -0,0 +1,48 @@
1
+ <%= name %>
2
+ by FIXME (your name)
3
+ FIXME (url)
4
+
5
+ == DESCRIPTION:
6
+
7
+ FIXME (describe your package)
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * FIXME (list of features or problems)
12
+
13
+ == SYNOPSIS:
14
+
15
+ FIXME (code sample of usage)
16
+
17
+ == REQUIREMENTS:
18
+
19
+ * FIXME (list of requirements)
20
+
21
+ == INSTALL:
22
+
23
+ * FIXME (sudo gem install, anything else)
24
+
25
+ == LICENSE:
26
+
27
+ (The MIT License)
28
+
29
+ Copyright (c) 2008 FIXME (different license?)
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining
32
+ a copy of this software and associated documentation files (the
33
+ 'Software'), to deal in the Software without restriction, including
34
+ without limitation the rights to use, copy, modify, merge, publish,
35
+ distribute, sublicense, and/or sell copies of the Software, and to
36
+ permit persons to whom the Software is furnished to do so, subject to
37
+ the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be
40
+ included in all copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
43
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.