capcode-base-datamapper 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/capcode-base-datamapper.gemspec +7 -4
- data/examples/blog-dm.yml +1 -1
- data/lib/capcode/base/dm.rb +2 -1
- metadata +38 -8
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{capcode-base-datamapper}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Gregoire Lejeune"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-13}
|
13
13
|
s.description = %q{Capcode plugin to access databases via DataMapper}
|
14
14
|
s.email = %q{gregoire.lejeune@free.fr}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -28,20 +28,23 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.homepage = %q{http://github.com/glejeune/Capcode.more/tree/master/capcode-base-datamapper}
|
29
29
|
s.rdoc_options = ["--charset=UTF-8"]
|
30
30
|
s.require_paths = ["lib"]
|
31
|
-
s.rubygems_version = %q{1.3.
|
31
|
+
s.rubygems_version = %q{1.3.7}
|
32
32
|
s.summary = %q{Capcode plugin to access databases via DataMapper}
|
33
33
|
|
34
34
|
if s.respond_to? :specification_version then
|
35
35
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
36
36
|
s.specification_version = 3
|
37
37
|
|
38
|
-
if Gem::Version.new(Gem::
|
38
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
39
39
|
s.add_runtime_dependency(%q<dm-core>, [">= 0"])
|
40
|
+
s.add_runtime_dependency(%q<dm-migrations>, [">= 0"])
|
40
41
|
else
|
41
42
|
s.add_dependency(%q<dm-core>, [">= 0"])
|
43
|
+
s.add_dependency(%q<dm-migrations>, [">= 0"])
|
42
44
|
end
|
43
45
|
else
|
44
46
|
s.add_dependency(%q<dm-core>, [">= 0"])
|
47
|
+
s.add_dependency(%q<dm-migrations>, [">= 0"])
|
45
48
|
end
|
46
49
|
end
|
47
50
|
|
data/examples/blog-dm.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
adapter: sqlite3
|
2
|
-
database:
|
2
|
+
database: dm_blog.db
|
data/lib/capcode/base/dm.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
begin
|
3
3
|
require 'dm-core'
|
4
|
+
require 'dm-migrations'
|
4
5
|
rescue LoadError => e
|
5
6
|
raise Capcode::MissingLibrary, "DataMapper could not be loaded (is it installed?): #{e.message}"
|
6
7
|
end
|
@@ -25,8 +26,8 @@ module Capcode
|
|
25
26
|
class << self
|
26
27
|
def db_connect( dbfile, logfile ) #:nodoc:
|
27
28
|
dbconfig = YAML::load(File.open(dbfile)).keys_to_sym
|
28
|
-
DataMapper.setup(:default, dbconfig)
|
29
29
|
DataMapper::Logger.new(logfile, :debug)
|
30
|
+
DataMapper.setup(:default, dbconfig)
|
30
31
|
DataMapper.auto_upgrade!
|
31
32
|
end
|
32
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capcode-base-datamapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Gregoire Lejeune
|
@@ -9,19 +15,37 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-09-13 00:00:00 +02:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: dm-core
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
17
33
|
type: :runtime
|
18
|
-
|
19
|
-
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: dm-migrations
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
20
40
|
requirements:
|
21
41
|
- - ">="
|
22
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
23
46
|
version: "0"
|
24
|
-
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
25
49
|
description: Capcode plugin to access databases via DataMapper
|
26
50
|
email: gregoire.lejeune@free.fr
|
27
51
|
executables: []
|
@@ -49,21 +73,27 @@ rdoc_options:
|
|
49
73
|
require_paths:
|
50
74
|
- lib
|
51
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
52
77
|
requirements:
|
53
78
|
- - ">="
|
54
79
|
- !ruby/object:Gem::Version
|
80
|
+
hash: 3
|
81
|
+
segments:
|
82
|
+
- 0
|
55
83
|
version: "0"
|
56
|
-
version:
|
57
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
58
86
|
requirements:
|
59
87
|
- - ">="
|
60
88
|
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
61
92
|
version: "0"
|
62
|
-
version:
|
63
93
|
requirements: []
|
64
94
|
|
65
95
|
rubyforge_project:
|
66
|
-
rubygems_version: 1.3.
|
96
|
+
rubygems_version: 1.3.7
|
67
97
|
signing_key:
|
68
98
|
specification_version: 3
|
69
99
|
summary: Capcode plugin to access databases via DataMapper
|