fe_core_ext 0.17.2 → 0.18.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: 31f0bf47a6cec69cc5bbc1d89d60917b33190151710d2bd0556f430701c2d39e
4
- data.tar.gz: 9534202d095c18eb3d4e13a763bdda3a12532240c7b963d8d945688d25041c99
3
+ metadata.gz: f00666d9afbde05b241fcb6c92e64dfc221e00bcc30f501716f3bed1801c7c7d
4
+ data.tar.gz: 531a73a26140b73e0c5cb2c5a97e15bd9996ff0f2d089538312e3f913d449ed8
5
5
  SHA512:
6
- metadata.gz: 229303606ccede9b55510cdd8ae857b4cad38648e802f5958f3528c065f31b200066df892a6e205c55ab577635d6d10f60eedde99c9a693fe80fa1030140e75e
7
- data.tar.gz: 6ad8b6a20d2c2826e697630065902db3dea3b2a0b03e8daa3beed8ce7927ffe6b0dbab72197d79c4d0d13986e34232b4ad89c06dc36d08277b2b1e0c8d1c692e
6
+ metadata.gz: a04f4590aaab29da8fac1cdf4d6e75ffdaace07d74666f1948cd824d6e79f435318ac343b4dd90fa0a13864ca0c7a063506c86fddd7316fa0becc57212ca0bd7
7
+ data.tar.gz: f9c7c6d3527cecbd9cd9085ab4e2deb6e1a372a69b37342563c2014bd2f253bea013c2ab4a459a4348aa5b82c1d89e4dafdebab8d44c30c9e5b7d32696eea2e7
@@ -8,11 +8,6 @@ end
8
8
 
9
9
  module FeCoreExt::CoreExt::String
10
10
  def to_integer
11
- return if not_number?
12
- delete(',').to_i
13
- end
14
-
15
- def to_integer_new
16
11
  return unless valid_number?
17
12
  delete(',').to_i
18
13
  end
@@ -8,11 +8,11 @@ end
8
8
 
9
9
  module URI
10
10
  def download(file)
11
+ warn 'URI#downloadの引数にはPathnameを使いましょう!' if file.is_a?(String)
11
12
  binary = OpenURI.open_uri(self).read
13
+ file = file + self.basename if file.to_s[-1] == '/'
12
14
  dirname = ::File.dirname(file)
13
- unless ::File.directory?(dirname)
14
- ::FileUtils.mkdir_p(dirname)
15
- end
15
+ ::FileUtils.mkdir_p(dirname) unless ::File.directory?(dirname)
16
16
  ::File.open(file, 'wb') {|f| f.write(binary)}
17
17
  end
18
18
 
@@ -1,3 +1,3 @@
1
1
  module FeCoreExt
2
- VERSION = '0.17.2'
2
+ VERSION = '0.18.1'
3
3
  end
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.17.2
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-13 00:00:00.000000000 Z
11
+ date: 2022-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport