ruby-rails-extensions 2.0.0.pre.rc.1 → 2.0.1.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1048be3864dabbae6b8f4c583b882f8d1733359925459d1038ebeb55496be69d
4
- data.tar.gz: 19b81681e64e638ea6cd13b5f7eab494791ba80684485ad5c463c5a6e70ea7f0
3
+ metadata.gz: c02d97dfbcfc023ae5fadf3660089d10901a1cf82d252de7ff073de90aa8cc06
4
+ data.tar.gz: d15be922c1fbb9d5255828b055037525bc1158580dd57e7cb7b5c92785b2deba
5
5
  SHA512:
6
- metadata.gz: d652662723e9c0fde85697a30a06f8cdc856d737f6aae161adbca99a108244d79c5f13992521bf1e56e673e0142d18fcfd42470c9a3391221f04655df7674ac4
7
- data.tar.gz: 92a67c99eca9ebd748ce097002469e8089a203b8bb696748c1a59ad06425d74173a7f5aa1bef4069812fbfd4b96b4ede447040b4957603a5d3669b2ba9a456b9
6
+ metadata.gz: fbe51541f008a0af51f86ff0bae341bd58f8429317d583b1eb9b559c9e882ff55826a3cc9a7bf2dddb4a891437b170ffa0428e252626ea0d4bba03195c7ddc36
7
+ data.tar.gz: 9cea83c70ff4e3880cf2dfff7a57c4e1b9a37f7f87d310d5da28392ea85e1970dafa220fbad08a0bba20172d4cd69885c00ce4f1b82bc411734ad15320e808f0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 2.0.1 (2024-07-29)
5
+ ------------------
6
+
7
+ * Bug fixes:
8
+ * `alias_method` doesn't work when target method doesn't exist. Switched to long hand alias
9
+
4
10
  2.0.0 (2024-07-26)
5
11
  ------------------
6
12
 
@@ -4,15 +4,15 @@ require 'forwardable'
4
4
  require 'set'
5
5
 
6
6
  Array.class_eval do
7
- # Replace my_array.map(&:method1).map(&:method2) with my_array.pipe(:method1, :method2)
8
- # @return [Array]
9
- def pipe(*fns)
10
- map { |a| fns.reduce(a, &:send) }
7
+ # Replace my_array.map(&:method1).map(&:method2) with my_array.pipe(:method1, :method2)
8
+ # @return [Array]
9
+ def pipe(*fns)
10
+ map { |a| fns.reduce(a, &:send) }
11
11
  end
12
12
  end
13
13
 
14
14
  Set.class_eval do
15
- extend Forwardable
15
+ extend Forwardable
16
16
 
17
- def_delegators :to_a, :pipe
17
+ def_delegators :to_a, :pipe
18
18
  end
@@ -1,7 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Enumerable.class_eval do
4
- alias_method :select_present, :compact_blank
4
+ # @see `compact_blank`
5
+ def select_present(...)
6
+ compact_blank(...)
7
+ end
5
8
 
6
- alias_method :select_present!, :compact_blank!
9
+ # @see `compact_blank!`
10
+ def select_present(...)
11
+ compact_blank!(...)
12
+ end
7
13
  end
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Enumerable.class_eval do
4
- alias_method :select_present_join, :compact_blank_join
4
+ # @see `compact_blank_join`
5
+ def select_present_join(...)
6
+ compact_blank_join(...)
7
+ end
5
8
  end
@@ -1,16 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  TrueClass.class_eval do
4
- alias_method :to_sort_i, :to_i
4
+ # @see `to_i`
5
+ def to_sort_i
6
+ to_i
7
+ end
5
8
  end
6
9
 
7
10
  FalseClass.class_eval do
8
- alias_method :to_sort_i, :to_i
11
+ # @see `to_i`
12
+ def to_sort_i
13
+ to_i
14
+ end
9
15
  end
10
16
 
11
17
  NilClass.class_eval do
12
- # :nodoc:
13
- def to_sort_i
14
- -1
18
+ # :nodoc:
19
+ def to_sort_i
20
+ -1
15
21
  end
16
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyRailsExtensions
4
- VERSION = '2.0.0-rc.1'
4
+ VERSION = '2.0.1-rc.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-rails-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.rc.1
4
+ version: 2.0.1.pre.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-26 00:00:00.000000000 Z
11
+ date: 2024-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop-rubomatic-rails
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.0
19
+ version: 1.4.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 1.3.0
29
+ version: 1.4.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'