monetize 1.9.1 → 1.11.0

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
- SHA1:
3
- metadata.gz: 7c921047a6f291ae61ceb19db130de7b0288d8e2
4
- data.tar.gz: f48eb20c8582b1453ef6114df30793f9367d934e
2
+ SHA256:
3
+ metadata.gz: 10b41ae5e40bb51d6d3fae9eb49cdd73c7be8542dd80c43467a12483f1c8e63b
4
+ data.tar.gz: 86ccb9489502a681cc271cca544eb2f1dbf9268034f1a7b83e2d1ddaa97d4f9a
5
5
  SHA512:
6
- metadata.gz: 9b4a49126c30cfd92968d6fed6cd43a806e5cda807f8dfd0c8956d434e0e3a3331191d9e228e5648c4d11157f01d3c3fcdb72f72f21e52f96002ab803b70265a
7
- data.tar.gz: 571ec0ec170014d408f4ba0208a1b40f04cdf3436b2939e7d43b922cfe2ce3e981fb5a51a6dc79eab8d07ccad4ecfbc270548e15b4293428df87dbc0c912d277
6
+ metadata.gz: c25475d1877bc00dceb06e01cb6863e4e805e87128320b6f77f2a7847930d22e1930ec9ee7cbe0f7efc462428348c05937121b2c45830cbf8f2003fd89dcd64c
7
+ data.tar.gz: fe0a09adc661a2d4afbbc7ee7ee7327d55fef5be9045f8c54d487121e6cc7057d9b53e1fa3890abad382fb8a71e178c69da04a2d95c069cd07880ae22f5f6818
@@ -0,0 +1,34 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ main ]
13
+ pull_request:
14
+ branches: [ main ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ ruby-version: ['2.6', '2.7', '3.0']
23
+
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - name: Set up Ruby
27
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: ${{ matrix.ruby-version }}
32
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
33
+ - name: Run tests
34
+ run: bundle exec rspec spec
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .ruby-version
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.11.0
4
+ - When parsing a string assume a single separator to be a decimal mark when number starts with 0
5
+
6
+ ## 1.10.0
7
+ - When using the `assume_from_symbol` option, the currency in the input string will be used over the assumed currency based on symbol. For example, `$1.05 CAD` will use `CAD` instead of `USD`.
8
+
9
+ ## 1.9.4
10
+ - Fix symbol parsing that are surrounded by other characters
11
+
12
+ ## 1.9.3
13
+ - Fix input parsing when currency symbol after the amount
14
+
15
+ ## 1.9.2
16
+ - Respect Money.rounding_mode when parsing strings
17
+ - Deprecate Monetize.extract_cents
18
+
3
19
  ## 1.9.1
4
20
  - Ruby 2.6 support
5
21
 
data/Gemfile CHANGED
@@ -1,7 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'coveralls', '>= 0.8.20', require: false
4
-
5
3
  # JSON and I18n gem no longer supports ruby < 2.0.0
6
4
  if defined?(JRUBY_VERSION)
7
5
  gem 'json'
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Shane Emmons
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/monetize.svg)](http://badge.fury.io/rb/monetize)
4
4
  [![Build Status](https://travis-ci.org/RubyMoney/monetize.svg?branch=master)](https://travis-ci.org/RubyMoney/monetize)
5
5
  [![Code Climate](https://codeclimate.com/github/RubyMoney/monetize.svg)](https://codeclimate.com/github/RubyMoney/monetize)
6
- [![Coverage Status](https://coveralls.io/repos/RubyMoney/monetize/badge.svg)](https://coveralls.io/r/RubyMoney/monetize)
7
6
  [![Dependency Status](https://gemnasium.com/RubyMoney/monetize.svg)](https://gemnasium.com/RubyMoney/monetize)
8
7
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
9
8
 
data/lib/monetize.rb CHANGED
@@ -31,9 +31,9 @@ module Monetize
31
31
  return from_numeric(input, currency) if input.is_a?(Numeric)
32
32
 
33
33
  parser = Monetize::Parser.new(input, currency, options)
34
- currency_from_input = Money::Currency.wrap(parser.parse_currency)
34
+ amount, currency = parser.parse
35
35
 
36
- Money.new(parser.parse_cents(currency_from_input), currency_from_input)
36
+ Money.from_amount(amount, currency)
37
37
  rescue Money::Currency::UnknownCurrency => e
38
38
  fail ParseError, e.message
39
39
  end
@@ -66,7 +66,10 @@ module Monetize
66
66
  end
67
67
 
68
68
  def extract_cents(input, currency = Money.default_currency)
69
- Monetize::Parser.new(input).parse_cents(currency)
69
+ warn '[DEPRECATION] Monetize.extract_cents is deprecated. Use Monetize.parse().cents'
70
+
71
+ money = parse(input, currency)
72
+ money.cents if money
70
73
  end
71
74
  end
72
75
  end
@@ -29,13 +29,17 @@ module Monetize
29
29
  MULTIPLIER_SUFFIXES.default = 0
30
30
  MULTIPLIER_REGEXP = Regexp.new(format('^(.*?\d)(%s)\b([^\d]*)$', MULTIPLIER_SUFFIXES.keys.join('|')), 'i')
31
31
 
32
+ DEFAULT_DECIMAL_MARK = '.'.freeze
33
+
32
34
  def initialize(input, fallback_currency = Money.default_currency, options = {})
33
35
  @input = input.to_s.strip
34
36
  @fallback_currency = fallback_currency
35
37
  @options = options
36
38
  end
37
39
 
38
- def parse_cents(currency)
40
+ def parse
41
+ currency = Money::Currency.wrap(parse_currency)
42
+
39
43
  multiplier_exp, input = extract_multiplier
40
44
 
41
45
  num = input.gsub(/(?:^#{currency.symbol}|[^\d.,'-]+)/, '')
@@ -46,47 +50,47 @@ module Monetize
46
50
 
47
51
  major, minor = extract_major_minor(num, currency)
48
52
 
49
- major, minor = apply_multiplier(multiplier_exp, major.to_i, minor)
53
+ amount = to_big_decimal([major, minor].join(DEFAULT_DECIMAL_MARK))
54
+ amount = apply_multiplier(multiplier_exp, amount)
55
+ amount = apply_sign(negative, amount)
50
56
 
51
- cents = major.to_i * currency.subunit_to_unit
57
+ [amount, currency]
58
+ end
52
59
 
53
- cents += set_minor_precision(minor, currency)
60
+ private
54
61
 
55
- apply_sign(negative, cents)
62
+ def to_big_decimal(value)
63
+ BigDecimal(value)
64
+ rescue ::ArgumentError => err
65
+ fail ParseError, err.message
56
66
  end
57
67
 
68
+ attr_reader :input, :fallback_currency, :options
69
+
58
70
  def parse_currency
59
71
  computed_currency = nil
60
- computed_currency = compute_currency if assume_from_symbol?
61
- computed_currency ||= input[/[A-Z]{2,3}/]
72
+ computed_currency = input[/[A-Z]{2,3}/]
73
+ computed_currency ||= compute_currency if assume_from_symbol?
74
+
62
75
 
63
76
  computed_currency || fallback_currency || Money.default_currency
64
77
  end
65
78
 
66
- private
67
-
68
- attr_reader :input, :fallback_currency, :options
69
-
70
79
  def assume_from_symbol?
71
80
  options.fetch(:assume_from_symbol) { Monetize.assume_from_symbol }
72
81
  end
73
82
 
74
- def apply_multiplier(multiplier_exp, major, minor)
75
- major *= 10**multiplier_exp
76
- minor = minor.to_s + ('0' * multiplier_exp)
77
- shift = minor[0...multiplier_exp].to_i
78
- major += shift
79
- minor = (minor[multiplier_exp..-1] || '')
80
- [major, minor]
83
+ def apply_multiplier(multiplier_exp, amount)
84
+ amount * 10**multiplier_exp
81
85
  end
82
86
 
83
- def apply_sign(negative, cents)
84
- negative ? cents * -1 : cents
87
+ def apply_sign(negative, amount)
88
+ negative ? amount * -1 : amount
85
89
  end
86
90
 
87
91
  def compute_currency
88
- matches = input.match(currency_symbol_regex)
89
- CURRENCY_SYMBOLS[matches[:symbol]] if matches
92
+ match = input.match(currency_symbol_regex)
93
+ CURRENCY_SYMBOLS[match.to_s] if match
90
94
  end
91
95
 
92
96
  def extract_major_minor(num, currency)
@@ -122,8 +126,13 @@ module Monetize
122
126
  else
123
127
  possible_major, possible_minor = split_major_minor(num, delimiter)
124
128
 
125
- if possible_minor.length != 3 || possible_major.length > 3 || delimiter == '.'
126
- # Doesn't look like thousands separator
129
+ # Doesn't look like thousands separator
130
+ is_decimal_mark = possible_minor.length != 3 ||
131
+ possible_major.length > 3 ||
132
+ possible_major.to_i == 0 ||
133
+ delimiter == '.'
134
+
135
+ if is_decimal_mark
127
136
  [possible_major, possible_minor]
128
137
  else
129
138
  ["#{possible_major}#{possible_minor}", '00']
@@ -150,29 +159,13 @@ module Monetize
150
159
  CURRENCY_SYMBOLS.keys.map { |key| Regexp.escape(key) }.join('|')
151
160
  end
152
161
 
153
- def set_minor_precision(minor, currency)
154
- if Money.infinite_precision
155
- (BigDecimal(minor) / (10**minor.size)) * currency.subunit_to_unit
156
- elsif minor.size < currency.decimal_places
157
- (minor + ('0' * currency.decimal_places))[0, currency.decimal_places].to_i
158
- elsif minor.size > currency.decimal_places
159
- if minor[currency.decimal_places, 1].to_i >= 5
160
- minor[0, currency.decimal_places].to_i + 1
161
- else
162
- minor[0, currency.decimal_places].to_i
163
- end
164
- else
165
- minor.to_i
166
- end
167
- end
168
-
169
162
  def split_major_minor(num, delimiter)
170
163
  major, minor = num.split(delimiter)
171
164
  [major, minor || '00']
172
165
  end
173
166
 
174
167
  def currency_symbol_regex
175
- /\A[\+|\-]?(?<symbol>#{regex_safe_symbols})/
168
+ /(?<![A-Z])(#{regex_safe_symbols})(?![A-Z])/i
176
169
  end
177
170
  end
178
171
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Monetize
4
- VERSION = '1.9.1'
4
+ VERSION = '1.11.0'
5
5
  end
data/monetize.gemspec CHANGED
@@ -7,8 +7,8 @@ require 'English'
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'monetize'
9
9
  spec.version = Monetize::VERSION
10
- spec.authors = ['Shane Emmons']
11
- spec.email = ['shane@emmons.io']
10
+ spec.authors = ['Shane Emmons', 'Anthony Dmitriyev']
11
+ spec.email = ['shane@emmons.io', 'anthony.dmitriyev@gmail.com']
12
12
  spec.description = 'A library for converting various objects into `Money` objects.'
13
13
  spec.summary = 'A library for converting various objects into `Money` objects.'
14
14
  spec.homepage = 'https://github.com/RubyMoney/monetize'
@@ -7,7 +7,7 @@ require 'monetize/core_extensions'
7
7
  describe Monetize, 'core extensions' do
8
8
  describe NilClass do
9
9
  describe '#to_money' do
10
- it 'work as documented' do
10
+ it 'works as documented' do
11
11
  money = nil.to_money
12
12
  expect(money.cents).to eq 0
13
13
  expect(money.currency).to eq Money.default_currency
@@ -22,7 +22,7 @@ describe Monetize, 'core extensions' do
22
22
 
23
23
  describe Numeric do
24
24
  describe '#to_money' do
25
- it 'work as documented' do
25
+ it 'works as documented' do
26
26
  money = 1234.to_money
27
27
  expect(money.cents).to eq 1_234_00
28
28
  expect(money.currency).to eq Money.default_currency
@@ -67,7 +67,8 @@ describe Monetize, 'core extensions' do
67
67
  '-1,000' => Money.new(-1_000_00),
68
68
  '1,000.5' => Money.new(1_000_50),
69
69
  '1,000.51' => Money.new(1_000_51),
70
- '1,000.505' => Money.new(1_000_51),
70
+ '1,000.505' => Money.new(1_000_50), # ROUND_HALF_EVEN default bankers rounding
71
+ '1,000.515' => Money.new(1_000_52), # ROUND_HALF_EVEN default bankers rounding
71
72
  '1,000.504' => Money.new(1_000_50),
72
73
  '1,000.0000' => Money.new(1_000_00),
73
74
  '1,000.5000' => Money.new(1_000_50),
@@ -149,6 +150,28 @@ describe Monetize, 'core extensions' do
149
150
  expect('1'.to_money('JPY')).to eq Money.new(1, 'JPY')
150
151
  expect('1.5'.to_money('KWD').cents).to eq 1_500
151
152
  end
153
+
154
+ it 'respects Money.rounding_mode' do
155
+ expect('1.009'.to_money).to eq(Money.new(1_01))
156
+
157
+ Money.rounding_mode(BigDecimal::ROUND_DOWN) do
158
+ expect('1.009'.to_money).to eq(Money.new(1_00))
159
+ end
160
+
161
+ expect('1.001'.to_money).to eq(Money.new(1_00))
162
+
163
+ Money.rounding_mode(BigDecimal::ROUND_UP) do
164
+ expect('1.001'.to_money).to eq(Money.new(1_01))
165
+ end
166
+ end
167
+
168
+ it 'produces results similar to Money.from_amount for all the rounding edge cases' do
169
+ (1_000..1_010).each do |amount|
170
+ amount = amount.to_f / 1000
171
+
172
+ expect(amount.to_s.to_money).to eq(Money.from_amount(amount))
173
+ end
174
+ end
152
175
  end
153
176
 
154
177
  describe '#to_currency' do
@@ -70,6 +70,10 @@ describe Monetize do
70
70
  expect(Monetize.parse("#{symbol}#{amount_in_units}")).to eq Money.new(amount, iso_code)
71
71
  end
72
72
 
73
+ it "parses formatted inputs with #{iso_code} symbol is after the amount" do
74
+ expect(Monetize.parse("#{amount_in_units}#{symbol}")).to eq Money.new(amount, iso_code)
75
+ end
76
+
73
77
  context 'prefix' do
74
78
  it 'parses formatted inputs with plus sign and currency as a symbol' do
75
79
  expect(Monetize.parse("+#{symbol}#{amount_in_units}")).to eq Money.new(amount, iso_code)
@@ -114,6 +118,15 @@ describe Monetize do
114
118
  expect(Monetize.parse('L9.99')).to eq Money.new(999, 'USD')
115
119
  end
116
120
 
121
+ it 'should use provided currency over symbol' do
122
+ expect(Monetize.parse('$1.05 CAD')).to eq Money.new(105, 'CAD')
123
+ end
124
+
125
+ it 'ignores ZAR symbols that is part of a text' do
126
+ expect(Monetize.parse('EUR 9.99')).to eq Money.new(999, 'EUR')
127
+ expect(Monetize.parse('9.99 EUR')).to eq Money.new(999, 'EUR')
128
+ end
129
+
117
130
  context 'negatives' do
118
131
  it 'ignores the ambiguous kr symbol' do
119
132
  # Could mean either of DKK, EEK, ISK, NOK, SEK
@@ -307,6 +320,29 @@ describe Monetize do
307
320
  expect('€8.883.331,0034'.to_money('EU4')).to eq Money.new(8_883_331_0034, 'EU4')
308
321
  # rubocop:enable Style/NumericLiterals
309
322
  end
323
+
324
+ it 'parses strings deducing a decimal mark when a single delimiter is used and major is 0' do
325
+ expect('$0,4'.to_money('BAR')).to eq Money.new(4000, 'BAR')
326
+ expect('€0.4'.to_money('EU4')).to eq Money.new(4000, 'EU4')
327
+
328
+ expect('$0,04'.to_money('BAR')).to eq Money.new(400, 'BAR')
329
+ expect('€0.04'.to_money('EU4')).to eq Money.new(400, 'EU4')
330
+
331
+ expect('$0,004'.to_money('BAR')).to eq Money.new(40, 'BAR')
332
+ expect('€0.004'.to_money('EU4')).to eq Money.new(40, 'EU4')
333
+
334
+ expect('$0,0004'.to_money('BAR')).to eq Money.new(4, 'BAR')
335
+ expect('€0.0004'.to_money('EU4')).to eq Money.new(4, 'EU4')
336
+
337
+ expect('$0,0024'.to_money('BAR')).to eq Money.new(24, 'BAR')
338
+ expect('€0.0024'.to_money('EU4')).to eq Money.new(24, 'EU4')
339
+
340
+ expect('$0,0324'.to_money('BAR')).to eq Money.new(324, 'BAR')
341
+ expect('€0.0324'.to_money('EU4')).to eq Money.new(324, 'EU4')
342
+
343
+ expect('$0,5324'.to_money('BAR')).to eq Money.new(5324, 'BAR')
344
+ expect('€0.5324'.to_money('EU4')).to eq Money.new(5324, 'EU4')
345
+ end
310
346
  end
311
347
  end
312
348
 
@@ -320,6 +356,10 @@ describe Monetize do
320
356
  it 'raises ArgumentError when unable to detect polarity' do
321
357
  expect { Monetize.parse!('-$5.95-') }.to raise_error Monetize::ParseError
322
358
  end
359
+
360
+ it 'raises ArgumentError with invalid format' do
361
+ expect { Monetize.parse!('11..0') }.to raise_error Monetize::ParseError
362
+ end
323
363
  end
324
364
 
325
365
  describe '.parse_collection' do
@@ -520,6 +560,20 @@ describe Monetize do
520
560
  end
521
561
 
522
562
  describe '.extract_cents' do
563
+ it 'is deprecated' do
564
+ allow(Monetize).to receive(:warn)
565
+
566
+ Monetize.extract_cents('100')
567
+
568
+ expect(Monetize)
569
+ .to have_received(:warn)
570
+ .with('[DEPRECATION] Monetize.extract_cents is deprecated. Use Monetize.parse().cents')
571
+ end
572
+
573
+ it 'extracts cents from a given string' do
574
+ expect(Monetize.extract_cents('10.99')).to eq(1099)
575
+ end
576
+
523
577
  it "correctly treats pipe marks '|' in input (regression test)" do
524
578
  expect(Monetize.extract_cents('100|0')).to eq Monetize.extract_cents('100!0')
525
579
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  # encoding: utf-8
2
- require 'coveralls'
3
- Coveralls.wear!
4
2
 
5
3
  require 'money'
6
4
 
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monetize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Emmons
8
- autorequire:
8
+ - Anthony Dmitriyev
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2019-02-16 00:00:00.000000000 Z
12
+ date: 2021-03-04 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: money
@@ -69,18 +70,18 @@ dependencies:
69
70
  description: A library for converting various objects into `Money` objects.
70
71
  email:
71
72
  - shane@emmons.io
73
+ - anthony.dmitriyev@gmail.com
72
74
  executables: []
73
75
  extensions: []
74
76
  extra_rdoc_files: []
75
77
  files:
76
- - ".coveralls.yml"
78
+ - ".github/workflows/ruby.yml"
77
79
  - ".gitignore"
78
80
  - ".rubocop.yml"
79
- - ".travis.yml"
80
81
  - CHANGELOG.md
81
82
  - CONTRIBUTING.md
82
83
  - Gemfile
83
- - LICENSE.txt
84
+ - LICENSE
84
85
  - README.md
85
86
  - Rakefile
86
87
  - lib/monetize.rb
@@ -105,7 +106,7 @@ metadata:
105
106
  changelog_uri: https://github.com/RubyMoney/monetize/blob/master/CHANGELOG.md
106
107
  source_code_uri: https://github.com/RubyMoney/monetize/
107
108
  bug_tracker_uri: https://github.com/RubyMoney/monetize/issues
108
- post_install_message:
109
+ post_install_message:
109
110
  rdoc_options: []
110
111
  require_paths:
111
112
  - lib
@@ -120,9 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
121
  - !ruby/object:Gem::Version
121
122
  version: '0'
122
123
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.6.8
125
- signing_key:
124
+ rubygems_version: 3.2.3
125
+ signing_key:
126
126
  specification_version: 4
127
127
  summary: A library for converting various objects into `Money` objects.
128
128
  test_files:
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- repo_token: pbKErt5rAW1iRYGMIAGGAAHfVRmiBzxfd
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.10
7
- - 2.2.10
8
- - 2.3.7
9
- - 2.4.4
10
- - 2.5.1
11
- - 2.6.0
12
- - jruby-9.0.5.0
13
- before_install:
14
- - gem install bundler --version '~> 1.17'
15
- script: bundle exec rspec spec
16
- notifications:
17
- recipients:
18
- - shane@emmons.io
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 Shane Emmons
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.