-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from masa21kik/update-dependencies
Update dependencies
- Loading branch information
Showing
15 changed files
with
150 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
inherit_gem: | ||
onkcop: | ||
- "config/rubocop.yml" | ||
- "config/rspec.yml" | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
language: ruby | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.0 | ||
- 2.2.2 | ||
- 2.3 | ||
- 2.4 | ||
- 2.5 | ||
- 2.6 | ||
bundler_args: "--jobs=2" | ||
cache: bundler | ||
before_install: | ||
- travis_retry gem update --system || travis_retry gem update --system 2.7.8 | ||
- travis_retry gem install bundler --no-document || travis_retry gem install bundler --no-document -v 1.17.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in csvconv.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# CSVConv | ||
# Csvconv | ||
|
||
CSV converter to JSON, YAML, LTSV | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'csvconv' | ||
require 'optparse' | ||
require "csvconv" | ||
require "optparse" | ||
|
||
options = { | ||
sep: ',', | ||
sep: ",", | ||
} | ||
output = STDOUT | ||
format = :json | ||
|
||
opt = OptionParser.new | ||
opt.on('--json', 'Output in JSON format') do | ||
opt.on("--json", "Output in JSON format") do | ||
format = :json | ||
end | ||
opt.on('--yaml', 'Output in YAML format') do | ||
opt.on("--yaml", "Output in YAML format") do | ||
format = :yaml | ||
end | ||
opt.on('--ltsv', 'Output in LTSV format') do | ||
opt.on("--ltsv", "Output in LTSV format") do | ||
format = :ltsv | ||
end | ||
opt.on('-s', '--separator SEP', | ||
'Set separator charactor (default is \',\')') do |v| | ||
opt.on("-s", "--separator SEP", | ||
"Set separator charactor (default is ',')") do |v| | ||
options[:sep] = v | ||
end | ||
opt.on('-o', '--output FILE', 'Write output to file') do |v| | ||
output = File.open(v, 'w') | ||
opt.on("-o", "--output FILE", "Write output to file") do |v| | ||
output = File.open(v, "w") | ||
end | ||
opt.on('-H', '--headers HEADERS', | ||
'List of headers separated with \',\'') do |v| | ||
options[:header] = v.split(',') | ||
opt.on("-H", "--headers HEADERS", | ||
"List of headers separated with ','") do |v| | ||
options[:header] = v.split(",") | ||
end | ||
opt.on('-h', '--help', 'Show this message') do | ||
opt.on("-h", "--help", "Show this message") do | ||
abort(opt.help) | ||
end | ||
opt.on('-v', '--version', 'Show version') do | ||
puts CSVConv::VERSION | ||
opt.on("-v", "--version", "Show version") do | ||
puts Csvconv::VERSION | ||
end | ||
opt.parse!(ARGV) | ||
|
||
inputs = ARGV.empty? ? [STDIN] : ARGV.map { |f| File.open(f) } | ||
inputs = ARGV.empty? ? [STDIN] : ARGV.map {|f| File.open(f) } | ||
inputs.each do |input| | ||
output.puts CSVConv.send("csv2#{format.to_s}", input, options) | ||
output.puts Csvconv.send("csv2#{format}", input, options) | ||
end | ||
|
||
output.close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
# coding: utf-8 | ||
lib = File.expand_path('../lib', __FILE__) | ||
lib = File.expand_path("lib", __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'csvconv/version' | ||
require "csvconv/version" | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'csvconv' | ||
spec.version = CSVConv::VERSION | ||
spec.authors = ['masa21kik'] | ||
spec.email = ['masa21kik@gmail.com'] | ||
spec.description = %q(CSV converter to JSON, YAML, LTSV) | ||
spec.summary = %q(CSV converter to JSON, YAML, LTSV) | ||
spec.homepage = 'https://github.com/masa21kik/csvconv' | ||
spec.license = 'MIT' | ||
spec.name = "csvconv" | ||
spec.version = Csvconv::VERSION | ||
spec.authors = ["masa21kik"] | ||
spec.email = ["masa21kik@gmail.com"] | ||
spec.description = "CSV converter to JSON, YAML, LTSV" | ||
spec.summary = "CSV converter to JSON, YAML, LTSV" | ||
spec.homepage = "https://github.com/masa21kik/csvconv" | ||
spec.license = "MIT" | ||
|
||
spec.files = `git ls-files`.split($RS) | ||
spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) } | ||
spec.test_files = spec.files.grep(/^(test|spec|features)\//) | ||
spec.require_paths = ['lib'] | ||
spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) } | ||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) | ||
spec.require_paths = ["lib"] | ||
|
||
spec.add_development_dependency 'bundler', '~> 1.3' | ||
spec.add_development_dependency 'rake' | ||
spec.add_development_dependency 'rspec' | ||
spec.add_development_dependency 'coveralls' | ||
spec.add_development_dependency 'flay' | ||
spec.add_development_dependency 'flog' | ||
spec.add_development_dependency 'reek' | ||
spec.add_development_dependency 'rubocop', '~> 0.23' | ||
spec.add_development_dependency "bundler", ">= 1.3.5" | ||
spec.add_development_dependency "coveralls" | ||
spec.add_development_dependency "flay" | ||
spec.add_development_dependency "flog" | ||
spec.add_development_dependency "onkcop" | ||
spec.add_development_dependency "rake" | ||
spec.add_development_dependency "reek" | ||
spec.add_development_dependency "rspec" | ||
spec.add_development_dependency "rubocop", "= 0.67.2" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# CSV converter | ||
module CSVConv | ||
VERSION = '0.0.2' | ||
module Csvconv | ||
VERSION = "0.0.3".freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.