ynab_convert 1.0.3 → 1.0.4

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: 2af241f007b8495197a8971ffbf3b3efe0dda41411c56a3543452dfea50fd03e
4
- data.tar.gz: ac7c2614c064e005524c808dd62bddbbaaa8e8395bea6a02b0bf4ef45960133f
3
+ metadata.gz: 7ad8f2a7b8c6b00d895032525413d35d4879da80be21e0b9fc852e1d413dbaa0
4
+ data.tar.gz: 99b9168cb23390fe15deec8f0c9c3c27cda183f95867b2849d79fa4e4a704c4d
5
5
  SHA512:
6
- metadata.gz: 3f96f0a1839d1bc4111f8f53aeac6f7b503155f65b03e2ccd113e0847baa8637beeef7aeae182538b3f6f4cd5caf5a462b568b0ffae5a42f24062722c4a51cf7
7
- data.tar.gz: 4f17efacff3b4b5cb62df38997863bad691b41a4f26d5a27ef3b7bfaa93072f217f4a824f11dd6e462ba422f862991e5ae14990e7f5f8c8879f49a7deba91274
6
+ metadata.gz: 630775dd15ab4f65a32c6dbe9617bea36c0721ff9d5cca49ee986f4e04831fa9335b41b996b2b3f69bbce630e452ae9045d3d98ec9b3d6862c84f6fb0077a1a6
7
+ data.tar.gz: 3bdf9b06d5327815fc31b8b3b9a9f6fb52e606ae6dc900501ff8fdf0671c110effe02dd5ca625fed0c3bbeb884b9572ff18ce7b9e46b8c21dd61d0a4b685956c
data/.travis.yml CHANGED
@@ -3,12 +3,12 @@ language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
5
  - 2.6
6
+ - 2.7
6
7
  before_install: gem install bundler
7
8
 
8
9
  jobs:
9
10
  include:
10
11
  - stage: test
11
- rvm: 2.6
12
12
  script: echo "Running tests for $(ruby -v)..." && bundle exec rake ci
13
13
  - stage: gem release
14
14
  rvm: 2.6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ynab_convert (1.0.3)
4
+ ynab_convert (1.0.4)
5
5
  i18n
6
6
  slop
7
7
 
data/bin/ynab_convert CHANGED
@@ -9,7 +9,6 @@ require 'ynab_convert/processors'
9
9
  require 'ynab_convert/logger'
10
10
  require 'ynab_convert/error'
11
11
  require 'slop/symbol'
12
- require 'pry'
13
12
 
14
13
  # Add mixins and run converter
15
14
  class Convert
@@ -5,7 +5,8 @@ require 'csv'
5
5
  require 'ynab_convert/logger'
6
6
 
7
7
  module Processor
8
- # Base class for a Processor, all processors must inherit from it
8
+ # Base class for a Processor, all processors must inherit from it.
9
+
9
10
  # rubocop:disable Metrics/ClassLength
10
11
  class Base
11
12
  include YnabLogger
@@ -13,8 +14,8 @@ module Processor
13
14
 
14
15
  attr_reader :loader_options
15
16
 
16
- # @option opts [String] :file Path to the CSV file to process
17
- # @option opts [Symbol] :format YNAB4 format to use, one of :flows or
17
+ # @option options [String] :file Path to the CSV file to process
18
+ # @option options [Symbol] :format YNAB4 format to use, one of :flows or
18
19
  # :amounts. :flows is useful for CSVs with separate debit and credit
19
20
  # columns, :amounts is for CSVs with only one amount columns and +/-
20
21
  # numbers. See
@@ -140,8 +141,8 @@ module Processor
140
141
  logger.debug "Will write to `#{temp_filename}'"
141
142
 
142
143
  logger.debug(loader_options)
143
- CSV.open(temp_filename, 'wb', output_options) do |converted|
144
- CSV.foreach(@file, 'rb', loader_options) do |row|
144
+ CSV.open(temp_filename, 'wb', **output_options) do |converted|
145
+ CSV.foreach(@file, 'rb', **loader_options) do |row|
145
146
  logger.debug "Parsing row: `#{row.to_h}'"
146
147
  # Some rows don't contain valid or useful data
147
148
  catch :skip_row do
@@ -2,21 +2,6 @@
2
2
 
3
3
  module Processor
4
4
  # Processes CSV files from N26
5
- #
6
- # An example of how to implement a custom processor
7
- # Processes CSV files with this format:
8
- # <<~ROWS
9
- # "Date","Payee","Memo","Outflow","Inflow"
10
- # "23/12/2019","coaxial","","1000000.00",""
11
- # "30/12/2019","Santa","","50000.00",""
12
- # "02/02/2020","Someone Else","","45.00",""
13
- # ROWS
14
- # The file name for the processor should be the institution name in
15
- # camel case. It's ok to skip "Bank" or "Credit Union" when naming the file
16
- # if it's redundant. For instance, this parser is for "Example Bank" but it's
17
- # named "example.rb", its corresponding spec is
18
- # "spec/example_processor_spec.rb" and its fixture would be
19
- # "spec/fixtures/example.csv"
20
5
  class N26 < Processor::Base
21
6
  # @option options [String] :file Path to the CSV file to process
22
7
  def initialize(options)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YnabConvert
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.4'
5
5
  end
data/lib/ynab_convert.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'ynab_convert/version'
4
4
  require 'slop'
5
- require 'pry'
6
5
  require 'ynab_convert/logger'
7
6
  require 'core_extensions/string.rb'
8
7
 
data/ynab_convert.gemspec CHANGED
@@ -14,6 +14,16 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/coaxial/ynab_convert'
15
15
  spec.license = 'MIT'
16
16
 
17
+ spec.required_ruby_version = '~> 2.6'
18
+
19
+ spec.metadata = {
20
+ 'bug_tracker_uri' => 'https://github.com/coaxial/ynab_convert/issues',
21
+ 'documentation_uri' => 'https://rubydoc.info/github/coaxial/ynab_convert/master',
22
+ 'homepage_uri' => 'https://github.com/coaxial/ynab_convert',
23
+ 'source_code_uri' => 'https://github.com/coaxial/ynab_convert'
24
+ }
25
+ spec.post_install_message = 'Happy budgetting!'
26
+
17
27
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
28
  # to allow pushing to a single host or delete this section to allow pushing to any host.
19
29
  if spec.respond_to?(:metadata)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ynab_convert
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - coaxial
@@ -236,18 +236,20 @@ homepage: https://github.com/coaxial/ynab_convert
236
236
  licenses:
237
237
  - MIT
238
238
  metadata:
239
- allowed_push_host: https://rubygems.org
239
+ bug_tracker_uri: https://github.com/coaxial/ynab_convert/issues
240
+ documentation_uri: https://rubydoc.info/github/coaxial/ynab_convert/master
240
241
  homepage_uri: https://github.com/coaxial/ynab_convert
241
242
  source_code_uri: https://github.com/coaxial/ynab_convert
242
- post_install_message:
243
+ allowed_push_host: https://rubygems.org
244
+ post_install_message: Happy budgetting!
243
245
  rdoc_options: []
244
246
  require_paths:
245
247
  - lib
246
248
  required_ruby_version: !ruby/object:Gem::Requirement
247
249
  requirements:
248
- - - ">="
250
+ - - "~>"
249
251
  - !ruby/object:Gem::Version
250
- version: '0'
252
+ version: '2.6'
251
253
  required_rubygems_version: !ruby/object:Gem::Requirement
252
254
  requirements:
253
255
  - - ">="