fe_core_ext 0.33.4 → 0.35.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 +4 -4
- data/lib/fe_core_ext/core_ext/string.rb +6 -25
- data/lib/fe_core_ext/gem_ext/ferrum.rb +9 -0
- data/lib/fe_core_ext/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5e7b2064ab60debcbf11816128170f9962d58b665b397357eaf3dd75b3995cd
|
4
|
+
data.tar.gz: a471eb764d6d8bbe96e04a64257cfb0b5c8bfa135ab8500780882183fb581880
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d710cd1646692765abf857aa7d0a964d442eb1a2885e04322c4371591451dadada346c37ec1c3e9e3b1e20f22d976b8cc080113ff4b57ce577bc9a9b679f49
|
7
|
+
data.tar.gz: af73a4c841a38ecdb51a6c1305a780fad8594930d7a854b0c7d1a94269678ee285e0a0831e93de31fe7d0d26054b4d23d0e452f531e8ae1130ecb8b4695a4a33
|
@@ -22,21 +22,11 @@ module FeCoreExt
|
|
22
22
|
delete(",").to_d
|
23
23
|
end
|
24
24
|
|
25
|
-
def to_decimal_new
|
26
|
-
return unless valid_number?
|
27
|
-
delete(",").to_d
|
28
|
-
end
|
29
|
-
|
30
25
|
def to_float
|
31
26
|
return unless valid_number?
|
32
27
|
delete(",").to_f
|
33
28
|
end
|
34
29
|
|
35
|
-
def valid_sec_code?
|
36
|
-
valid_chars = "[0-9ACDFGHJKLMNPRSTUWXY]"
|
37
|
-
match?(/^\d#{valid_chars}\d#{valid_chars}$/)
|
38
|
-
end
|
39
|
-
|
40
30
|
def to_pathname
|
41
31
|
Pathname(self)
|
42
32
|
end
|
@@ -58,12 +48,12 @@ module FeCoreExt
|
|
58
48
|
tr("0-9A-Za-z &・.-()", '0-9A-Za-z &・.\-()')
|
59
49
|
end
|
60
50
|
|
61
|
-
def
|
62
|
-
tr("
|
51
|
+
def to_half_alpha
|
52
|
+
tr("0-9A-Za-z &・.-()", '0-9A-Za-z &・.\-()')
|
63
53
|
end
|
64
54
|
|
65
|
-
def
|
66
|
-
|
55
|
+
def to_katakana
|
56
|
+
tr("ぁ-ん", "ァ-ン")
|
67
57
|
end
|
68
58
|
|
69
59
|
def kana_upcase
|
@@ -71,12 +61,12 @@ module FeCoreExt
|
|
71
61
|
end
|
72
62
|
|
73
63
|
def to_han_kana
|
74
|
-
return if
|
64
|
+
return if nil?
|
75
65
|
NKF.nkf("-wxZ4", self)
|
76
66
|
end
|
77
67
|
|
78
68
|
def to_zen_kana
|
79
|
-
return if
|
69
|
+
return if nil?
|
80
70
|
NKF.nkf("-wX", self)
|
81
71
|
end
|
82
72
|
|
@@ -97,15 +87,6 @@ module FeCoreExt
|
|
97
87
|
reverse.gsub(/^\p{Zs}+|^\p{Cf}+/, "").reverse.gsub(/^\p{Zs}+|^\p{Cf}+/, "")
|
98
88
|
end
|
99
89
|
|
100
|
-
def sjis_encodable
|
101
|
-
tr("\u301C\u2212\u00A2\u00A3\u00AC\u2014\u2016",
|
102
|
-
"\uFF5E\uFF0D\uFFE0\uFFE1\uFFE2\u2015\u2225")
|
103
|
-
end
|
104
|
-
|
105
|
-
def eucjp_encodable
|
106
|
-
tr("\uFF5E\uFF0D\uFFE0\uFFE1\uFFE2\u2015\u2225",
|
107
|
-
"\u301C\u2212\u00A2\u00A3\u00AC\u2014\u2016")
|
108
|
-
end
|
109
90
|
end
|
110
91
|
end
|
111
92
|
end
|
@@ -31,6 +31,15 @@ module Ferrum
|
|
31
31
|
wait_for_selector(selector, :at_xpath, timeout)
|
32
32
|
end
|
33
33
|
|
34
|
+
def with(selector, init:nil, wait:3, step:0.1)
|
35
|
+
sleep(init) if init
|
36
|
+
meth = selector.start_with?("/") ? :at_xpath : :at_css
|
37
|
+
until node = send(meth, selector) rescue nil
|
38
|
+
(wait -= step) > 0 ? sleep(step) : break
|
39
|
+
end
|
40
|
+
node
|
41
|
+
end
|
42
|
+
|
34
43
|
private
|
35
44
|
|
36
45
|
def wait_for_selector(selector, selector_method, timeout)
|
data/lib/fe_core_ext/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fe_core_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.35.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tetsu
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -116,7 +116,7 @@ homepage: http://github.com/ironsand/fe_core_ext
|
|
116
116
|
licenses:
|
117
117
|
- MIT
|
118
118
|
metadata: {}
|
119
|
-
post_install_message:
|
119
|
+
post_install_message:
|
120
120
|
rdoc_options: []
|
121
121
|
require_paths:
|
122
122
|
- lib
|
@@ -131,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
135
|
-
signing_key:
|
134
|
+
rubygems_version: 3.5.22
|
135
|
+
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Core class extensions
|
138
138
|
test_files: []
|