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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8ddee10edcd4d87e35140d998f03f17503bedbf93802dd1ad9026dbb5e1da5b
4
- data.tar.gz: ec509b9e2fd6e1d816780f54ac9c2ed41d43b354a3b0427347d238422c10817f
3
+ metadata.gz: 071e6c1ee0bb76726ab666edb5ea866bcd290b310c5e2c3e83f2fa57cca9ca2e
4
+ data.tar.gz: 10d559b3073cf2a325aeb9861b80b0cb62c872881f3de96a1eecebc0bc5f1a53
5
5
  SHA512:
6
- metadata.gz: 84c17f17ea4cedb15ca53576159a1a278d97b4a670b9aba9a5bc554dd331a0218fa4738adfaca5a93794aec51ebceb3df9457e9fec0bff38ef31b26cfb83e0e6
7
- data.tar.gz: 38af677205f0c537be166345cfa1631fab5d06776792b28f90179d627d04fb375e31fc0ee1dd678fa2d4235390dd52f21e5c2971e2bd9007e1db009ace8343fa
6
+ metadata.gz: 4cadb8ab579bc8097355dbeedd107c3507f27862698a9caacce2fbf0e138d8a93c0855231f6ceb89d5700e85440395324922bf5b05351d4fa2b4585e50b5d9e6
7
+ data.tar.gz: 5063b5f792153f649a447fc0676dd74877f1c070ac3fe820f912bf4d596d0218060c443f67e9abe5d452c9c0b52ffe5c6b02bbe29e3db750f562fc5650494cf4
@@ -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 proj and environment is staging:
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 proj and environment is development:
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
@@ -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) }
@@ -1,3 +1,3 @@
1
1
  module Dynomite
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  end
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.8
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: 2018-11-13 00:00:00.000000000 Z
11
+ date: 2019-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport