dynamodb-migration 0.7.0 → 0.8.0

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
- SHA1:
3
- metadata.gz: 7438e7d0407f14c9802d739098fcf93a2d87292e
4
- data.tar.gz: 49b54b9232e0026d4227eeeeeb910a48a7cbcb7e
2
+ SHA256:
3
+ metadata.gz: 4262fe6945f4907d41b51ff24d9330200773336dbb938e5649adb0837b07896b
4
+ data.tar.gz: 07c2a581ca41dbc3dde0abd626148e8844e8fc936ac9ae1917075c48e9dd2bca
5
5
  SHA512:
6
- metadata.gz: 8666ea2fd78aa07d723c8c7d12cabfa90fe36df0455a980bfa17cc0c4326ebcd003752d9535fd0c40116ae1d73f120630b64b123846de02be764a5700083d1e7
7
- data.tar.gz: 527c0cf47f522a38caf0948e178a53f34c49d2eba0d627a084930331def7d3a80ab12bbd5f771be51bfb194c57360ad5bffe686520ccf5d04fa88f56eafdf381
6
+ metadata.gz: 583b3f5ecc738a100df60d2e9a67cbd621c75a244ac0402d5a2ed200db3d1108d7665fa919eeaa3eed60a1654c99aa4e9d5855fdf6ca59f25512bd1b1cc49cb1
7
+ data.tar.gz: 4a07d83dce037d8f8d49774bc82ab86b6dd2c4a375d53d1c3041ef435e825f067ce3b75b50fcd6db3f3e114ff1978bd9831669799e901dc5a8c83ed9ca1cbd3f
data/README.md CHANGED
@@ -51,11 +51,6 @@ set :migrations_path, File.join(File.dirname(__FILE__), 'migrations')
51
51
  # "migrations"
52
52
  set :migration_table_name, 'migrations'
53
53
 
54
- # registering the below requires the "dynamodb-client" gem, alternatively
55
- # you can return a Aws::DynamoDB::Client instance from a method named
56
- # `dynamodb_client`
57
- register DynamoDB::Client
58
-
59
54
  # registering this extension will automatically run migrations when the app
60
55
  # starts up
61
56
  register DynamoDB::Migration
@@ -19,10 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "aws-sdk", "~> 2"
22
+ spec.add_dependency "aws-sdk-dynamodb", "~> 1"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.11"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
- spec.add_development_dependency "dynamodb-client", "~> 0.2.0"
28
27
  end
@@ -18,7 +18,7 @@ module DynamoDB
18
18
  Dir.glob("#{options[:path]}/**/*.rb").each do |file|
19
19
  require file
20
20
  end
21
- Execute.new(options[:client], options[:migration_table_name])
21
+ Execute.new(options[:client], options[:migration_table_name], options[:tags])
22
22
  .update_all
23
23
  end
24
24
  end
@@ -3,9 +3,10 @@ module DynamoDB
3
3
  class Execute
4
4
  DEFAULT_MIGRATION_TABLE_NAME = 'migrations'
5
5
 
6
- def initialize(client, migration_table_name)
6
+ def initialize(client, migration_table_name, tags)
7
7
  @client = client
8
8
  @migration_table_name = migration_table_name
9
+ @tags = tags
9
10
  end
10
11
 
11
12
  def update_all
@@ -17,7 +18,7 @@ module DynamoDB
17
18
 
18
19
  private
19
20
 
20
- attr_reader :client
21
+ attr_reader :client, :tags
21
22
 
22
23
  def apply_migration(clazz)
23
24
  return if migration_completed?(clazz)
@@ -126,6 +127,7 @@ module DynamoDB
126
127
  stream_enabled: true,
127
128
  stream_view_type: "NEW_AND_OLD_IMAGES",
128
129
  },
130
+ tags: tags
129
131
  )
130
132
  puts "Waiting for table #{migration_table_name} to exist..."
131
133
  client.wait_until(:table_exists, {:table_name => migration_table_name})
@@ -146,6 +148,10 @@ module DynamoDB
146
148
  ENV['DYNAMODB_MIGRATION_TABLE_NAME'] ||
147
149
  DEFAULT_MIGRATION_TABLE_NAME
148
150
  end
151
+
152
+ def tags
153
+ @tags || []
154
+ end
149
155
  end
150
156
  end
151
157
  end
@@ -1,5 +1,5 @@
1
1
  module DynamoDB
2
2
  module Migration
3
- VERSION = "0.7.0"
3
+ VERSION = "0.8.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamodb-migration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Lawson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-24 00:00:00.000000000 Z
11
+ date: 2019-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: aws-sdk
14
+ name: aws-sdk-dynamodb
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2'
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2'
26
+ version: '1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
- - !ruby/object:Gem::Dependency
70
- name: dynamodb-client
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.2.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.2.0
83
69
  description: Allows for the creation of simple DynamoDB commands that will be executed
84
70
  only once against a DynamoDB database to allow you to "migrate" the schema of the
85
71
  database over time. This is a simple implementation for DynamoDB, similar to tools
@@ -125,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
111
  version: '0'
126
112
  requirements: []
127
113
  rubyforge_project:
128
- rubygems_version: 2.5.1
114
+ rubygems_version: 2.7.8
129
115
  signing_key:
130
116
  specification_version: 4
131
117
  summary: A simple DynamoDB migration tool.