sharp 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sharp.rb +1 -13
- data/lib/sharp/version.rb +1 -1
- data/sharp.gemspec +1 -1
- metadata +2 -2
data/lib/sharp.rb
CHANGED
@@ -75,25 +75,13 @@ module Sharp
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
#TODO: Pull out Sequel-specific code
|
79
78
|
def db
|
80
|
-
@db ||=
|
81
|
-
db_config.inject({}) do |acc, (key, value)|
|
82
|
-
acc[key] = Sequel.connect(value.merge(:logger => logger))
|
83
|
-
Sequel::Model.db = acc[key] if key == :default
|
84
|
-
acc
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
def db_config
|
90
|
-
@db_config ||= YAML.load_file(root.join("config/database.yml")).symbolize_keys[env].symbolize_keys
|
79
|
+
@db ||= YAML.load_file(root.join("config/database.yml")).symbolize_keys[env].symbolize_keys
|
91
80
|
end
|
92
81
|
|
93
82
|
protected
|
94
83
|
def pre_initialization
|
95
84
|
Dir.glob(root.join("app/preinitializers/*.rb")) {|file| load file }
|
96
|
-
db # TODO: Pull out Sequel-specific code
|
97
85
|
end
|
98
86
|
|
99
87
|
# TODO: Make an Array of load paths that you can add to that these are just part of
|
data/lib/sharp/version.rb
CHANGED
data/sharp.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sharp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|