public
Description: Set of ActiveRecord classes used to interact with a WordPress database.
Homepage:
Clone URL: git://github.com/inaka/wp_on_rails.git
name age message
file .gitignore Fri Dec 19 11:44:17 -0800 2008 initial blank repository [inaka]
file README.rdoc Fri Dec 26 07:47:15 -0800 2008 md5 hashing requirement [inaka]
file Rakefile Sun Jan 11 13:26:35 -0800 2009 version bumped and option primary key fixed [inaka]
directory lib/ Wed Feb 04 13:50:06 -0800 2009 added relationship for user [inaka]
file wp_on_rails.gemspec Sun Jan 11 13:27:05 -0800 2009 version bumped where it hurts [inaka]
README.rdoc

WordPress On Rails

The goal of this simple Gem is to provide a set of ActiveRecord objects that can manipulate a WordPress database.

What’s new in this release?

This is really just a set of objects right now. It needs to be expanded on before it can be used to manipulate a WP installation without a lot of inside information as to what each field means.

Installation/Usage

WordPress Administrators must use PRE-2.5 credential hashing algorithm, which is less secure, if you want to be able to authenticate users in Rails. See wordpress.org/extend/plugins/md5-password-hashes/ gem install wp_on_rails

require ‘wp_on_rails’

# if you want to use one database for your rails application and another for wordpress # create a ‘blog’ connection in your database file with the proper credentials # also, a third parameter can be passed in which is the prefix to assign to the # wordpress table names - this is optional. WordPress::Base.init_connection(#{RAILS_ROOT}/config/database.yml’,’blog’,’blog1_’)

# if you set a prefix in your installation and your wordpress tables are in the current database WordPress::Base.set_table_prefix(‘prefix_’)

TODO

  • Not all tables are in place
  • Relationships between tables are missing
  • Tests
  • Documentation
  • Implement PHPass and remove MD5 password hashing requirement

See Also

The WordPress schema is at codex.wordpress.org/Database_Description

License

(Licensed under the terms of the MIT License)

Copyright © 2008 Chad DePue, Electronic Inaka, LLC

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.