fe_core_ext 0.12.1 → 0.13.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: b07dfd3cb4b79ad499a3d508eeb9eb3cd965278ee3e52ad78a9c3a463859a2bf
4
- data.tar.gz: c24f1cda6e78bb1e197782fd2672f487917f2e415b8cfd12fe9d26546239a383
3
+ metadata.gz: a6509e45e7856df89bc3f07e710a8e225ec2fc663aa220eaa8dd3b21148f0918
4
+ data.tar.gz: 4c730c403a8f83f6883da2f63f25d430841c24a3a5ffe2d4764e81f1a2ede3d2
5
5
  SHA512:
6
- metadata.gz: 030ef4d1254507a56ba84ef95872137dbd7bc3fa744112acd0704460221455b9bc89a2b37ab57289b34f1375a3ee07941ca12503f9631aba569891532e5627a7
7
- data.tar.gz: 9729c276bf751075d723cdb5cefdf1960a83f145b48d8513ecfb42424e603b4ad873c18b247bceb4824467c20a51138706631e095505d0271ecea901a0e3f055
6
+ metadata.gz: 3cef3a1512b31ca2f07d9c11de0d89220d403a905b78de4bf4265da37ae2e8e34b51d64791455f4e111534fe84ca1f54db0173ee33148592fb389df061fab883
7
+ data.tar.gz: b7100437b7e62e38c35507338715109e4700299d58ac3d54688da33350865fa60c6d4b4c2cb6978ef9de70a497d0684c18ed5a1511fd50781e2cb628ba79d339
@@ -1,4 +1,5 @@
1
1
  require 'uri'
2
+ require 'fileutils'
2
3
  require 'open-uri'
3
4
  require 'net/http'
4
5
 
@@ -8,6 +9,10 @@ end
8
9
  module URI
9
10
  def download(file)
10
11
  binary = OpenURI.open_uri(self).read
12
+ dirname = File.dirname(file)
13
+ unless File.directory?(dirname)
14
+ FileUtils.mkdir_p(dirname)
15
+ end
11
16
  ::File.open(file, 'wb') {|f| f.write(binary)}
12
17
  end
13
18
 
@@ -1,3 +1,3 @@
1
1
  module FeCoreExt
2
- VERSION = '0.12.1'
2
+ VERSION = '0.13.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fe_core_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsu