diff options
Diffstat (limited to 'vendor/plugins/thinking-sphinx/tasks')
| -rw-r--r-- | vendor/plugins/thinking-sphinx/tasks/distribution.rb | 48 | ||||
| -rw-r--r-- | vendor/plugins/thinking-sphinx/tasks/rails.rake | 1 | ||||
| -rw-r--r-- | vendor/plugins/thinking-sphinx/tasks/testing.rb | 86 |
3 files changed, 0 insertions, 135 deletions
diff --git a/vendor/plugins/thinking-sphinx/tasks/distribution.rb b/vendor/plugins/thinking-sphinx/tasks/distribution.rb deleted file mode 100644 index 54ea964..0000000 --- a/vendor/plugins/thinking-sphinx/tasks/distribution.rb +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | require 'rake/rdoctask' | ||
| 2 | require 'rake/gempackagetask' | ||
| 3 | |||
| 4 | $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib' | ||
| 5 | require 'thinking_sphinx' | ||
| 6 | |||
| 7 | desc 'Generate documentation' | ||
| 8 | Rake::RDocTask.new(:rdoc) do |rdoc| | ||
| 9 | rdoc.rdoc_dir = 'rdoc' | ||
| 10 | rdoc.title = 'Thinking Sphinx - ActiveRecord Sphinx Plugin' | ||
| 11 | rdoc.options << '--line-numbers' << '--inline-source' | ||
| 12 | rdoc.rdoc_files.include('README') | ||
| 13 | rdoc.rdoc_files.include('lib/**/*.rb') | ||
| 14 | end | ||
| 15 | |||
| 16 | spec = Gem::Specification.new do |s| | ||
| 17 | s.name = "thinking-sphinx" | ||
| 18 | s.version = ThinkingSphinx::Version::String | ||
| 19 | s.summary = "A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching." | ||
| 20 | s.description = "A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching." | ||
| 21 | s.author = "Pat Allan" | ||
| 22 | s.email = "pat@freelancing-gods.com" | ||
| 23 | s.homepage = "http://ts.freelancing-gods.com" | ||
| 24 | s.has_rdoc = true | ||
| 25 | s.rdoc_options << "--title" << "Thinking Sphinx -- Rails/Merb Sphinx Plugin" << | ||
| 26 | "--line-numbers" | ||
| 27 | s.rubyforge_project = "thinking-sphinx" | ||
| 28 | s.test_files = FileList["spec/**/*_spec.rb"] | ||
| 29 | s.files = FileList[ | ||
| 30 | "lib/**/*.rb", | ||
| 31 | "LICENCE", | ||
| 32 | "README", | ||
| 33 | "tasks/**/*.rb", | ||
| 34 | "tasks/**/*.rake", | ||
| 35 | "vendor/**/*" | ||
| 36 | ] | ||
| 37 | end | ||
| 38 | |||
| 39 | Rake::GemPackageTask.new(spec) do |p| | ||
| 40 | p.gem_spec = spec | ||
| 41 | p.need_tar = true | ||
| 42 | p.need_zip = true | ||
| 43 | end | ||
| 44 | |||
| 45 | desc "Build gemspec file" | ||
| 46 | task :build do | ||
| 47 | File.open('thinking-sphinx.gemspec', 'w') { |f| f.write spec.to_ruby } | ||
| 48 | end | ||
diff --git a/vendor/plugins/thinking-sphinx/tasks/rails.rake b/vendor/plugins/thinking-sphinx/tasks/rails.rake deleted file mode 100644 index 47fa76c..0000000 --- a/vendor/plugins/thinking-sphinx/tasks/rails.rake +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | require File.join(File.dirname(__FILE__), '/../lib/thinking_sphinx/tasks') \ No newline at end of file | ||
diff --git a/vendor/plugins/thinking-sphinx/tasks/testing.rb b/vendor/plugins/thinking-sphinx/tasks/testing.rb deleted file mode 100644 index 9cb83ba..0000000 --- a/vendor/plugins/thinking-sphinx/tasks/testing.rb +++ /dev/null | |||
| @@ -1,86 +0,0 @@ | |||
| 1 | require 'rubygems' | ||
| 2 | require 'spec/rake/spectask' | ||
| 3 | require 'cucumber/rake/task' | ||
| 4 | |||
| 5 | desc "Run the specs under spec" | ||
| 6 | Spec::Rake::SpecTask.new do |t| | ||
| 7 | t.spec_files = FileList['spec/**/*_spec.rb'] | ||
| 8 | t.spec_opts << "-c" | ||
| 9 | end | ||
| 10 | |||
| 11 | desc "Run all feature-set configurations" | ||
| 12 | task :features do |t| | ||
| 13 | puts "rake features:mysql" | ||
| 14 | system "rake features:mysql" | ||
| 15 | puts "rake features:postgresql" | ||
| 16 | system "rake features:postgresql" | ||
| 17 | end | ||
| 18 | |||
| 19 | namespace :features do | ||
| 20 | def add_task(name, description) | ||
| 21 | Cucumber::Rake::Task.new(name, description) do |t| | ||
| 22 | t.cucumber_opts = "--format pretty" | ||
| 23 | t.step_pattern = [ | ||
| 24 | "features/support/env", | ||
| 25 | "features/support/db/#{name}", | ||
| 26 | "features/support/db/active_record", | ||
| 27 | "features/support/post_database", | ||
| 28 | "features/step_definitions/**.rb" | ||
| 29 | ] | ||
| 30 | end | ||
| 31 | end | ||
| 32 | |||
| 33 | add_task :mysql, "Run feature-set against MySQL" | ||
| 34 | add_task :postgresql, "Run feature-set against PostgreSQL" | ||
| 35 | end | ||
| 36 | |||
| 37 | desc "Generate RCov reports" | ||
| 38 | Spec::Rake::SpecTask.new(:rcov) do |t| | ||
| 39 | t.libs << 'lib' | ||
| 40 | t.spec_files = FileList['spec/**/*_spec.rb'] | ||
| 41 | t.rcov = true | ||
| 42 | t.rcov_opts = ['--exclude', 'spec', '--exclude', 'gems', '--exclude', 'riddle'] | ||
| 43 | end | ||
| 44 | |||
| 45 | namespace :rcov do | ||
| 46 | def add_task(name, description) | ||
| 47 | Cucumber::Rake::Task.new(name, description) do |t| | ||
| 48 | t.cucumber_opts = "--format pretty" | ||
| 49 | t.step_pattern = [ | ||
| 50 | "features/support/env", | ||
| 51 | "features/support/db/#{name}", | ||
| 52 | "features/support/db/active_record", | ||
| 53 | "features/support/post_database", | ||
| 54 | "features/step_definitions/**.rb" | ||
| 55 | ] | ||
| 56 | t.rcov = true | ||
| 57 | t.rcov_opts = [ | ||
| 58 | '--exclude', 'spec', | ||
| 59 | '--exclude', 'gems', | ||
| 60 | '--exclude', 'riddle', | ||
| 61 | '--exclude', 'features' | ||
| 62 | ] | ||
| 63 | end | ||
| 64 | end | ||
| 65 | |||
| 66 | add_task :mysql, "Run feature-set against MySQL with rcov" | ||
| 67 | add_task :postgresql, "Run feature-set against PostgreSQL with rcov" | ||
| 68 | end | ||
| 69 | |||
| 70 | desc "Build cucumber.yml file" | ||
| 71 | task :cucumber_defaults do | ||
| 72 | default_requires = %w( | ||
| 73 | --require features/support/env.rb | ||
| 74 | --require features/support/db/mysql.rb | ||
| 75 | --require features/support/db/active_record.rb | ||
| 76 | --require features/support/post_database.rb | ||
| 77 | ).join(" ") | ||
| 78 | |||
| 79 | step_definitions = FileList["features/step_definitions/**.rb"].collect { |path| | ||
| 80 | "--require #{path}" | ||
| 81 | }.join(" ") | ||
| 82 | |||
| 83 | File.open('cucumber.yml', 'w') { |f| | ||
| 84 | f.write "default: \"#{default_requires} #{step_definitions}\"" | ||
| 85 | } | ||
| 86 | end | ||
