dynomite 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/docs/migrations/long-example.rb +2 -2
- data/lib/dynomite/item.rb +3 -2
- data/lib/dynomite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 071e6c1ee0bb76726ab666edb5ea866bcd290b310c5e2c3e83f2fa57cca9ca2e
|
4
|
+
data.tar.gz: 10d559b3073cf2a325aeb9861b80b0cb62c872881f3de96a1eecebc0bc5f1a53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cadb8ab579bc8097355dbeedd107c3507f27862698a9caacce2fbf0e138d8a93c0855231f6ceb89d5700e85440395324922bf5b05351d4fa2b4585e50b5d9e6
|
7
|
+
data.tar.gz: 5063b5f792153f649a447fc0676dd74877f1c070ac3fe820f912bf4d596d0218060c443f67e9abe5d452c9c0b52ffe5c6b02bbe29e3db750f562fc5650494cf4
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [1.0.9]
|
7
|
+
- allow item.replace(hash) to work
|
8
|
+
- Merge pull request #3 from mveer99/patch-1 Update comments: Fixed typo in project_name
|
9
|
+
|
6
10
|
## [1.0.8]
|
7
11
|
- scope endpoint option to dynamodb client only vs the entire Aws.config
|
8
12
|
|
@@ -21,10 +21,10 @@
|
|
21
21
|
# If your project_name is demo and environment is production:
|
22
22
|
# create_table "posts" => table name: "demo-prod-posts"
|
23
23
|
#
|
24
|
-
# If your project_name is
|
24
|
+
# If your project_name is demo and environment is staging:
|
25
25
|
# create_table "posts" => table name: "demo-stag-posts"
|
26
26
|
#
|
27
|
-
# If your project_name is
|
27
|
+
# If your project_name is demo and environment is development:
|
28
28
|
# create_table "posts" => table name: "demo-dev-posts"
|
29
29
|
#
|
30
30
|
# If the table_namespace is set to a blank string or nil, then a namespace
|
data/lib/dynomite/item.rb
CHANGED
@@ -66,8 +66,8 @@ module Dynomite
|
|
66
66
|
|
67
67
|
# The method is named replace to clearly indicate that the item is
|
68
68
|
# fully replaced.
|
69
|
-
def replace
|
70
|
-
attrs = self.class.replace(@attrs)
|
69
|
+
def replace(hash={})
|
70
|
+
attrs = self.class.replace(@attrs.deep_merge(hash))
|
71
71
|
@attrs = attrs # refresh attrs because it now has the id
|
72
72
|
end
|
73
73
|
|
@@ -123,6 +123,7 @@ module Dynomite
|
|
123
123
|
# AWS Docs examples: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.Ruby.04.html
|
124
124
|
def self.scan(params={})
|
125
125
|
log("It's recommended to not use scan for production. It can be slow and expensive. You can a LSI or GSI and query the index instead.")
|
126
|
+
log("Scanning table: #{table_name}")
|
126
127
|
params = { table_name: table_name }.merge(params)
|
127
128
|
resp = db.scan(params)
|
128
129
|
resp.items.map {|i| self.new(i) }
|
data/lib/dynomite/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynomite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|