capcode-base-datamapper 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.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.2.0"
8
+ s.version = "0.3.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-09-13}
12
+ s.date = %q{2010-09-15}
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 = [
@@ -1,2 +1,3 @@
1
1
  adapter: sqlite3
2
- database: dm_blog.db
2
+ path: dm_blog.db
3
+ host: localhost
@@ -26,7 +26,9 @@ module Capcode
26
26
  class << self
27
27
  def db_connect( dbfile, logfile ) #:nodoc:
28
28
  dbconfig = YAML::load(File.open(dbfile)).keys_to_sym
29
- DataMapper::Logger.new(logfile, :debug)
29
+ loglevel = (dbconfig.delete(:loglevel) || "error").to_sym
30
+ DataMapper.finalize
31
+ DataMapper::Logger.new(logfile, loglevel)
30
32
  DataMapper.setup(:default, dbconfig)
31
33
  DataMapper.auto_upgrade!
32
34
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capcode-base-datamapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gregoire Lejeune
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-13 00:00:00 +02:00
18
+ date: 2010-09-15 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency