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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 146ef624bc9e0172c1ebdb287b6d906b51e9b34826b85d50937c244210148c50
4
- data.tar.gz: 1353a3721872dbfe61334bf5bc4d6869799d5ab9439b955b421710a366d73ae1
3
+ metadata.gz: da996b0856a8d3474dfe2bd58b34bc96956874c16cb58281bec0d0fb36f81cf7
4
+ data.tar.gz: 92e9180d09351aa8de077b8d6da2f8176a64d2d62123c2c7d5feb93ae0712c4a
5
5
  SHA512:
6
- metadata.gz: affe7184ffd215d3279735dfb3218253a271278eb36e8edb2173cae2afc892d486eb8fdf94cefca3eae291cb8739b06258217e581dac991851da3fe13dcfd1c2
7
- data.tar.gz: 9bd61eab0dfe28211d5e5ce970627a029c9fa0209f70f1e03483e3c3a9d04cdfa2ecb68383bd622733b9fd96020d9a29b53a50df7d1503687aa8ddc51e99e0a2
6
+ metadata.gz: 82f5f4921be989aec8fdda9dbca21475bfde61295eab6a8c810c53b31f821a76637f8a8970e99d75a32816f9892327bfb1e303df0b3e7ab644981c2be9f33795
7
+ data.tar.gz: 926f816917dae6073a2218129fb149c5ea09dd894937babac3b18bcf61dd0f9611e97f4d5004878e17896d881f4e1c92b3cf1afbd9d1199c9f7c351c01b4adb3
@@ -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/csv_to_sqlite"
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/csv_to_sqlite"
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.
@@ -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
- CsvToSqlite::SQL::CreateTable.new(name: 'persons', csv_table: csv_table, connection: connection).run
16
- CsvToSqlite::SQL::Insert.new(name: 'persons', csv_table: csv_table, connection: connection).run
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
@@ -1,3 +1,3 @@
1
1
  module CsvToSqlite
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  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.0
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-20 00:00:00.000000000 Z
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/csv_to_sqlite
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/csv_to_sqlite
46
- source_code_uri: https://github.com/joaofelipe1294/csv_to_sqlite
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.1.2
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.