csv_to_sqlite3 0.1.0 → 0.1.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 +4 -4
- data/csv_to_sqlite3.gemspec +2 -2
- data/lib/csv_to_sqlite.rb +4 -2
- data/lib/csv_to_sqlite/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da996b0856a8d3474dfe2bd58b34bc96956874c16cb58281bec0d0fb36f81cf7
|
4
|
+
data.tar.gz: 92e9180d09351aa8de077b8d6da2f8176a64d2d62123c2c7d5feb93ae0712c4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82f5f4921be989aec8fdda9dbca21475bfde61295eab6a8c810c53b31f821a76637f8a8970e99d75a32816f9892327bfb1e303df0b3e7ab644981c2be9f33795
|
7
|
+
data.tar.gz: 926f816917dae6073a2218129fb149c5ea09dd894937babac3b18bcf61dd0f9611e97f4d5004878e17896d881f4e1c92b3cf1afbd9d1199c9f7c351c01b4adb3
|
data/csv_to_sqlite3.gemspec
CHANGED
@@ -8,12 +8,12 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = %q{An easy way to convert a csv file into SQLite database.}
|
10
10
|
spec.description = %q{Add a better description.}
|
11
|
-
spec.homepage = "https://github.com/joaofelipe1294/
|
11
|
+
spec.homepage = "https://github.com/joaofelipe1294/csv_to_sqlite3"
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
14
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
|
-
spec.metadata["source_code_uri"] = "https://github.com/joaofelipe1294/
|
16
|
+
spec.metadata["source_code_uri"] = "https://github.com/joaofelipe1294/csv_to_sqlite3"
|
17
17
|
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
18
18
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
data/lib/csv_to_sqlite.rb
CHANGED
@@ -12,8 +12,10 @@ module CsvToSqlite
|
|
12
12
|
def convert file_path
|
13
13
|
connection = CsvToSqlite::Database.new().connect
|
14
14
|
csv_table = CsvToSqlite::CsvReader.load_file file_path
|
15
|
-
|
16
|
-
|
15
|
+
puts file_path
|
16
|
+
table_name = file_path.split("/").last.split(".csv").first
|
17
|
+
CsvToSqlite::SQL::CreateTable.new(name: table_name, csv_table: csv_table, connection: connection).run
|
18
|
+
CsvToSqlite::SQL::Insert.new(name: table_name, csv_table: csv_table, connection: connection).run
|
17
19
|
end
|
18
20
|
|
19
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csv_to_sqlite3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joaofelipelopes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Add a better description.
|
14
14
|
email:
|
@@ -38,12 +38,12 @@ files:
|
|
38
38
|
- lib/sql/column.rb
|
39
39
|
- lib/sql/create_table.rb
|
40
40
|
- lib/sql/insert.rb
|
41
|
-
homepage: https://github.com/joaofelipe1294/
|
41
|
+
homepage: https://github.com/joaofelipe1294/csv_to_sqlite3
|
42
42
|
licenses:
|
43
43
|
- MIT
|
44
44
|
metadata:
|
45
|
-
homepage_uri: https://github.com/joaofelipe1294/
|
46
|
-
source_code_uri: https://github.com/joaofelipe1294/
|
45
|
+
homepage_uri: https://github.com/joaofelipe1294/csv_to_sqlite3
|
46
|
+
source_code_uri: https://github.com/joaofelipe1294/csv_to_sqlite3
|
47
47
|
post_install_message:
|
48
48
|
rdoc_options: []
|
49
49
|
require_paths:
|
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
|
-
rubygems_version: 3.
|
62
|
+
rubygems_version: 3.0.3
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: An easy way to convert a csv file into SQLite database.
|