bones 2.0.3 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/History.txt +11 -0
  2. data/Manifest.txt +20 -25
  3. data/README.txt +114 -83
  4. data/Rakefile +7 -6
  5. data/data/Rakefile.erb +7 -1
  6. data/data/bin/NAME.erb +1 -1
  7. data/data/lib/NAME.rb.erb +4 -11
  8. data/data/spec/NAME_spec.rb.erb +0 -1
  9. data/data/spec/spec_helper.rb.erb +0 -1
  10. data/lib/bones.rb +21 -8
  11. data/lib/bones/annotation_extractor.rb +1 -2
  12. data/lib/bones/debug.rb +0 -1
  13. data/lib/bones/main.rb +183 -109
  14. data/lib/bones/smtp_tls.rb +0 -1
  15. data/{data → lib/bones}/tasks/ann.rake +0 -1
  16. data/{data → lib/bones}/tasks/bones.rake +0 -1
  17. data/lib/bones/tasks/gem.rake +192 -0
  18. data/{data → lib/bones}/tasks/git.rake +0 -1
  19. data/{data → lib/bones}/tasks/manifest.rake +3 -4
  20. data/{data → lib/bones}/tasks/notes.rake +0 -1
  21. data/{data → lib/bones}/tasks/post_load.rake +2 -2
  22. data/{data → lib/bones}/tasks/rdoc.rake +0 -1
  23. data/{data → lib/bones}/tasks/rubyforge.rake +2 -4
  24. data/{data → lib/bones}/tasks/setup.rb +14 -3
  25. data/{data → lib/bones}/tasks/spec.rake +1 -2
  26. data/{data → lib/bones}/tasks/svn.rake +0 -1
  27. data/{data → lib/bones}/tasks/test.rake +3 -1
  28. data/spec/bones/main_spec.rb +157 -0
  29. data/spec/bones_spec.rb +18 -0
  30. data/spec/data/data/README.txt +0 -0
  31. data/spec/data/data/Rakefile +0 -0
  32. data/spec/data/foo/README.txt +0 -0
  33. data/spec/data/foo/Rakefile +0 -0
  34. data/spec/spec_helper.rb +22 -0
  35. data/tasks/ann.rake +0 -1
  36. data/tasks/bones.rake +0 -1
  37. data/tasks/gem.rake +98 -32
  38. data/tasks/git.rake +0 -1
  39. data/tasks/manifest.rake +3 -4
  40. data/tasks/notes.rake +0 -1
  41. data/tasks/post_load.rake +2 -2
  42. data/tasks/rdoc.rake +0 -1
  43. data/tasks/rubyforge.rake +2 -4
  44. data/tasks/setup.rb +14 -3
  45. data/tasks/spec.rake +1 -2
  46. data/tasks/svn.rake +47 -0
  47. data/tasks/test.rake +3 -1
  48. metadata +40 -17
  49. data/data/tasks/gem.rake +0 -126
@@ -1,126 +0,0 @@
1
- # $Id$
2
-
3
- require 'rake/gempackagetask'
4
-
5
- namespace :gem do
6
-
7
- PROJ.gem._spec = Gem::Specification.new do |s|
8
- s.name = PROJ.name
9
- s.version = PROJ.version
10
- s.summary = PROJ.summary
11
- s.authors = Array(PROJ.authors)
12
- s.email = PROJ.email
13
- s.homepage = Array(PROJ.url).first
14
- s.rubyforge_project = PROJ.rubyforge.name
15
-
16
- s.description = PROJ.description
17
-
18
- PROJ.gem.dependencies.each do |dep|
19
- s.add_dependency(*dep)
20
- end
21
-
22
- s.files = PROJ.gem.files
23
- s.executables = PROJ.gem.executables.map {|fn| File.basename(fn)}
24
- s.extensions = PROJ.gem.files.grep %r/extconf\.rb$/
25
-
26
- s.bindir = 'bin'
27
- dirs = Dir["{#{PROJ.libs.join(',')}}"]
28
- s.require_paths = dirs unless dirs.empty?
29
-
30
- incl = Regexp.new(PROJ.rdoc.include.join('|'))
31
- excl = PROJ.rdoc.exclude.dup.concat %w[\.rb$ ^(\.\/|\/)?ext]
32
- excl = Regexp.new(excl.join('|'))
33
- rdoc_files = PROJ.gem.files.find_all do |fn|
34
- case fn
35
- when excl; false
36
- when incl; true
37
- else false end
38
- end
39
- s.rdoc_options = PROJ.rdoc.opts + ['--main', PROJ.rdoc.main]
40
- s.extra_rdoc_files = rdoc_files
41
- s.has_rdoc = true
42
-
43
- if test ?f, PROJ.test.file
44
- s.test_file = PROJ.test.file
45
- else
46
- s.test_files = PROJ.test.files.to_a
47
- end
48
-
49
- # Do any extra stuff the user wants
50
- PROJ.gem.extras.each do |msg, val|
51
- case val
52
- when Proc
53
- val.call(s.send(msg))
54
- else
55
- s.send "#{msg}=", val
56
- end
57
- end
58
- end # Gem::Specification.new
59
-
60
- # A prerequisites task that all other tasks depend upon
61
- task :prereqs
62
-
63
- desc 'Show information about the gem'
64
- task :debug => 'gem:prereqs' do
65
- puts PROJ.gem._spec.to_ruby
66
- end
67
-
68
- pkg = Rake::PackageTask.new(PROJ.name, PROJ.version) do |pkg|
69
- pkg.need_tar = PROJ.gem.need_tar
70
- pkg.need_zip = PROJ.gem.need_zip
71
- pkg.package_files += PROJ.gem._spec.files
72
- end
73
- Rake::Task['gem:package'].instance_variable_set(:@full_comment, nil)
74
-
75
- gem_file = if PROJ.gem._spec.platform == Gem::Platform::RUBY
76
- "#{pkg.package_name}.gem"
77
- else
78
- "#{pkg.package_name}-#{PROJ.gem._spec.platform}.gem"
79
- end
80
-
81
- desc "Build the gem file #{gem_file}"
82
- task :package => ['gem:prereqs', "#{pkg.package_dir}/#{gem_file}"]
83
-
84
- file "#{pkg.package_dir}/#{gem_file}" => [pkg.package_dir] + PROJ.gem._spec.files do
85
- when_writing("Creating GEM") {
86
- Gem::Builder.new(PROJ.gem._spec).build
87
- verbose(true) {
88
- mv gem_file, "#{pkg.package_dir}/#{gem_file}"
89
- }
90
- }
91
- end
92
-
93
- desc 'Install the gem'
94
- task :install => [:clobber, 'gem:package'] do
95
- sh "#{SUDO} #{GEM} install --local pkg/#{PROJ.gem._spec.full_name}"
96
-
97
- # use this version of the command for rubygems > 1.0.0
98
- #sh "#{SUDO} #{GEM} install --no-update-sources pkg/#{PROJ.gem._spec.full_name}"
99
- end
100
-
101
- desc 'Uninstall the gem'
102
- task :uninstall do
103
- installed_list = Gem.source_index.find_name(PROJ.name)
104
- if installed_list and installed_list.collect { |s| s.version.to_s}.include?(PROJ.version) then
105
- sh "#{SUDO} #{GEM} uninstall --version '#{PROJ.version}' --ignore-dependencies --executables #{PROJ.name}"
106
- end
107
- end
108
-
109
- desc 'Reinstall the gem'
110
- task :reinstall => [:uninstall, :install]
111
-
112
- desc 'Cleanup the gem'
113
- task :cleanup do
114
- sh "#{SUDO} #{GEM} cleanup #{PROJ.gem._spec.name}"
115
- end
116
-
117
- end # namespace :gem
118
-
119
- desc 'Alias to gem:package'
120
- task :gem => 'gem:package'
121
-
122
- task :clobber => 'gem:clobber_package'
123
-
124
- remove_desc_for_task %w(gem:clobber_package)
125
-
126
- # EOF