├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ ├── codeql-analysis.yml │ └── ruby.yml ├── .gitignore ├── .rspec ├── .rubocop.yml ├── .rvmrc ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTORS.md ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── TO_DO_v2.md ├── docs ├── _introduction.md ├── basic_read_api.md ├── basic_write_api.md ├── batch_processing.md ├── data_transformations.md ├── examples.md ├── header_transformations.md ├── header_validations.md ├── options.md ├── row_col_sep.md └── value_converters.md ├── ext └── smarter_csv │ ├── extconf.rb │ └── smarter_csv.c ├── lib ├── smarter_csv.rb └── smarter_csv │ ├── auto_detection.rb │ ├── errors.rb │ ├── file_io.rb │ ├── hash_transformations.rb │ ├── header_transformations.rb │ ├── header_validations.rb │ ├── headers.rb │ ├── options.rb │ ├── parser.rb │ ├── reader.rb │ ├── version.rb │ └── writer.rb ├── smarter_csv.gemspec └── spec ├── .rspec ├── .rspec.status ├── features ├── binary │ └── binary_file_spec.rb ├── chunked │ ├── chunked_reading_spec.rb │ └── chunked_spec.rb ├── converters │ ├── convert_values_to_numeric_spec.rb │ └── value_converters_spec.rb ├── formating │ ├── bom_issues_spec.rb │ ├── carriage_return_spec.rb │ ├── column_separator_spec.rb │ ├── emoji_spec.rb │ ├── line_ending_spec.rb │ └── valid_unicode_spec.rb ├── general │ ├── additional_separator_spec.rb │ ├── basic_spec.rb │ ├── empty_columns_spec.rb │ └── simple_spec.rb ├── hash_transformations │ ├── remove_empty_values_spec.rb │ ├── remove_keys_from_hashes_spec.rb │ ├── remove_not_mapped_keys_spec.rb │ ├── remove_values_matching_spec.rb │ └── remove_zero_values_spec.rb ├── header_handling │ ├── duplicate_headers_spec.rb │ ├── header_transformation_spec.rb │ ├── invalid_headers_spec.rb │ ├── keep_headers_spec.rb │ ├── key_mapping_spec.rb │ ├── no_header_spec.rb │ ├── not_downcase_header_spec.rb │ ├── required_headers_spec.rb │ ├── silence_missing_keys_spec.rb │ ├── strings_as_keys_spec.rb │ └── strip_chars_from_headers_spec.rb ├── ignore_comments_spec.rb ├── quotes │ ├── escaped_quote_chars_spec.rb │ └── quoted_spec.rb ├── skip_lines_spec.rb └── special_cases │ ├── empty_lines_spec.rb │ ├── extra_columns_spec.rb │ ├── hard_sample_spec.rb │ ├── malformed_spec.rb │ ├── problematic_spec.rb │ └── trading_spec.rb ├── fixtures ├── additional_separator.csv ├── basic.csv ├── binary.csv ├── binary_no_headers.csv ├── bom_test_0000feff.csv ├── bom_test_efbbbf.csv ├── bom_test_feff.csv ├── bom_test_fffe.csv ├── bom_test_fffe0000.csv ├── carriage_returns_n.csv ├── carriage_returns_quoted.csv ├── carriage_returns_r.csv ├── carriage_returns_rn.csv ├── chunk_cornercase.csv ├── chunked.csv ├── duplicate_headers.csv ├── emoji.csv ├── empty.csv ├── empty_columns_1.csv ├── empty_columns_2.csv ├── empty_lines.csv ├── escaped_quote_char.csv ├── escaped_quote_char_2.csv ├── escaped_quote_char_3.csv ├── escaped_quote_char_4.csv ├── extra_columns.csv ├── hard_sample.csv ├── ignore_comments.csv ├── ignore_comments2.csv ├── key_mapping.csv ├── line_endings_n.csv ├── line_endings_r.csv ├── line_endings_rn.csv ├── lots_of_columns.csv ├── malformed.csv ├── malformed_data_eof.csv ├── malformed_data_gobbled.csv ├── malformed_header.csv ├── money.csv ├── no_header.csv ├── numeric.csv ├── pets.csv ├── problematic.csv ├── quote_char.csv ├── quoted.csv ├── quoted2.csv ├── required_headers.csv ├── sample.csv ├── separator_chars_between_quotes.csv ├── separator_chars_between_quotes_no_headers.csv ├── separator_colon.csv ├── separator_colon_no_headers.csv ├── separator_comma.csv ├── separator_comma_no_headers.csv ├── separator_comma_no_headers_will_fail.csv ├── separator_pipe.csv ├── separator_pipe_no_headers.csv ├── separator_semi.csv ├── separator_semi_no_headers.csv ├── separator_tab.csv ├── separator_tab_no_headers.csv ├── silence_missing_keys.csv ├── simple_no_header.csv ├── simple_no_header_windows.csv ├── simple_with_header.csv ├── simple_with_header_utf8.csv ├── simple_with_header_utf8_windows.csv ├── simple_with_header_windows.csv ├── simple_with_header_with_space.csv ├── skip_lines.csv ├── trading.csv ├── user_import.csv ├── valid_unicode.csv ├── with_dashes.csv └── with_dates.csv ├── smarter_csv ├── blank_spec.rb ├── close_file_spec.rb ├── file_encoding_spec.rb ├── option_validations_spec.rb ├── options_processing_spec.rb ├── parse │ ├── README.md │ ├── column_separator_spec.rb │ ├── max_size_spec.rb │ ├── old_csv_library_spec.rb │ └── rfc4180_and_more_spec.rb ├── reader_spec.rb └── writer_spec.rb ├── spec.opts └── spec_helper.rb /.github/FUNDING.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/.github/FUNDING.yml -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/.github/workflows/codeql-analysis.yml -------------------------------------------------------------------------------- /.github/workflows/ruby.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/.github/workflows/ruby.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/.gitignore -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --require spec_helper 2 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/.rubocop.yml -------------------------------------------------------------------------------- /.rvmrc: -------------------------------------------------------------------------------- 1 | rvm gemset use smarter_csv 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/CONTRIBUTORS.md -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/Gemfile -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/README.md -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/Rakefile -------------------------------------------------------------------------------- /TO_DO_v2.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/TO_DO_v2.md -------------------------------------------------------------------------------- /docs/_introduction.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/_introduction.md -------------------------------------------------------------------------------- /docs/basic_read_api.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/basic_read_api.md -------------------------------------------------------------------------------- /docs/basic_write_api.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/basic_write_api.md -------------------------------------------------------------------------------- /docs/batch_processing.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/batch_processing.md -------------------------------------------------------------------------------- /docs/data_transformations.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/data_transformations.md -------------------------------------------------------------------------------- /docs/examples.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/examples.md -------------------------------------------------------------------------------- /docs/header_transformations.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/header_transformations.md -------------------------------------------------------------------------------- /docs/header_validations.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/header_validations.md -------------------------------------------------------------------------------- /docs/options.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/options.md -------------------------------------------------------------------------------- /docs/row_col_sep.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/row_col_sep.md -------------------------------------------------------------------------------- /docs/value_converters.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/docs/value_converters.md -------------------------------------------------------------------------------- /ext/smarter_csv/extconf.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/ext/smarter_csv/extconf.rb -------------------------------------------------------------------------------- /ext/smarter_csv/smarter_csv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/ext/smarter_csv/smarter_csv.c -------------------------------------------------------------------------------- /lib/smarter_csv.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv.rb -------------------------------------------------------------------------------- /lib/smarter_csv/auto_detection.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/auto_detection.rb -------------------------------------------------------------------------------- /lib/smarter_csv/errors.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/errors.rb -------------------------------------------------------------------------------- /lib/smarter_csv/file_io.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/file_io.rb -------------------------------------------------------------------------------- /lib/smarter_csv/hash_transformations.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/hash_transformations.rb -------------------------------------------------------------------------------- /lib/smarter_csv/header_transformations.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/header_transformations.rb -------------------------------------------------------------------------------- /lib/smarter_csv/header_validations.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/header_validations.rb -------------------------------------------------------------------------------- /lib/smarter_csv/headers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/headers.rb -------------------------------------------------------------------------------- /lib/smarter_csv/options.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/options.rb -------------------------------------------------------------------------------- /lib/smarter_csv/parser.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/parser.rb -------------------------------------------------------------------------------- /lib/smarter_csv/reader.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/reader.rb -------------------------------------------------------------------------------- /lib/smarter_csv/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module SmarterCSV 4 | VERSION = "1.14.4" 5 | end 6 | -------------------------------------------------------------------------------- /lib/smarter_csv/writer.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/lib/smarter_csv/writer.rb -------------------------------------------------------------------------------- /smarter_csv.gemspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/smarter_csv.gemspec -------------------------------------------------------------------------------- /spec/.rspec: -------------------------------------------------------------------------------- 1 | --format documentation 2 | --color 3 | --require spec_helper 4 | -------------------------------------------------------------------------------- /spec/.rspec.status: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/features/binary/binary_file_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/binary/binary_file_spec.rb -------------------------------------------------------------------------------- /spec/features/chunked/chunked_reading_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/chunked/chunked_reading_spec.rb -------------------------------------------------------------------------------- /spec/features/chunked/chunked_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/chunked/chunked_spec.rb -------------------------------------------------------------------------------- /spec/features/converters/convert_values_to_numeric_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/converters/convert_values_to_numeric_spec.rb -------------------------------------------------------------------------------- /spec/features/converters/value_converters_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/converters/value_converters_spec.rb -------------------------------------------------------------------------------- /spec/features/formating/bom_issues_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/formating/bom_issues_spec.rb -------------------------------------------------------------------------------- /spec/features/formating/carriage_return_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/formating/carriage_return_spec.rb -------------------------------------------------------------------------------- /spec/features/formating/column_separator_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/formating/column_separator_spec.rb -------------------------------------------------------------------------------- /spec/features/formating/emoji_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/formating/emoji_spec.rb -------------------------------------------------------------------------------- /spec/features/formating/line_ending_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/formating/line_ending_spec.rb -------------------------------------------------------------------------------- /spec/features/formating/valid_unicode_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/formating/valid_unicode_spec.rb -------------------------------------------------------------------------------- /spec/features/general/additional_separator_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/general/additional_separator_spec.rb -------------------------------------------------------------------------------- /spec/features/general/basic_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/general/basic_spec.rb -------------------------------------------------------------------------------- /spec/features/general/empty_columns_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/general/empty_columns_spec.rb -------------------------------------------------------------------------------- /spec/features/general/simple_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/general/simple_spec.rb -------------------------------------------------------------------------------- /spec/features/hash_transformations/remove_empty_values_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/hash_transformations/remove_empty_values_spec.rb -------------------------------------------------------------------------------- /spec/features/hash_transformations/remove_keys_from_hashes_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/hash_transformations/remove_keys_from_hashes_spec.rb -------------------------------------------------------------------------------- /spec/features/hash_transformations/remove_not_mapped_keys_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/hash_transformations/remove_not_mapped_keys_spec.rb -------------------------------------------------------------------------------- /spec/features/hash_transformations/remove_values_matching_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/hash_transformations/remove_values_matching_spec.rb -------------------------------------------------------------------------------- /spec/features/hash_transformations/remove_zero_values_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/hash_transformations/remove_zero_values_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/duplicate_headers_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/duplicate_headers_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/header_transformation_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/header_transformation_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/invalid_headers_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/invalid_headers_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/keep_headers_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/keep_headers_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/key_mapping_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/key_mapping_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/no_header_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/no_header_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/not_downcase_header_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/not_downcase_header_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/required_headers_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/required_headers_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/silence_missing_keys_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/silence_missing_keys_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/strings_as_keys_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/strings_as_keys_spec.rb -------------------------------------------------------------------------------- /spec/features/header_handling/strip_chars_from_headers_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/header_handling/strip_chars_from_headers_spec.rb -------------------------------------------------------------------------------- /spec/features/ignore_comments_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/ignore_comments_spec.rb -------------------------------------------------------------------------------- /spec/features/quotes/escaped_quote_chars_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/quotes/escaped_quote_chars_spec.rb -------------------------------------------------------------------------------- /spec/features/quotes/quoted_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/quotes/quoted_spec.rb -------------------------------------------------------------------------------- /spec/features/skip_lines_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/skip_lines_spec.rb -------------------------------------------------------------------------------- /spec/features/special_cases/empty_lines_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/special_cases/empty_lines_spec.rb -------------------------------------------------------------------------------- /spec/features/special_cases/extra_columns_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/special_cases/extra_columns_spec.rb -------------------------------------------------------------------------------- /spec/features/special_cases/hard_sample_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/special_cases/hard_sample_spec.rb -------------------------------------------------------------------------------- /spec/features/special_cases/malformed_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/special_cases/malformed_spec.rb -------------------------------------------------------------------------------- /spec/features/special_cases/problematic_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/special_cases/problematic_spec.rb -------------------------------------------------------------------------------- /spec/features/special_cases/trading_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/features/special_cases/trading_spec.rb -------------------------------------------------------------------------------- /spec/fixtures/additional_separator.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/additional_separator.csv -------------------------------------------------------------------------------- /spec/fixtures/basic.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/basic.csv -------------------------------------------------------------------------------- /spec/fixtures/binary.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/binary.csv -------------------------------------------------------------------------------- /spec/fixtures/binary_no_headers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/binary_no_headers.csv -------------------------------------------------------------------------------- /spec/fixtures/bom_test_0000feff.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/bom_test_0000feff.csv -------------------------------------------------------------------------------- /spec/fixtures/bom_test_efbbbf.csv: -------------------------------------------------------------------------------- 1 | some_id,type,fuzzboxes 2 | 42766805,zizzles,1234 3 | 38759150,quizzes,5678 4 | -------------------------------------------------------------------------------- /spec/fixtures/bom_test_feff.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/bom_test_feff.csv -------------------------------------------------------------------------------- /spec/fixtures/bom_test_fffe.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/bom_test_fffe.csv -------------------------------------------------------------------------------- /spec/fixtures/bom_test_fffe0000.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/bom_test_fffe0000.csv -------------------------------------------------------------------------------- /spec/fixtures/carriage_returns_n.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/carriage_returns_n.csv -------------------------------------------------------------------------------- /spec/fixtures/carriage_returns_quoted.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/carriage_returns_quoted.csv -------------------------------------------------------------------------------- /spec/fixtures/carriage_returns_r.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/carriage_returns_r.csv -------------------------------------------------------------------------------- /spec/fixtures/carriage_returns_rn.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/carriage_returns_rn.csv -------------------------------------------------------------------------------- /spec/fixtures/chunk_cornercase.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/chunk_cornercase.csv -------------------------------------------------------------------------------- /spec/fixtures/chunked.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/chunked.csv -------------------------------------------------------------------------------- /spec/fixtures/duplicate_headers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/duplicate_headers.csv -------------------------------------------------------------------------------- /spec/fixtures/emoji.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/emoji.csv -------------------------------------------------------------------------------- /spec/fixtures/empty.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/empty.csv -------------------------------------------------------------------------------- /spec/fixtures/empty_columns_1.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/empty_columns_1.csv -------------------------------------------------------------------------------- /spec/fixtures/empty_columns_2.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/empty_columns_2.csv -------------------------------------------------------------------------------- /spec/fixtures/empty_lines.csv: -------------------------------------------------------------------------------- 1 | id,name 2 | 3 | 1,Bob 4 | 5 | 2,Paul 6 | 7 | -------------------------------------------------------------------------------- /spec/fixtures/escaped_quote_char.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/escaped_quote_char.csv -------------------------------------------------------------------------------- /spec/fixtures/escaped_quote_char_2.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/escaped_quote_char_2.csv -------------------------------------------------------------------------------- /spec/fixtures/escaped_quote_char_3.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/escaped_quote_char_3.csv -------------------------------------------------------------------------------- /spec/fixtures/escaped_quote_char_4.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/escaped_quote_char_4.csv -------------------------------------------------------------------------------- /spec/fixtures/extra_columns.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/extra_columns.csv -------------------------------------------------------------------------------- /spec/fixtures/hard_sample.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/hard_sample.csv -------------------------------------------------------------------------------- /spec/fixtures/ignore_comments.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/ignore_comments.csv -------------------------------------------------------------------------------- /spec/fixtures/ignore_comments2.csv: -------------------------------------------------------------------------------- 1 | h1,h2 2 | a,"b 3 | #c" -------------------------------------------------------------------------------- /spec/fixtures/key_mapping.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/key_mapping.csv -------------------------------------------------------------------------------- /spec/fixtures/line_endings_n.csv: -------------------------------------------------------------------------------- 1 | name,count,price 2 | hammer,4,12.50 3 | axe,2,7.30 4 | crowbar,3,17.50 5 | -------------------------------------------------------------------------------- /spec/fixtures/line_endings_r.csv: -------------------------------------------------------------------------------- 1 | name,count,price hammer,4,12.50 axe,2,7.30 crowbar,3,17.50 -------------------------------------------------------------------------------- /spec/fixtures/line_endings_rn.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/line_endings_rn.csv -------------------------------------------------------------------------------- /spec/fixtures/lots_of_columns.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/lots_of_columns.csv -------------------------------------------------------------------------------- /spec/fixtures/malformed.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/malformed.csv -------------------------------------------------------------------------------- /spec/fixtures/malformed_data_eof.csv: -------------------------------------------------------------------------------- 1 | name,dob,height 2 | Arnold Schwarzenegger,1947-07-30,188 3 | Jeff Bridges,1949-12-04,"5 4 | -------------------------------------------------------------------------------- /spec/fixtures/malformed_data_gobbled.csv: -------------------------------------------------------------------------------- 1 | name,dob,height 2 | Arnold Schwarzenegger,1947-07-30,6'2" 3 | Jeff Bridges,1949-12-04, 4 | -------------------------------------------------------------------------------- /spec/fixtures/malformed_header.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/malformed_header.csv -------------------------------------------------------------------------------- /spec/fixtures/money.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/money.csv -------------------------------------------------------------------------------- /spec/fixtures/no_header.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/no_header.csv -------------------------------------------------------------------------------- /spec/fixtures/numeric.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/numeric.csv -------------------------------------------------------------------------------- /spec/fixtures/pets.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/pets.csv -------------------------------------------------------------------------------- /spec/fixtures/problematic.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/problematic.csv -------------------------------------------------------------------------------- /spec/fixtures/quote_char.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/quote_char.csv -------------------------------------------------------------------------------- /spec/fixtures/quoted.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/quoted.csv -------------------------------------------------------------------------------- /spec/fixtures/quoted2.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/quoted2.csv -------------------------------------------------------------------------------- /spec/fixtures/required_headers.csv: -------------------------------------------------------------------------------- 1 | name,count 2 | Bill,3 3 | Tom, 2 4 | Mike,5 5 | -------------------------------------------------------------------------------- /spec/fixtures/sample.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/sample.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_chars_between_quotes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_chars_between_quotes.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_chars_between_quotes_no_headers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_chars_between_quotes_no_headers.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_colon.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_colon.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_colon_no_headers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_colon_no_headers.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_comma.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_comma.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_comma_no_headers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_comma_no_headers.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_comma_no_headers_will_fail.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_comma_no_headers_will_fail.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_pipe.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_pipe.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_pipe_no_headers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_pipe_no_headers.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_semi.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_semi.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_semi_no_headers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_semi_no_headers.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_tab.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_tab.csv -------------------------------------------------------------------------------- /spec/fixtures/separator_tab_no_headers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/separator_tab_no_headers.csv -------------------------------------------------------------------------------- /spec/fixtures/silence_missing_keys.csv: -------------------------------------------------------------------------------- 1 | THIS,THAT 2 | 1,2 3 | -------------------------------------------------------------------------------- /spec/fixtures/simple_no_header.csv: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | -------------------------------------------------------------------------------- /spec/fixtures/simple_no_header_windows.csv: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | -------------------------------------------------------------------------------- /spec/fixtures/simple_with_header.csv: -------------------------------------------------------------------------------- 1 | user_id 2 | 1 3 | 2 4 | 3 5 | 4 6 | -------------------------------------------------------------------------------- /spec/fixtures/simple_with_header_utf8.csv: -------------------------------------------------------------------------------- 1 | üser_id 2 | 1 3 | 2 4 | 3 5 | 4 6 | -------------------------------------------------------------------------------- /spec/fixtures/simple_with_header_utf8_windows.csv: -------------------------------------------------------------------------------- 1 | üser_id 2 | 1 3 | 2 4 | 3 5 | 4 6 | -------------------------------------------------------------------------------- /spec/fixtures/simple_with_header_windows.csv: -------------------------------------------------------------------------------- 1 | user_id 2 | 1 3 | 2 4 | 3 5 | 4 6 | -------------------------------------------------------------------------------- /spec/fixtures/simple_with_header_with_space.csv: -------------------------------------------------------------------------------- 1 | user id 2 | 1 3 | 2 4 | 3 5 | 4 6 | -------------------------------------------------------------------------------- /spec/fixtures/skip_lines.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/skip_lines.csv -------------------------------------------------------------------------------- /spec/fixtures/trading.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/trading.csv -------------------------------------------------------------------------------- /spec/fixtures/user_import.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/user_import.csv -------------------------------------------------------------------------------- /spec/fixtures/valid_unicode.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/valid_unicode.csv -------------------------------------------------------------------------------- /spec/fixtures/with_dashes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/with_dashes.csv -------------------------------------------------------------------------------- /spec/fixtures/with_dates.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/fixtures/with_dates.csv -------------------------------------------------------------------------------- /spec/smarter_csv/blank_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/blank_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/close_file_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/close_file_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/file_encoding_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/file_encoding_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/option_validations_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/option_validations_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/options_processing_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/options_processing_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/parse/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/parse/README.md -------------------------------------------------------------------------------- /spec/smarter_csv/parse/column_separator_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/parse/column_separator_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/parse/max_size_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/parse/max_size_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/parse/old_csv_library_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/parse/old_csv_library_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/parse/rfc4180_and_more_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/parse/rfc4180_and_more_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/reader_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/reader_spec.rb -------------------------------------------------------------------------------- /spec/smarter_csv/writer_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/smarter_csv/writer_spec.rb -------------------------------------------------------------------------------- /spec/spec.opts: -------------------------------------------------------------------------------- 1 | --color 2 | --backtrace 3 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilo/smarter_csv/HEAD/spec/spec_helper.rb --------------------------------------------------------------------------------