appfuel 0.5.7 → 0.5.8

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: c05007c52cdadfd45cb0a021ddd43f8e2d96875a
4
- data.tar.gz: db7c77243472aa7c6f35339a7b24fbac384fcc02
3
+ metadata.gz: 5c8b9e19b1a6eb8dc07f3ddb296f5e4af70fe848
4
+ data.tar.gz: 8b746ca541b5e33c99ee2d719452f1c84265718c
5
5
  SHA512:
6
- metadata.gz: b7764d6b15834ddae5d2e2916cdb50a313b98cf6d2d03d9965589e721e6a5335649def32835a6360cf674db9cc79bcdd5b1dba97b526741a81a9de43bf0ff7f8
7
- data.tar.gz: c5bcdc614ee39ab5964a979d6d4fd5bde21cba7295f39c28e361d0f043e4a905021df23eef4b7de90ecbe8e13a16fd54e438e3e92d6a6dcf36925573a51656e5
6
+ metadata.gz: aac076ef608c55b1b55674c8ea37d9b576d037bad0404e1a888ddbb66b5e19e8bf6668c923a02e3a3fdc1a55369b67c5df3a5c70e32ec0ff86c27aa05e70339e
7
+ data.tar.gz: 84e50e4263cec503206c0b5843e49b32c5484cc6314ea9878e28a2655969a74da387b34ef35035deff306267fb57b1842c5f6e22c61475d91c7439a3df62fa9d
data/CHANGELOG.md CHANGED
@@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. (Pending ap
5
5
 
6
6
 
7
7
  # Releases
8
- ## [[0.5.7]] (https://github.com/rsb/appfuel/releases/tag/0.5.7) 2017-07-18
8
+
9
+ ## [[0.5.8]](https://github.com/rsb/appfuel/releases/tag/0.5.8) 2017-07-20
10
+ ### Fixed
11
+ - aws dynamodb initializer region was not being set
12
+ - dynamodb repo did not have to_entity or storage_class
13
+
14
+ ## [[0.5.7]](https://github.com/rsb/appfuel/releases/tag/0.5.7) 2017-07-18
9
15
  ### Changed
10
16
  - domain entity `attr_typed!` will always converts the type name to a symbol
11
17
 
@@ -4,14 +4,15 @@ Appfuel::Initialize.define('global.aws_dynamodb') do |config, container|
4
4
 
5
5
  env = config[:env]
6
6
  endpoint = config[:aws][:dynamodb][:endpoint]
7
+ region = config[:aws][:region] || 'us-east-1'
8
+ aws_config = { region: region }
9
+
7
10
  if ['local', 'development'].include?(env.to_s) && endpoint
8
- Aws.config.update({
9
- endpoint: endpoint
10
- })
11
+ aws_config[:endpoint] = endpoint
11
12
  end
12
- key = Appfuel::AwsDynamodb::CLIENT_CONTAINER_KEY
13
+ Aws.config.update(aws_config)
13
14
 
14
- client = Aws::DynamoDB::Client.new
15
15
 
16
- container.register(key, client)
16
+ client = Aws::DynamoDB::Client.new
17
+ container.register(Appfuel::AwsDynamodb::CLIENT_CONTAINER_KEY, client)
17
18
  end
@@ -6,6 +6,14 @@ module Appfuel
6
6
  "#{super}.aws.dynamodb"
7
7
  end
8
8
  end
9
+
10
+ def storage_class(domain_name)
11
+ mapper.storage_class('aws.dynamodb', domain_name)
12
+ end
13
+
14
+ def to_entity(domain_name, storage)
15
+ super(domain_name, 'aws.dynamodb', storage)
16
+ end
9
17
  end
10
18
  end
11
19
  end
@@ -79,7 +79,9 @@ module Appfuel
79
79
 
80
80
  def handle_response(response, headers = {})
81
81
  if content_type == :json || headers[:content_type] == :json
82
- return json(response.body)
82
+ data = response.body
83
+
84
+ return data.empty? ? {} : json(response.body)
83
85
  end
84
86
 
85
87
  response.body
@@ -1,3 +1,3 @@
1
1
  module Appfuel
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appfuel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Scott-Buccleuch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-18 00:00:00.000000000 Z
11
+ date: 2017-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord