eac_ruby_utils 0.86.0 → 0.87.0

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: cb43d75df268978d9c55132da9f3e397fff08e830f699911cd1603927b4bedb8
4
- data.tar.gz: 2eff47acaff0d353be69220b4ee511fa39ddccf2cf2e7cab0e6d4f3bad246d68
3
+ metadata.gz: 1d4ecfbc2e97f7fb3f09539826cfeb26eca26eac7e12fd7ea396dbf1c26cdc88
4
+ data.tar.gz: dfb7c05df973182295f4ad73c118e1825d80130e7a446a5a395ecd3d9c361e35
5
5
  SHA512:
6
- metadata.gz: e69e6e3dfcaea37b1c1b7723289fd36cb163c9535d60d93a2ab52c428b1fc4ebaad30bb4acd5b1891a3357467942b4721e06a180521fc373cb22ef6c183d0249
7
- data.tar.gz: dbf10280434bf5ad40b32cd0cac112e448174b1e93bafffb6d7eeed39c9389292bac59e8c8908da04792d79104c2d2a39d2b77bad0b19f2961071b040885fe01
6
+ metadata.gz: 7dc1d1cf517eee4582a0359aa3868fea24b4305ee365dcf2c8509db75180c021a428256f8ea32d21ce88ce29a43a5a016ed0dcec39143d84ec9b359802dc6d83
7
+ data.tar.gz: a7caf88e6692f6ff0ba15d0c231ca86bac511ef10eb539afaa3f4aac0556d50d19328822dac22ca8f5be69b4ef83cebfd06658ecaa9790f154ddc64ac6f0a1b9
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/object/blank'
4
+ require 'addressable/uri'
5
+
6
+ class Object
7
+ # Convert +self+ to String and then to Addressable::URI. Return nil if +self+ is +blank?+.
8
+ #
9
+ # @return [Addressable::URI]
10
+ def to_uri
11
+ return self if is_a?(::Addressable::URI)
12
+
13
+ to_s.blank? ? nil : ::Addressable::URI.parse(to_s)
14
+ end
15
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.86.0'
4
+ VERSION = '0.87.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.86.0
4
+ version: 0.87.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-30 00:00:00.000000000 Z
11
+ date: 2022-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -203,6 +203,7 @@ files:
203
203
  - lib/eac_ruby_utils/patches/object/if_present.rb
204
204
  - lib/eac_ruby_utils/patches/object/if_respond.rb
205
205
  - lib/eac_ruby_utils/patches/object/to_pathname.rb
206
+ - lib/eac_ruby_utils/patches/object/to_uri.rb
206
207
  - lib/eac_ruby_utils/patches/pathname.rb
207
208
  - lib/eac_ruby_utils/patches/pathname/basename_sub.rb
208
209
  - lib/eac_ruby_utils/patches/pathname/if_exist.rb