bones 2.5.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/History.txt +2 -0
  2. data/README.rdoc +54 -306
  3. data/Rakefile +28 -37
  4. data/bin/bones +10 -3
  5. data/{spec/data/data → default}/.bnsignore +3 -1
  6. data/{data → default}/History.txt.bns +0 -0
  7. data/{data → default}/README.txt.bns +0 -0
  8. data/default/Rakefile.bns +21 -0
  9. data/{data → default}/bin/NAME.bns +0 -0
  10. data/{data → default}/lib/NAME.rb.bns +0 -0
  11. data/{data → default}/spec/NAME_spec.rb.bns +0 -0
  12. data/{data → default}/spec/spec_helper.rb.bns +0 -0
  13. data/{data → default}/test/test_NAME.rb +0 -0
  14. data/lib/bones.rb +73 -31
  15. data/lib/bones/annotation_extractor.rb +16 -26
  16. data/lib/bones/app.rb +87 -58
  17. data/lib/bones/app/command.rb +143 -64
  18. data/lib/bones/app/create.rb +93 -0
  19. data/lib/bones/app/file_manager.rb +7 -8
  20. data/lib/bones/app/freeze.rb +59 -0
  21. data/lib/bones/app/info.rb +39 -0
  22. data/lib/bones/app/unfreeze.rb +44 -0
  23. data/lib/bones/colors.rb +54 -0
  24. data/lib/bones/gem_package_task.rb +71 -0
  25. data/lib/bones/helpers.rb +93 -0
  26. data/lib/bones/plugins/ann.rb +166 -0
  27. data/lib/bones/plugins/bones_plugin.rb +193 -0
  28. data/lib/bones/plugins/gem.rb +274 -0
  29. data/lib/bones/plugins/notes.rb +45 -0
  30. data/lib/bones/plugins/rdoc.rb +93 -0
  31. data/lib/bones/plugins/test.rb +57 -0
  32. data/lib/bones/smtp_tls.rb +1 -0
  33. data/spec/bones/app/file_manager_spec.rb +6 -6
  34. data/spec/bones/app_spec.rb +14 -18
  35. data/spec/bones_spec.rb +9 -4
  36. data/{data → spec/data/default}/.bnsignore +0 -0
  37. data/spec/data/{data → default}/History +0 -0
  38. data/spec/data/{data → default}/NAME/NAME.rb.bns +0 -0
  39. data/spec/data/{data → default}/README.txt.bns +0 -0
  40. data/{data → spec/data/default}/Rakefile.bns +0 -0
  41. data/spec/data/{data → default}/lib/NAME.rb.bns +0 -0
  42. metadata +94 -68
  43. data/lib/bones/app/create_command.rb +0 -86
  44. data/lib/bones/app/freeze_command.rb +0 -73
  45. data/lib/bones/app/info_command.rb +0 -58
  46. data/lib/bones/app/unfreeze_command.rb +0 -53
  47. data/lib/bones/app/update_command.rb +0 -47
  48. data/lib/bones/debug.rb +0 -72
  49. data/lib/bones/tasks/ann.rake +0 -80
  50. data/lib/bones/tasks/bones.rake +0 -20
  51. data/lib/bones/tasks/gem.rake +0 -201
  52. data/lib/bones/tasks/git.rake +0 -40
  53. data/lib/bones/tasks/notes.rake +0 -27
  54. data/lib/bones/tasks/post_load.rake +0 -34
  55. data/lib/bones/tasks/rdoc.rake +0 -51
  56. data/lib/bones/tasks/rubyforge.rake +0 -55
  57. data/lib/bones/tasks/setup.rb +0 -292
  58. data/lib/bones/tasks/spec.rake +0 -54
  59. data/lib/bones/tasks/svn.rake +0 -47
  60. data/lib/bones/tasks/test.rake +0 -40
  61. data/lib/bones/tasks/zentest.rake +0 -36
  62. data/spec/data/data/Rakefile.bns +0 -30
  63. data/tasks/ann.rake +0 -80
  64. data/tasks/bones.rake +0 -20
  65. data/tasks/gem.rake +0 -201
  66. data/tasks/git.rake +0 -40
  67. data/tasks/notes.rake +0 -27
  68. data/tasks/post_load.rake +0 -34
  69. data/tasks/rdoc.rake +0 -51
  70. data/tasks/rubyforge.rake +0 -55
  71. data/tasks/setup.rb +0 -292
  72. data/tasks/spec.rake +0 -54
  73. data/tasks/svn.rake +0 -47
  74. data/tasks/test.rake +0 -40
  75. data/tasks/zentest.rake +0 -36
data/tasks/spec.rake DELETED
@@ -1,54 +0,0 @@
1
-
2
- if HAVE_SPEC_RAKE_SPECTASK and not PROJ.spec.files.to_a.empty?
3
- require 'spec/rake/verify_rcov'
4
-
5
- namespace :spec do
6
-
7
- desc 'Run all specs with basic output'
8
- Spec::Rake::SpecTask.new(:run) do |t|
9
- t.ruby_opts = PROJ.ruby_opts
10
- t.spec_opts = PROJ.spec.opts
11
- t.spec_files = PROJ.spec.files
12
- t.libs += PROJ.libs
13
- end
14
-
15
- desc 'Run all specs with text output'
16
- Spec::Rake::SpecTask.new(:specdoc) do |t|
17
- t.ruby_opts = PROJ.ruby_opts
18
- t.spec_opts = PROJ.spec.opts + ['--format', 'specdoc']
19
- t.spec_files = PROJ.spec.files
20
- t.libs += PROJ.libs
21
- end
22
-
23
- if HAVE_RCOV
24
- desc 'Run all specs with RCov'
25
- Spec::Rake::SpecTask.new(:rcov) do |t|
26
- t.ruby_opts = PROJ.ruby_opts
27
- t.spec_opts = PROJ.spec.opts
28
- t.spec_files = PROJ.spec.files
29
- t.libs += PROJ.libs
30
- t.rcov = true
31
- t.rcov_dir = PROJ.rcov.dir
32
- t.rcov_opts = PROJ.rcov.opts + ['--exclude', 'spec']
33
- end
34
-
35
- RCov::VerifyTask.new(:verify) do |t|
36
- t.threshold = PROJ.rcov.threshold
37
- t.index_html = File.join(PROJ.rcov.dir, 'index.html')
38
- t.require_exact_threshold = PROJ.rcov.threshold_exact
39
- end
40
-
41
- task :verify => :rcov
42
- remove_desc_for_task %w(spec:clobber_rcov)
43
- end
44
-
45
- end # namespace :spec
46
-
47
- desc 'Alias to spec:run'
48
- task :spec => 'spec:run'
49
-
50
- task :clobber => 'spec:clobber_rcov' if HAVE_RCOV
51
-
52
- end # if HAVE_SPEC_RAKE_SPECTASK
53
-
54
- # EOF
data/tasks/svn.rake DELETED
@@ -1,47 +0,0 @@
1
-
2
- if HAVE_SVN
3
-
4
- unless PROJ.svn.root
5
- info = %x/svn info ./
6
- m = %r/^Repository Root:\s+(.*)$/.match(info)
7
- PROJ.svn.root = (m.nil? ? '' : m[1])
8
- end
9
- PROJ.svn.root = File.join(PROJ.svn.root, PROJ.svn.path) unless PROJ.svn.path.empty?
10
-
11
- namespace :svn do
12
-
13
- # A prerequisites task that all other tasks depend upon
14
- task :prereqs
15
-
16
- desc 'Show tags from the SVN repository'
17
- task :show_tags => 'svn:prereqs' do |t|
18
- tags = %x/svn list #{File.join(PROJ.svn.root, PROJ.svn.tags)}/
19
- tags.gsub!(%r/\/$/, '')
20
- tags = tags.split("\n").sort {|a,b| b <=> a}
21
- puts tags
22
- end
23
-
24
- desc 'Create a new tag in the SVN repository'
25
- task :create_tag => 'svn:prereqs' do |t|
26
- v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
27
- abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version
28
-
29
- svn = PROJ.svn
30
- trunk = File.join(svn.root, svn.trunk)
31
- tag = "%s-%s" % [PROJ.name, PROJ.version]
32
- tag = File.join(svn.root, svn.tags, tag)
33
- msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"
34
-
35
- puts "Creating SVN tag '#{tag}'"
36
- unless system "svn cp -m '#{msg}' #{trunk} #{tag}"
37
- abort "Tag creation failed"
38
- end
39
- end
40
-
41
- end # namespace :svn
42
-
43
- task 'gem:release' => 'svn:create_tag'
44
-
45
- end # if PROJ.svn.path
46
-
47
- # EOF
data/tasks/test.rake DELETED
@@ -1,40 +0,0 @@
1
-
2
- if test(?e, PROJ.test.file) or not PROJ.test.files.to_a.empty?
3
- require 'rake/testtask'
4
-
5
- namespace :test do
6
-
7
- Rake::TestTask.new(:run) do |t|
8
- t.libs = PROJ.libs
9
- t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file]
10
- else PROJ.test.files end
11
- t.ruby_opts += PROJ.ruby_opts
12
- t.ruby_opts += PROJ.test.opts
13
- end
14
-
15
- if HAVE_RCOV
16
- desc 'Run rcov on the unit tests'
17
- task :rcov => :clobber_rcov do
18
- opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
19
- opts = opts.join(' ')
20
- files = if test(?f, PROJ.test.file) then [PROJ.test.file]
21
- else PROJ.test.files end
22
- files = files.join(' ')
23
- sh "#{RCOV} #{files} #{opts}"
24
- end
25
-
26
- task :clobber_rcov do
27
- rm_r 'coverage' rescue nil
28
- end
29
- end
30
-
31
- end # namespace :test
32
-
33
- desc 'Alias to test:run'
34
- task :test => 'test:run'
35
-
36
- task :clobber => 'test:clobber_rcov' if HAVE_RCOV
37
-
38
- end
39
-
40
- # EOF
data/tasks/zentest.rake DELETED
@@ -1,36 +0,0 @@
1
- if HAVE_ZENTEST
2
-
3
- # --------------------------------------------------------------------------
4
- if test(?e, PROJ.test.file) or not PROJ.test.files.to_a.empty?
5
- require 'autotest'
6
-
7
- namespace :test do
8
- task :autotest do
9
- Autotest.run
10
- end
11
- end
12
-
13
- desc "Run the autotest loop"
14
- task :autotest => 'test:autotest'
15
-
16
- end # if test
17
-
18
- # --------------------------------------------------------------------------
19
- if HAVE_SPEC_RAKE_SPECTASK and not PROJ.spec.files.to_a.empty?
20
- require 'autotest/rspec'
21
-
22
- namespace :spec do
23
- task :autotest do
24
- load '.autotest' if test(?f, '.autotest')
25
- Autotest::Rspec.run
26
- end
27
- end
28
-
29
- desc "Run the autotest loop"
30
- task :autotest => 'spec:autotest'
31
-
32
- end # if rspec
33
-
34
- end # if HAVE_ZENTEST
35
-
36
- # EOF