toy-dynamo 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5d8387f139d7bb7a5482897fd890b4313f2c3b8
4
- data.tar.gz: 5c51caec159188855d0280b5e99b8bb0ca56e167
3
+ metadata.gz: d7095663348fee70d8b0e1d75f96c7a916f84dca
4
+ data.tar.gz: e63a6a0c664fb02283cab38057a45a1f3f1aebab
5
5
  SHA512:
6
- metadata.gz: d1666bd47f3ea19b098720387c59411eb15ef7a4c31202724ff1bdb6c02c3671cb16edaf5617c46b0a415408b885e4ad4feeee0dd186e92796cdcd51e1c7bb9f
7
- data.tar.gz: 31ae6e655e45998dfe43279dc46a710d30ef65f5274bc52d91a3716ae580344b6dd71a0457c81080f9487f485af44db0bfbc434f3b2858821d870c0b79650d78
6
+ metadata.gz: 35f9f1d6b844d7f29e4baa88ad2a454068dd9090faa7c4f4e2e404527cfdfbc13d309e95ed2ceb80e462a2bef262f7710454af93d4a2086cfa4a24ed62382eb9
7
+ data.tar.gz: a2e48dca0f1d94ac3873fc09d9e64ac393d0e2ed2ed91c5d140f01ba171f60d159922e44045f63ce8df57a1a3efdd7e1742e7118c0b7ef0bf1e8972cca6db5b3
data/README.md CHANGED
@@ -17,7 +17,7 @@ In ActiveModel model:
17
17
  ```
18
18
  class Comment
19
19
 
20
- include Toy::Dynamo
20
+ include Toy::Dynamo::Store
21
21
 
22
22
  adapter :dynamo, Toy::Dynamo::Adapter.default_client, {:model => self}
23
23
 
@@ -0,0 +1,15 @@
1
+ module Toy
2
+ module Dynamo
3
+ module Store
4
+
5
+ MAX_ITEM_SIZE = 65_536
6
+
7
+ extend ActiveSupport::Concern
8
+ include Toy::Store
9
+
10
+ include Schema
11
+ include Querying
12
+
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,5 @@
1
1
  module Toy
2
2
  module Dynamo
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
data/lib/toy/dynamo.rb CHANGED
@@ -9,6 +9,7 @@ require "toy/dynamo/persistence"
9
9
  # Override 'write_attribute' for hash_key == id
10
10
  require "toy/dynamo/attributes"
11
11
  require "toy/dynamo/config"
12
+ require "toy/dynamo/store"
12
13
  require "toy/dynamo/extensions/array"
13
14
  require "toy/dynamo/extensions/boolean"
14
15
  require "toy/dynamo/extensions/date"
@@ -20,12 +21,14 @@ require "toy/dynamo/extensions/symbol"
20
21
  module Toy
21
22
  module Dynamo
22
23
 
23
- MAX_ITEM_SIZE = 65_536
24
+ def configure
25
+ block_given? ? yield(Toy::Dynamo::Config) : Toy::Dynamo::Config
26
+ end
27
+ alias :config :configure
24
28
 
25
- extend ActiveSupport::Concern
26
- include Toy::Store
29
+ def logger
30
+ Toy::Dynamo::Config.logger
31
+ end
27
32
 
28
- include Schema
29
- include Querying
30
33
  end
31
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toy-dynamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cary Dunn
@@ -95,6 +95,7 @@ files:
95
95
  - lib/toy/dynamo/querying.rb
96
96
  - lib/toy/dynamo/response.rb
97
97
  - lib/toy/dynamo/schema.rb
98
+ - lib/toy/dynamo/store.rb
98
99
  - lib/toy/dynamo/table.rb
99
100
  - lib/toy/dynamo/tasks.rb
100
101
  - lib/toy/dynamo/version.rb