ocean-dynamo 1.0.3 → 1.0.4

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: f2cdd30b503b4060f584c550f20b4bfa7b2ba959
4
- data.tar.gz: 5048098e3a9566858ce71b3862c3af4f822ef765
3
+ metadata.gz: 9e520e001a8732d1e8238a73c9e23e0b8f4fd5b2
4
+ data.tar.gz: 921ef44f7fc8af615664f5037444a35f8fd8f4a6
5
5
  SHA512:
6
- metadata.gz: 2600759e665f052392e3255ff0a382ee6175d25d393ff64a550b96ae2f49841abf87a35f56cf3ac174765cd3bf9fd71b83d11e8c1527c09fc611c85d177446d9
7
- data.tar.gz: 0f7242ea5d99b228600f79e2cc7f83c47bca269c6c605794a09d87a8beeacc6d0fc8c25ce40ee4df976b191a3e418cbcfc42e99b26d61753953b3cc6edfd2f31
6
+ metadata.gz: 8ef0072ba8c6d720a0049dc4c39485f00743e9387ac9ce167d83a5f2b1bd15c0b386b14b61b8fc918fffa93dbd3a579d02cad1a7c4bd85f9397e6ebc263c8bda
7
+ data.tar.gz: 9a238b2932974f82e812bec6256f78d26b2dcdcdacc5670db28ca63024f515be5617613d39cccdfc34cb74fef30b315fd94d0c62044989599e481d9fa6b534fa
@@ -276,12 +276,10 @@ block:
276
276
 
277
277
  # DynamoDB table cleaner
278
278
  CHEF_ENV = "master" unless defined?(CHEF_ENV)
279
+ regexp = Regexp.new("^.+_#{CHEF_ENV}_[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}_test$")
279
280
  cleaner = lambda {
280
281
  c = Aws::DynamoDB::Client.new
281
- c.list_tables.table_names.each do |t|
282
- next unless t =~ Regexp.new("^.+_#{CHEF_ENV}_[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}_test$")
283
- c.delete_table({table_name: t})
284
- end
282
+ c.list_tables.table_names.each { |t| c.delete_table({table_name: t}) if t =~ regexp }
285
283
  }
286
284
 
287
285
  Then, inside the +RSpec.configure+ block:
@@ -1,3 +1,3 @@
1
1
  module OceanDynamo
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-dynamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson