rearmed 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rearmed.rb +2 -1
- data/lib/rearmed/version.rb +1 -1
- data/test/rearmed_test.rb +18 -3
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f2fba9bb8ffb4bca9cf4aa15efa561e0368b9698aa64e91bee261200477ade0
|
4
|
+
data.tar.gz: 0e42302a143f42503d288806e5871b6138044e0a51225aa85b5733d76fe0b3bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3288a910ff95324d2d41c161d57e79386263867489d004448b79115490ba59a10246cbdd7699194d53f65a27c4e228818099a23ab7de0ce523f8fd0b226945e
|
7
|
+
data.tar.gz: 48391823c8469d9e3cd81a681f101e8d1f8b125c64b4369f7bf86f729ed5f093ee325c8ec20f35e35702e486999512a622a2a6bc9caf91c3141f6dac1ae6dfb3
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
---------
|
3
3
|
|
4
|
+
|
5
|
+
- **2.0.1 - July 12, 2018**
|
6
|
+
- Fix Ruby 1.9.3 support. Do not use `__dir__` because Ruby 1.9.3 does not support it.
|
7
|
+
- Fix tests. Add `wwtd` for better local testing.
|
4
8
|
- **2.0.0 - July 11, 2018**
|
5
9
|
- Rename all generic `Rearmed` methods to their respective object type subclass and add type checking. Three examples:
|
6
10
|
- `Rearmed.casecmp?(str1, str2)` changed to `Rearmed::String.casecmp?(str1, str2)`
|
data/lib/rearmed.rb
CHANGED
@@ -56,7 +56,8 @@ module Rearmed
|
|
56
56
|
if @applied
|
57
57
|
raise ::Rearmed::Exceptions::PatchesAlreadyAppliedError.new
|
58
58
|
else
|
59
|
-
|
59
|
+
patches_folder = File.expand_path('../rearmed/monkey_patches', __FILE__)
|
60
|
+
Dir[File.join(patches_folder, '*.rb')].each do |filename|
|
60
61
|
require filename
|
61
62
|
end
|
62
63
|
|
data/lib/rearmed/version.rb
CHANGED
data/test/rearmed_test.rb
CHANGED
@@ -40,7 +40,7 @@ class RearmedTest < MiniTest::Test
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
43
|
+
def test_string_float?
|
44
44
|
str = '132.2'
|
45
45
|
eql(str.valid_float?, true)
|
46
46
|
|
@@ -91,8 +91,23 @@ class RearmedTest < MiniTest::Test
|
|
91
91
|
str2 = 'fo'
|
92
92
|
eql(str1.casecmp?(str2), false)
|
93
93
|
|
94
|
-
|
95
|
-
|
94
|
+
if RUBY_VERSION.to_f == 2.4
|
95
|
+
assert_raises TypeError do
|
96
|
+
str2 = true
|
97
|
+
eql(str1.casecmp?(str2), nil)
|
98
|
+
end
|
99
|
+
|
100
|
+
assert_raises TypeError do
|
101
|
+
str2 = []
|
102
|
+
eql(str1.casecmp?(str2), nil)
|
103
|
+
end
|
104
|
+
else
|
105
|
+
str2 = true
|
106
|
+
eql(str1.casecmp?(str2), nil)
|
107
|
+
|
108
|
+
str2 = []
|
109
|
+
eql(str1.casecmp?(str2), nil)
|
110
|
+
end
|
96
111
|
|
97
112
|
str2 = 'foo'
|
98
113
|
eql(Rearmed::String.casecmp?(str1, str2), true)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rearmed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Weston Ganger
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: wwtd
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: A collection of helpful methods and monkey patches for Objects, Strings,
|
56
70
|
Enumerables, Arrays, Hash, Dates, Minitest & Rails
|
57
71
|
email: weston@westonganger.com
|
@@ -94,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
108
|
version: '0'
|
95
109
|
requirements: []
|
96
110
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.7.
|
111
|
+
rubygems_version: 2.7.3
|
98
112
|
signing_key:
|
99
113
|
specification_version: 4
|
100
114
|
summary: A collection of helpful methods and monkey patches for Objects, Strings,
|