GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of freelancing-god/active-matchers
Description: Helpful rspec matchers for testing validations and associations.
Homepage: http://am.freelancing-gods.com
Clone URL: git://github.com/Narnach/active-matchers.git
Converted to a proper gem.
chrislloyd (author)
Tue Jul 01 22:02:33 -0700 2008
commit  0ee307934f5bba9faa12b5017eeb930932c81bd5
tree    b47def69b183280e1c9dc2433dfd25338ce675f2
parent  c34f3aac89c22116de624ec7b1d27d4f0a85373c
...
1
2
 
...
 
1
2
0
@@ -1 +1 @@
0
-pkg
0
\ No newline at end of file
0
+pkg
...
1
2
3
 
4
 
 
5
6
 
7
8
9
10
 
11
12
 
 
 
 
 
 
13
14
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
17
18
19
20
21
 
 
22
23
24
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
...
 
 
 
1
2
3
4
5
 
6
7
 
 
 
8
9
 
10
11
12
13
14
15
16
 
 
17
18
19
20
21
22
23
24
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
0
@@ -1,52 +1,52 @@
0
-require 'rake'
0
-require 'rake/testtask'
0
-require 'rake/rdoctask'
0
+require 'rubygems'
0
 require 'rake/gempackagetask'
0
+require 'rubygems/specification'
0
+require 'date'
0
 
0
-require 'active_record'
0
+$:.unshift File.join(File.dirname(__FILE__), 'lib')
0
 
0
-# allow require of spec/spec_helper
0
-$LOAD_PATH.unshift File.dirname(__FILE__) + '/../'
0
-$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib'
0
+require 'active-matchers'
0
 
0
-require 'active_matchers'
0
+GEM = "active-matchers"
0
+GEM_VERSION = ActiveMatchers::Version::STRING
0
+AUTHOR = "Pat Allan"
0
+EMAIL = "pat@freelancing-gods.com"
0
+HOMEPAGE = "http://am.freelancing-gods.com"
0
+SUMMARY = "Helpful rspec matchers for testing validations and associations."
0
 
0
-desc 'Default: run unit tests.'
0
-task :default => :test
0
+spec = Gem::Specification.new do |s|
0
+ s.name = GEM
0
+ s.version = GEM_VERSION
0
+ s.platform = Gem::Platform::RUBY
0
+ s.has_rdoc = true
0
+ s.extra_rdoc_files = ['README','LICENSE']
0
+ s.summary = SUMMARY
0
+ s.description = s.summary
0
+ s.author = AUTHOR
0
+ s.email = EMAIL
0
+ s.homepage = HOMEPAGE
0
+
0
+ s.add_dependency 'active_record'
0
+
0
+ s.require_path = 'lib'
0
+ s.autorequire = GEM
0
+ s.files = %w(README LICENSE Rakefile init.rb) + Dir.glob("{lib,specs}/**/*")
0
+end
0
 
0
-desc 'Test the rspec_additions plugin.'
0
-Rake::TestTask.new(:test) do |t|
0
- t.libs << 'lib'
0
- t.pattern = 'test/**/*_test.rb'
0
- t.verbose = true
0
+Rake::GemPackageTask.new(spec) do |pkg|
0
+ pkg.gem_spec = spec
0
 end
0
 
0
-desc 'Generate documentation for the rspec_additions plugin.'
0
-Rake::RDocTask.new(:rdoc) do |rdoc|
0
- rdoc.rdoc_dir = 'rdoc'
0
- rdoc.title = 'Active Matchers'
0
- rdoc.options << '--line-numbers' << '--inline-source'
0
- rdoc.rdoc_files.include('README')
0
- rdoc.rdoc_files.include('lib/**/*.rb')
0
+desc "install the gem locally"
0
+task :install => [:package] do
0
+ sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
0
 end
0
 
0
-spec = Gem::Specification.new do |s|
0
- s.name = "active-matchers"
0
- s.version = ActiveMatchers::Version::String
0
- s.summary = "Helpful rspec matchers for testing validations and associations."
0
- s.description = "Helpful rspec matchers for testing validations and associations."
0
- s.author = "Pat Allan"
0
- s.email = "pat@freelancing-gods.com"
0
- s.homepage = "http://am.freelancing-gods.com"
0
- s.has_rdoc = true
0
- s.rdoc_options << "--title" << "Active Matchers - Model Matchers for RSpec" <<
0
- "--line-numbers"
0
- s.rubyforge_project = "active-matchers"
0
- s.files = FileList[
0
- "lib/**/*.rb",
0
- # "MIT-LICENCE",
0
- "README"
0
- ]
0
+desc "create a gemspec file"
0
+task :make_spec do
0
+ File.open("#{GEM}.gemspec", "w") do |file|
0
+ file.puts spec.to_ruby
0
+ end
0
 end
0
 
0
 Rake::GemPackageTask.new(spec) do |p|

Comments

    No one has commented yet.