public
Description: RSpec's official Ruby on Rails plugin
Clone URL: git://github.com/dchelimsky/rspec-rails.git
Search Repo:
Added a rake task for building a gem out of the plugin.  This allows for 
easier reuse of ActiveRecord helpers in non RoR apps ( see ticket #383).
Updated Spec::Rails::VERSION to be more consistent with Spec::VERSION 
since it will now be treated like a gem in some cases.
bmabey (author)
Sat Jun 28 13:25:47 -0700 2008
dchelimsky (committer)
Sat Jun 28 13:37:17 -0700 2008
commit  5e24a49373c4b64a3a7216bcdd6ea44becebe573
tree    53db6800149dffe563fca63467b4feaa15b4ce68
parent  abcffab8b13a41956b82dc7672ccfa8b34b9e553
...
 
1
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
4
5
...
7
8
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
0
@@ -1,5 +1,23 @@
0
+$:.unshift('lib')
0
 require 'rake'
0
 require 'rake/rdoctask'
0
+require 'rubygems'
0
+require 'rake/gempackagetask'
0
+
0
+begin
0
+
0
+ module Spec
0
+ module VERSION
0
+ BUILD_TIME_UTC = 'place_holder'
0
+ end
0
+ end
0
+
0
+ require 'spec/rails/version'
0
+
0
+rescue
0
+ # Catch the BUILD_TIME_UTC verification exception.
0
+ # This exception is not relevant when running these tasks and hinders the gem installation.
0
+end
0
 
0
 desc 'Generate RDoc'
0
 rd = Rake::RDocTask.new do |rdoc|
0
@@ -7,3 +25,40 @@ rd = Rake::RDocTask.new do |rdoc|
0
   rdoc.options << '--title' << 'Spec::Rails' << '--line-numbers' << '--inline-source' << '--main' << 'Spec::Rails'
0
   rdoc.rdoc_files.include('MIT-LICENSE', 'lib/**/*.rb')
0
 end
0
+
0
+PKG_NAME = "rspec-rails"
0
+PKG_VERSION = Spec::Rails::VERSION::STRING
0
+PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
0
+PKG_FILES = FileList[
0
+ '[A-Z]*',
0
+ 'lib/**/*.rb',
0
+ 'spec/**/*',
0
+ 'spec_resources/**/*',
0
+ 'generators/**/*',
0
+ 'stories/**/*',
0
+ 'tasks/**/*'
0
+]
0
+
0
+rspec_rails = Gem::Specification.new do |s|
0
+ s.name = PKG_NAME
0
+ s.version = PKG_VERSION
0
+ s.summary = Spec::Rails::VERSION::DESCRIPTION
0
+ s.description = <<-EOF
0
+ rpsec-rails is a Ruby on Rails plugin that allows you to drive the development
0
+ of your RoR application using RSpec, a framework that aims to enable BDD in Ruby.
0
+ EOF
0
+
0
+ s.files = PKG_FILES.to_a
0
+ s.require_path = 'lib'
0
+
0
+ s.has_rdoc = true
0
+ s.rdoc_options = rd.options
0
+
0
+ s.author = "RSpec Development Team"
0
+ s.email = "rspec-devel@rubyforge.org"
0
+ s.homepage = Spec::Rails::VERSION::URL
0
+ s.platform = Gem::Platform::RUBY
0
+end
0
+
0
+Rake::GemPackageTask.new(rspec_rails) do |pkg|
0
+end
...
1
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
6
7
...
1
2
3
 
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
0
@@ -1,7 +1,23 @@
0
 module Spec
0
   module Rails
0
     module VERSION #:nodoc:
0
- BUILD_TIME_UTC = 20080615141040
0
+ unless defined? MAJOR
0
+ MAJOR = 1
0
+ MINOR = 1
0
+ TINY = 4
0
+ RELEASE_CANDIDATE = nil
0
+
0
+ BUILD_TIME_UTC = 20080615141040
0
+
0
+ STRING = [MAJOR, MINOR, TINY].join('.')
0
+ TAG = "REL_#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('_')}".upcase.gsub(/\.|-/, '_')
0
+ FULL_VERSION = "#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')} (build #{BUILD_TIME_UTC})"
0
+
0
+ NAME = "RSpec-Rails"
0
+ URL = "http://github.com/dchelimsky/rspec-rails"
0
+
0
+ DESCRIPTION = "#{NAME}-#{FULL_VERSION} - BDD for Ruby on Rails\n#{URL}"
0
+ end
0
     end
0
   end
0
 end

Comments

    No one has commented yet.