reckon 0.6.0 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +50 -0
  3. data/.gitignore +3 -0
  4. data/.ruby-version +1 -1
  5. data/CHANGELOG.md +75 -7
  6. data/Gemfile.lock +1 -1
  7. data/README.md +85 -24
  8. data/Rakefile +17 -1
  9. data/bin/build-new-version.sh +26 -0
  10. data/bin/reckon +9 -1
  11. data/lib/reckon.rb +1 -0
  12. data/lib/reckon/app.rb +18 -141
  13. data/lib/reckon/cosine_similarity.rb +67 -62
  14. data/lib/reckon/csv_parser.rb +2 -7
  15. data/lib/reckon/date_column.rb +10 -0
  16. data/lib/reckon/money.rb +59 -52
  17. data/lib/reckon/options.rb +153 -0
  18. data/lib/reckon/version.rb +1 -1
  19. data/spec/cosine_training_and_test.rb +52 -0
  20. data/spec/integration/another_bank_example/input.csv +9 -0
  21. data/spec/integration/another_bank_example/output.ledger +36 -0
  22. data/spec/integration/another_bank_example/test_args +1 -0
  23. data/spec/integration/ask_for_account/cli_input.exp +33 -0
  24. data/spec/integration/ask_for_account/expected_output +11 -0
  25. data/spec/integration/ask_for_account/input.csv +9 -0
  26. data/spec/integration/ask_for_account/test_args +1 -0
  27. data/spec/integration/austrian_example/input.csv +13 -0
  28. data/spec/integration/austrian_example/output.ledger +52 -0
  29. data/spec/integration/austrian_example/test_args +2 -0
  30. data/spec/integration/bom_utf8_file/input.csv +3 -0
  31. data/spec/integration/bom_utf8_file/output.ledger +4 -0
  32. data/spec/integration/bom_utf8_file/test_args +3 -0
  33. data/spec/integration/broker_canada_example/input.csv +12 -0
  34. data/spec/integration/broker_canada_example/output.ledger +48 -0
  35. data/spec/integration/broker_canada_example/test_args +1 -0
  36. data/spec/integration/chase/account_tokens_and_regex/output.ledger +36 -0
  37. data/spec/integration/chase/account_tokens_and_regex/test_args +2 -0
  38. data/spec/integration/chase/account_tokens_and_regex/tokens.yml +16 -0
  39. data/spec/integration/chase/default_account_names/output.ledger +36 -0
  40. data/spec/integration/chase/default_account_names/test_args +3 -0
  41. data/spec/integration/chase/input.csv +9 -0
  42. data/spec/integration/chase/learn_from_existing/learn.ledger +7 -0
  43. data/spec/integration/chase/learn_from_existing/output.ledger +36 -0
  44. data/spec/integration/chase/learn_from_existing/test_args +1 -0
  45. data/spec/integration/chase/simple/output.ledger +36 -0
  46. data/spec/integration/chase/simple/test_args +1 -0
  47. data/spec/integration/danish_kroner_nordea_example/input.csv +6 -0
  48. data/spec/integration/danish_kroner_nordea_example/output.ledger +24 -0
  49. data/spec/integration/danish_kroner_nordea_example/test_args +1 -0
  50. data/spec/integration/english_date_example/input.csv +3 -0
  51. data/spec/integration/english_date_example/output.ledger +12 -0
  52. data/spec/integration/english_date_example/test_args +1 -0
  53. data/spec/integration/extratofake/input.csv +24 -0
  54. data/spec/integration/extratofake/output.ledger +92 -0
  55. data/spec/integration/extratofake/test_args +1 -0
  56. data/spec/integration/french_example/input.csv +9 -0
  57. data/spec/integration/french_example/output.ledger +36 -0
  58. data/spec/integration/french_example/test_args +2 -0
  59. data/spec/integration/german_date_example/input.csv +3 -0
  60. data/spec/integration/german_date_example/output.ledger +12 -0
  61. data/spec/integration/german_date_example/test_args +1 -0
  62. data/spec/integration/harder_date_example/input.csv +5 -0
  63. data/spec/integration/harder_date_example/output.ledger +20 -0
  64. data/spec/integration/harder_date_example/test_args +1 -0
  65. data/spec/integration/ing/input.csv +3 -0
  66. data/spec/integration/ing/output.ledger +12 -0
  67. data/spec/integration/ing/test_args +1 -0
  68. data/spec/integration/intuit_mint_example/input.csv +7 -0
  69. data/spec/integration/intuit_mint_example/output.ledger +28 -0
  70. data/spec/integration/intuit_mint_example/test_args +1 -0
  71. data/spec/integration/invalid_header_example/input.csv +6 -0
  72. data/spec/integration/invalid_header_example/output.ledger +8 -0
  73. data/spec/integration/invalid_header_example/test_args +1 -0
  74. data/spec/integration/inversed_credit_card/input.csv +16 -0
  75. data/spec/integration/inversed_credit_card/output.ledger +64 -0
  76. data/spec/integration/inversed_credit_card/test_args +1 -0
  77. data/spec/integration/nationwide/input.csv +4 -0
  78. data/spec/integration/nationwide/output.ledger +16 -0
  79. data/spec/integration/nationwide/test_args +1 -0
  80. data/spec/integration/regression/issue_51_account_tokens/input.csv +8 -0
  81. data/spec/integration/regression/issue_51_account_tokens/output.ledger +32 -0
  82. data/spec/integration/regression/issue_51_account_tokens/test_args +4 -0
  83. data/spec/integration/regression/issue_51_account_tokens/tokens.yml +9 -0
  84. data/spec/integration/regression/issue_64_date_column/input.csv +3 -0
  85. data/spec/integration/regression/issue_64_date_column/output.ledger +8 -0
  86. data/spec/integration/regression/issue_64_date_column/test_args +1 -0
  87. data/spec/integration/regression/issue_73_account_token_matching/input.csv +2 -0
  88. data/spec/integration/regression/issue_73_account_token_matching/output.ledger +4 -0
  89. data/spec/integration/regression/issue_73_account_token_matching/test_args +6 -0
  90. data/spec/integration/regression/issue_73_account_token_matching/tokens.yml +8 -0
  91. data/spec/integration/regression/issue_85_date_example/input.csv +2 -0
  92. data/spec/integration/regression/issue_85_date_example/output.ledger +8 -0
  93. data/spec/integration/regression/issue_85_date_example/test_args +1 -0
  94. data/spec/integration/spanish_date_example/input.csv +3 -0
  95. data/spec/integration/spanish_date_example/output.ledger +12 -0
  96. data/spec/integration/spanish_date_example/test_args +1 -0
  97. data/spec/integration/suntrust/input.csv +7 -0
  98. data/spec/integration/suntrust/output.ledger +28 -0
  99. data/spec/integration/suntrust/test_args +1 -0
  100. data/spec/integration/test.sh +123 -0
  101. data/spec/integration/test_money_column/input.csv +3 -0
  102. data/spec/integration/test_money_column/output.ledger +8 -0
  103. data/spec/integration/test_money_column/test_args +1 -0
  104. data/spec/integration/two_money_columns/input.csv +5 -0
  105. data/spec/integration/two_money_columns/output.ledger +20 -0
  106. data/spec/integration/two_money_columns/test_args +1 -0
  107. data/spec/integration/yyyymmdd_date_example/input.csv +1 -0
  108. data/spec/integration/yyyymmdd_date_example/output.ledger +4 -0
  109. data/spec/integration/yyyymmdd_date_example/test_args +1 -0
  110. data/spec/reckon/app_spec.rb +24 -6
  111. data/spec/reckon/csv_parser_spec.rb +3 -3
  112. data/spec/reckon/money_column_spec.rb +24 -24
  113. data/spec/reckon/money_spec.rb +15 -34
  114. data/spec/reckon/options_spec.rb +17 -0
  115. data/spec/spec_helper.rb +6 -1
  116. metadata +102 -7
  117. data/.travis.yml +0 -13
data/.travis.yml DELETED
@@ -1,13 +0,0 @@
1
- language: ruby
2
- rvm:
3
- # Mac High Sierra
4
- - 2.0.0-p648
5
- # Mac Mojave
6
- - 2.3.7
7
- # Ubuntu 19.10
8
- - 2.5
9
- # Mac Catalina
10
- - 2.6
11
- script: "bundle exec rake"
12
- before_install:
13
- - sudo apt-get -y install ledger