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 +4 -4
- data/README.rdoc +2 -1
- data/lib/webify_ruby/convert.rb +4 -2
- data/lib/webify_ruby/css.rb +2 -1
- data/lib/webify_ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d663c9fba84cf14a908e588ea1950f5fac73231
|
4
|
+
data.tar.gz: 0396ba04df2889511da2eb4db5603847e523b2e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
|
data/lib/webify_ruby/convert.rb
CHANGED
@@ -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
|
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
|
data/lib/webify_ruby/css.rb
CHANGED
@@ -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
|
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
|
data/lib/webify_ruby/version.rb
CHANGED