appfuel 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86b53af1e23fb6e34017a940816d4a84e2caa7d2
|
4
|
+
data.tar.gz: 974b1dfd89827a541f42be6ca7f7dd90c127409f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f2dae26a6472892d1e02be3ddd3b7b23ddbcce9e24baf2a2f1944e146c19e8a0556a09a2f501bdc04a87d8cbd0293cc31418c99e6c4807901cdc2a9c2f49df5
|
7
|
+
data.tar.gz: 000ca55f3d3ba17b8c2710ebb720075ad794b7467908d49a7aadeb2f25b732b229cf4c4478c229838499cde4437300465869cf9a7441d8db1ac384f2a57c210f
|
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.5.1]] (https://github.com/rsb/appfuel/releases/tag/0.5.0) 2017-07-03
|
9
|
+
### Added
|
10
|
+
- table prefix to aws_dynamodb nosql_model
|
11
|
+
|
8
12
|
## [[0.5.0]] (https://github.com/rsb/appfuel/releases/tag/0.5.0) 2017-06-29
|
9
13
|
### Added
|
10
14
|
- adding new repository type of aws dynamodb
|
@@ -6,7 +6,7 @@ module Appfuel
|
|
6
6
|
|
7
7
|
class << self
|
8
8
|
def container_class_type
|
9
|
-
'aws.
|
9
|
+
'aws.dynamodb'
|
10
10
|
end
|
11
11
|
|
12
12
|
def config_key(value = nil)
|
@@ -16,16 +16,32 @@ module Appfuel
|
|
16
16
|
|
17
17
|
def load_config
|
18
18
|
config = app_container[:config]
|
19
|
-
|
20
|
-
|
19
|
+
key = config_key.to_s
|
20
|
+
if key.contains?('.')
|
21
|
+
keys = config_key.split('.').map {|k| k.to_sym}
|
22
|
+
else
|
23
|
+
keys = [config_key]
|
24
|
+
end
|
25
|
+
|
26
|
+
keys.each.inject(config) do |c, k|
|
27
|
+
unless c.key?(k)
|
28
|
+
fail "[aws_dynamodb] config key (#{k}) not found - #{self}"
|
29
|
+
end
|
30
|
+
c[k]
|
21
31
|
end
|
22
|
-
config[config_key]
|
23
32
|
end
|
24
33
|
|
25
34
|
def load_client
|
26
35
|
app_container[CLIENT_CONTAINER_KEY]
|
27
36
|
end
|
28
37
|
|
38
|
+
def table_name(value = nil)
|
39
|
+
return @table_name if value.nil?
|
40
|
+
|
41
|
+
prefix = load_config[:table_prefix]
|
42
|
+
@table_name = "#{prefix}#{value}"
|
43
|
+
end
|
44
|
+
|
29
45
|
def inherited(klass)
|
30
46
|
stage_class_for_registration(klass)
|
31
47
|
end
|
data/lib/appfuel/version.rb
CHANGED