Permalink
Browse files

removed plugin acts-as-taggable-on, moved to gem

  • Loading branch information...
Bob Martens
Bob Martens committed Dec 6, 2008
1 parent ec6e3b6 commit 99972230d9e919cf983d9a871ab97b028eb68685
@@ -1 +0,0 @@
-*.log
@@ -1,18 +0,0 @@
-== 2008-07-17
-
-* Can now use a named_scope to find tags!
-
-== 2008-06-23
-
-* Can now find related objects of another class (tristanzdunn)
-* Removed extraneous down migration cruft (azabaj)
-
-== 2008-06-09
-
- * Added support for Single Table Inheritance
- * Adding gemspec and rails/init.rb for gemified plugin
-
-== 2007-12-12
-
- * Added ability to use dynamic tag contexts
- * Fixed missing migration generator
@@ -1,20 +0,0 @@
-Copyright (c) 2007 Michael Bleigh and Intridea Inc.
-
-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 PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL 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,190 +0,0 @@
-ActsAsTaggableOn
-================
-
-This plugin was originally based on Acts as Taggable on Steroids by Jonathan Viney.
-It has evolved substantially since that point, but all credit goes to him for the
-initial tagging functionality that so many people have used.
-
-For instance, in a social network, a user might have tags that are called skills,
-interests, sports, and more. There is no real way to differentiate between tags and
-so an implementation of this type is not possible with acts as taggable on steroids.
-
-Enter Acts as Taggable On. Rather than tying functionality to a specific keyword
-(namely "tags"), acts as taggable on allows you to specify an arbitrary number of
-tag "contexts" that can be used locally or in combination in the same way steroids
-was used.
-
-Installation
-============
-
-Plugin
-------
-
-Acts As Taggable On is available both as a gem and as a traditional plugin. For the
-traditional plugin you can install like so (Rails 2.1 or later):
-
- script/plugin install git://github.com/mbleigh/acts-as-taggable-on.git
-
-For earlier versions:
-
- git clone git://github.com/mbleigh/acts-as-taggable-on.git vendor/plugins/acts-as-taggable-on
-
-GemPlugin
----------
-
-Acts As Taggable On is also available as a gem plugin using Rails 2.1's gem dependencies.
-To install the gem, add this to your config/environment.rb:
-
- config.gem "mbleigh-acts-as-taggable-on", :source => "http://gems.github.com", :lib => "acts-as-taggable-on"
-
-After that, you can run "rake gems:install" to install the gem if you don't already have it.
-See http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies for
-additional details about gem dependencies in Rails.
-
-** NOTE **
-Some issues have been experienced with "rake gems:install". If that doesn't work to install the gem,
-try just installing it as a normal gem:
-
- gem install mbleigh-acts-as-taggable-on --source http://gems.github.com
-
-Post Installation (Rails)
--------------------------
-1. script/generate acts_as_taggable_on_migration
-2. rake db/migrate
-
-Testing
-=======
-
-Acts As Taggable On uses RSpec for its test coverage. If you already have RSpec on your
-application, the specs will run while using:
-
-rake spec:plugins
-
-Example
-=======
-
-class User < ActiveRecord::Base
- acts_as_taggable_on :tags, :skills, :interests
-end
-
-@user = User.new(:name => "Bobby")
-@user.tag_list = "awesome, slick, hefty" # this should be familiar
-@user.skill_list = "joking, clowning, boxing" # but you can do it for any context!
-@user.skill_list # => ["joking","clowning","boxing"] as TagList
-@user.save
-
-@user.tags # => [<Tag name:"awesome">,<Tag name:"slick">,<Tag name:"hefty">]
-@user.skills # => [<Tag name:"joking">,<Tag name:"clowning">,<Tag name:"boxing">]
-
-# The old way
-User.find_tagged_with("awesome", :on => :tags) # => [@user]
-User.find_tagged_with("awesome", :on => :skills) # => []
-
-# The better way (utilizes named_scope)
-User.tagged_with("awesome", :on => :tags) # => [@user]
-User.tagged_with("awesome", :on => :skills) # => []
-
-@frankie = User.create(:name => "Frankie", :skill_list => "joking, flying, eating")
-User.skill_counts # => [<Tag name="joking" count=2>,<Tag name="clowning" count=1>...]
-@frankie.skill_counts
-
-Finding Tagged Objects
-======================
-
-Acts As Taggable On utilizes Rails 2.1's named_scope to create an association
-for tags. This way you can mix and match to filter down your results, and it
-also improves compatibility with the will_paginate gem:
-
-class User < ActiveRecord::Base
- acts_as_taggable_on :tags
- named_scope :by_join_date, :order => "created_at DESC"
-end
-
-User.tagged_with("awesome").by_date
-User.tagged_with("awesome").by_date.paginate(:page => params[:page], :per_page => 20)
-
-Relationships
-=============
-
-You can find objects of the same type based on similar tags on certain contexts.
-Also, objects will be returned in descending order based on the total number of
-matched tags.
-
-@bobby = User.find_by_name("Bobby")
-@bobby.skill_list # => ["jogging", "diving"]
-
-@frankie = User.find_by_name("Frankie")
-@frankie.skill_list # => ["hacking"]
-
-@tom = User.find_by_name("Tom")
-@tom.skill_list # => ["hacking", "jogging", "diving"]
-
-@tom.find_related_skills # => [<User name="Bobby">,<User name="Frankie">]
-@bobby.find_related_skills # => [<User name="Tom">]
-@frankie.find_related_skills # => [<User name="Tom">]
-
-
-Dynamic Tag Contexts
-====================
-
-In addition to the generated tag contexts in the definition, it is also possible
-to allow for dynamic tag contexts (this could be user generated tag contexts!)
-
-@user = User.new(:name => "Bobby")
-@user.set_tag_list_on(:customs, "same, as, tag, list")
-@user.tag_list_on(:customs) # => ["same","as","tag","list"]
-@user.save
-@user.tags_on(:customs) # => [<Tag name='same'>,...]
-@user.tag_counts_on(:customs)
-User.find_tagged_with("same", :on => :customs) # => [@user]
-
-Tag Ownership
-=============
-
-Tags can have owners:
-
-class User < ActiveRecord::Base
- acts_as_tagger
-end
-
-class Photo < ActiveRecord::Base
- acts_as_taggable_on :locations
-end
-
-@some_user.tag(@some_photo, :with => "paris, normandy", :on => :locations)
-@some_user.owned_taggings
-@some_user.owned_tags
-@some_photo.locations_from(@some_user)
-
-Caveats, Uncharted Waters
-=========================
-
-This plugin is still under active development. Tag caching has not
-been thoroughly (or even casually) tested and may not work as expected.
-
-Contributors
-============
-
-* Michael Bleigh - Original Author
-* Brendan Lim - Related Objects
-* Pradeep Elankumaran - Taggers
-* Sinclair Bain - Patch King
-
-Patch Contributors
-------------------
-
-* tristanzdunn - Related objects of other classes
-* azabaj - Fixed migrate down
-* Peter Cooper - named_scope fix
-* slainer68 - STI fix
-* harrylove - migration instructions and fix-ups
-* lawrencepit - cached tag work
-
-Resources
-=========
-
-* Acts As Community - http://www.actsascommunity.com/projects/acts-as-taggable-on
-* GitHub - http://github.com/mbleigh/acts-as-taggable-on
-* Lighthouse - http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on
-
-Copyright (c) 2007 Michael Bleigh (http://mbleigh.com/) and Intridea Inc. (http://intridea.com/), released under the MIT license
@@ -1,42 +0,0 @@
-Gem::Specification.new do |s|
- s.name = "acts-as-taggable-on"
- s.version = "1.0.2"
- s.date = "2008-06-10"
- s.summary = "Tagging for ActiveRecord with custom contexts and advanced features."
- s.email = "michael@intridea.com"
- s.homepage = "http://www.actsascommunity.com/projects/acts-as-taggable-on"
- s.description = "Acts As Taggable On provides the ability to have multiple tag contexts on a single model in ActiveRecord. It also has support for tag clouds, related items, taggers, and more."
- s.has_rdoc = false
- s.authors = ["Michael Bleigh"]
- s.files = [ "CHANGELOG",
- "MIT-LICENSE",
- "README",
- "generators/acts_as_taggable_on_migration",
- "generators/acts_as_taggable_on_migration/acts_as_taggable_on_migration_generator.rb",
- "generators/acts_as_taggable_on_migration/templates",
- "generators/acts_as_taggable_on_migration/templates/add_users_migration.rb",
- "generators/acts_as_taggable_on_migration/templates/migration.rb",
- "init.rb",
- "lib/acts-as-taggable-on.rb",
- "lib/acts_as_taggable_on/acts_as_taggable_on.rb",
- "lib/acts_as_taggable_on/acts_as_tagger.rb",
- "lib/acts_as_taggable_on/tag.rb",
- "lib/acts_as_taggable_on/tag_list.rb",
- "lib/acts_as_taggable_on/tagging.rb",
- "lib/acts_as_taggable_on/tags_helper.rb",
- "rails/init.rb",
- "spec/acts_as_taggable_on",
- "spec/acts_as_taggable_on/acts_as_taggable_on_spec.rb",
- "spec/acts_as_taggable_on/tag_list_spec.rb",
- "spec/acts_as_taggable_on/tag_spec.rb",
- "spec/acts_as_taggable_on/taggable_spec.rb",
- "spec/acts_as_taggable_on/tagger_spec.rb",
- "spec/acts_as_taggable_on/tagging_spec.rb",
- "spec/debug.log",
- "spec/schema.rb",
- "spec/spec_helper.rb",
- "uninstall.rb" ]
- #s.rdoc_options = ["--main", "README.txt"]
- #s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
- #s.add_dependency("mbleigh-mash", [">= 0.0.5"])
-end
@@ -1,7 +0,0 @@
-class ActsAsTaggableOnMigrationGenerator < Rails::Generator::Base
- def manifest
- record do |m|
- m.migration_template 'migration.rb', 'db/migrate', :migration_file_name => "acts_as_taggable_on_migration"
- end
- end
-end
@@ -1,29 +0,0 @@
-class ActsAsTaggableOnMigration < ActiveRecord::Migration
- def self.up
- create_table :tags do |t|
- t.column :name, :string
- end
-
- create_table :taggings do |t|
- t.column :tag_id, :integer
- t.column :taggable_id, :integer
- t.column :tagger_id, :integer
- t.column :tagger_type, :string
-
- # You should make sure that the column created is
- # long enough to store the required class names.
- t.column :taggable_type, :string
- t.column :context, :string
-
- t.column :created_at, :datetime
- end
-
- add_index :taggings, :tag_id
- add_index :taggings, [:taggable_id, :taggable_type, :context]
- end
-
- def self.down
- drop_table :taggings
- drop_table :tags
- end
-end
@@ -1 +0,0 @@
-require File.dirname(__FILE__) + "/rails/init"
@@ -1,6 +0,0 @@
-require 'acts_as_taggable_on/acts_as_taggable_on'
-require 'acts_as_taggable_on/acts_as_tagger'
-require 'acts_as_taggable_on/tag'
-require 'acts_as_taggable_on/tag_list'
-require 'acts_as_taggable_on/tags_helper'
-require 'acts_as_taggable_on/tagging'
Oops, something went wrong.

0 comments on commit 9997223

Please sign in to comment.