Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 66 lines (56 sloc) 2.129 kb
ccdbc41 @sferik Make Rakefile executable
sferik authored
1 #!/usr/bin/env rake
74b5eb0 @sferik Use Bunder
sferik authored
2 require 'bundler'
8afaa99 @caniszczyk Add support for Travis CI
caniszczyk authored
3 include Rake::DSL
74b5eb0 @sferik Use Bunder
sferik authored
4 Bundler::GemHelper.install_tasks
f08960d Initial import
Matt Sanford authored
5
bb18a64 @sferik Opt-in for testing with rubygems-test
sferik authored
6 task :default => ['spec', 'test:conformance']
7 task :test => :spec
f08960d Initial import
Matt Sanford authored
8
c66eed6 @sferik Upgrade to RSpec 2
sferik authored
9 require 'rspec/core/rake_task'
10 RSpec::Core::RakeTask.new(:spec)
11
f2215b1 Rakefile fix for even better submodule handling
Matt Sanford authored
12 def conformance_version(dir)
74b5eb0 @sferik Use Bunder
sferik authored
13 require 'digest'
f2215b1 Rakefile fix for even better submodule handling
Matt Sanford authored
14 Dir[File.join(dir, '*')].inject(Digest::SHA1.new){|digest, file| digest.update(Digest::SHA1.file(file).hexdigest) }
15 end
16
d4bd2ec Change conformance testing to use new mmodule style. Add rake task to…
Matt Sanford authored
17 namespace :test do
18 namespace :conformance do
19 desc "Update conformance testing data"
20 task :update do
e14fc13 Fix conformance rake task. Update the data.
Matt Sanford authored
21 puts "Updating conformance data ... "
226049a Updated rake task for submodules. Updated regex for unicode (but not …
Matt Sanford authored
22 system("git submodule init") || raise("Failed to init submodule")
23 system("git submodule update") || raise("Failed to update submodule")
e14fc13 Fix conformance rake task. Update the data.
Matt Sanford authored
24 puts "Updating conformance data ... DONE"
d4bd2ec Change conformance testing to use new mmodule style. Add rake task to…
Matt Sanford authored
25 end
26
226049a Updated rake task for submodules. Updated regex for unicode (but not …
Matt Sanford authored
27 desc "Change conformance test data to the lastest version"
28 task :latest => ['conformance:update'] do
29 current_dir = File.dirname(__FILE__)
30 submodule_dir = File.join(File.dirname(__FILE__), "test", "twitter-text-conformance")
f2215b1 Rakefile fix for even better submodule handling
Matt Sanford authored
31 version_before = conformance_version(submodule_dir)
226049a Updated rake task for submodules. Updated regex for unicode (but not …
Matt Sanford authored
32 system("cd #{submodule_dir} && git pull origin master") || raise("Failed to pull submodule version")
f2215b1 Rakefile fix for even better submodule handling
Matt Sanford authored
33 system("cd #{current_dir}")
34 if conformance_version(submodule_dir) != version_before
35 system("cd #{current_dir} && git add #{submodule_dir}") || raise("Failed to add upgrade files")
36 system("git commit -m \"Upgraded to the latest conformance suite\" #{submodule_dir}") || raise("Failed to commit upgraded conformacne data")
37 puts "Upgraded conformance suite."
38 else
39 puts "No conformance suite changes."
40 end
226049a Updated rake task for submodules. Updated regex for unicode (but not …
Matt Sanford authored
41 end
42
d4bd2ec Change conformance testing to use new mmodule style. Add rake task to…
Matt Sanford authored
43 desc "Run conformance test suite"
44 task :run do
1ecd6a1 Allow underscores in subdomains
J.P. Cummins authored
45 ruby '-rubygems', "test/conformance_test.rb"
d4bd2ec Change conformance testing to use new mmodule style. Add rake task to…
Matt Sanford authored
46 end
47 end
48
49 desc "Run conformance test suite"
226049a Updated rake task for submodules. Updated regex for unicode (but not …
Matt Sanford authored
50 task :conformance => ['conformance:latest', 'conformance:run'] do
d4bd2ec Change conformance testing to use new mmodule style. Add rake task to…
Matt Sanford authored
51 end
52 end
53
c181672 @sferik Replace deprecated rake/rdoctask with rdoc/task
sferik authored
54 require 'rdoc/task'
a4927bb adding the ability to get indices as well
Raffi Krikorian authored
55 namespace :doc do
c181672 @sferik Replace deprecated rake/rdoctask with rdoc/task
sferik authored
56 RDoc::Task.new do |rd|
38a8bca Minor doc updates and a spelling fix.
Matt Sanford authored
57 rd.main = "README.rdoc"
58 rd.rdoc_dir = 'doc'
59 rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
60 end
61 end
62
c66eed6 @sferik Upgrade to RSpec 2
sferik authored
63 desc "Run cruise control build"
f175c2f Cruise should run conformance tests
Matt Sanford authored
64 task :cruise => [:spec, 'test:conformance'] do
65 end
Something went wrong with that request. Please try again.