dm-drupal 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +26 -0
- data/lib/drupal.rb +12 -3
- metadata +13 -12
data/README
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
== DM Drupal ==
|
2
|
+
|
3
|
+
Its a Datamapper wrapper for a drupal+cck database.
|
4
|
+
|
5
|
+
lots of eval right now. sorry.
|
6
|
+
|
7
|
+
== Install ==
|
8
|
+
|
9
|
+
to install:
|
10
|
+
|
11
|
+
gem install dm-drupal
|
12
|
+
|
13
|
+
|
14
|
+
== Using Hooks ==
|
15
|
+
|
16
|
+
this is for associating with dynamic cck fields that don't exist when the app loads.
|
17
|
+
|
18
|
+
class BlogPost
|
19
|
+
include DataMapper::Resource
|
20
|
+
post_drupal do
|
21
|
+
has 1, :drupal_blog_post,
|
22
|
+
:repository => repository(:drupal),
|
23
|
+
:class_name => 'Drupal::BlogPost',
|
24
|
+
:child_key => ['legacy_blog_post_id']
|
25
|
+
end
|
26
|
+
end
|
data/lib/drupal.rb
CHANGED
@@ -36,12 +36,21 @@ module Drupal
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
# have to change this.. something broke somewhere (is sad)
|
40
|
+
module DataMapper::Resource::DrupalHook
|
41
|
+
def self.included model
|
42
|
+
model.class_eval do
|
43
|
+
def self.post_drupal &blk
|
44
|
+
Drupal.hooks = Drupal::PostHook.new self, blk
|
45
|
+
end
|
46
|
+
end
|
42
47
|
end
|
43
48
|
end
|
44
49
|
|
50
|
+
# module DataMapper::Resource
|
51
|
+
# extend DataMapper::Resource::ClassMethods
|
52
|
+
# end
|
53
|
+
|
45
54
|
$:<< File.expand_path(Pathname.new(__FILE__).dirname)
|
46
55
|
require 'drupal/user'
|
47
56
|
require 'drupal/node'
|
metadata
CHANGED
@@ -1,40 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-drupal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Quinn Shanahan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-15 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description:
|
16
|
+
description: A datamapper wrapper for a drupal database.. great for migrations
|
17
17
|
email: q.shanahan@gmail.com
|
18
18
|
executables: []
|
19
19
|
|
20
20
|
extensions: []
|
21
21
|
|
22
|
-
extra_rdoc_files:
|
23
|
-
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
24
|
files:
|
25
|
+
- lib/drupal.rb
|
26
|
+
- lib/drupal/cck.rb
|
25
27
|
- lib/drupal/cck/builder.rb
|
26
28
|
- lib/drupal/cck/fields.rb
|
27
|
-
- lib/drupal/cck.rb
|
28
29
|
- lib/drupal/node.rb
|
29
30
|
- lib/drupal/user.rb
|
30
|
-
-
|
31
|
+
- README
|
31
32
|
has_rdoc: true
|
32
|
-
homepage:
|
33
|
+
homepage: http://github.com/quinn/dm-drupal
|
33
34
|
licenses: []
|
34
35
|
|
35
36
|
post_install_message:
|
36
|
-
rdoc_options:
|
37
|
-
|
37
|
+
rdoc_options:
|
38
|
+
- --charset=UTF-8
|
38
39
|
require_paths:
|
39
40
|
- lib
|
40
41
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -55,6 +56,6 @@ rubyforge_project:
|
|
55
56
|
rubygems_version: 1.3.5
|
56
57
|
signing_key:
|
57
58
|
specification_version: 3
|
58
|
-
summary:
|
59
|
+
summary: Datamapper << Drupal
|
59
60
|
test_files: []
|
60
61
|
|