separatum 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +101 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/separatum.rb +35 -0
- data/lib/separatum/converters/hash2_object.rb +17 -0
- data/lib/separatum/converters/object2_hash.rb +20 -0
- data/lib/separatum/exporters/active_record.rb +16 -0
- data/lib/separatum/exporters/active_record_code.rb +27 -0
- data/lib/separatum/exporters/active_record_code/attribute.rb.erb +1 -0
- data/lib/separatum/exporters/active_record_code/object.rb.erb +3 -0
- data/lib/separatum/exporters/active_record_code/transaction.rb.erb +3 -0
- data/lib/separatum/exporters/json_file.rb +16 -0
- data/lib/separatum/importers/active_record.rb +86 -0
- data/lib/separatum/importers/json_file.rb +14 -0
- data/lib/separatum/object.rb +5 -0
- data/lib/separatum/processors/inspect.rb +10 -0
- data/lib/separatum/processors/uuid_changer.rb +30 -0
- data/lib/separatum/string.rb +5 -0
- data/lib/separatum/version.rb +3 -0
- data/separatum.gemspec +36 -0
- metadata +113 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b772e3f0272e01367a9e4e8ab1be143964046207677841d6b0532262d6e8a7c1
|
4
|
+
data.tar.gz: 824578f149e375bbc57bb28cf6b44155610a53c7448c5e27b4e09646d625b951
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 92051fcf37e11b151718a21281a95cc23a6cda366a4891623182ba2f3e183e720ebff0758d48960169ff74c0a2e682c1381d581a49f7c3a5561deaa7a2d32325
|
7
|
+
data.tar.gz: 457a164b48dcf7b0b6f30bb5d29e55e24784b7257f2d3d448f611f59a2ce16674f84481bda7d93d4e6d4baadeb3a790a7802937e880fd8af7a4bf6e6afdf1ba4
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 kraaaken
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
# (WIP) Separatum
|
2
|
+
|
3
|
+
Extract and transfer linked objects from one database into another.
|
4
|
+
|
5
|
+
## How you can use it
|
6
|
+
|
7
|
+
- Making seeds.rb as copy of production data for testing purposes.
|
8
|
+
- Making separate database for AB-testing (performance or marketing purposes)
|
9
|
+
- Checking your data logical structure (it will raise on broken or unexisting links)
|
10
|
+
|
11
|
+
## UUID
|
12
|
+
|
13
|
+
It is better if you are using UUID primary key in every table you want to extract.
|
14
|
+
This will allow you to avoid problems (with primary keys and sequences) during importing objects into a new database.
|
15
|
+
Also `UuidChanger` can help you avoid collisions in case of importing same objects more than one time in the same database.
|
16
|
+
|
17
|
+
## Examples
|
18
|
+
|
19
|
+
```bash
|
20
|
+
gem install separatum
|
21
|
+
```
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'separatum'
|
25
|
+
```
|
26
|
+
|
27
|
+
### Extract and export
|
28
|
+
|
29
|
+
Build new exporter
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
exporter = Separatum.build do
|
33
|
+
use Separatum::Importers::ActiveRecord # We are going to crawl ActiveRecord objects
|
34
|
+
use Separatum::Converters::Object2Hash # Most of the modules in Separatum is working with Hash-form of objects
|
35
|
+
use Separatum::Processors::UuidChanger # Hide production's UUIDs with no broken links
|
36
|
+
use Separatum::Exporters::JsonFile, file_name: 'separate.json' # Export object to json file
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
Define start object and extract all linked records into `separate.json` file
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
start_object = User.find('any_uuid_from_your_table')
|
44
|
+
exporter.(start_object)
|
45
|
+
```
|
46
|
+
|
47
|
+
### Import into new database
|
48
|
+
|
49
|
+
Build new importer
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
importer = Separatum.build do
|
53
|
+
use Separatum::Importers::JsonFile, file_name: 'separate.json' # We are going to import hashed objects from separate.json
|
54
|
+
use Separatum::Converters::Hash2Object # Convert back to real objects (not persisted)
|
55
|
+
use Separatum::Exporters::ActiveRecord # Save them (in one transaction for all objects in set)
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
Import records to a database from `separate.json` file
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
importer.() # It returns set of persisted objects
|
63
|
+
```
|
64
|
+
|
65
|
+
### Extract and generate ruby code
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
seeds_generator = Separatum.build do
|
69
|
+
use Separatum::Importers::ActiveRecord
|
70
|
+
use Separatum::Converters::Object2Hash
|
71
|
+
use Separatum::Processors::UuidChanger
|
72
|
+
use Separatum::Converters::Hash2Object
|
73
|
+
use Separatum::Exporters::ActiveRecordCode
|
74
|
+
end
|
75
|
+
|
76
|
+
```
|
77
|
+
|
78
|
+
Return generated ruby code for creating objects in a database
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
start_object = User.find('any_uuid_you_want_to_start_from')
|
82
|
+
puts seeds_generator.(start_object)
|
83
|
+
```
|
84
|
+
|
85
|
+
## TODO
|
86
|
+
|
87
|
+
- Data obfuscation (respecting to private data)
|
88
|
+
|
89
|
+
## Development
|
90
|
+
|
91
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
92
|
+
|
93
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
94
|
+
|
95
|
+
## Contributing
|
96
|
+
|
97
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/a0s/separatum.
|
98
|
+
|
99
|
+
## License
|
100
|
+
|
101
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "separatum"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/separatum.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require "separatum/version"
|
2
|
+
|
3
|
+
Dir[File.expand_path(File.join(__FILE__, %w(.. ** *.rb)))].each(&method(:require))
|
4
|
+
|
5
|
+
module Separatum
|
6
|
+
def self.build(&block)
|
7
|
+
instance = Class.new.include(StackMethods).new
|
8
|
+
stack = instance.instance_eval(&block)
|
9
|
+
Stack.new(stack: stack)
|
10
|
+
end
|
11
|
+
|
12
|
+
module StackMethods
|
13
|
+
def use(klass, *params)
|
14
|
+
fail unless klass.is_a?(Class)
|
15
|
+
(@stack ||= []) << [klass, *params]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class Stack
|
20
|
+
def initialize(stack:)
|
21
|
+
@stack = stack
|
22
|
+
end
|
23
|
+
|
24
|
+
def call(*options)
|
25
|
+
current_options = options
|
26
|
+
current_result = nil
|
27
|
+
@stack.each do |el|
|
28
|
+
klass, *params = el
|
29
|
+
instance = klass.new(*params)
|
30
|
+
current_result = instance.(*(current_result || current_options))
|
31
|
+
end
|
32
|
+
current_result
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Separatum
|
2
|
+
module Converters
|
3
|
+
class Hash2Object
|
4
|
+
def call(*hashes)
|
5
|
+
hashes.map do |hash|
|
6
|
+
hash_copy = hash.symbolize_keys
|
7
|
+
_klass = hash_copy.delete(:_klass).constantize
|
8
|
+
instance = _klass.new
|
9
|
+
hash_copy.symbolize_keys.each do |k, v|
|
10
|
+
instance.send("#{k}=", v)
|
11
|
+
end
|
12
|
+
instance
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Separatum
|
2
|
+
module Converters
|
3
|
+
class Object2Hash
|
4
|
+
def call(*objects)
|
5
|
+
objects.map do |object|
|
6
|
+
klass = object.class.respond_to?(:name) ? object.class.name : object.class.to_s
|
7
|
+
if object.respond_to?(:as_json)
|
8
|
+
{ _klass: klass }.merge(object.as_json)
|
9
|
+
elsif object.respond_to?(:to_hash)
|
10
|
+
{ _klass: klass }.merge(object.to_hash)
|
11
|
+
elsif object.respond_to?(:to_h)
|
12
|
+
{ _klass: klass }.merge(object.to_h)
|
13
|
+
else
|
14
|
+
fail(object.inspect)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Separatum
|
2
|
+
module Exporters
|
3
|
+
class ActiveRecord
|
4
|
+
def call(*objects)
|
5
|
+
::ActiveRecord::Base.transaction do
|
6
|
+
objects.each do |o|
|
7
|
+
o.class.connection.execute("ALTER TABLE %s DISABLE TRIGGER ALL;" % [o.class.table_name])
|
8
|
+
o.save!(validate: false)
|
9
|
+
o.class.connection.execute("ALTER TABLE %s ENABLE TRIGGER ALL;" % [o.class.table_name])
|
10
|
+
end
|
11
|
+
end
|
12
|
+
objects.map(&:reload)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Separatum
|
2
|
+
module Exporters
|
3
|
+
class ActiveRecordCode
|
4
|
+
T_TRANSACTION = File.expand_path(File.join(__FILE__, %w(.. active_record_code transaction.rb.erb)))
|
5
|
+
T_OBJECT = File.expand_path(File.join(__FILE__, %w(.. active_record_code object.rb.erb)))
|
6
|
+
T_ATTRIBUTE = File.expand_path(File.join(__FILE__, %w(.. active_record_code attribute.rb.erb)))
|
7
|
+
|
8
|
+
attr_reader :objects_str, :attributes_str, :key_str, :value_str
|
9
|
+
|
10
|
+
def call(*objects)
|
11
|
+
@objects_str = objects.map do |object|
|
12
|
+
@attributes_str = object.attributes.map do |key, value|
|
13
|
+
@key_str = key
|
14
|
+
if value.is_a?(ActiveSupport::TimeWithZone)
|
15
|
+
@value_str = "\"#{value}\""
|
16
|
+
else
|
17
|
+
@value_str = value.inspect
|
18
|
+
end
|
19
|
+
ERB.new(File.read(T_ATTRIBUTE)).result(binding).strip
|
20
|
+
end
|
21
|
+
ERB.new(File.read(T_OBJECT)).result(binding).strip
|
22
|
+
end
|
23
|
+
ERB.new(File.read(T_TRANSACTION)).result(binding).strip
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= key_str %>: <%= value_str %>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<%= object.class %>.connection.execute("ALTER TABLE <%= object.class.table_name %> DISABLE TRIGGER ALL;")
|
2
|
+
<%= object.class %>.new(<%= attributes_str.join(', ') %>).save!(validate: false)
|
3
|
+
<%= object.class %>.connection.execute("ALTER TABLE <%= object.class.table_name %> ENABLE TRIGGER ALL;")
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Separatum
|
2
|
+
module Exporters
|
3
|
+
class JsonFile
|
4
|
+
def initialize(file_name:, pretty_print: false)
|
5
|
+
@file_name = file_name
|
6
|
+
@pretty_print = pretty_print
|
7
|
+
end
|
8
|
+
|
9
|
+
def call(*array)
|
10
|
+
str = @pretty_print ? JSON.pretty_generate(array) : JSON.dump(array)
|
11
|
+
File.write(@file_name, str)
|
12
|
+
array
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
3
|
+
module Separatum
|
4
|
+
module Importers
|
5
|
+
class ActiveRecord
|
6
|
+
attr_reader :klass_transitions, :object_transitions
|
7
|
+
|
8
|
+
def initialize(**params)
|
9
|
+
@max_depth = params[:max_depth] || 2
|
10
|
+
@skip_through = params[:skip_through] || true
|
11
|
+
@skip_nil = params[:skip_nil] || true
|
12
|
+
|
13
|
+
@skip_klasses = params[:skip_klasses] || []
|
14
|
+
@skip_objects = params[:skip_objects] || []
|
15
|
+
@skip_klass_transitions = params[:skip_klass_transitions] || []
|
16
|
+
@skip_object_transitions = params[:skip_object_transitions] || []
|
17
|
+
|
18
|
+
@klass_transitions = Set[]
|
19
|
+
@object_transitions = Set[]
|
20
|
+
@objects = Set[]
|
21
|
+
end
|
22
|
+
|
23
|
+
def call(object)
|
24
|
+
@objects.add(object)
|
25
|
+
act(object)
|
26
|
+
@objects.to_a
|
27
|
+
end
|
28
|
+
|
29
|
+
def act(object, depth = 1)
|
30
|
+
object.class.reflections.each do |association_name, reflection|
|
31
|
+
if @skip_through && reflection.is_a?(ActiveRecord::Reflection::ThroughReflection)
|
32
|
+
next
|
33
|
+
end
|
34
|
+
|
35
|
+
if @skip_nil && object.send(association_name).nil?
|
36
|
+
next
|
37
|
+
end
|
38
|
+
|
39
|
+
if depth >= @max_depth
|
40
|
+
next
|
41
|
+
end
|
42
|
+
|
43
|
+
case reflection.macro
|
44
|
+
when :belongs_to, :has_one
|
45
|
+
new_object = object.send(association_name)
|
46
|
+
next if @objects.include?(new_object)
|
47
|
+
next if new_object.is_one_of_a?(@skip_klasses)
|
48
|
+
|
49
|
+
next if @object_transitions.include?([new_object, object])
|
50
|
+
next if @skip_objects.include?(new_object)
|
51
|
+
next if @skip_object_transitions.include?([object, new_object])
|
52
|
+
next if @skip_klasses.include?(new_object.class)
|
53
|
+
next if @skip_klass_transitions.include?([object.class, new_object.class])
|
54
|
+
|
55
|
+
@objects.add(new_object)
|
56
|
+
@klass_transitions.add([object.class, new_object.class])
|
57
|
+
@object_transitions.add([object, new_object])
|
58
|
+
act(new_object, depth + 1)
|
59
|
+
|
60
|
+
|
61
|
+
when :has_many
|
62
|
+
new_objects = object.send(association_name)
|
63
|
+
new_objects.each do |new_object|
|
64
|
+
next if @objects.include?(new_object)
|
65
|
+
next if new_object.is_one_of_a?(@skip_klasses)
|
66
|
+
|
67
|
+
next if @object_transitions.include?([new_object, object])
|
68
|
+
next if @skip_objects.include?(new_object)
|
69
|
+
next if @skip_object_transitions.include?([object, new_object])
|
70
|
+
next if @skip_klasses.include?(new_object.class)
|
71
|
+
next if @skip_klass_transitions.include?([object.class, new_object.class])
|
72
|
+
|
73
|
+
@objects.add(new_object)
|
74
|
+
@klass_transitions.add([object.class, new_object.class])
|
75
|
+
@object_transitions.add([object, new_object])
|
76
|
+
act(new_object, depth + 1)
|
77
|
+
end
|
78
|
+
|
79
|
+
else
|
80
|
+
fail
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
|
3
|
+
module Separatum
|
4
|
+
module Processors
|
5
|
+
class UuidChanger
|
6
|
+
def initialize
|
7
|
+
@uuid_map = {}
|
8
|
+
end
|
9
|
+
|
10
|
+
def call(*hashes)
|
11
|
+
hashes.map(&method(:transform_hash))
|
12
|
+
end
|
13
|
+
|
14
|
+
def transform_hash(h)
|
15
|
+
new_h = {}
|
16
|
+
h.each do |k, v|
|
17
|
+
if v.is_a?(String) && v.is_uuid?
|
18
|
+
unless @uuid_map[v]
|
19
|
+
@uuid_map[v] = SecureRandom.uuid
|
20
|
+
end
|
21
|
+
new_h[k] = @uuid_map[v]
|
22
|
+
else
|
23
|
+
new_h[k] = v
|
24
|
+
end
|
25
|
+
end
|
26
|
+
new_h
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/separatum.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "separatum/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "separatum"
|
7
|
+
spec.version = Separatum::VERSION
|
8
|
+
spec.authors = ["Anton Osenenko"]
|
9
|
+
|
10
|
+
spec.summary = %q{Extract and transfer linked objects from one database into another.}
|
11
|
+
spec.homepage = "https://github.com/a0s/separatum"
|
12
|
+
spec.license = "MIT"
|
13
|
+
|
14
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
15
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
16
|
+
if spec.respond_to?(:metadata)
|
17
|
+
spec.metadata["homepage_uri"] = "https://github.com/a0s/separatum"
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/a0s/separatum"
|
19
|
+
else
|
20
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
21
|
+
"public gem pushes."
|
22
|
+
end
|
23
|
+
|
24
|
+
# Specify which files should be added to the gem when it is released.
|
25
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
26
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
27
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.17"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: separatum
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Anton Osenenko
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-06-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.17'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.17'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- ".gitignore"
|
62
|
+
- ".rspec"
|
63
|
+
- ".travis.yml"
|
64
|
+
- Gemfile
|
65
|
+
- Gemfile.lock
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- bin/console
|
70
|
+
- bin/setup
|
71
|
+
- lib/separatum.rb
|
72
|
+
- lib/separatum/converters/hash2_object.rb
|
73
|
+
- lib/separatum/converters/object2_hash.rb
|
74
|
+
- lib/separatum/exporters/active_record.rb
|
75
|
+
- lib/separatum/exporters/active_record_code.rb
|
76
|
+
- lib/separatum/exporters/active_record_code/attribute.rb.erb
|
77
|
+
- lib/separatum/exporters/active_record_code/object.rb.erb
|
78
|
+
- lib/separatum/exporters/active_record_code/transaction.rb.erb
|
79
|
+
- lib/separatum/exporters/json_file.rb
|
80
|
+
- lib/separatum/importers/active_record.rb
|
81
|
+
- lib/separatum/importers/json_file.rb
|
82
|
+
- lib/separatum/object.rb
|
83
|
+
- lib/separatum/processors/inspect.rb
|
84
|
+
- lib/separatum/processors/uuid_changer.rb
|
85
|
+
- lib/separatum/string.rb
|
86
|
+
- lib/separatum/version.rb
|
87
|
+
- separatum.gemspec
|
88
|
+
homepage: https://github.com/a0s/separatum
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata:
|
92
|
+
homepage_uri: https://github.com/a0s/separatum
|
93
|
+
source_code_uri: https://github.com/a0s/separatum
|
94
|
+
post_install_message:
|
95
|
+
rdoc_options: []
|
96
|
+
require_paths:
|
97
|
+
- lib
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
requirements: []
|
109
|
+
rubygems_version: 3.0.3
|
110
|
+
signing_key:
|
111
|
+
specification_version: 4
|
112
|
+
summary: Extract and transfer linked objects from one database into another.
|
113
|
+
test_files: []
|