bones 1.3.5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,16 +8,16 @@ namespace :spec do
8
8
  desc 'Run all specs with basic output'
9
9
  Spec::Rake::SpecTask.new(:run) do |t|
10
10
  t.ruby_opts = PROJ.ruby_opts
11
- t.spec_opts = PROJ.spec_opts
12
- t.spec_files = PROJ.specs
11
+ t.spec_opts = PROJ.spec.opts
12
+ t.spec_files = PROJ.spec.files
13
13
  t.libs += PROJ.libs
14
14
  end
15
15
 
16
16
  desc 'Run all specs with text output'
17
17
  Spec::Rake::SpecTask.new(:specdoc) do |t|
18
18
  t.ruby_opts = PROJ.ruby_opts
19
- t.spec_opts = PROJ.spec_opts + ['--format', 'specdoc']
20
- t.spec_files = PROJ.specs
19
+ t.spec_opts = PROJ.spec.opts + ['--format', 'specdoc']
20
+ t.spec_files = PROJ.spec.files
21
21
  t.libs += PROJ.libs
22
22
  end
23
23
 
@@ -25,21 +25,22 @@ namespace :spec do
25
25
  desc 'Run all specs with RCov'
26
26
  Spec::Rake::SpecTask.new(:rcov) do |t|
27
27
  t.ruby_opts = PROJ.ruby_opts
28
- t.spec_opts = PROJ.spec_opts
29
- t.spec_files = PROJ.specs
28
+ t.spec_opts = PROJ.spec.opts
29
+ t.spec_files = PROJ.spec.files
30
30
  t.libs += PROJ.libs
31
31
  t.rcov = true
32
- t.rcov_dir = PROJ.rcov_dir
33
- t.rcov_opts = PROJ.rcov_opts + ['--exclude', 'spec']
32
+ t.rcov_dir = PROJ.rcov.dir
33
+ t.rcov_opts = PROJ.rcov.opts + ['--exclude', 'spec']
34
34
  end
35
35
 
36
36
  RCov::VerifyTask.new(:verify) do |t|
37
- t.threshold = PROJ.rcov_threshold
38
- t.index_html = File.join(PROJ.rcov_dir, 'index.html')
39
- t.require_exact_threshold = PROJ.rcov_threshold_exact
37
+ t.threshold = PROJ.rcov.threshold
38
+ t.index_html = File.join(PROJ.rcov.dir, 'index.html')
39
+ t.require_exact_threshold = PROJ.rcov.threshold_exact
40
40
  end
41
41
 
42
42
  task :verify => :rcov
43
+ remove_desc_for_task %w(spec:clobber_rcov)
43
44
  end
44
45
 
45
46
  end # namespace :spec
@@ -49,8 +50,6 @@ task :spec => 'spec:run'
49
50
 
50
51
  task :clobber => 'spec:clobber_rcov' if HAVE_RCOV
51
52
 
52
- remove_desc_for_task %w(spec:clobber_rcov)
53
-
54
53
  end # if HAVE_SPEC_RAKE_SPECTASK
55
54
 
56
55
  # EOF
@@ -1,32 +1,36 @@
1
- # $Id$
1
+ # $Id: svn.rake 585 2008-04-07 20:15:39Z tim_pease $
2
2
 
3
+ if HAVE_SVN
3
4
 
4
- if PROJ.svn and system("svn --version 2>&1 > #{DEV_NULL}")
5
-
6
- unless PROJ.svn_root
5
+ unless PROJ.svn.root
7
6
  info = %x/svn info ./
8
7
  m = %r/^Repository Root:\s+(.*)$/.match(info)
9
- PROJ.svn_root = (m.nil? ? '' : m[1])
8
+ PROJ.svn.root = (m.nil? ? '' : m[1])
10
9
  end
11
- PROJ.svn_root = File.join(PROJ.svn_root, PROJ.svn) if String === PROJ.svn
10
+ PROJ.svn.root = File.join(PROJ.svn.root, PROJ.svn.path) unless PROJ.svn.path.empty?
12
11
 
13
12
  namespace :svn do
14
13
 
14
+ # A prerequisites task that all other tasks depend upon
15
+ task :prereqs
16
+
15
17
  desc 'Show tags from the SVN repository'
16
- task :show_tags do |t|
17
- tags = %x/svn list #{File.join(PROJ.svn_root, PROJ.svn_tags)}/
18
+ task :show_tags => 'svn:prereqs' do |t|
19
+ tags = %x/svn list #{File.join(PROJ.svn.root, PROJ.svn.tags)}/
18
20
  tags.gsub!(%r/\/$/, '')
21
+ tags = tags.split("\n").sort {|a,b| b <=> a}
19
22
  puts tags
20
23
  end
21
24
 
22
25
  desc 'Create a new tag in the SVN repository'
23
- task :create_tag do |t|
26
+ task :create_tag => 'svn:prereqs' do |t|
24
27
  v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
25
28
  abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version
26
29
 
27
- trunk = File.join(PROJ.svn_root, PROJ.svn_trunk)
30
+ svn = PROJ.svn
31
+ trunk = File.join(svn.root, svn.trunk)
28
32
  tag = "%s-%s" % [PROJ.name, PROJ.version]
29
- tag = File.join(PROJ.svn_root, PROJ.svn_tags, tag)
33
+ tag = File.join(svn.root, svn.tags, tag)
30
34
  msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"
31
35
 
32
36
  puts "Creating SVN tag '#{tag}'"
@@ -39,6 +43,6 @@ end # namespace :svn
39
43
 
40
44
  task 'gem:release' => 'svn:create_tag'
41
45
 
42
- end # if PROJ.svn
46
+ end # if PROJ.svn.path
43
47
 
44
48
  # EOF
@@ -6,19 +6,19 @@ namespace :test do
6
6
 
7
7
  Rake::TestTask.new(:run) do |t|
8
8
  t.libs = PROJ.libs
9
- t.test_files = if test(?f, PROJ.test_file) then [PROJ.test_file]
10
- else PROJ.tests end
9
+ t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file]
10
+ else PROJ.test.files end
11
11
  t.ruby_opts += PROJ.ruby_opts
12
- t.ruby_opts += PROJ.test_opts
12
+ t.ruby_opts += PROJ.test.opts
13
13
  end
14
14
 
15
15
  if HAVE_RCOV
16
16
  desc 'Run rcov on the unit tests'
17
17
  task :rcov => :clobber_rcov do
18
- opts = PROJ.rcov_opts.dup << '-o' << PROJ.rcov_dir
18
+ opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
19
19
  opts = opts.join(' ')
20
- files = if test(?f, PROJ.test_file) then [PROJ.test_file]
21
- else PROJ.tests end
20
+ files = if test(?f, PROJ.test.file) then [PROJ.test.file]
21
+ else PROJ.test.files end
22
22
  files = files.join(' ')
23
23
  sh "#{RCOV} #{files} #{opts}"
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bones
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 2.0.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: 2008-02-27 00:00:00 -07:00
12
+ date: 2008-04-07 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -46,12 +46,12 @@ files:
46
46
  - data/spec/NAME_spec.rb.erb
47
47
  - data/spec/spec_helper.rb.erb
48
48
  - data/tasks/ann.rake
49
- - data/tasks/annotations.rake
50
49
  - data/tasks/bones.rake
51
- - data/tasks/doc.rake
52
50
  - data/tasks/gem.rake
53
51
  - data/tasks/manifest.rake
52
+ - data/tasks/notes.rake
54
53
  - data/tasks/post_load.rake
54
+ - data/tasks/rdoc.rake
55
55
  - data/tasks/rubyforge.rake
56
56
  - data/tasks/setup.rb
57
57
  - data/tasks/spec.rake
@@ -60,15 +60,16 @@ files:
60
60
  - data/test/test_NAME.rb
61
61
  - lib/bones.rb
62
62
  - lib/bones/annotation_extractor.rb
63
+ - lib/bones/debug.rb
63
64
  - lib/bones/main.rb
64
65
  - lib/bones/smtp_tls.rb
65
66
  - tasks/ann.rake
66
- - tasks/annotations.rake
67
67
  - tasks/bones.rake
68
- - tasks/doc.rake
69
68
  - tasks/gem.rake
70
69
  - tasks/manifest.rake
70
+ - tasks/notes.rake
71
71
  - tasks/post_load.rake
72
+ - tasks/rdoc.rake
72
73
  - tasks/rubyforge.rake
73
74
  - tasks/setup.rb
74
75
  - tasks/spec.rake
@@ -96,12 +97,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
97
  requirements:
97
98
  - - ">="
98
99
  - !ruby/object:Gem::Version
99
- version: "0"
100
+ version: 1.1.0
100
101
  version:
101
102
  requirements: []
102
103
 
103
104
  rubyforge_project: codeforpeople
104
- rubygems_version: 1.0.1
105
+ rubygems_version: 1.1.0
105
106
  signing_key:
106
107
  specification_version: 2
107
108
  summary: Mr Bones is a handy tool that builds a skeleton for your new Ruby projects
@@ -1,22 +0,0 @@
1
- # $Id$
2
-
3
- if HAVE_BONES
4
-
5
- desc "Enumerate all annotations"
6
- task :notes do
7
- Bones::AnnotationExtractor.enumerate(
8
- PROJ, PROJ.annotation_tags.join('|'), :tag => true)
9
- end
10
-
11
- namespace :notes do
12
- PROJ.annotation_tags.each do |tag|
13
- desc "Enumerate all #{tag} annotations"
14
- task tag.downcase.to_sym do
15
- Bones::AnnotationExtractor.enumerate(PROJ, tag)
16
- end
17
- end
18
- end
19
-
20
- end # if HAVE_BONES
21
-
22
- # EOF
@@ -1,22 +0,0 @@
1
- # $Id$
2
-
3
- if HAVE_BONES
4
-
5
- desc "Enumerate all annotations"
6
- task :notes do
7
- Bones::AnnotationExtractor.enumerate(
8
- PROJ, PROJ.annotation_tags.join('|'), :tag => true)
9
- end
10
-
11
- namespace :notes do
12
- PROJ.annotation_tags.each do |tag|
13
- desc "Enumerate all #{tag} annotations"
14
- task tag.downcase.to_sym do
15
- Bones::AnnotationExtractor.enumerate(PROJ, tag)
16
- end
17
- end
18
- end
19
-
20
- end # if HAVE_BONES
21
-
22
- # EOF