vae 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWYwNWIxZWM2ZmU3NmMzNmRkM2MyMmIxNDFjMmRlMWQ0ZmE1ZGQzYQ==
4
+ YzE3ZDY1ZjdmN2NjMjcyMzY0Njc0MWQ4Y2Q0NTI3NDVkODQ3OWI2YQ==
5
5
  data.tar.gz: !binary |-
6
- ODI1MDllMjllZjY0ODZjOTdkOTk3ZmVhOTM3NDE2NGEyMWZiNWVjYQ==
6
+ MDlkY2YwZTI2ZWFmYmQ2ZWUzZTczMTQwOTQzMmQ4MTQyYmVkZDhhYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NTljZTVhODA3OWY0ZmRhZDlhNzAzOTUwZmU1ZWE4Yjk1YjRiNGZlODg4NDgx
10
- ZWVjZWMzN2NjNzFhODE5Yjk2YWZhNmUzODNjNDY5NWYyMjBmMDFhNWY5MjA1
11
- MmFjYzg5MTg1NTNjMzEyZjZjNzI1MGNhYmJiZGNjMTBjODg2ZTE=
9
+ NjVjMDY1MGVkNDIwNDNlYzBkMTY0ZmI5YmM1MDM2ODllZGZlZWJiNjMyMjk4
10
+ M2VlMTY1NDBhZTRmYWI1ZGE1NDM5YWY0NGY0YWE0ODAwZDU4Y2RmOWZkOGU4
11
+ YjA2NjNhYjIwMDVkNmViMDA1YzJiNmUwZjQ2MmExYzJiYmE3NTQ=
12
12
  data.tar.gz: !binary |-
13
- NzhkN2MwODVlZDdiMDIxZWNjMmMxNWU1Zjc0YzBjNTM0ZjgyOTkyZmM5OGIx
14
- OGVmMzllNGQ2OWIzZGI2NjcwYjliZmM1YWVhMjk4YmYyZTcyODg1OTllNzQw
15
- YWI5OWVjNDBjNjRjNzE1MzRlM2YyZmMyNDkyM2I3ZmMyYWE3YTk=
13
+ M2JkYTAzZGY3Yjc2NTMwMGMxMzAzYjZjYzI4NGE4ZTFjMzhmMTFkNGZmMzRk
14
+ M2M0ZTRkOWNlMTU0NmEzYjMyNDg1MWI4ODI0NmQxMGNhZGE1YjU1MWVmZjli
15
+ MjI4NmNhODZkNWVkNDVjOGIwY2FjOWMyNjRiZWU1OGIyYzBmNGU=
@@ -102,7 +102,12 @@ class VaeSiteServlet < Servlet
102
102
  return nil unless local_path.length > 0
103
103
  get_source_file(local_path)
104
104
  end
105
-
105
+
106
+ def get_line_from_sass_exception(exception)
107
+ return exception.message.scan(/:(\d+)/).first.first if exception.is_a?(::SyntaxError)
108
+ exception.backtrace[0].scan(/:(\d+)/).first.first
109
+ end
110
+
106
111
  def not_modified?(req, res, mtime, etag)
107
112
  return true if (ims = req.params['IF_MODIFIED_SINCE']) && Time.parse(ims) >= mtime
108
113
  return true if (inm = req.params['IF_NONE_MATCH']) && WEBrick::HTTPUtils::split_header_value(inm).member?(etag)
@@ -113,10 +118,12 @@ class VaeSiteServlet < Servlet
113
118
  begin
114
119
  options = Compass.sass_engine_options
115
120
  options[:load_paths] << File.dirname(local_path)
121
+ options[:syntax] = :scss if local_path =~ /\.scss$/
116
122
  engine = Sass::Engine.new(open(local_path, "rb").read, options)
117
123
  engine.render
118
124
  rescue Sass::SyntaxError => e
119
125
  e.message
126
+ "Sass Syntax Error on line #{get_line_from_sass_exception(e)} #{e.message}"
120
127
  end
121
128
  end
122
129
 
@@ -139,7 +146,7 @@ class VaeSiteServlet < Servlet
139
146
  else
140
147
  mtype = WEBrick::HTTPUtils::mime_type(local_path, WEBrick::HTTPUtils::DefaultMimeTypes)
141
148
  res.header['last-modified'] = mtime.httpdate
142
- if req.params["REQUEST_URI"] =~ /.sass$/
149
+ if req.params["REQUEST_URI"] =~ /\.(sass|scss)$/
143
150
  res.header['Content-Type'] = "text/css"
144
151
  res.body << render_sass(local_path)
145
152
  else
@@ -1 +1 @@
1
- VER = "0.6.1"
1
+ VER = "0.6.2"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Action Verb, LLC
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-06 00:00:00.000000000 Z
12
+ date: 2013-09-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chunky_png