data_migrater 0.3.0 → 0.5.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
2
  SHA1:
3
- metadata.gz: d18ad057ff627de12fb89e183f32f399fc5982bf
4
- data.tar.gz: 71d9bc74af6bedeb81e810512584b20649d26aa0
3
+ metadata.gz: 2e763846467f7bf1af5607a89750f416e4addb70
4
+ data.tar.gz: 666f66ff8908a468b27f4da84fb486c0e0919ffb
5
5
  SHA512:
6
- metadata.gz: acd8775f066a903ed373309b4c06c934301aaa76ec1a41bcfe769271d3d2c33c69d8f0559bc7d35bdfb91921978e17bf909bfaa7c0de831acd35391759443988
7
- data.tar.gz: 7b8c18ec30448b76280a87bca602a335133d11f11b09d2aa4344ae98a0eda6824a0d49620b4883df1574721fc9bebee4f6ecc9560a08f10b3c62cc28543dc0a4
6
+ metadata.gz: c3c6a9c17e22316dc01aa1385d62134063ab3801db8528615577dcd8394bc1dc334e6b288912120fac6fdc504f22e0099e3a216d3a778fc03fc2eaccd55a6a76
7
+ data.tar.gz: c98bf19f3c91c7bde8f9a38a4472504eef266d6e149150d864f984f3fd7ef8faa18a4ed6d02c7d9e387d26065c4c0d00fe83df101eda1d0064f1b0e91aa6b13a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
+ # 0.4.0
2
+
3
+ - Add Rails 5 support;
4
+ - Bump Ruby until 2.4.1.
5
+
1
6
  # 0.3.0
2
7
 
3
- - Added support for CSV.
8
+ - Added support for CSV;
9
+ - Added options `dir` to specify the directory on Logger;
10
+ - Added options `file` to specify the Logger file name.
4
11
 
5
12
  # 0.2.0
6
13
 
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Data Migrater
2
2
 
3
+ [![Build Status](https://travis-ci.org/getninjas/data_migrater.svg)](https://travis-ci.org/getninjas/data_migrater)
4
+ [![Gem Version](https://badge.fury.io/rb/data_migrater.svg)](https://badge.fury.io/rb/data_migrater)
5
+
3
6
  Data Migration is like Migrate, but it will changes the data of your tables,
4
7
  not your schema. This gems creates a file where you can write code to make
5
8
  change along you schema changes.
@@ -73,7 +76,6 @@ class MyDataMigration
73
76
  include DataMigrater::CSV
74
77
 
75
78
  def execute
76
- # parsed from `db/data_migrate/support/csv/my_data_migration.csv`
77
79
  csv.each do |line|
78
80
  Object.create! line
79
81
  end
@@ -87,10 +89,9 @@ By default, the class name is used and the file is parsed from `db/data_migrate/
87
89
  class MyDataMigration
88
90
  include DataMigrater::CSV
89
91
 
90
- data_csv path: "/tmp/objects.csv"
92
+ data_csv path: '/tmp/objects.csv'
91
93
 
92
94
  def execute
93
- # parsed from `/tmp/objects.csv`
94
95
  csv.each do |line|
95
96
  Object.create! line
96
97
  end
@@ -107,16 +108,11 @@ class MyDataMigration
107
108
  data_csv chunk_size: 2
108
109
 
109
110
  def execute
110
- csv.each do |line|
111
- # line:
112
- #
113
- # [
114
- # { first_name: 'Washington', last_name: 'Botelho' },
115
- # { first_name: 'Lucas' , last_name: 'Souza' }
116
- # ]
117
-
118
- Object.create! line
119
- end
111
+ # [
112
+ # { first_name: 'Washington', last_name: 'Botelho' },
113
+ # { first_name: 'Lucas' , last_name: 'Souza' }
114
+ # ]
115
+ csv.each { |line| Object.create line }
120
116
  end
121
117
  end
122
118
  ```
@@ -138,7 +134,7 @@ end
138
134
  ```
139
135
 
140
136
  #### Options
141
-
137
+ dum
142
138
  - `dir`: Directory where CSV is located;
143
139
  - `file`: File name;
144
140
  - `path`: Composition of `dir/file` when you want give a fully qualified path. Default: `db/data_migrate/support/csv/class_name.csv`.
@@ -152,18 +148,90 @@ end
152
148
 
153
149
  For more CSV options, check the project [Smarter CSV](https://github.com/tilo/smarter_csv):
154
150
 
155
- ## Test
151
+ ## S3
156
152
 
157
- Before send pull request, check if specs is passing.
153
+ You can download your CSV directly from [Amazon S3](https://aws.amazon.com/s3) using the module `DataMigrater::CSV` with some configs.
154
+ You *must* keep the path as `:s3` to activate S3 feature.
158
155
 
159
- ```bash
160
- rspec spec
161
156
  ```
157
+ class MyDataMigration
158
+ include DataMigrater::CSV
159
+
160
+ data_csv path: :s3
162
161
 
163
- ## Code Style
162
+ def execute
163
+ csv.each { |line| Object.create line }
164
+ end
165
+ end
166
+ ```
164
167
 
165
- And check if the code style is good.
168
+ By default, the class name is used as the file name in `underscore` style: `my_data_migration.csv`. You can change it:
166
169
 
167
- ```bash
168
- rubocop --debug --display-cop-names
169
170
  ```
171
+ class MyDataMigration
172
+ include DataMigrater::CSV
173
+
174
+ data_csv path: :s3, file: 'custom-name.csv'
175
+
176
+ def execute
177
+ csv.each { |line| Object.create line }
178
+ end
179
+ end
180
+ ```
181
+
182
+ By default, the bucket name is `data-migrater`, to change it, just declare the `bucket` options:
183
+
184
+ ```
185
+ class MyDataMigration
186
+ include DataMigrater::CSV
187
+
188
+ data_csv path: :s3, bucket: 'custom-bucket'
189
+
190
+ def execute
191
+ csv.each { |line| Object.create line }
192
+ end
193
+ end
194
+ ```
195
+
196
+ When file is downloaded, it is keeped in a temporary (`/tmp`) folder waiting to be parsed, using the options `tmp_dir` you change it:
197
+
198
+ ```
199
+ class MyDataMigration
200
+ include DataMigrater::CSV
201
+
202
+ data_csv path: :s3, tmp_dir: '/Users/wbotelhos'
203
+
204
+ def execute
205
+ csv.each { |line| Object.create line }
206
+ end
207
+ end
208
+ ```
209
+
210
+ #### Credentials
211
+
212
+ By default, when you use the S3 feature, the envs `ACCESS_KEY_ID`, `REGION` and `SECRET_ACCESS_KEY` will be used.
213
+ If you do not want export it globally and need to pass it inside you class, just declare de `credentials` options:
214
+
215
+ ```
216
+ class MyDataMigration
217
+ include DataMigrater::CSV
218
+
219
+ data_csv path: :s3, credentials: {
220
+ access_key_id: 'foo',
221
+ region: 'us-east-1',
222
+ secret_access_key: 'bar'
223
+ }
224
+
225
+ def execute
226
+ csv.each { |line| Object.create line }
227
+ end
228
+ end
229
+ ```
230
+
231
+ #### Options
232
+
233
+ - `bucket`: Bucket name;
234
+ - `credentials`: AWS credentials: `access_key_id`, `region` and `secret_access_key`;
235
+ - `file`: File name;
236
+ - `path`: `:s3` to indicate the S3 support;
237
+ - `tmp_dir`: Directory where CSV will be keeped after download.
data/lib/data_migrater.rb CHANGED
@@ -10,4 +10,5 @@ require 'data_migrater/csv'
10
10
  require 'data_migrater/logger'
11
11
  require 'data_migrater/migration'
12
12
  require 'data_migrater/migrator'
13
+ require 'data_migrater/s3'
13
14
  require 'data_migrater/version'
@@ -7,20 +7,24 @@ module DataMigrater
7
7
  require 'smarter_csv'
8
8
 
9
9
  included do
10
- def csv
11
- result = ::SmarterCSV.process(csv_path, csv_options)
10
+ def csv(processor: ::SmarterCSV)
11
+ return s3.download(processor: processor) if csv_s3?
12
12
 
13
- result
13
+ processor.process csv_path, csv_options
14
14
  end
15
15
 
16
16
  def csv_path
17
17
  return csv_options[:path] if csv_options[:path].present?
18
18
 
19
- [csv_dir, csv_file].join '/'
19
+ @csv_path ||= [csv_dir, csv_file].join('/')
20
20
  end
21
21
 
22
22
  private
23
23
 
24
+ def csv_bucket
25
+ csv_options.delete(:bucket) || 'data-migrater'
26
+ end
27
+
24
28
  def csv_dir
25
29
  csv_options.delete(:dir) || 'db/data_migrate/support/csv'
26
30
  end
@@ -32,15 +36,36 @@ module DataMigrater
32
36
  def csv_options
33
37
  self.class.csv_options
34
38
  end
39
+
40
+ def csv_s3?
41
+ csv_path.to_s == 's3'
42
+ end
43
+
44
+ def csv_tmp_dir
45
+ csv_options.delete(:tmp_dir) || '/tmp'
46
+ end
47
+
48
+ def s3_credentials
49
+ csv_options.delete(:credentials) || {}
50
+ end
51
+
52
+ def s3
53
+ DataMigrater::S3.new(
54
+ credentials: s3_credentials,
55
+ bucket: csv_bucket,
56
+ file: csv_file,
57
+ tmp_dir: csv_tmp_dir
58
+ )
59
+ end
35
60
  end
36
61
 
37
62
  module ClassMethods
38
63
  def data_csv(options = {})
39
- @options = options
64
+ @csv_options = options
40
65
  end
41
66
 
42
67
  def csv_options
43
- @options || {}
68
+ @csv_options || {}
44
69
  end
45
70
  end
46
71
  end
@@ -44,11 +44,11 @@ module DataMigrater
44
44
 
45
45
  module ClassMethods
46
46
  def data_logger(options = {})
47
- @options = options
47
+ @logger_options = options
48
48
  end
49
49
 
50
50
  def logger_options
51
- @options || {}
51
+ @logger_options || {}
52
52
  end
53
53
  end
54
54
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DataMigrater
4
+ class S3
5
+ require 'aws-sdk'
6
+
7
+ def initialize(bucket:, credentials: {}, file:, tmp_dir:)
8
+ @bucket = bucket
9
+ @credentials = credentials.reverse_merge(default_credentials)
10
+ @file = file
11
+ @tmp_dir = tmp_dir
12
+
13
+ ::Aws.config.update @credentials
14
+ end
15
+
16
+ def download(processor:)
17
+ File.open(file_path, 'w+') do |file|
18
+ client.get_object options, target: file
19
+
20
+ processor.process file
21
+ end
22
+ end
23
+
24
+ private
25
+
26
+ def client
27
+ Aws::S3::Client.new
28
+ end
29
+
30
+ def default_credentials
31
+ {
32
+ access_key_id: ENV['AWS_ACCESS_KEY_ID'],
33
+ region: ENV['AWS_REGION'],
34
+ secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']
35
+ }
36
+ end
37
+
38
+ def file_path
39
+ [@tmp_dir, @file].join('/')
40
+ end
41
+
42
+ def options
43
+ { bucket: @bucket, key: @file }
44
+ end
45
+ end
46
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DataMigrater
4
- VERSION = '0.3.0'.freeze
4
+ VERSION = '0.5.0'
5
5
  end
data/spec/csv/csv_spec.rb CHANGED
@@ -3,28 +3,50 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  RSpec.describe '#data_csv' do
6
- before do
7
- stub_const 'Dummy', Class.new
6
+ context 'when path is not about s3' do
7
+ before do
8
+ stub_const 'Dummy', Class.new
8
9
 
9
- Dummy.class_eval { include DataMigrater::CSV }
10
- Dummy.class_eval { data_csv dir: 'spec/support/csv' }
10
+ Dummy.class_eval { include DataMigrater::CSV }
11
+ Dummy.class_eval { data_csv dir: 'spec/support/csv' }
12
+ end
13
+
14
+ it 'returns an array of hash' do
15
+ expect(Dummy.new.csv).to eq [
16
+ {
17
+ first_name: 'Washington',
18
+ last_name: 'Botelho',
19
+ username: 'wbotelhos',
20
+ age: 32,
21
+ birthday: '23/10/1984'
22
+ },
23
+
24
+ {
25
+ first_name: 'Lucas',
26
+ last_name: 'Souza',
27
+ username: 'lucasas'
28
+ }
29
+ ]
30
+ end
11
31
  end
12
32
 
13
- it 'returns an array of hash' do
14
- expect(Dummy.new.csv).to eq [
15
- {
16
- first_name: 'Washington',
17
- last_name: 'Botelho',
18
- username: 'wbotelhos',
19
- age: 32,
20
- birthday: '23/10/1984'
21
- },
22
-
23
- {
24
- first_name: 'Lucas',
25
- last_name: 'Souza',
26
- username: 'lucasas'
27
- }
28
- ]
33
+ context 'when path is about s3' do
34
+ before do
35
+ stub_const 'Dummy', Class.new
36
+
37
+ Dummy.class_eval { include DataMigrater::CSV }
38
+ Dummy.class_eval { data_csv path: :s3 }
39
+
40
+ allow(DataMigrater::S3).to receive(:new).with(
41
+ credentials: {},
42
+ bucket: 'data-migrater',
43
+ file: 'dummy.csv',
44
+ tmp_dir: '/tmp'
45
+ ) { double download: :result }
46
+ end
47
+
48
+ it 'reads csv from s3' do
49
+ expect(Dummy.new.csv).to eq :result
50
+ end
29
51
  end
30
52
  end
@@ -16,7 +16,7 @@ RSpec.describe '#data_logger' do
16
16
  it 'logs on the given path file with right content' do
17
17
  subject.logger.info 'done!'
18
18
 
19
- result = /\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} -\d{4}\] INFO Dummy: done!\n/
19
+ result = /\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} (-|\+)\d{4}\] INFO Dummy: done!\n/
20
20
 
21
21
  expect(File.readlines('custom.log').last).to match result
22
22
  end
@@ -35,7 +35,7 @@ RSpec.describe '#data_logger' do
35
35
  it 'logs on log folder with class name with right content' do
36
36
  subject.logger.info 'done!'
37
37
 
38
- result = /\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} -\d{4}\] INFO Dummy: done!\n/
38
+ result = /\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} (-|\+)\d{4}\] INFO Dummy: done!\n/
39
39
 
40
40
  expect(File.readlines('log/dummy.log').last).to match result
41
41
  end
@@ -53,7 +53,7 @@ RSpec.describe '#data_logger' do
53
53
  it 'logs on log folder with class name with right content' do
54
54
  subject.logger.info 'done!'
55
55
 
56
- result = /\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} -\d{4}\] INFO Dummy: done!\n/
56
+ result = /\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} (-|\+)\d{4}\] INFO Dummy: done!\n/
57
57
 
58
58
  expect(File.readlines('log/dummy.log').last).to match result
59
59
  end
@@ -34,7 +34,7 @@ describe DataMigrater::Migration do
34
34
  DataMigration.create version: version
35
35
  end
36
36
 
37
- specify { expect(subject.execute).to be_falsy }
37
+ specify { expect(subject.execute).to eq false }
38
38
 
39
39
  it 'does not executes' do
40
40
  expect(migration).not_to receive :execute
@@ -53,7 +53,7 @@ describe DataMigrater::Migration do
53
53
  it 'creates a new data_migrations' do
54
54
  subject.execute
55
55
 
56
- expect(DataMigration.exists?(version: version)).to be_truthy
56
+ expect(DataMigration.exists?(version: version)).to eq true
57
57
  end
58
58
 
59
59
  context 'and some error is raised' do
@@ -67,7 +67,7 @@ describe DataMigrater::Migration do
67
67
  begin
68
68
  subject.execute
69
69
  rescue
70
- expect(DataMigration.exists?(version: version)).to be_falsy
70
+ expect(DataMigration.exists?(version: version)).to eq false
71
71
  end
72
72
  end
73
73
  end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe DataMigrater::S3, '.download' do
6
+ subject { described_class.new bucket: 'data-migrater', file: 'dummy.csv', tmp_dir: '/tmp' }
7
+
8
+ let!(:client) { double(Aws::S3).as_null_object }
9
+ let!(:file_open) { double(File).as_null_object }
10
+ let!(:processor) { double.as_null_object }
11
+ let!(:temp_file) { double(File).as_null_object }
12
+
13
+ before do
14
+ allow(Aws::S3::Client).to receive(:new) { client }
15
+ allow(File).to receive(:open).with('/tmp/dummy.csv', 'w+').and_yield temp_file
16
+ end
17
+
18
+ it 'downloads the csv file' do
19
+ expect(client).to receive(:get_object).with({ bucket: 'data-migrater', key: 'dummy.csv' }, target: temp_file)
20
+
21
+ subject.download processor: processor
22
+ end
23
+
24
+ it 'process the csv content with given processor' do
25
+ expect(processor).to receive(:process).with temp_file
26
+
27
+ subject.download processor: processor
28
+ end
29
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe DataMigrater::S3, 'initialize' do
6
+ before do
7
+ allow(ENV).to receive(:[]).with('AWS_ACCESS_KEY_ID') { 'AWS_ACCESS_KEY_ID' }
8
+ allow(ENV).to receive(:[]).with('AWS_REGION') { 'AWS_REGION' }
9
+ allow(ENV).to receive(:[]).with('AWS_SECRET_ACCESS_KEY') { 'AWS_SECRET_ACCESS_KEY' }
10
+ end
11
+
12
+ context 'when only mandatory params is given' do
13
+ subject { described_class.new bucket: 'data-migrater', file: 'dummy.csv', tmp_dir: '/tmp' }
14
+
15
+ it 'caches default values and uses exported envs' do
16
+ expect(subject.instance_variable_get(:@bucket)).to eq 'data-migrater'
17
+ expect(subject.instance_variable_get(:@file)).to eq 'dummy.csv'
18
+ expect(subject.instance_variable_get(:@tmp_dir)).to eq '/tmp'
19
+
20
+ expect(subject.instance_variable_get(:@credentials)).to eq(
21
+ access_key_id: 'AWS_ACCESS_KEY_ID',
22
+ region: 'AWS_REGION',
23
+ secret_access_key: 'AWS_SECRET_ACCESS_KEY'
24
+ )
25
+ end
26
+
27
+ it 'updates the aws config' do
28
+ expect(::Aws.config).to receive(:update).with(
29
+ access_key_id: 'AWS_ACCESS_KEY_ID',
30
+ region: 'AWS_REGION',
31
+ secret_access_key: 'AWS_SECRET_ACCESS_KEY'
32
+ )
33
+
34
+ subject
35
+ end
36
+ end
37
+
38
+ context 'when some credential is given' do
39
+ subject do
40
+ described_class.new(
41
+ bucket: 'data-migrater',
42
+ file: 'dummy.csv',
43
+ tmp_dir: '/tmp',
44
+
45
+ credentials: {
46
+ access_key_id: 'access_key_id',
47
+ region: 'region',
48
+ secret_access_key: 'secret_access_key'
49
+ }
50
+ )
51
+ end
52
+
53
+ it 'is used' do
54
+ expect(::Aws.config).to receive(:update).with(
55
+ access_key_id: 'access_key_id',
56
+ region: 'region',
57
+ secret_access_key: 'secret_access_key'
58
+ )
59
+
60
+ subject
61
+ end
62
+ end
63
+ end
data/spec/spec_helper.rb CHANGED
@@ -9,3 +9,7 @@ require 'pry-byebug'
9
9
  ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:'
10
10
 
11
11
  Dir[File.expand_path('support/**/*.rb', __dir__)].each { |file| require file }
12
+
13
+ def local_path
14
+ "#{File.expand_path(__dir__)}/support/local"
15
+ end
@@ -1,3 +0,0 @@
1
- first name,last name,username,age,birthday
2
- Washington,Botelho,wbotelhos,32,23/10/1984
3
- Lucas,Souza,lucasas,,
metadata CHANGED
@@ -1,43 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_migrater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Washington Botelho
7
8
  - GetNinjas
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-05-31 00:00:00.000000000 Z
12
+ date: 2017-08-04 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activerecord
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - "~>"
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '4.1'
21
+ - - "<"
18
22
  - !ruby/object:Gem::Version
19
- version: 4.1.14
23
+ version: '6'
20
24
  type: :runtime
21
25
  prerelease: false
22
26
  version_requirements: !ruby/object:Gem::Requirement
23
27
  requirements:
24
- - - "~>"
28
+ - - ">="
25
29
  - !ruby/object:Gem::Version
26
- version: 4.1.14
30
+ version: '4.1'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '6'
27
34
  - !ruby/object:Gem::Dependency
28
35
  name: railties
29
36
  requirement: !ruby/object:Gem::Requirement
30
37
  requirements:
31
- - - "~>"
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '4.1'
41
+ - - "<"
32
42
  - !ruby/object:Gem::Version
33
- version: 4.1.14
43
+ version: '6'
34
44
  type: :runtime
35
45
  prerelease: false
36
46
  version_requirements: !ruby/object:Gem::Requirement
37
47
  requirements:
38
- - - "~>"
48
+ - - ">="
39
49
  - !ruby/object:Gem::Version
40
- version: 4.1.14
50
+ version: '4.1'
51
+ - - "<"
52
+ - !ruby/object:Gem::Version
53
+ version: '6'
41
54
  - !ruby/object:Gem::Dependency
42
55
  name: smarter_csv
43
56
  requirement: !ruby/object:Gem::Requirement
@@ -53,19 +66,19 @@ dependencies:
53
66
  - !ruby/object:Gem::Version
54
67
  version: '1.1'
55
68
  - !ruby/object:Gem::Dependency
56
- name: bundler
69
+ name: aws-sdk
57
70
  requirement: !ruby/object:Gem::Requirement
58
71
  requirements:
59
- - - ">="
72
+ - - "~>"
60
73
  - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
74
+ version: '2.9'
75
+ type: :runtime
63
76
  prerelease: false
64
77
  version_requirements: !ruby/object:Gem::Requirement
65
78
  requirements:
66
- - - ">="
79
+ - - "~>"
67
80
  - !ruby/object:Gem::Version
68
- version: '0'
81
+ version: '2.9'
69
82
  - !ruby/object:Gem::Dependency
70
83
  name: guard-rspec
71
84
  requirement: !ruby/object:Gem::Requirement
@@ -108,20 +121,6 @@ dependencies:
108
121
  - - ">="
109
122
  - !ruby/object:Gem::Version
110
123
  version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rspec
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
124
  - !ruby/object:Gem::Dependency
126
125
  name: rubocop-rspec
127
126
  requirement: !ruby/object:Gem::Requirement
@@ -165,7 +164,9 @@ dependencies:
165
164
  - !ruby/object:Gem::Version
166
165
  version: '0'
167
166
  description: Generates Data Migrations on Migrate style.
168
- email: tech@getninjas.com.br
167
+ email:
168
+ - wbotelhos@gmail.com
169
+ - tech@getninjas.com.br
169
170
  executables: []
170
171
  extensions: []
171
172
  extra_rdoc_files: []
@@ -179,6 +180,7 @@ files:
179
180
  - lib/data_migrater/logger.rb
180
181
  - lib/data_migrater/migration.rb
181
182
  - lib/data_migrater/migrator.rb
183
+ - lib/data_migrater/s3.rb
182
184
  - lib/data_migrater/version.rb
183
185
  - lib/data_migration.rb
184
186
  - lib/generators/data_migrater/create_generator.rb
@@ -196,6 +198,8 @@ files:
196
198
  - spec/logger/logger_path_spec.rb
197
199
  - spec/migrater_spec.rb
198
200
  - spec/migration_spec.rb
201
+ - spec/s3/download_spec.rb
202
+ - spec/s3/initialize_spec.rb
199
203
  - spec/spec_helper.rb
200
204
  - spec/support/common.rb
201
205
  - spec/support/csv/dummy.csv
@@ -222,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
226
  version: '0'
223
227
  requirements: []
224
228
  rubyforge_project:
225
- rubygems_version: 2.6.11
229
+ rubygems_version: 2.6.12
226
230
  signing_key:
227
231
  specification_version: 4
228
232
  summary: A Data Migrator gem
@@ -237,6 +241,8 @@ test_files:
237
241
  - spec/logger/logger_path_spec.rb
238
242
  - spec/migrater_spec.rb
239
243
  - spec/migration_spec.rb
244
+ - spec/s3/download_spec.rb
245
+ - spec/s3/initialize_spec.rb
240
246
  - spec/spec_helper.rb
241
247
  - spec/support/common.rb
242
248
  - spec/support/csv/dummy.csv