webify_ruby 0.1.1 → 0.1.2

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: df7c60c404d181e5c118aaa2e9bfe1f3310e5a43
4
- data.tar.gz: 59e2e747a4511c3d85db65f636ed5f8073399b67
3
+ metadata.gz: f94685633063500b756c61864f275b2fdbf51a37
4
+ data.tar.gz: 6a41e8167b22cb480b06840c922a93256c08e225
5
5
  SHA512:
6
- metadata.gz: 0fe0a3023f824e370a5e98ec0588853618a9ee9f8771e027b6eb8e1e33d966ce3871bf6627b4564789bb091acc5b5a3adbecbcf6eb0f3d7a22334a0d3b4e4fa3
7
- data.tar.gz: 1519bf20766b028a50ba9fa7aa421693e57ea38fbe65e71f73e0becba1793c7e20f2bc1ec35ff7fa94053c6e00e9971a8bba622bb7d74653a37d0ad01ba6df43
6
+ metadata.gz: 148f1815c8e1e7c1d76ba9768ed7f74384cf008547b8e40afd05b7fd76f5140c24d6168fadbd5e1ea3a3da1ab0d25c9974ca364ce1051050e0c4f935c47cbc7c
7
+ data.tar.gz: 552e56e1f427ae08dabde4423dbfd0ef4a0147af5e049f6b72f7a0baf76a9a663708d0be73bc061f3cec6988a4a57b724ff8d8548aa8d9a6db99dbdba9d5ce88
data/README.rdoc CHANGED
@@ -7,16 +7,7 @@
7
7
 
8
8
  = WebifyRuby - Haskell Webify bindings gem for Ruby and Rails Applications
9
9
 
10
- Version 0.0.1 :: Lazi
11
- Version 0.0.2 :: Gali
12
- Version 0.0.3 :: Vani
13
- Version 0.0.4 :: Kolxi
14
- Version 0.0.5 :: Racha
15
- Version 0.0.6 :: Gagra
16
- Version 0.0.7 :: Sochi
17
- Version 0.0.8 :: Poti
18
- Version 0.1.0 :: Kaspi
19
- Version 0.1.1 :: Sarpi
10
+ Latest version: 0.1.2
20
11
 
21
12
  == Generated HTML preview
22
13
 
@@ -35,7 +26,7 @@ https://github.com/dachi-gh/webify/tree/executables
35
26
  https://github.com/dachi-gh/webify
36
27
 
37
28
  ==== Add to your Gemfile
38
- gem 'webify_ruby', '~> 0.1.1'
29
+ gem 'webify_ruby', '~> 0.1.2'
39
30
  or git for development version
40
31
  gem 'webify_ruby', :git => 'git://github.com/dachi-gh/webify_ruby.git'
41
32
 
@@ -35,32 +35,38 @@ module WebifyRuby
35
35
  attr_reader :styles
36
36
  # Public: Returns the filepath of CSS file created if applicable.
37
37
  attr_reader :css_file
38
+ # Public: Returns the html_file that bas been createde
39
+ attr_reader :html_file
40
+ # Public: Returns the value of custom css file link
41
+ attr_reader :link_to_css
38
42
 
39
43
  # Public: Initialize a Convertion of font-file.
40
44
  #
41
- # file - A String containing relative or full path of file to convert.
42
- # :dir - A String indicating to the desired to save converted files (optional).
43
- # :css - A String or Boolean value indicating a desired CSS behavior.
44
- # If present, it can be either directory path in String or Boolean.
45
- # If value is set to true, then a stylesheet file won't be created,
46
- # but code will become accessible as :styles attribute (optional).
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).
49
- # :html - If present, it will create an HTML file in the given directory.
50
- # Note: CSS has to be set to generate a file too. (optional).
45
+ # file - A String containing relative or full path of file to convert.
46
+ # :dir - A String indicating to the desired to save converted files (optional).
47
+ # :css - A String or Boolean value indicating a desired CSS behavior.
48
+ # If present, it can be either directory path in String or Boolean.
49
+ # If value is set to true, then a stylesheet file won't be created,
50
+ # but code will become accessible as :styles attribute (optional).
51
+ # :link_to - A String notation indicating how to prefix a font url in CSS (optional).
52
+ # :unique_id - A custom identifier which will separate different fonts (optional).
53
+ # :html - If present, it will create an HTML file in the given directory.
54
+ # Note: CSS has to be set to generate a file too. (optional).
55
+ # :link_to_css - Css file to link to. (optional).
51
56
  #
52
57
  # Returns nothing.
53
58
  # Raises Errno::ENOENT if the inputted file cannot be found.
54
59
  # Raises Error if the inputted font file is not withing valid extensions.
55
60
  # Raises Error::ENOENT if the directory of inputted file is not accessible.
56
- def initialize(file, dir: nil, css: nil, link_to: nil, unique_id: nil, html: nil)
57
- [file, dir, css, link_to, unique_id, html]
61
+ def initialize(file, dir: nil, css: nil, link_to: nil, unique_id: nil, html: nil, link_to_css: nil)
62
+ [file, dir, css, link_to, unique_id, html, link_to_css]
58
63
 
59
64
  @desired_dir = dir
60
65
  @css = css
61
66
  @link_to = link_to
62
67
  @unique_id = unique_id
63
68
  @html = html
69
+ @link_to_css = link_to_css
64
70
 
65
71
  raise Errno::ENOENT, "The font file '#{file}' does not exist" unless File.exists?(file)
66
72
  @original_file = file
@@ -141,8 +147,10 @@ module WebifyRuby
141
147
  def generate_html
142
148
  return false if @css_file.nil? or @html.nil?
143
149
 
144
- html = WebifyRuby::Html.new(@css_file, @html)
145
- @html_file = html.result
150
+ css_link = @link_to_css.nil? ? @css_file : @link_to_css
151
+
152
+ html = WebifyRuby::Html.new(css_link, @html)
153
+ @html_file = html.html_file
146
154
  end
147
155
 
148
156
  protected
@@ -1,4 +1,4 @@
1
1
  module WebifyRuby
2
2
  # Public: WebifyRuby version
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webify_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dachi Natsvlishvili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-16 00:00:00.000000000 Z
11
+ date: 2014-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler