webify_ruby 0.0.5 → 0.0.6

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: b1f7127f1f895d7361f23adcd0fc7aa766a87ecd
4
- data.tar.gz: 4f8148a2d3bbaf20a12aec5fed35cedd58d67123
3
+ metadata.gz: 1d663c9fba84cf14a908e588ea1950f5fac73231
4
+ data.tar.gz: 0396ba04df2889511da2eb4db5603847e523b2e0
5
5
  SHA512:
6
- metadata.gz: f217d2fa2033c4abd14aefb28b867c5ac50abae2f21cdb19e24d28c366f40a1ba7d499b2c02c101e3af966df12281e2615b167d473ec7565161e3f9cf97aa7f2
7
- data.tar.gz: 6c3d504df49188509fd05daea1e020887b1f91014a0b601bf2801f41be2a607f9f196801e66cdb2f769af472476407cc3e90d82bd1a9ea134529922357a73d67
6
+ metadata.gz: 02d36346c4736b6ed394948784d7e299001aa6d84106a949ca6efe50fcf4975dcb7c84340fef00aff4c54580cf7a29d0d0e1bd9c8695836ef460fc0898d65a0d
7
+ data.tar.gz: 58514fd303fe7228a9a18e1aad91cbd33eace632cf7ed7080c0b7b5c3cdd056a97fb0c2c9c94e49a9fc1844ffee6da5d58ff156a425916720bb8b9a66401d60f
data/README.rdoc CHANGED
@@ -12,6 +12,7 @@
12
12
  Version 0.0.3 :: Vani
13
13
  Version 0.0.4 :: Kolxi
14
14
  Version 0.0.5 :: Racha
15
+ Version 0.0.6 :: Gagra
15
16
 
16
17
  == Usage
17
18
 
@@ -26,7 +27,7 @@ https://github.com/dachi-gh/webify/tree/executables
26
27
  https://github.com/dachi-gh/webify
27
28
 
28
29
  ==== Add to your Gemfile
29
- gem 'webify_ruby', '~> 0.0.5'
30
+ gem 'webify_ruby', '~> 0.0.6'
30
31
  or git for development version
31
32
  gem 'webify_ruby', :git => 'git://github.com/dachi-gh/webify_ruby.git'
32
33
 
@@ -33,6 +33,8 @@ module WebifyRuby
33
33
  attr_reader :link_to
34
34
  # Public: Returns the String CSS stylesheet code if possible.
35
35
  attr_reader :styles
36
+ # Public: Returns the filepath of CSS file created if applicable.
37
+ attr_reader :css_file
36
38
 
37
39
  # Public: Initialize a Convertion of font-file.
38
40
  #
@@ -102,7 +104,7 @@ module WebifyRuby
102
104
  # Method generates Css if attribute is present and writes to a file
103
105
  # if attribute possibly is a directory.
104
106
  #
105
- # Returns the Fixnum length of CSS code written or nothing.
107
+ # Returns the CSS filepath, code written or nothing.
106
108
  def generate_css
107
109
  needs = affected_files.map { |m| File.extname(m)[1..-1].to_sym }
108
110
 
@@ -115,7 +117,7 @@ module WebifyRuby
115
117
  css = WebifyRuby::Css.new(File.basename(@file, ".*"), @file, *needs)
116
118
  @styles = css.result
117
119
 
118
- css.write @css if should_write_css?
120
+ @css_file = css.write @css if should_write_css?
119
121
  end
120
122
 
121
123
  protected
@@ -109,13 +109,14 @@ module WebifyRuby
109
109
  #
110
110
  # dir - The String directory path to write CSS file to.
111
111
  #
112
- # Returns the Fixnum length of characters written.
112
+ # Returns the css file just written.
113
113
  def write(dir)
114
114
  @dir = FileUtils.mkdir_p dir
115
115
  @css_file = File.join(@dir, @filename + '.css')
116
116
 
117
117
  File.delete(@css_file) if File.exist?(@css_file)
118
118
  @output = File.open(@css_file, 'w') { |file| file.write(@result) }
119
+ @css_file
119
120
  end
120
121
 
121
122
  private
@@ -1,4 +1,4 @@
1
1
  module WebifyRuby
2
2
  # Public: WebifyRuby version
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dachi Natsvlishvili