money-heuristics 0.1.0 → 0.1.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +17 -0
- data/lib/money-heuristics/version.rb +1 -1
- data/money-heuristics.gemspec +2 -2
- data/spec/heuristics_spec.rb +2 -2
- data/spec/spec_helper.rb +3 -18
- metadata +5 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: fd6f8fe869d3de62f041b8f153daf6a079672408
         | 
| 4 | 
            +
              data.tar.gz: 479cfda0313b62954f8aa77354d3b04c96f611f6
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1ebb83436fc9ec044eb5670b1e2623e78f5df926770ad4cb898d618cc2eafd147c10fe0a27ea4e30cbd3752f828bd3608f7ac3e18e9d185f1a404444c48427c5
         | 
| 7 | 
            +
              data.tar.gz: 843fdc6279c9239bcdb159646341d4ce807e43d731e380888696a0dc594bfce76d6cc9053c8e1341b35f5615151d0d7fcb7a6a6181916e2c81a263ea228f6852
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -8,6 +8,23 @@ This is a module for heuristic analysis of the string input for the | |
| 8 8 | 
             
            [](https://coveralls.io/github/RubyMoney/money-heuristics?branch=master)
         | 
| 9 9 | 
             
            [](https://opensource.org/licenses/MIT)
         | 
| 10 10 |  | 
| 11 | 
            +
            ## Installation
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            Include this line in your `Gemfile`:
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            ```ruby
         | 
| 16 | 
            +
            gem 'money-heuristics'
         | 
| 17 | 
            +
            ```
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            ## Usage
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            ```ruby
         | 
| 22 | 
            +
            >> Money::Currency.analyze 'USD 200'
         | 
| 23 | 
            +
            => ["USD"]
         | 
| 24 | 
            +
            >> Money::Currency.analyze 'zł123,000.50'
         | 
| 25 | 
            +
            => ["PLN"]
         | 
| 26 | 
            +
            ```
         | 
| 27 | 
            +
             | 
| 11 28 | 
             
            ## Contributing
         | 
| 12 29 |  | 
| 13 30 | 
             
            See the [Contribution Guidelines](https://github.com/RubyMoney/money-heuristics/blob/master/CONTRIBUTING.md)
         | 
    
        data/money-heuristics.gemspec
    CHANGED
    
    | @@ -7,14 +7,14 @@ Gem::Specification.new do |s| | |
| 7 7 | 
             
              s.name        = "money-heuristics"
         | 
| 8 8 | 
             
              s.version     = MoneyHeuristics::VERSION
         | 
| 9 9 | 
             
              s.platform    = Gem::Platform::RUBY
         | 
| 10 | 
            -
              s.authors     = ['Shane Emmons']
         | 
| 10 | 
            +
              s.authors     = ['Shane Emmons', 'Anthony Dmitriyev']
         | 
| 11 11 | 
             
              s.email       = ['shane@emmons.io']
         | 
| 12 12 | 
             
              s.homepage    = 'https://rubymoney.github.io/money-heuristics'
         | 
| 13 13 | 
             
              s.summary     = 'Heuristic module for for the money gem'
         | 
| 14 14 | 
             
              s.description = 'This is a module for heuristic analysis of the string input for the money gem. It was formerly part of the gem.'
         | 
| 15 15 | 
             
              s.license     = 'MIT'
         | 
| 16 16 |  | 
| 17 | 
            -
              s.add_dependency 'money', '>= 6. | 
| 17 | 
            +
              s.add_dependency 'money', '>= 6.9.0'
         | 
| 18 18 | 
             
              s.add_dependency 'sixarm_ruby_unaccent', ['>= 1.1.1', '< 2']
         | 
| 19 19 |  | 
| 20 20 | 
             
              s.add_development_dependency "bundler", "~> 1.3"
         | 
    
        data/spec/heuristics_spec.rb
    CHANGED
    
    | @@ -1,4 +1,4 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe MoneyHeuristics do
         | 
| 4 4 | 
             
              describe "#analyze_string" do
         | 
| @@ -126,7 +126,7 @@ describe MoneyHeuristics do | |
| 126 126 | 
             
                  expect(it.analyze("៛")).not_to eq []
         | 
| 127 127 | 
             
                  expect(it.analyze("₩")).not_to eq []
         | 
| 128 128 | 
             
                  expect(it.analyze("د.ك")).not_to eq []
         | 
| 129 | 
            -
                  expect(it.analyze(" | 
| 129 | 
            +
                  expect(it.analyze("₸")).not_to eq []
         | 
| 130 130 | 
             
                  expect(it.analyze("₭")).not_to eq []
         | 
| 131 131 | 
             
                  expect(it.analyze("ل.ل")).not_to eq []
         | 
| 132 132 | 
             
                  expect(it.analyze("₨")).not_to eq []
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -1,28 +1,13 @@ | |
| 1 | 
            -
            require  | 
| 1 | 
            +
            require 'coveralls'
         | 
| 2 2 | 
             
            Coveralls.wear!
         | 
| 3 3 |  | 
| 4 4 | 
             
            $LOAD_PATH.unshift File.dirname(__FILE__)
         | 
| 5 | 
            -
            require "rspec"
         | 
| 6 | 
            -
            require "money"
         | 
| 7 5 |  | 
| 8 | 
            -
             | 
| 6 | 
            +
            require 'rspec'
         | 
| 7 | 
            +
            require 'money-heuristics'
         | 
| 9 8 |  | 
| 10 9 | 
             
            RSpec.configure do |c|
         | 
| 11 10 | 
             
              c.order = :random
         | 
| 12 11 | 
             
              c.filter_run :focus
         | 
| 13 12 | 
             
              c.run_all_when_everything_filtered = true
         | 
| 14 13 | 
             
            end
         | 
| 15 | 
            -
             | 
| 16 | 
            -
            def reset_i18n
         | 
| 17 | 
            -
              I18n.backend = I18n::Backend::Simple.new
         | 
| 18 | 
            -
            end
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            RSpec.shared_context "with infinite precision", :infinite_precision do
         | 
| 21 | 
            -
              before do
         | 
| 22 | 
            -
                Money.infinite_precision = true
         | 
| 23 | 
            -
              end
         | 
| 24 | 
            -
             | 
| 25 | 
            -
              after do
         | 
| 26 | 
            -
                Money.infinite_precision = false
         | 
| 27 | 
            -
              end
         | 
| 28 | 
            -
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,15 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: money-heuristics
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Shane Emmons
         | 
| 8 | 
            +
            - Anthony Dmitriyev
         | 
| 8 9 | 
             
            autorequire: 
         | 
| 9 10 | 
             
            bindir: bin
         | 
| 10 11 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017- | 
| 12 | 
            +
            date: 2017-12-12 00:00:00.000000000 Z
         | 
| 12 13 | 
             
            dependencies:
         | 
| 13 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 15 | 
             
              name: money
         | 
| @@ -16,14 +17,14 @@ dependencies: | |
| 16 17 | 
             
                requirements:
         | 
| 17 18 | 
             
                - - ">="
         | 
| 18 19 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 6. | 
| 20 | 
            +
                    version: 6.9.0
         | 
| 20 21 | 
             
              type: :runtime
         | 
| 21 22 | 
             
              prerelease: false
         | 
| 22 23 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 24 | 
             
                requirements:
         | 
| 24 25 | 
             
                - - ">="
         | 
| 25 26 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: 6. | 
| 27 | 
            +
                    version: 6.9.0
         | 
| 27 28 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 29 | 
             
              name: sixarm_ruby_unaccent
         | 
| 29 30 | 
             
              requirement: !ruby/object:Gem::Requirement
         |