web_font 0.1.7 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2360cdd2557cba87009c058e99e702f67330cd24
4
- data.tar.gz: cf0a404127d90afb109929ddf5a0323247ce6cc6
3
+ metadata.gz: daeb84b7a30eadf77b86b9daa99d87bed84b13e0
4
+ data.tar.gz: c56b53d8ce58b1a8c6e27d617443f0582c04760f
5
5
  SHA512:
6
- metadata.gz: 046ece7009cb087bcc67018476a94e613a6d6b1136d888175fdfd91c2be66c8f08a34679df5cf47912181f927ea3e1af9a4a2b4bb056b9e1358b653ba62b5307
7
- data.tar.gz: d4cbe132286800094fa7af36e833a7e5e9feced1cf5fb85592601fb2f2fc2349ac5dfbb76bfcad698fb6c77d90eb581b344529d3ef7e0e1391bd521e7333c42f
6
+ metadata.gz: e4dc2db56c1da156a841ad553d1064ce689d690355d24e981711140fa35f1dcd95af2dc423922fc7a28285050eac6e5f9cccc85e9b518232e61c68526e9316f5
7
+ data.tar.gz: 23a98fff3217a4898bbab6bfa6ec01641c4ffac6627cac486bec72ebd8214fe2f10a680fbfeb8bc1817365bf9c82c7d5f18ee7adfea389778272be5d7152464f
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ Rake::TestTask.new do |t|
7
7
  end
8
8
  task default: :test
9
9
 
10
- # ENV['GOOGLE_API_KEY'] ||= ''
10
+ ENV['GOOGLE_API_KEY'] ||= 'AIzaSyDhMw8jN0DSS6mLn17fRgMYPcOLblDD3XY'
11
11
  WebFont::Index.path = File.expand_path('../cache/index', __FILE__)
12
12
 
13
13
  WebFont::LocalCache.cache = true
@@ -25,11 +25,14 @@ module WebFont
25
25
  downloader = WebFont::Downloader.new
26
26
  cache_path = WebFont::LocalCache.cache_path
27
27
 
28
- if WebFont::LocalCache.enable?
29
- FileUtils.mkdir_p(cache_path)
28
+ unless WebFont::LocalCache.cache
29
+ raise 'WebFont::LocalCache.cache is false.'
30
+ end
31
+
32
+ if cache_path
33
+ FileUtils.mkdir_p(cache_path) if !Dir.exist?(cache_path)
30
34
  else
31
- raise 'WebFont::LocalCache.cache_path is empty or ' +
32
- 'WebFont::LocalCache.cache is false.'
35
+ raise 'WebFont::LocalCache.cache_path is empty.'
33
36
  end
34
37
 
35
38
  file_path = "#{WebFont::Index.path}/fonts.json"
@@ -1,3 +1,3 @@
1
1
  module WebFont
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_font
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sophy Eung