webify_ruby 0.0.6 → 0.0.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b0da654bc573523c9a6b33c2a51be467b56e937
|
4
|
+
data.tar.gz: d63d09b4e29593fa8690d32f784bddaf6cc60bb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb1e6a3d56c56834e11dba1b9ab573b7b7a407a2883f05bf77d6085133784f14ba9b54c7fce7d7bba2147b040a0b266aedae9126f9f65c9e34707d1a7e802b4c
|
7
|
+
data.tar.gz: 161a5107a04db64ed25aeff9a9d63746e94f98b72016e0ede4647a8e338fa321a48fa7b699a5cb081466f0e439f81f6bd34e6062e1808b90587820f9847619ef
|
data/README.rdoc
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
Version 0.0.4 :: Kolxi
|
14
14
|
Version 0.0.5 :: Racha
|
15
15
|
Version 0.0.6 :: Gagra
|
16
|
+
Version 0.0.7 :: Sochi
|
16
17
|
|
17
18
|
== Usage
|
18
19
|
|
@@ -27,7 +28,7 @@ https://github.com/dachi-gh/webify/tree/executables
|
|
27
28
|
https://github.com/dachi-gh/webify
|
28
29
|
|
29
30
|
==== Add to your Gemfile
|
30
|
-
gem 'webify_ruby', '~> 0.0.
|
31
|
+
gem 'webify_ruby', '~> 0.0.7'
|
31
32
|
or git for development version
|
32
33
|
gem 'webify_ruby', :git => 'git://github.com/dachi-gh/webify_ruby.git'
|
33
34
|
|
data/lib/webify_ruby/convert.rb
CHANGED
@@ -45,17 +45,19 @@ module WebifyRuby
|
|
45
45
|
# If value is set to true, then a stylesheet file won't be created,
|
46
46
|
# but code will become accessible as :styles attribute (optional).
|
47
47
|
# :link_to - A String notation indicating how to prefix a font url in CSS (optional).
|
48
|
+
# :unique_id - A custom identifier which will separate different fonts (optional).
|
48
49
|
#
|
49
50
|
# Returns nothing.
|
50
51
|
# Raises Errno::ENOENT if the inputted file cannot be found.
|
51
52
|
# Raises Error if the inputted font file is not withing valid extensions.
|
52
53
|
# Raises Error::ENOENT if the directory of inputted file is not accessible.
|
53
|
-
def initialize(file, dir: nil, css: nil, link_to: nil)
|
54
|
-
[file, dir, css, link_to]
|
54
|
+
def initialize(file, dir: nil, css: nil, link_to: nil, unique_id: nil)
|
55
|
+
[file, dir, css, link_to, unique_id]
|
55
56
|
|
56
57
|
@desired_dir = dir
|
57
58
|
@css = css
|
58
59
|
@link_to = link_to
|
60
|
+
@unique_id = unique_id
|
59
61
|
|
60
62
|
raise Errno::ENOENT, "The font file '#{file}' does not exist" unless File.exists?(file)
|
61
63
|
@original_file = file
|
@@ -66,6 +68,12 @@ module WebifyRuby
|
|
66
68
|
raise Errno::ENOENT, "Can't find directory '#{@original_dir}'" unless File.directory? @original_dir
|
67
69
|
|
68
70
|
@result_dir = Dir.mktmpdir(nil, destination_dir)
|
71
|
+
|
72
|
+
unless @unique_id.nil?
|
73
|
+
custom_dir = File.join(File.expand_path('..', @result_dir), @unique_id)
|
74
|
+
FileUtils.mv @result_dir, custom_dir
|
75
|
+
@result_dir = custom_dir
|
76
|
+
end
|
69
77
|
|
70
78
|
FileUtils.cp(@original_file, @result_dir)
|
71
79
|
|
data/lib/webify_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webify_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dachi Natsvlishvili
|
@@ -440,7 +440,6 @@ files:
|
|
440
440
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73341-ckz6g0/bpg_dedaena_nonblock.woff
|
441
441
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-1b8lmlp/bpg_dedaena_nonblock.eot
|
442
442
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-1b8lmlp/bpg_dedaena_nonblock.svg
|
443
|
-
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-1b8lmlp/bpg_dedaena_nonblock.ttf
|
444
443
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-1b8lmlp/bpg_dedaena_nonblock.woff
|
445
444
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-pz1wu1/bpg_dedaena_nonblock.eot
|
446
445
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-pz1wu1/bpg_dedaena_nonblock.svg
|
@@ -855,7 +854,6 @@ test_files:
|
|
855
854
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73341-ckz6g0/bpg_dedaena_nonblock.woff
|
856
855
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-1b8lmlp/bpg_dedaena_nonblock.eot
|
857
856
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-1b8lmlp/bpg_dedaena_nonblock.svg
|
858
|
-
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-1b8lmlp/bpg_dedaena_nonblock.ttf
|
859
857
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-1b8lmlp/bpg_dedaena_nonblock.woff
|
860
858
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-pz1wu1/bpg_dedaena_nonblock.eot
|
861
859
|
- test/webify_ruby_rails/public/ttf_convert/d20140211-73431-pz1wu1/bpg_dedaena_nonblock.svg
|