appfuel 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/appfuel/config/db.rb +55 -0
- data/lib/appfuel/config.rb +1 -0
- data/lib/appfuel/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c32f42ddca4dac5bed04b9d9ea85f0336a30cf56
|
4
|
+
data.tar.gz: cabb31e8924f1338e13db68c811fbbd84392136d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26cf24b7b078750b4d9d7348009b1ad5014f9b02012c6f61d6cb144861959f98d3897f463b5f8382b07551eb18a26f92f67ff204bf1f992bd5703fee9c3c09aa
|
7
|
+
data.tar.gz: 34b05f5ab2d22b0d1fcf72a9671bf51ab73d6b360ac2b7e448fee5547a4c4064b86687e26f110477128ea45994ebe8a10d66a50a97debdedc3434d2074aaaf2c
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. (Pending ap
|
|
5
5
|
|
6
6
|
|
7
7
|
# Releases
|
8
|
+
## [[0.4.2]](https://github.com/rsb/appfuel/releases/tag/0.4.2) 2017-06-21
|
9
|
+
### Added
|
10
|
+
- database configuration definition
|
11
|
+
|
8
12
|
## [[0.4.1]](https://github.com/rsb/appfuel/releases/tag/0.4.1) 2017-06-21
|
9
13
|
### Changed
|
10
14
|
- renamed `Appfuel::Configuration` to `Appfuel::Config`
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Appfuel
|
2
|
+
module Config
|
3
|
+
# Defines database configuration. This is designed to hold more than one
|
4
|
+
# database connection which is why they are named invidually. We are using
|
5
|
+
# active record so the config is taylored to that style connection.
|
6
|
+
#
|
7
|
+
# Configuration Overview
|
8
|
+
#
|
9
|
+
# pool: Managed connection which controls the amount of thread access to
|
10
|
+
# a limited number of database connections
|
11
|
+
# adapter: We always use postgres, rarely changes
|
12
|
+
# encoding: We always use unicode, rarely changes
|
13
|
+
# database Name of the database
|
14
|
+
# username Name of the database user
|
15
|
+
# password Database password
|
16
|
+
# host Location of the database server
|
17
|
+
#
|
18
|
+
# @return Defintion
|
19
|
+
def self.db_definition
|
20
|
+
Appfuel::Configuration.define :db do
|
21
|
+
validator {
|
22
|
+
required(:main).filled(:hash?)
|
23
|
+
required(:path).filled(:str?)
|
24
|
+
required(:seed_path).filled(:str?)
|
25
|
+
required(:migrations_path).filled(:str?)
|
26
|
+
}
|
27
|
+
|
28
|
+
db_path = 'db'
|
29
|
+
defaults path: db_path,
|
30
|
+
migrations_path: "#{db_path}/migrations",
|
31
|
+
seed_path: 'db/seed'
|
32
|
+
|
33
|
+
define :main do
|
34
|
+
defaults pool: 5,
|
35
|
+
adapter: 'postgresql',
|
36
|
+
encoding: 'unicode',
|
37
|
+
schema_format: 'sql'
|
38
|
+
|
39
|
+
validator do
|
40
|
+
required(:schema_search_path).filled(:str?)
|
41
|
+
required(:schema_format).filled(:str?)
|
42
|
+
required(:database).filled(:str?)
|
43
|
+
required(:username).filled(:str?)
|
44
|
+
required(:password).filled(:str?)
|
45
|
+
required(:host).filled(:str?)
|
46
|
+
required(:adapter).filled(:str?)
|
47
|
+
optional(:pool).filled(:int?)
|
48
|
+
optional(:encoding).filled(:str?)
|
49
|
+
optional(:port).filled(:int?)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/lib/appfuel/config.rb
CHANGED
data/lib/appfuel/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appfuel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Scott-Buccleuch
|
@@ -291,6 +291,7 @@ files:
|
|
291
291
|
- lib/appfuel/application/root.rb
|
292
292
|
- lib/appfuel/cli_msg_request.rb
|
293
293
|
- lib/appfuel/config.rb
|
294
|
+
- lib/appfuel/config/db.rb
|
294
295
|
- lib/appfuel/config/definition_dsl.rb
|
295
296
|
- lib/appfuel/config/file_loader.rb
|
296
297
|
- lib/appfuel/config/populate.rb
|