barista 0.7.0.pre2 → 0.7.0.pre3
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.
- data/barista.gemspec +2 -2
- data/lib/barista/compiler.rb +7 -2
- data/lib/barista/framework.rb +1 -1
- data/lib/barista/version.rb +1 -1
- metadata +4 -4
data/barista.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{barista}
|
8
|
-
s.version = "0.7.0.
|
8
|
+
s.version = "0.7.0.pre3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Darcy Laycock"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-12-10}
|
13
13
|
s.description = %q{Barista provides simple, integrated support for CoffeeScript in Rack and Rails applications.
|
14
14
|
|
15
15
|
Much like Compass does for Sass, It also provides Frameworks (bundleable code which can be shared via Gems).
|
data/lib/barista/compiler.rb
CHANGED
@@ -90,7 +90,7 @@ module Barista
|
|
90
90
|
def compile!
|
91
91
|
location = @options.fetch(:origin, 'inline')
|
92
92
|
@compiled_content = compile(@context, location)
|
93
|
-
@compiled_content = preamble(location) + @compiled_content if Barista.add_preamble?
|
93
|
+
@compiled_content = preamble(location) + @compiled_content if location != 'inline' && Barista.add_preamble?
|
94
94
|
@compiled = true
|
95
95
|
end
|
96
96
|
|
@@ -107,7 +107,12 @@ module Barista
|
|
107
107
|
rescue CoffeeScript::Error => e
|
108
108
|
Barista.invoke_hook :compilation_failed, where, e.message
|
109
109
|
if Barista.exception_on_error? && !@options[:silence]
|
110
|
-
|
110
|
+
if e.is_a?(CoffeeScript::CompilationError)
|
111
|
+
where_within_app = where.sub(/#{Regexp.escape(Barista.app_root.to_s)}\/?/, '')
|
112
|
+
raise CompilationError, "Error: In #{where_within_app}, #{e.message}"
|
113
|
+
else
|
114
|
+
raise CompilationError, "CoffeeScript encountered an error compiling #{where}: #{e.message}"
|
115
|
+
end
|
111
116
|
end
|
112
117
|
compilation_error_for where, e.message
|
113
118
|
end
|
data/lib/barista/framework.rb
CHANGED
data/lib/barista/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barista
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -1876988218
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 0.7.0.
|
10
|
+
- pre3
|
11
|
+
version: 0.7.0.pre3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Darcy Laycock
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-12-10 00:00:00 +08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|