json_to_csv_convertor 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: f3e668b55195917954c79a10ac1fd467cb473f5a8b601ddc8ad18c55ff67e026
4
- data.tar.gz: 16829a414dcf44bc3facbf1591ea5a96ef491d5d9e3a88339b26f10f86f506fe
3
+ metadata.gz: 3f2ba4a438f233cf12a0100de63906ab8109f829f7e437a0d284077b5c4349d6
4
+ data.tar.gz: 6cca662625aed9d43e73f559c6bc32a87932f339efb181b416d51c2e55d1cf38
5
5
  SHA512:
6
- metadata.gz: fe9715ecb13b7f401f360dd364a667221d8c27383cdd45ec842ecb92cad85fab4f6e39b2a8cd036e719e6d397196fe11d6d302ae13a9f12c69791fb547dab08b
7
- data.tar.gz: 8c62e41f7442d4378481c98e347e13a92ec704b5c4a975ec0d29cdfeb0efa8cefe25b2c36d8008e1d2638709d891d6c8f598b8559a77c733d3094f1d1ffcccc4
6
+ metadata.gz: 115722ab52d12540c8da128f481881f5f8d2a04469e9748806dadfcf8e58297a9fe50c60c14e6e201d9640b2ecb51e589ec2a281314703133d2cb50c76f48bc8
7
+ data.tar.gz: 9c6646444a54a184a97868039e966441dd497ab8067ab908061f68ac102f540709d865756bee444cf6f9abc7fcc14a58ce4f08be021508fe4faba375598fbd19
data/README.md CHANGED
@@ -1,9 +1,5 @@
1
1
  # JsonToCsvConvertor
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/json_to_csv_convertor`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
3
  ## Installation
8
4
 
9
5
  Add this line to your application's Gemfile:
@@ -22,13 +18,12 @@ Or install it yourself as:
22
18
 
23
19
  ## Usage
24
20
 
25
- TODO: Write usage instructions here
21
+ require 'json_to_csv_convertor'
26
22
 
27
- ## Development
23
+ include JsonToCsvConvertor
28
24
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
25
 
31
- 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
+ json_to_csv(json)
32
27
 
33
28
  ## Contributing
34
29
 
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonToCsvConvertor
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -7,9 +7,11 @@ module JsonToCsvConvertor
7
7
  class Error < StandardError; end
8
8
 
9
9
  include ConvertJson
10
+ include ReadJson
10
11
 
11
- def self.convert_json_to_csv(json)
12
- ConvertJson::json_to_csv(json)
12
+
13
+ def convert_json_to_csv(json)
14
+ json_to_csv make_json_readable(json)
13
15
  end
14
16
 
15
- end
17
+ end
@@ -3,10 +3,8 @@ require 'json'
3
3
  require_relative 'read_json'
4
4
 
5
5
  module ConvertJson
6
- include ReadJson
7
6
 
8
- def json_to_csv(json)
9
- json_rows = ReadJson::make_json_readable(json)
7
+ def json_to_csv(json_rows)
10
8
  header_keys = head_colums(json_rows)
11
9
  csv_string = CSV.generate do |csv|
12
10
  csv << header_keys.keys
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_to_csv_convertor
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
  - vasyl.marmash
@@ -28,6 +28,10 @@ files:
28
28
  - bin/console
29
29
  - bin/setup
30
30
  - json_to_csv_convertor-0.1.0.gem
31
+ - json_to_csv_convertor-0.1.1.gem
32
+ - json_to_csv_convertor-0.1.2.gem
33
+ - json_to_csv_convertor-0.1.3.gem
34
+ - json_to_csv_convertor-0.1.4.gem
31
35
  - json_to_csv_convertor.gemspec
32
36
  - lib/json_to_csv_convertor.rb
33
37
  - lib/json_to_csv_convertor/version.rb