shoulda-matchers 3.1.2 → 3.1.3

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: 3a1fd7405d13a2290fc86e1eeda40cb9390a67b1
4
- data.tar.gz: e8e2c3b0036ed5c61e41325c47308942d75973d3
2
+ SHA256:
3
+ metadata.gz: 53f6d57668b2c4f65787cf1eea63889b83ae9d3201d9dbe84603b051faddf0e6
4
+ data.tar.gz: 87cceafbe6b98f156f95bb458580ed8f2ee77b4b989f99b57142e43fb7d0d44b
5
5
  SHA512:
6
- metadata.gz: 40782891996d9199019f456ecb42c5825387dddf098f9f77b0d11ac9d6d928dad7b2582096839f5b8e29ad4cf4f25f92d7f93856cf839f8eff9e87b0f7b3a6ff
7
- data.tar.gz: 33cd8f5486d2e1a33f261bc081f0f2c5dd1be8010b5fb3ab54ceb7d436d595e8701cf56398457fe7099a25269af6f491a109c4c70ffe6e5584f0ac80dc295282
6
+ metadata.gz: de3671526d4a72ad816c3e4628e5ac9412bc6a858f7dcf42028d0f24480675ef835d4b2313ecf9b5fedb628cf60354206fdb2f16d7663c975efa6cab29479dd0
7
+ data.tar.gz: 916de2f2ecf31d9f44390708acb91ef033b67bc020eb464512a81f4bbe2e4f7ca8edd49ff2610079e47ec0ef5ce601ef553b81d7eacb0645d280b99901eab7d7
@@ -2,6 +2,7 @@ language: ruby
2
2
  sudo: false
3
3
  cache: bundler
4
4
  script: "bundle exec rake"
5
+ install: "bundle install --jobs=3 --retry=3"
5
6
 
6
7
  env:
7
8
  - DATABASE_ADAPTER=sqlite3
data/NEWS.md CHANGED
@@ -1,3 +1,10 @@
1
+ # 3.1.3
2
+
3
+ ### Improvements
4
+
5
+ * Update `BigDecimal.new()` to use `BigDecimal()` and avoid deprecation warnings
6
+ in Ruby 2.6.
7
+
1
8
  # 3.1.2
2
9
 
3
10
  ### Deprecations
@@ -116,7 +116,7 @@ GEM
116
116
  rake (>= 0.8.7)
117
117
  thor (>= 0.18.1, < 2.0)
118
118
  rake (10.5.0)
119
- rdoc (4.2.0)
119
+ rdoc (4.3.0)
120
120
  redcarpet (3.3.2)
121
121
  rspec (3.4.0)
122
122
  rspec-core (~> 3.4.0)
@@ -118,7 +118,7 @@ GEM
118
118
  rake (>= 0.8.7)
119
119
  thor (>= 0.18.1, < 2.0)
120
120
  rake (10.5.0)
121
- rdoc (4.2.0)
121
+ rdoc (4.3.0)
122
122
  redcarpet (3.3.2)
123
123
  rspec (3.4.0)
124
124
  rspec-core (~> 3.4.0)
@@ -114,7 +114,7 @@ GEM
114
114
  rake (>= 0.8.7)
115
115
  thor (>= 0.18.1, < 2.0)
116
116
  rake (10.5.0)
117
- rdoc (4.2.0)
117
+ rdoc (4.3.0)
118
118
  redcarpet (3.3.2)
119
119
  rspec (3.4.0)
120
120
  rspec-core (~> 3.4.0)
@@ -139,7 +139,7 @@ GEM
139
139
  rake (>= 0.8.7)
140
140
  thor (>= 0.18.1, < 2.0)
141
141
  rake (10.5.0)
142
- rdoc (4.2.0)
142
+ rdoc (4.3.0)
143
143
  redcarpet (3.3.2)
144
144
  rspec (3.4.0)
145
145
  rspec-core (~> 3.4.0)
@@ -105,7 +105,7 @@ module Shoulda
105
105
  else
106
106
  case column_type
107
107
  when :integer, :float then 1
108
- when :decimal then BigDecimal.new(1, 0)
108
+ when :decimal then BigDecimal(1, 0)
109
109
  when :datetime, :time, :timestamp then Time.now
110
110
  when :date then Date.new
111
111
  when :binary then '0'
@@ -270,7 +270,7 @@ module Shoulda
270
270
  class ValidateInclusionOfMatcher < ValidationMatcher
271
271
  ARBITRARY_OUTSIDE_STRING = 'shoulda-matchers test string'
272
272
  ARBITRARY_OUTSIDE_FIXNUM = 123456789
273
- ARBITRARY_OUTSIDE_DECIMAL = BigDecimal.new('0.123456789')
273
+ ARBITRARY_OUTSIDE_DECIMAL = BigDecimal('0.123456789')
274
274
  ARBITRARY_OUTSIDE_DATE = Date.jd(9999999)
275
275
  ARBITRARY_OUTSIDE_DATETIME = DateTime.jd(9999999)
276
276
  ARBITRARY_OUTSIDE_TIME = Time.at(9999999999)
@@ -1,6 +1,6 @@
1
1
  module Shoulda
2
2
  module Matchers
3
3
  # @private
4
- VERSION = '3.1.2'.freeze
4
+ VERSION = '3.1.3'.freeze
5
5
  end
6
6
  end
@@ -107,18 +107,18 @@ describe Shoulda::Matchers::ActiveModel::ValidateInclusionOfMatcher, type: :mode
107
107
  context 'against a decimal attribute' do
108
108
  it_behaves_like 'it supports in_array',
109
109
  possible_values: [1.0, 2.0, 3.0, 4.0, 5.0].map { |number|
110
- BigDecimal.new(number.to_s)
110
+ BigDecimal(number.to_s)
111
111
  },
112
- zero: BigDecimal.new('0.0'),
112
+ zero: BigDecimal('0.0'),
113
113
  reserved_outside_value: described_class::ARBITRARY_OUTSIDE_DECIMAL
114
114
 
115
115
  it_behaves_like 'it supports in_range',
116
- possible_values: BigDecimal.new('1.0') .. BigDecimal.new('5.0'),
117
- zero: BigDecimal.new('0.0')
116
+ possible_values: BigDecimal('1.0') .. BigDecimal('5.0'),
117
+ zero: BigDecimal('0.0')
118
118
 
119
119
  def build_object(options = {}, &block)
120
120
  build_object_with_generic_attribute(
121
- options.merge(column_type: :decimal, value: BigDecimal.new('1.0')),
121
+ options.merge(column_type: :decimal, value: BigDecimal('1.0')),
122
122
  &block
123
123
  )
124
124
  end
@@ -130,7 +130,7 @@ describe Shoulda::Matchers::ActiveModel::ValidateInclusionOfMatcher, type: :mode
130
130
  def validation_matcher_scenario_args
131
131
  super.deep_merge(
132
132
  column_type: :decimal,
133
- default_value: BigDecimal.new('1.0')
133
+ default_value: BigDecimal('1.0')
134
134
  )
135
135
  end
136
136
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tammer Saleh
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2017-07-12 00:00:00.000000000 Z
17
+ date: 2019-01-28 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: activesupport
@@ -366,7 +366,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
366
366
  version: '0'
367
367
  requirements: []
368
368
  rubyforge_project:
369
- rubygems_version: 2.6.11
369
+ rubygems_version: 2.7.6
370
370
  signing_key:
371
371
  specification_version: 4
372
372
  summary: Making tests easy on the fingers and eyes