csv_json_converter 0.1.4 → 0.1.5

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: f1f3376d08cdd35e377a8948b5557767c12ecaa6ebb016b211e12d8c13836d8d
4
- data.tar.gz: 1f48a73d83e9c365b24ea62f640a9b31690c25ed7aa6e7c8e9d01f9f72992031
3
+ metadata.gz: b18ca7a164f2cd0734d5c66d0f8783e797a7c9c3ff783cf91996b97cf1b5654d
4
+ data.tar.gz: 0d53ebb69cf99cb51949900f504400284e24776cb4b6a14c607ed9d95bce2f7e
5
5
  SHA512:
6
- metadata.gz: f78b16b10cbc8e594395402d2ce6d3cd8f1041f2e2a689664a644defc62ff4ab8ef7045d82eccd23bac63571ab45b3fc3cbb709d5efebf0a1d18738dde061467
7
- data.tar.gz: 6938447a517037a4d10fc481f8073efadd1a2cb9aa971207b9edc349dd94c24faf6cf38ae0e1d9dca3bcaf2f5acf0f3b3f88b2a589436a61d522a52ccee00db9
6
+ metadata.gz: b5ecc2bc8950d09f0e923a7650050c0810ef2181600a951bd67e18106561e0b6b1ad5715e358c6c9c850bd022b175eeaffef9670eda3d263e6eb933f19352480
7
+ data.tar.gz: 8f8c1bdcb7b0551b11ac838f0d6aa46dcb58fc1b235ab23dcabe0027d76e2c2c8853abd6076d88c6b8eafb8eefb6738845a75a9c4e54c89506cf4922e7bbc55f
data/README.md CHANGED
@@ -1,15 +1,13 @@
1
1
  # CsvJsonConverter
2
2
 
3
3
  <a name="readme-top"></a>
4
- # :green_book: Table of Contents
5
4
  [![csv_json_ - converter](https://img.shields.io/badge/csv_json_convert_-csv-2ea44f)](https://rubygems.org/gems/csv_json_converter)
6
5
  - [:green_book: Table of Contents](#-table-of-contents)
7
6
  - [:book: csv\_json\_converter ](#-csv_json_converter-)
8
7
  - [Installation ](#installation-)
9
8
  - [Usage](#usage)
10
- - [Using to\_json](#csv_to_json)
11
- - [Using activerecord\_to\_csv](#using-activerecord_to_csv)
12
- - [json\_or\_ruby\_to\_csv usage with rails controller](#json_or_ruby_to_csv-usage-with-rails-controller)
9
+ - [Convert csv to json](#csv-to-json)
10
+ - [Convert json to csv](#json-to-csv)
13
11
  - [:busts_in_silhouette: Authors ](#-authors-)
14
12
  - [:handshake: Contributing ](#-contributing-)
15
13
  - [:star:️ Show your support ](#️-show-your-support-)
@@ -27,7 +25,7 @@ gem install csv_json_converter
27
25
  ```
28
26
  ### Usage
29
27
  `require` this gem on the top of your ruby code.
30
- ### Covert csv to json
28
+ ### Csv to json
31
29
  If you want to convert `csv string`, to json you can use `to_json` method from `CsvJsonConverter`. Let's see how:-
32
30
 
33
31
  <i>For example </i>
@@ -52,7 +50,7 @@ If you want to convert `csv string`, to json you can use `to_json` method from `
52
50
  "hex": "jz40cbafbec8d6f92e93d22ea6ef5b"
53
51
  }
54
52
  ```
55
- ### Covert json to csv
53
+ ### Json to csv
56
54
  If you want to convert `json object`, to json you can use `to_csv` method from `CsvJsonConverter`. Let's see how:-
57
55
 
58
56
  <i>For example </i>
@@ -74,7 +72,7 @@ If you want to convert `json object`, to json you can use `to_csv` method from `
74
72
 
75
73
  **The output looks like below**
76
74
  ```
77
- "file,text,number,hex\ntest18.csv,CMkABfAGXvmSFV,9892576,jz40cbafbec8d6f92e93d22ea6ef5b
75
+ "file,text,number,hex\ntest18.csv,CMkABfAGXvmSFV,9892576,jz40cbafbec8d6f92e93d22ea6ef5b"
78
76
  ```
79
77
  ## :busts_in_silhouette: Authors <a name="authors"></a>
80
78
  :bust_in_silhouette: Pablo Zambrano
Binary file
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/csv_json_converter/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "csv_json_converter"
7
+ spec.version = CsvJsonConverter::VERSION
8
+ spec.authors = ["alexoid1"]
9
+ spec.email = ["alexzambra2610@gmail.com"]
10
+
11
+ spec.summary = "This is a gem to covert csv to json string and vice versa"
12
+ spec.description = "This gem transform a csv string in a json string."
13
+ spec.homepage = "https://rubygems.org/gems/csv_json_converter"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["documentation_uri"] = "https://github.com/Alexoid1/csv_json_converter"
20
+ spec.metadata["source_code_uri"] = "https://github.com/Alexoid1/csv_json_converter"
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(__dir__) do
24
+ `git ls-files -z`.split("\x0").reject do |f|
25
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
26
+ end
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ # spec.add_dependency "example-gem", "~> 1.0"
34
+
35
+ # For more information and examples about making a new gem, check out our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CsvJsonConverter
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_json_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - alexoid1
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-25 00:00:00.000000000 Z
11
+ date: 2023-09-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem transform a csv string in a json string.
14
14
  email:
@@ -24,6 +24,8 @@ files:
24
24
  - LICENSE.txt
25
25
  - README.md
26
26
  - Rakefile
27
+ - csv_json_converter-0.1.4.gem
28
+ - csv_json_converter.gemspec
27
29
  - lib/csv_json_converter.rb
28
30
  - lib/csv_json_converter/version.rb
29
31
  - sig/csv_json_converter.rbs
@@ -52,5 +54,5 @@ requirements: []
52
54
  rubygems_version: 3.4.10
53
55
  signing_key:
54
56
  specification_version: 4
55
- summary: This is a gem to covert csv to json string
57
+ summary: This is a gem to covert csv to json string and vice versa
56
58
  test_files: []