fe_core_ext 0.9.2 → 0.12.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b07dfd3cb4b79ad499a3d508eeb9eb3cd965278ee3e52ad78a9c3a463859a2bf
|
4
|
+
data.tar.gz: c24f1cda6e78bb1e197782fd2672f487917f2e415b8cfd12fe9d26546239a383
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 030ef4d1254507a56ba84ef95872137dbd7bc3fa744112acd0704460221455b9bc89a2b37ab57289b34f1375a3ee07941ca12503f9631aba569891532e5627a7
|
7
|
+
data.tar.gz: 9729c276bf751075d723cdb5cefdf1960a83f145b48d8513ecfb42424e603b4ad873c18b247bceb4824467c20a51138706631e095505d0271ecea901a0e3f055
|
@@ -19,6 +19,15 @@ module FeCoreExt::CoreExt::Date
|
|
19
19
|
end
|
20
20
|
|
21
21
|
module FeCoreExt::CoreExt::DateClassMethods
|
22
|
+
def parsable?(string)
|
23
|
+
begin
|
24
|
+
parse(string)
|
25
|
+
true
|
26
|
+
rescue ArgumentError
|
27
|
+
false
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
22
31
|
def parse_as_future(string)
|
23
32
|
date = parse(string)
|
24
33
|
date > current ? date : date + 1.year
|
@@ -37,9 +37,19 @@ module FeCoreExt::CoreExt::PathnameClassMethods
|
|
37
37
|
def join(*args)
|
38
38
|
new(File.join(*args))
|
39
39
|
end
|
40
|
+
|
41
|
+
def mktmpdir(prefix_suffix=nil, tmpdir=nil)
|
42
|
+
if block_given?
|
43
|
+
Dir.mktmpdir prefix_suffix, tmpdir do |dir|
|
44
|
+
yield new(dir)
|
45
|
+
end
|
46
|
+
else
|
47
|
+
new(Dir.mktmpdir(prefix_suffix, tmpdir))
|
48
|
+
end
|
49
|
+
end
|
40
50
|
end
|
41
51
|
|
42
52
|
class Pathname
|
43
53
|
extend FeCoreExt::CoreExt::PathnameClassMethods
|
44
54
|
include FeCoreExt::CoreExt::Pathname
|
45
|
-
end
|
55
|
+
end
|
@@ -25,10 +25,15 @@ module FeCoreExt::CoreExt::String
|
|
25
25
|
to_i == 0 && match('0').nil?
|
26
26
|
end
|
27
27
|
|
28
|
+
## deprecated
|
28
29
|
def zen_to_han
|
29
30
|
tr('0-9A-Za-z &・-()', '0-9A-Za-z &・\-()')
|
30
31
|
end
|
31
32
|
|
33
|
+
def alphanumeric_zen_to_han
|
34
|
+
tr('0-9A-Za-z &・-()', '0-9A-Za-z &・\-()')
|
35
|
+
end
|
36
|
+
|
32
37
|
def to_katakana
|
33
38
|
tr('ぁ-ん', 'ァ-ン')
|
34
39
|
end
|
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.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tetsu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -130,8 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
|
-
|
134
|
-
rubygems_version: 2.7.6.2
|
133
|
+
rubygems_version: 3.1.6
|
135
134
|
signing_key:
|
136
135
|
specification_version: 4
|
137
136
|
summary: Core class extensions
|