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: 2ebc666db81c563d31cb86e1d1783187e090c9a0
4
- data.tar.gz: 50554a3c3ddbef08ea7c453f9ab20850c8569dcd
3
+ metadata.gz: 86b53af1e23fb6e34017a940816d4a84e2caa7d2
4
+ data.tar.gz: 974b1dfd89827a541f42be6ca7f7dd90c127409f
5
5
  SHA512:
6
- metadata.gz: e5b5a659ce0a686e2b495d1c6f6326a991b787f62619640c9bbecd06dd9e194f4508b247cff7190b2839606e864b1083f432c429e6c1952b95050d0d8fa07f40
7
- data.tar.gz: 8493feb719823602a34412e8b8ac18f995b523e24dada3dcd61dd9bcf6603dff6ab6b30b48a783657ce20eea1778a892516906e6334972028e8ac74f8efbf132
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.dynamo_db'
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
- unless config.key?(config_key)
20
- fail "[aws_dynamodb] config key (#{config_key}) not found - #{self}"
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
@@ -3,7 +3,7 @@ module Appfuel
3
3
  class Repository < Appfuel::Repository::Base
4
4
  class << self
5
5
  def container_class_type
6
- "#{super}.aws.dynamo_db"
6
+ "#{super}.aws.dynamodb"
7
7
  end
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Appfuel
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Scott-Buccleuch