parse-db-import 0.0.1
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 +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.html +152 -0
- data/README.md +38 -0
- data/Rakefile +2 -0
- data/bin/parse-db-import +30 -0
- data/lib/parse/db/import.rb +17 -0
- data/lib/parse/db/import/activerecord_helpers.rb +66 -0
- data/lib/parse/db/import/create_schema.rb +29 -0
- data/lib/parse/db/import/import_data.rb +22 -0
- data/lib/parse/db/import/utils.rb +26 -0
- data/lib/parse/db/import/version.rb +7 -0
- data/parse-db-import.gemspec +28 -0
- metadata +159 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 972c606465d4c1c9802f64c070717ba41b967e89
|
4
|
+
data.tar.gz: 132635339ee69e412961412e2ec37ff460acc2eb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ffaf78da0be19cebf9e124162977a05972a1674a7b3d67e70c43e9f87a5f7afe226744234b8c0475a6b94e9f13f68831fb759f0268ab445de859c8c216c8496d
|
7
|
+
data.tar.gz: 76f66fcf5eb274fd5b33a00af87d88e0bf7b47b42b11ee0c90e92b8a237c05d37883046096bc145e19e4ddb011ab637123a46a2638afdf28ce1ad528891fc422
|
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 JohnMorales
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.html
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><style>html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
|
2
|
+
|
3
|
+
body{
|
4
|
+
color:#444;
|
5
|
+
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman',
|
6
|
+
"Hiragino Sans GB", "STXihei", "微软雅黑", serif;
|
7
|
+
font-size:12px;
|
8
|
+
line-height:1.5em;
|
9
|
+
background:#fefefe;
|
10
|
+
width: 45em;
|
11
|
+
margin: 10px auto;
|
12
|
+
padding: 1em;
|
13
|
+
outline: 1300px solid #FAFAFA;
|
14
|
+
}
|
15
|
+
|
16
|
+
a{ color: #0645ad; text-decoration:none;}
|
17
|
+
a:visited{ color: #0b0080; }
|
18
|
+
a:hover{ color: #06e; }
|
19
|
+
a:active{ color:#faa700; }
|
20
|
+
a:focus{ outline: thin dotted; }
|
21
|
+
a:hover, a:active{ outline: 0; }
|
22
|
+
|
23
|
+
span.backtick {
|
24
|
+
border:1px solid #EAEAEA;
|
25
|
+
border-radius:3px;
|
26
|
+
background:#F8F8F8;
|
27
|
+
padding:0 3px 0 3px;
|
28
|
+
}
|
29
|
+
|
30
|
+
::-moz-selection{background:rgba(255,255,0,0.3);color:#000}
|
31
|
+
::selection{background:rgba(255,255,0,0.3);color:#000}
|
32
|
+
|
33
|
+
a::-moz-selection{background:rgba(255,255,0,0.3);color:#0645ad}
|
34
|
+
a::selection{background:rgba(255,255,0,0.3);color:#0645ad}
|
35
|
+
|
36
|
+
p{
|
37
|
+
margin:1em 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
img{
|
41
|
+
max-width:100%;
|
42
|
+
}
|
43
|
+
|
44
|
+
h1,h2,h3,h4,h5,h6{
|
45
|
+
font-weight:normal;
|
46
|
+
color:#111;
|
47
|
+
line-height:1em;
|
48
|
+
}
|
49
|
+
h4,h5,h6{ font-weight: bold; }
|
50
|
+
h1{ font-size:2.5em; }
|
51
|
+
h2{ font-size:2em; border-bottom:1px solid silver; padding-bottom: 5px; }
|
52
|
+
h3{ font-size:1.5em; }
|
53
|
+
h4{ font-size:1.2em; }
|
54
|
+
h5{ font-size:1em; }
|
55
|
+
h6{ font-size:0.9em; }
|
56
|
+
|
57
|
+
blockquote{
|
58
|
+
color:#666666;
|
59
|
+
margin:0;
|
60
|
+
padding-left: 3em;
|
61
|
+
border-left: 0.5em #EEE solid;
|
62
|
+
}
|
63
|
+
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }
|
64
|
+
|
65
|
+
|
66
|
+
pre , code, kbd, samp {
|
67
|
+
color: #000;
|
68
|
+
font-family: monospace;
|
69
|
+
font-size: 0.88em;
|
70
|
+
border-radius:3px;
|
71
|
+
background-color: #F8F8F8;
|
72
|
+
border: 1px solid #CCC;
|
73
|
+
}
|
74
|
+
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 5px 12px;}
|
75
|
+
pre code { border: 0px !important; padding: 0;}
|
76
|
+
code { padding: 0 3px 0 3px; }
|
77
|
+
|
78
|
+
b, strong { font-weight: bold; }
|
79
|
+
|
80
|
+
dfn { font-style: italic; }
|
81
|
+
|
82
|
+
ins { background: #ff9; color: #000; text-decoration: none; }
|
83
|
+
|
84
|
+
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
|
85
|
+
|
86
|
+
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
|
87
|
+
sup { top: -0.5em; }
|
88
|
+
sub { bottom: -0.25em; }
|
89
|
+
|
90
|
+
ul, ol { margin: 1em 0; padding: 0 0 0 2em; }
|
91
|
+
li p:last-child { margin:0 }
|
92
|
+
dd { margin: 0 0 0 2em; }
|
93
|
+
|
94
|
+
img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
|
95
|
+
|
96
|
+
table { border-collapse: collapse; border-spacing: 0; }
|
97
|
+
td { vertical-align: top; }
|
98
|
+
|
99
|
+
@media only screen and (min-width: 480px) {
|
100
|
+
body{font-size:14px;}
|
101
|
+
}
|
102
|
+
|
103
|
+
@media only screen and (min-width: 768px) {
|
104
|
+
body{font-size:16px;}
|
105
|
+
}
|
106
|
+
|
107
|
+
@media print {
|
108
|
+
* { background: transparent !important; color: black !important; filter:none !important; -ms-filter: none !important; }
|
109
|
+
body{font-size:12pt; max-width:100%; outline:none;}
|
110
|
+
a, a:visited { text-decoration: underline; }
|
111
|
+
hr { height: 1px; border:0; border-bottom:1px solid black; }
|
112
|
+
a[href]:after { content: " (" attr(href) ")"; }
|
113
|
+
abbr[title]:after { content: " (" attr(title) ")"; }
|
114
|
+
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
|
115
|
+
pre, blockquote { border: 1px solid #999; padding-right: 1em; page-break-inside: avoid; }
|
116
|
+
tr, img { page-break-inside: avoid; }
|
117
|
+
img { max-width: 100% !important; }
|
118
|
+
@page :left { margin: 15mm 20mm 15mm 10mm; }
|
119
|
+
@page :right { margin: 15mm 10mm 15mm 20mm; }
|
120
|
+
p, h2, h3 { orphans: 3; widows: 3; }
|
121
|
+
h2, h3 { page-break-after: avoid; }
|
122
|
+
}
|
123
|
+
</style><title>README</title></head><body><h1 id="parse-db-import">Parse-Db-Import</h1>
|
124
|
+
<p>This solution is if you need to move away from Parse and build your own backend. This tool allows you to quickly import data exported from Parse into a database supported by active record. Currently it expects the records to be pre-flattened by <a href="#parse-migrator">parse-migrator</a></p>
|
125
|
+
<p>See also</p>
|
126
|
+
<ul>
|
127
|
+
<li><a href="https://github.com/JohnMorales/parse-migrator">parse-migrator</a></li>
|
128
|
+
<li><a href="https://github.com/mattt/rack-scaffold">rack-scaffold</a></li>
|
129
|
+
</ul>
|
130
|
+
<h2 id="installation">Installation</h2>
|
131
|
+
<pre><code class="sh"> $ gem install parse-db-import
|
132
|
+
</code></pre>
|
133
|
+
|
134
|
+
<h2 id="usage">Usage</h2>
|
135
|
+
<pre><code class="sh"> $ bundle exec parse-db-import --path [path] --dbname [database]
|
136
|
+
</code></pre>
|
137
|
+
|
138
|
+
<h3 id="other-options">Other options</h3>
|
139
|
+
<pre><code class="ruby"> --adapter [postgresql] #(mysql, mysql2, postgresql or sqlite3 defaults to postgresql)
|
140
|
+
--dbuser [user] #(optional, will use current account)
|
141
|
+
--dbpassword [password] #(optional, will use current account)
|
142
|
+
--host [host] #(optional, will use 'localhost')
|
143
|
+
</code></pre>
|
144
|
+
|
145
|
+
<h2 id="contributing">Contributing</h2>
|
146
|
+
<ol>
|
147
|
+
<li>Fork it ( https://github.com/[my-github-username]/parse-db-import/fork )</li>
|
148
|
+
<li>Create your feature branch (<code>git checkout -b my-new-feature</code>)</li>
|
149
|
+
<li>Commit your changes (<code>git commit -am 'Add some feature'</code>)</li>
|
150
|
+
<li>Push to the branch (<code>git push origin my-new-feature</code>)</li>
|
151
|
+
<li>Create a new Pull Request</li>
|
152
|
+
</ol></body></html>
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Parse-Db-Import
|
2
|
+
|
3
|
+
This solution is if you need to move away from Parse and build your own backend. This tool allows you to quickly import data exported from Parse into a database supported by active record. Currently it expects the records to be pre-flattened by [parse-migrator](https://github.com/JohnMorales/parse-migrator)
|
4
|
+
|
5
|
+
See also
|
6
|
+
|
7
|
+
- [parse-migrator](https://github.com/JohnMorales/parse-migrator)
|
8
|
+
- [rack-scaffold](https://github.com/mattt/rack-scaffold)
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
```sh
|
13
|
+
$ gem install parse-db-import
|
14
|
+
```
|
15
|
+
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
```sh
|
20
|
+
$ bundle exec parse-db-import --path [path] --dbname [database]
|
21
|
+
```
|
22
|
+
|
23
|
+
### Other options
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
--adapter [postgresql] #(mysql, mysql2, postgresql or sqlite3 defaults to postgresql)
|
27
|
+
--dbuser [user] #(optional, will use current account)
|
28
|
+
--dbpassword [password] #(optional, will use current account)
|
29
|
+
--host [host] #(optional, will use 'localhost')
|
30
|
+
```
|
31
|
+
|
32
|
+
## Contributing
|
33
|
+
|
34
|
+
1. Fork it ( https://github.com/[my-github-username]/parse-db-import/fork )
|
35
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
36
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
37
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
38
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/parse-db-import
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'commander'
|
4
|
+
require 'rubygems'
|
5
|
+
require "parse/db/import"
|
6
|
+
require "parse/db/import/version"
|
7
|
+
|
8
|
+
Commander.configure do
|
9
|
+
program :version, Parse::Db::Import::VERSION
|
10
|
+
program :description, 'Simple app to import parse db'
|
11
|
+
default_command :import
|
12
|
+
|
13
|
+
command :import do |c|
|
14
|
+
c.syntax = 'parse-db-import import [options]'
|
15
|
+
c.summary = ''
|
16
|
+
c.description = ''
|
17
|
+
c.example 'parse-db-import --path [path] --dbname [database] --adapter [postgresql] --dbuser [user] --dbpassword [password] --host [host]', 'command example'
|
18
|
+
c.option '--path String', String, 'The location of where the json files exist'
|
19
|
+
c.option '--entity String', String, 'The entity to load, all if missing'
|
20
|
+
c.option '--dbname String', String, 'db name'
|
21
|
+
c.option '--adapter String', String, 'mysql, mysql2, postgresql or sqlite3 defaults to postgresql'
|
22
|
+
c.option '--dbuser String', String, 'db user name'
|
23
|
+
c.option '--dbpassword String', String, 'db password'
|
24
|
+
c.option '--host String', String, 'db password'
|
25
|
+
c.action do |args, options|
|
26
|
+
options.path = ask("Path? ") unless options.path
|
27
|
+
Parse::Db::Import.new.run(options)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "parse/db/import/activerecord_helpers"
|
2
|
+
require "parse/db/import/create_schema"
|
3
|
+
require "parse/db/import/import_data"
|
4
|
+
|
5
|
+
|
6
|
+
module Parse
|
7
|
+
module Db
|
8
|
+
class Import
|
9
|
+
def run(options)
|
10
|
+
options.default({ host: "localhost", adapter: "postgresql", entity: "**" })
|
11
|
+
init_active_record options
|
12
|
+
create_schema options
|
13
|
+
import_data options
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'active_record'
|
2
|
+
|
3
|
+
module Parse
|
4
|
+
module Db
|
5
|
+
class Import
|
6
|
+
def init_active_record(options)
|
7
|
+
ActiveRecord::Base.establish_connection({
|
8
|
+
adapter: options.adapter,
|
9
|
+
host: options.host,
|
10
|
+
username: options.dbuser,
|
11
|
+
password: options.dbpassword,
|
12
|
+
database: options.dbname
|
13
|
+
})
|
14
|
+
end
|
15
|
+
def get_class(class_name)
|
16
|
+
return self.class.const_get(class_name, false) if self.class.const_defined?(class_name, false)
|
17
|
+
klass = self.class.const_set(class_name, Class.new(ActiveRecord::Base) do
|
18
|
+
@inheritance_column = "ar_type"
|
19
|
+
end)
|
20
|
+
create_table_if_missing(klass)
|
21
|
+
klass
|
22
|
+
end
|
23
|
+
|
24
|
+
def create_table_if_missing klass
|
25
|
+
dbconnection = klass.connection
|
26
|
+
dbconnection = klass.connection
|
27
|
+
dbconnection.create_table(klass.table_name) unless dbconnection.table_exists? klass.table_name
|
28
|
+
end
|
29
|
+
def get_missing_columns(klass, columns)
|
30
|
+
@seen_columns ||= {}
|
31
|
+
missing_columns = []
|
32
|
+
# Get the list of columns that we've already checked.
|
33
|
+
seen_columns = @seen_columns[klass.table_name] || []
|
34
|
+
|
35
|
+
# We don't need to check columns that we've already checked.
|
36
|
+
columns -= seen_columns
|
37
|
+
return columns if columns.empty?
|
38
|
+
|
39
|
+
|
40
|
+
dbconnection = klass.connection
|
41
|
+
|
42
|
+
#Get a listing of all the columns that don't exist in the entity
|
43
|
+
columns.each { |k| missing_columns.push(k) unless dbconnection.column_exists?(klass.table_name, k) }
|
44
|
+
|
45
|
+
|
46
|
+
#Mark that we've seen all these columns so we don't need to search the database again.
|
47
|
+
@seen_columns[klass.table_name] = seen_columns | columns
|
48
|
+
missing_columns
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
def create_missing_columns(klass, missing_columns)
|
53
|
+
return if missing_columns.length == 0
|
54
|
+
|
55
|
+
#Create any columns that are missing.
|
56
|
+
dbconnection = klass.connection
|
57
|
+
dbconnection.change_table(klass.table_name) do |t|
|
58
|
+
missing_columns.each { |k,v| t.column k, :string, { limit: v } }
|
59
|
+
end
|
60
|
+
klass.reset_column_information
|
61
|
+
klass.inheritance_column = "ar_type"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "parse/db/import/utils"
|
2
|
+
module Parse
|
3
|
+
module Db
|
4
|
+
class Import
|
5
|
+
def create_schema(options)
|
6
|
+
Dir["#{options.path}/#{options.entity}/data.json"].each do |file|
|
7
|
+
missing_columns = {}
|
8
|
+
klass = klass_from_file(file)
|
9
|
+
puts "Scanning....#{klass.name}"
|
10
|
+
process_parse_file(file) do |record|
|
11
|
+
columns = get_missing_columns(klass, record.keys)
|
12
|
+
unless columns.empty?
|
13
|
+
columns.each { |k| missing_columns[k] = 0}
|
14
|
+
end
|
15
|
+
missing_columns.each do |k, v|
|
16
|
+
len = record[k].to_s.length
|
17
|
+
missing_columns[k] = len if v < len
|
18
|
+
end
|
19
|
+
end
|
20
|
+
if (missing_columns.length)
|
21
|
+
puts "Creating....#{klass.name} columns #{missing_columns.map{|k,v| "#{k} varchar(#{v})"}.join(", ")}"
|
22
|
+
create_missing_columns(klass, missing_columns)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require "parse/db/import/utils"
|
2
|
+
|
3
|
+
module Parse
|
4
|
+
module Db
|
5
|
+
class Import
|
6
|
+
def import_data(options)
|
7
|
+
Dir["#{options.path}/#{options.entity}/data.json"].each do |file|
|
8
|
+
klass = klass_from_file(file)
|
9
|
+
puts "Importing....#{klass.name}"
|
10
|
+
process_parse_file(file) do |record|
|
11
|
+
begin
|
12
|
+
klass.new(record).save!()
|
13
|
+
rescue Exception
|
14
|
+
puts record
|
15
|
+
raise
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Parse
|
2
|
+
module Db
|
3
|
+
class Import
|
4
|
+
|
5
|
+
def map_arrays_to_strings(record)
|
6
|
+
record.each { |k, v| record[k] = v.join(', ') if v.is_a? Array }
|
7
|
+
end
|
8
|
+
|
9
|
+
def klass_from_file(file)
|
10
|
+
class_name = File.basename(File.dirname(file))
|
11
|
+
get_class(class_name)
|
12
|
+
end
|
13
|
+
|
14
|
+
def process_parse_file(file, &block)
|
15
|
+
IO.foreach(file) do |record|
|
16
|
+
record = JSON.parse(record)
|
17
|
+
record = map_arrays_to_strings(record)
|
18
|
+
next if record["delete"]
|
19
|
+
yield(record)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'parse/db/import/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "parse-db-import"
|
8
|
+
spec.version = Parse::Db::Import::VERSION
|
9
|
+
spec.authors = ["JohnMorales"]
|
10
|
+
spec.email = ["jmorales@gmail.com"]
|
11
|
+
spec.summary = %q{A tool to import Parse database exports to activerecord}
|
12
|
+
spec.description = %q{This tool allows you to import your json files exported from Parse to any database supported by activerecord.}
|
13
|
+
spec.homepage = "https://github.com/JohnMorales/parse-db-import"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.1"
|
23
|
+
spec.add_dependency "activerecord", "~> 4.1"
|
24
|
+
spec.add_dependency "commander", "~> 4.2"
|
25
|
+
spec.add_dependency "pg", "~> 0.17"
|
26
|
+
spec.add_development_dependency "pry", "~> 0.10"
|
27
|
+
spec.add_development_dependency "pry-byebug", "~> 1.3"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: parse-db-import
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- JohnMorales
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-05 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.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
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.1'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activerecord
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: commander
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4.2'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pg
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.17'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.17'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.10'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.10'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry-byebug
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.3'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.3'
|
111
|
+
description: This tool allows you to import your json files exported from Parse to
|
112
|
+
any database supported by activerecord.
|
113
|
+
email:
|
114
|
+
- jmorales@gmail.com
|
115
|
+
executables:
|
116
|
+
- parse-db-import
|
117
|
+
extensions: []
|
118
|
+
extra_rdoc_files: []
|
119
|
+
files:
|
120
|
+
- ".gitignore"
|
121
|
+
- Gemfile
|
122
|
+
- Gemfile.lock
|
123
|
+
- LICENSE.txt
|
124
|
+
- README.html
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- bin/parse-db-import
|
128
|
+
- lib/parse/db/import.rb
|
129
|
+
- lib/parse/db/import/activerecord_helpers.rb
|
130
|
+
- lib/parse/db/import/create_schema.rb
|
131
|
+
- lib/parse/db/import/import_data.rb
|
132
|
+
- lib/parse/db/import/utils.rb
|
133
|
+
- lib/parse/db/import/version.rb
|
134
|
+
- parse-db-import.gemspec
|
135
|
+
homepage: https://github.com/JohnMorales/parse-db-import
|
136
|
+
licenses:
|
137
|
+
- MIT
|
138
|
+
metadata: {}
|
139
|
+
post_install_message:
|
140
|
+
rdoc_options: []
|
141
|
+
require_paths:
|
142
|
+
- lib
|
143
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
148
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
requirements: []
|
154
|
+
rubyforge_project:
|
155
|
+
rubygems_version: 2.2.2
|
156
|
+
signing_key:
|
157
|
+
specification_version: 4
|
158
|
+
summary: A tool to import Parse database exports to activerecord
|
159
|
+
test_files: []
|