fe_core_ext 0.18.0 → 0.20.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99a359ad78833a8c9dbabba2d613224cfccd2f6fccc6930a0e55d15dd5ca23bd
|
4
|
+
data.tar.gz: 5823113f42e75ef36d704c1d11b42d90e15ac122b88c4cec2d83b8b8eed89482
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c53ff871a962b4b8fc36840ab581a1d2c311b5bc9dab29a13c9f3e62c951ed295c6eb74094bb7f5bba0382287aceaaf04071a7c647b20e918e0f76843c50660e
|
7
|
+
data.tar.gz: 7c49d12b359118d9d601cc26c7e71e8812eb9473e2f79a1552dd37842e8c966295afdf9648b235342f980b2a38bf68b97c65dad0395977cbe0b19faca5059d27
|
@@ -75,9 +75,17 @@ module FeCoreExt::CoreExt::String
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def to_date_in_ja
|
78
|
+
to_date_in_ja_seireki || to_date_in_ja_heisei
|
79
|
+
end
|
80
|
+
|
81
|
+
def to_date_in_ja_seireki
|
78
82
|
match(/(\d{4})年(\d{1,2})月(\d{1,2})日/) {Date.new($1.to_i, $2.to_i, $3.to_i)}
|
79
83
|
end
|
80
84
|
|
85
|
+
def to_date_in_ja_heisei
|
86
|
+
match(/平成(\d{2})年(\d{1,2})月(\d{1,2})日/) {Date.new($1.to_i + 1988, $2.to_i, $3.to_i)}
|
87
|
+
end
|
88
|
+
|
81
89
|
# remove also no break space and other space like characters.
|
82
90
|
def strong_strip
|
83
91
|
reverse.gsub(/^\p{Zs}+|^\p{Cf}+/, '').reverse.gsub(/^\p{Zs}+|^\p{Cf}+/, '')
|
@@ -8,7 +8,7 @@ end
|
|
8
8
|
|
9
9
|
module URI
|
10
10
|
def download(file)
|
11
|
-
warn 'URI#downloadの引数にはPathnameを使いましょう!' if
|
11
|
+
warn 'URI#downloadの引数にはPathnameを使いましょう!' if file.is_a?(String)
|
12
12
|
binary = OpenURI.open_uri(self).read
|
13
13
|
file = file + self.basename if file.to_s[-1] == '/'
|
14
14
|
dirname = ::File.dirname(file)
|
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.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tetsu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|