sinatra-datamapper 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,16 +10,16 @@ module Sinatra
10
10
 
11
11
  # Create the logger instance itself.
12
12
  ::DataMapper::Logger.new(
13
- settings.datamapper_log_path,
14
- settings.datamapper_log_level,
15
- settings.datamapper_log_prefix
13
+ app.settings.datamapper_log_path,
14
+ app.settings.datamapper_log_level,
15
+ app.settings.datamapper_log_prefix
16
16
  )
17
17
 
18
18
  # Load all configured repositories, defaulting to an in-memory sqlite3 database.
19
19
  app.set :datamapper_repositories, { :default => 'sqlite::memory:' }
20
20
 
21
21
  # Setup each repository, applying any specified naming conventions.
22
- settings.datamapper_repositories.each do |name, uri_or_options|
22
+ app.settings.datamapper_repositories.each do |name, uri_or_options|
23
23
  if uri_or_options.is_a?(Hash)
24
24
  resource_scheme = uri_or_options.delete(:resource_naming_convention)
25
25
  field_scheme = uri_or_options.delete(:field_naming_convention)
@@ -37,9 +37,9 @@ module Sinatra
37
37
  app.set :datamapper_models, proc { root && ::File.join(root, 'models') }
38
38
 
39
39
  # If we have any models available, load them.
40
- if settings.datamapper_models
40
+ if app.settings.datamapper_models
41
41
  import = ::Kernel.method(:require)
42
- pattern = settings.datamapper_models + '/**/*.rb'
42
+ pattern = app.settings.datamapper_models + '/**/*.rb'
43
43
  ::Dir[pattern].each(&import)
44
44
  end
45
45
 
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module DataMapper
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-datamapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-05 00:00:00.000000000 Z
12
+ date: 2014-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: datamapper
16
- requirement: &13724340 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: 1.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *13724340
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.2.0
25
30
  description: Easily integrate DataMapper with Sinatra
26
31
  email:
27
32
  - joshua.michael.keyes@gmail.com
@@ -57,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
62
  version: '0'
58
63
  requirements: []
59
64
  rubyforge_project:
60
- rubygems_version: 1.8.15
65
+ rubygems_version: 1.8.23
61
66
  signing_key:
62
67
  specification_version: 3
63
68
  summary: Sinata/DataMapper Extension