Data Mapper Drupal
Help you to migrate Drupal (php) to a Ruby web project ;)
credit : https://github.com/quinn/dm-drupal
Installation
Add this line to your application's Gemfile:
gem 'dm-drupal2'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dm-drupal2
Usage
require 'rubygems'
require 'active_record'
require 'data_mapper' # requires all the gems listed above
require 'dm-core'
require 'dm-drupal2'
puts "ready"
DataMapper.setup(:drupal, 'postgres://postgres:password@localhost/database')
Drupal::Node.all.each do |n|
puts "Title : #{n.title}"
end
Drupal::User.all.each do |u|
puts "User : #{u.name}"
# u.profile
# u.mail
# u.nodes
end
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request