Permalink
Browse files

cleaning out some unused plugins

  • Loading branch information...
1 parent f6fd20d commit 11529a4e7622e8c0ca9af8ec00d48908129082cc @ryanb committed Dec 7, 2010
Showing with 7 additions and 3,254 deletions.
  1. +7 −6 db/schema.rb
  2. +0 −182 lib/tasks/rspec.rake
  3. +0 −20 vendor/plugins/delayed_job/MIT-LICENSE
  4. +0 −107 vendor/plugins/delayed_job/README.textile
  5. +0 −22 vendor/plugins/delayed_job/Rakefile
  6. +0 −1 vendor/plugins/delayed_job/VERSION
  7. +0 −61 vendor/plugins/delayed_job/delayed_job.gemspec
  8. +0 −11 vendor/plugins/delayed_job/generators/delayed_job/delayed_job_generator.rb
  9. +0 −20 vendor/plugins/delayed_job/generators/delayed_job/templates/migration.rb
  10. +0 −7 vendor/plugins/delayed_job/generators/delayed_job/templates/script
  11. +0 −1 vendor/plugins/delayed_job/init.rb
  12. +0 −65 vendor/plugins/delayed_job/lib/delayed/command.rb
  13. +0 −271 vendor/plugins/delayed_job/lib/delayed/job.rb
  14. +0 −17 vendor/plugins/delayed_job/lib/delayed/message_sending.rb
  15. +0 −55 vendor/plugins/delayed_job/lib/delayed/performable_method.rb
  16. +0 −54 vendor/plugins/delayed_job/lib/delayed/worker.rb
  17. +0 −13 vendor/plugins/delayed_job/lib/delayed_job.rb
  18. +0 −26 vendor/plugins/delayed_job/recipes/delayed_job.rb
  19. +0 −42 vendor/plugins/delayed_job/spec/database.rb
  20. +0 −128 vendor/plugins/delayed_job/spec/delayed_method_spec.rb
  21. +0 −389 vendor/plugins/delayed_job/spec/job_spec.rb
  22. +0 −17 vendor/plugins/delayed_job/spec/story_spec.rb
  23. +0 −1 vendor/plugins/delayed_job/tasks/jobs.rake
  24. +0 −15 vendor/plugins/delayed_job/tasks/tasks.rb
  25. +0 −20 vendor/plugins/rails_upgrade/MIT-LICENSE
  26. +0 −20 vendor/plugins/rails_upgrade/README
  27. +0 −22 vendor/plugins/rails_upgrade/Rakefile
  28. +0 −2 vendor/plugins/rails_upgrade/init.rb
  29. +0 −38 vendor/plugins/rails_upgrade/install.rb
  30. +0 −472 vendor/plugins/rails_upgrade/lib/application_checker.rb
  31. +0 −95 vendor/plugins/rails_upgrade/lib/gemfile_generator.rb
  32. +0 −51 vendor/plugins/rails_upgrade/lib/new_configuration_generator.rb
  33. 0 vendor/plugins/rails_upgrade/lib/rails_upgrade.rb
  34. +0 −349 vendor/plugins/rails_upgrade/lib/routes_upgrader.rb
  35. +0 −78 vendor/plugins/rails_upgrade/lib/tasks/rails_upgrade_tasks.rake
  36. +0 −293 vendor/plugins/rails_upgrade/test/application_checker_test.rb
  37. +0 −72 vendor/plugins/rails_upgrade/test/gemfile_generator_test.rb
  38. +0 −63 vendor/plugins/rails_upgrade/test/new_configuration_generator_test.rb
  39. +0 −142 vendor/plugins/rails_upgrade/test/routes_upgrader_test.rb
  40. +0 −5 vendor/plugins/rails_upgrade/test/test_helper.rb
  41. +0 −1 vendor/plugins/rails_upgrade/uninstall.rb
View
@@ -1,10 +1,11 @@
-# This file is auto-generated from the current state of the database. Instead of editing this file,
-# please use the migrations feature of Active Record to incrementally modify your database, and
-# then regenerate this schema definition.
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
#
-# Note that this schema.rb definition is the authoritative source for your database schema. If you need
-# to create the application database on another system, you should be using db:schema:load, not running
-# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
View
@@ -1,182 +0,0 @@
-gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
-rspec_gem_dir = nil
-Dir["#{RAILS_ROOT}/vendor/gems/*"].each do |subdir|
- rspec_gem_dir = subdir if subdir.gsub("#{RAILS_ROOT}/vendor/gems/","") =~ /^(\w+-)?rspec-(\d+)/ && File.exist?("#{subdir}/lib/spec/rake/spectask.rb")
-end
-rspec_plugin_dir = File.expand_path(File.dirname(__FILE__) + '/../../vendor/plugins/rspec')
-
-if rspec_gem_dir && (test ?d, rspec_plugin_dir)
- raise "\n#{'*'*50}\nYou have rspec installed in both vendor/gems and vendor/plugins\nPlease pick one and dispose of the other.\n#{'*'*50}\n\n"
-end
-
-if rspec_gem_dir
- $LOAD_PATH.unshift("#{rspec_gem_dir}/lib")
-elsif File.exist?(rspec_plugin_dir)
- $LOAD_PATH.unshift("#{rspec_plugin_dir}/lib")
-end
-
-# Don't load rspec if running "rake gems:*"
-unless ARGV.any? {|a| a =~ /^gems/}
-
-begin
- require 'spec/rake/spectask'
-rescue MissingSourceFile
- module Spec
- module Rake
- class SpecTask
- def initialize(name)
- task name do
- # if rspec-rails is a configured gem, this will output helpful material and exit ...
- require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
-
- # ... otherwise, do this:
- raise <<-MSG
-
-#{"*" * 80}
-* You are trying to run an rspec rake task defined in
-* #{__FILE__},
-* but rspec can not be found in vendor/gems, vendor/plugins or system gems.
-#{"*" * 80}
-MSG
- end
- end
- end
- end
- end
-end
-
-Rake.application.instance_variable_get('@tasks').delete('default')
-
-spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop
-task :noop do
-end
-
-task :default => :spec
-task :stats => "spec:statsetup"
-
-desc "Run all specs in spec directory (excluding plugin specs)"
-Spec::Rake::SpecTask.new(:spec => spec_prereq) do |t|
- t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
- t.spec_files = FileList['spec/**/*_spec.rb']
-end
-
-namespace :spec do
- desc "Run all specs in spec directory with RCov (excluding plugin specs)"
- Spec::Rake::SpecTask.new(:rcov) do |t|
- t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.rcov = true
- t.rcov_opts = lambda do
- IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
- end
- end
-
- desc "Print Specdoc for all specs (excluding plugin specs)"
- Spec::Rake::SpecTask.new(:doc) do |t|
- t.spec_opts = ["--format", "specdoc", "--dry-run"]
- t.spec_files = FileList['spec/**/*_spec.rb']
- end
-
- desc "Print Specdoc for all plugin examples"
- Spec::Rake::SpecTask.new(:plugin_doc) do |t|
- t.spec_opts = ["--format", "specdoc", "--dry-run"]
- t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*')
- end
-
- [:models, :controllers, :views, :helpers, :lib, :integration].each do |sub|
- desc "Run the code examples in spec/#{sub}"
- Spec::Rake::SpecTask.new(sub => spec_prereq) do |t|
- t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
- t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
- end
- end
-
- desc "Run the code examples in vendor/plugins (except RSpec's own)"
- Spec::Rake::SpecTask.new(:plugins => spec_prereq) do |t|
- t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
- t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude("vendor/plugins/rspec-rails/*")
- end
-
- namespace :plugins do
- desc "Runs the examples for rspec_on_rails"
- Spec::Rake::SpecTask.new(:rspec_on_rails) do |t|
- t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
- t.spec_files = FileList['vendor/plugins/rspec-rails/spec/**/*_spec.rb']
- end
- end
-
- # Setup specs for stats
- task :statsetup do
- require 'code_statistics'
- ::STATS_DIRECTORIES << %w(Model\ specs spec/models) if File.exist?('spec/models')
- ::STATS_DIRECTORIES << %w(View\ specs spec/views) if File.exist?('spec/views')
- ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) if File.exist?('spec/controllers')
- ::STATS_DIRECTORIES << %w(Helper\ specs spec/helpers) if File.exist?('spec/helpers')
- ::STATS_DIRECTORIES << %w(Library\ specs spec/lib) if File.exist?('spec/lib')
- ::STATS_DIRECTORIES << %w(Routing\ specs spec/routing) if File.exist?('spec/routing')
- ::STATS_DIRECTORIES << %w(Integration\ specs spec/integration) if File.exist?('spec/integration')
- ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?('spec/models')
- ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?('spec/views')
- ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?('spec/controllers')
- ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?('spec/helpers')
- ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?('spec/lib')
- ::CodeStatistics::TEST_TYPES << "Routing specs" if File.exist?('spec/routing')
- ::CodeStatistics::TEST_TYPES << "Integration specs" if File.exist?('spec/integration')
- end
-
- namespace :db do
- namespace :fixtures do
- desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z."
- task :load => :environment do
- ActiveRecord::Base.establish_connection(Rails.env)
- base_dir = File.join(Rails.root, 'spec', 'fixtures')
- fixtures_dir = ENV['FIXTURES_DIR'] ? File.join(base_dir, ENV['FIXTURES_DIR']) : base_dir
-
- require 'active_record/fixtures'
- (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/).map {|f| File.join(fixtures_dir, f) } : Dir.glob(File.join(fixtures_dir, '*.{yml,csv}'))).each do |fixture_file|
- Fixtures.create_fixtures(File.dirname(fixture_file), File.basename(fixture_file, '.*'))
- end
- end
- end
- end
-
- namespace :server do
- daemonized_server_pid = File.expand_path("#{RAILS_ROOT}/tmp/pids/spec_server.pid")
-
- desc "start spec_server."
- task :start do
- if File.exist?(daemonized_server_pid)
- $stderr.puts "spec_server is already running."
- else
- $stderr.puts %Q{Starting up spec_server ...}
- FileUtils.mkdir_p('tmp/pids') unless test ?d, 'tmp/pids'
- system("ruby", "script/spec_server", "--daemon", "--pid", daemonized_server_pid)
- end
- end
-
- desc "stop spec_server."
- task :stop do
- unless File.exist?(daemonized_server_pid)
- $stderr.puts "No server running."
- else
- $stderr.puts "Shutting down spec_server ..."
- system("kill", "-s", "TERM", File.read(daemonized_server_pid).strip) &&
- File.delete(daemonized_server_pid)
- end
- end
-
- desc "restart spec_server."
- task :restart => [:stop, :start]
-
- desc "check if spec server is running"
- task :status do
- if File.exist?(daemonized_server_pid)
- $stderr.puts %Q{spec_server is running (PID: #{File.read(daemonized_server_pid).gsub("\n","")})}
- else
- $stderr.puts "No server running."
- end
- end
- end
-end
-
-end
@@ -1,20 +0,0 @@
-Copyright (c) 2005 Tobias Luetke
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOa AND
-NONINFRINGEMENT. IN NO EVENT SaALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,107 +0,0 @@
-h1. Delayed::Job
-
-Delated_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background.
-
-It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks. Amongst those tasks are:
-
-* sending massive newsletters
-* image resizing
-* http downloads
-* updating smart collections
-* updating solr, our search server, after product changes
-* batch imports
-* spam checks
-
-h2. Setup
-
-The library evolves around a delayed_jobs table which looks as follows:
-
- create_table :delayed_jobs, :force => true do |table|
- table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue
- table.integer :attempts, :default => 0 # Provides for retries, but still fail eventually.
- table.text :handler # YAML-encoded string of the object that will do work
- table.string :last_error # reason for last failure (See Note below)
- table.datetime :run_at # When to run. Could be Time.now for immediately, or sometime in the future.
- table.datetime :locked_at # Set when a client is working on this object
- table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
- table.string :locked_by # Who is working on this object (if locked)
- table.timestamps
- end
-
-On failure, the job is scheduled again in 5 seconds + N ** 4, where N is the number of retries.
-
-The default MAX_ATTEMPTS is 25. After this, the job either deleted (default), or left in the database with "failed_at" set.
-With the default of 25 attempts, the last retry will be 20 days later, with the last interval being almost 100 hours.
-
-The default MAX_RUN_TIME is 4.hours. If your job takes longer than that, another computer could pick it up. It's up to you to
-make sure your job doesn't exceed this time. You should set this to the longest time you think the job could take.
-
-By default, it will delete failed jobs (and it always deletes successful jobs). If you want to keep failed jobs, set
-Delayed::Job.destroy_failed_jobs = false. The failed jobs will be marked with non-null failed_at.
-
-Here is an example of changing job parameters in Rails:
-
- # config/initializers/delayed_job_config.rb
- Delayed::Job.destroy_failed_jobs = false
- silence_warnings do
- Delayed::Job.const_set("MAX_ATTEMPTS", 3)
- Delayed::Job.const_set("MAX_RUN_TIME", 5.minutes)
- end
-
-Note: If your error messages are long, consider changing last_error field to a :text instead of a :string (255 character limit).
-
-
-h2. Usage
-
-Jobs are simple ruby objects with a method called perform. Any object which responds to perform can be stuffed into the jobs table.
-Job objects are serialized to yaml so that they can later be resurrected by the job runner.
-
- class NewsletterJob < Struct.new(:text, :emails)
- def perform
- emails.each { |e| NewsletterMailer.deliver_text_to_email(text, e) }
- end
- end
-
- Delayed::Job.enqueue NewsletterJob.new('lorem ipsum...', Customers.find(:all).collect(&:email))
-
-There is also a second way to get jobs in the queue: send_later.
-
-
- BatchImporter.new(Shop.find(1)).send_later(:import_massive_csv, massive_csv)
-
-
-This will simply create a Delayed::PerformableMethod job in the jobs table which serializes all the parameters you pass to it. There are some special smarts for active record objects
-which are stored as their text representation and loaded from the database fresh when the job is actually run later.
-
-
-h2. Running the jobs
-
-Run @script/generate delayed_job@ to add @script/delayed_job@. This script can then be used to manage a process which will start working off jobs.
-
- # Runs two workers in separate processes.
- $ ruby script/delayed_job -e production -n 2 start
- $ ruby script/delayed_job -e production stop
-
-You can invoke @rake jobs:work@ which will start working off jobs. You can cancel the rake task with @CTRL-C@.
-
-Workers can be running on any computer, as long as they have access to the database and their clock is in sync. You can even
-run multiple workers on per computer, but you must give each one a unique name. (TODO: put in an example)
-Keep in mind that each worker will check the database at least every 5 seconds.
-
-Note: The rake task will exit if the database has any network connectivity problems.
-
-h3. Cleaning up
-
-You can invoke @rake jobs:clear@ to delete all jobs in the queue.
-
-h3. Changes
-
-* 1.7.0: Added failed_at column which can optionally be set after a certain amount of failed job attempts. By default failed job attempts are destroyed after about a month.
-
-* 1.6.0: Renamed locked_until to locked_at. We now store when we start a given job instead of how long it will be locked by the worker. This allows us to get a reading on how long a job took to execute.
-
-* 1.5.0: Job runners can now be run in parallel. Two new database columns are needed: locked_until and locked_by. This allows us to use pessimistic locking instead of relying on row level locks. This enables us to run as many worker processes as we need to speed up queue processing.
-
-* 1.2.0: Added #send_later to Object for simpler job creation
-
-* 1.0.0: Initial release
@@ -1,22 +0,0 @@
-# -*- encoding: utf-8 -*-
-begin
- require 'jeweler'
-rescue LoadError
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
- exit 1
-end
-
-Jeweler::Tasks.new do |s|
- s.name = "delayed_job"
- s.summary = "Database-backed asynchronous priority queue system -- Extracted from Shopify"
- s.email = "tobi@leetsoft.com"
- s.homepage = "http://github.com/tobi/delayed_job/tree/master"
- s.description = "Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks."
- s.authors = ["Tobias Lütke"]
-
- s.has_rdoc = true
- s.rdoc_options = ["--main", "README.textile", "--inline-source", "--line-numbers"]
- s.extra_rdoc_files = ["README.textile"]
-
- s.test_files = Dir['spec/**/*']
-end
@@ -1 +0,0 @@
-1.8.0
Oops, something went wrong.

0 comments on commit 11529a4

Please sign in to comment.