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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79f7a3d1ed519a875dca357a27c43edfa213f681
4
- data.tar.gz: 18fbf4a233e688163c980f81c01fc95a38d43d99
3
+ metadata.gz: fd6f8fe869d3de62f041b8f153daf6a079672408
4
+ data.tar.gz: 479cfda0313b62954f8aa77354d3b04c96f611f6
5
5
  SHA512:
6
- metadata.gz: 29d56724b61912d83dbb54af05c4c7c0f45ffd74f97804da050b10996cc7ca84cfdbb94100b3668b11d84acefb3e07c9e3738f46ef119218c4ab94e225da9d28
7
- data.tar.gz: b8f1d08cadadc95218bd28c759216861a994205f87839eefa95329ff3e7aca137317795c00b8a19debd1cc1d3b0a44a819a5181d36d6598aaa5c50a64704881c
6
+ metadata.gz: 1ebb83436fc9ec044eb5670b1e2623e78f5df926770ad4cb898d618cc2eafd147c10fe0a27ea4e30cbd3752f828bd3608f7ac3e18e9d185f1a404444c48427c5
7
+ data.tar.gz: 843fdc6279c9239bcdb159646341d4ce807e43d731e380888696a0dc594bfce76d6cc9053c8e1341b35f5615151d0d7fcb7a6a6181916e2c81a263ea228f6852
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ - Bumped money dependency to >= 6.9.0
6
+
3
7
  ## 0.1.0
4
8
 
5
9
  - Refactored code
data/README.md CHANGED
@@ -8,6 +8,23 @@ This is a module for heuristic analysis of the string input for the
8
8
  [![Coverage Status](https://coveralls.io/repos/RubyMoney/money-heuristics/badge.svg?branch=master)](https://coveralls.io/github/RubyMoney/money-heuristics?branch=master)
9
9
  [![License](https://img.shields.io/github/license/RubyMoney/money-heuristics.svg)](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)
@@ -1,3 +1,3 @@
1
1
  module MoneyHeuristics
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -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.8.2'
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"
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
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("")).not_to eq []
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 []
@@ -1,28 +1,13 @@
1
- require "coveralls"
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
- I18n.enforce_available_locales = false
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.0
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-04-14 00:00:00.000000000 Z
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.8.2
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.8.2
27
+ version: 6.9.0
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: sixarm_ruby_unaccent
29
30
  requirement: !ruby/object:Gem::Requirement