bones-rspec 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ == 1.0.0 / 2010-10-14
2
+
3
+ * 1 major enhancement
4
+ * Birthday!
data/README.txt ADDED
@@ -0,0 +1,38 @@
1
+ bones-rspec
2
+ by Tim Pease
3
+ http://rubygems.org/gems/bones-rspec
4
+
5
+ == DESCRIPTION:
6
+
7
+ The rspec package for Mr Bones provides tasks to incorporate rspec tests into
8
+ bones based projects. It also works in tandem with the bones-rcov plugin to
9
+ run code coverage over your specs.
10
+
11
+ == INSTALL:
12
+
13
+ gem install bones-rspec
14
+
15
+ == LICENSE:
16
+
17
+ (The MIT License)
18
+
19
+ Copyright (c) 2010
20
+
21
+ Permission is hereby granted, free of charge, to any person obtaining
22
+ a copy of this software and associated documentation files (the
23
+ 'Software'), to deal in the Software without restriction, including
24
+ without limitation the rights to use, copy, modify, merge, publish,
25
+ distribute, sublicense, and/or sell copies of the Software, and to
26
+ permit persons to whom the Software is furnished to do so, subject to
27
+ the following conditions:
28
+
29
+ The above copyright notice and this permission notice shall be
30
+ included in all copies or substantial portions of the Software.
31
+
32
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
33
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
34
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
35
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
36
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
37
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
38
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+
2
+ begin
3
+ require 'bones'
4
+ rescue LoadError
5
+ abort '### Please install the "bones" gem ###'
6
+ end
7
+
8
+ Bones {
9
+ name 'bones-rspec'
10
+ authors 'Tim Pease'
11
+ email 'tim.pease@gmail.com'
12
+ url 'http://github.com/TwP/bones-rspec'
13
+ ignore_file '.gitignore'
14
+
15
+ depend_on 'bones'
16
+
17
+ use_gmail
18
+ }
19
+
@@ -0,0 +1,88 @@
1
+
2
+ module Bones::Plugins::Spec
3
+ include ::Bones::Helpers
4
+ extend self
5
+
6
+ def initialize_spec
7
+ require 'spec/rake/spectask'
8
+ have?(:spec) { true }
9
+
10
+ ::Bones.config {
11
+ desc 'Configuration settings for the RSpec test framework.'
12
+ spec {
13
+ files FileList['spec/**/*_spec.rb'], :desc => <<-__
14
+ The list of spec files to run. This defaults to all the ruby fines
15
+ in the 'spec' directory that end with '_spec.rb' as their filename.
16
+ __
17
+
18
+ opts [], :desc => <<-__
19
+ An array of command line options that will be passed to the spec
20
+ command when running your tests. See the RSpec help documentation
21
+ either online or from the command line by running 'spec --help'.
22
+ __
23
+ }
24
+ }
25
+ rescue LoadError
26
+ have?(:spec) { false }
27
+ end
28
+
29
+ def post_load
30
+ return unless have? :spec
31
+ config = ::Bones.config
32
+ have?(:spec) { !config.spec.files.to_a.empty? }
33
+ end
34
+
35
+ def define_tasks
36
+ return unless have? :spec
37
+ config = ::Bones.config
38
+
39
+ namespace :spec do
40
+ desc 'Run all specs with basic output'
41
+ Spec::Rake::SpecTask.new(:run) do |t|
42
+ t.ruby_opts = config.ruby_opts
43
+ t.spec_opts = config.spec.opts
44
+ t.spec_files = config.spec.files
45
+ t.libs += config.libs
46
+ end
47
+
48
+ desc 'Run all specs with text output'
49
+ Spec::Rake::SpecTask.new(:specdoc) do |t|
50
+ t.ruby_opts = config.ruby_opts
51
+ t.spec_opts = config.spec.opts + ['--format', 'specdoc']
52
+ t.spec_files = config.spec.files
53
+ t.libs += config.libs
54
+ end
55
+
56
+ if have? :rcov
57
+ require 'spec/rake/verify_rcov'
58
+
59
+ desc 'Run all specs with Rcov'
60
+ Spec::Rake::SpecTask.new(:rcov) do |t|
61
+ t.ruby_opts = config.ruby_opts
62
+ t.spec_opts = config.spec.opts
63
+ t.spec_files = config.spec.files
64
+ t.libs += config.libs
65
+ t.rcov = true
66
+ t.rcov_dir = config.rcov.dir
67
+ t.rcov_opts.concat(config.rcov.opts)
68
+ end
69
+
70
+ RCov::VerifyTask.new(:verify) do |t|
71
+ t.threshold = config.rcov.threshold
72
+ t.index_html = File.join(config.rcov.dir, 'index.html')
73
+ t.require_exact_threshold = config.rcov.threshold_exact
74
+ end
75
+
76
+ task :verify => :rcov
77
+ remove_desc_for_task %w(spec:clobber_rcov)
78
+ end
79
+ end # namespace :spec
80
+
81
+ desc 'Alias to spec:run'
82
+ task :spec => 'spec:run'
83
+
84
+ task :clobber => 'spec:clobber_rcov' if have? :rcov
85
+ end
86
+
87
+ end # module Bones::Plugins::Spec
88
+
data/version.txt ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
metadata ADDED
@@ -0,0 +1,108 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bones-rspec
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Tim Pease
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-14 00:00:00 -06:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: bones
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 19
30
+ segments:
31
+ - 3
32
+ - 5
33
+ - 0
34
+ version: 3.5.0
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: bones
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 19
46
+ segments:
47
+ - 3
48
+ - 5
49
+ - 0
50
+ version: 3.5.0
51
+ type: :development
52
+ version_requirements: *id002
53
+ description: |-
54
+ The rspec package for Mr Bones provides tasks to incorporate rspec tests into
55
+ bones based projects. It also works in tandem with the bones-rcov plugin to
56
+ run code coverage over your specs.
57
+ email: tim.pease@gmail.com
58
+ executables: []
59
+
60
+ extensions: []
61
+
62
+ extra_rdoc_files:
63
+ - History.txt
64
+ - README.txt
65
+ - version.txt
66
+ files:
67
+ - History.txt
68
+ - README.txt
69
+ - Rakefile
70
+ - lib/bones/plugins/spec.rb
71
+ - version.txt
72
+ has_rdoc: true
73
+ homepage: http://github.com/TwP/bones-rspec
74
+ licenses: []
75
+
76
+ post_install_message:
77
+ rdoc_options:
78
+ - --main
79
+ - README.txt
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ hash: 3
97
+ segments:
98
+ - 0
99
+ version: "0"
100
+ requirements: []
101
+
102
+ rubyforge_project: bones-rspec
103
+ rubygems_version: 1.3.7
104
+ signing_key:
105
+ specification_version: 3
106
+ summary: The rspec package for Mr Bones provides tasks to incorporate rspec tests into bones based projects
107
+ test_files: []
108
+