barista 0.7.0.pre2 → 0.7.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.pre2"
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-11-26}
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).
@@ -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
- raise CompilationError, "CoffeeScript encountered an error compiling #{where}: #{e.message}"
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
@@ -2,7 +2,7 @@ module Barista
2
2
  class Framework
3
3
 
4
4
  def self.default_framework
5
- @default_framework ||= self.new("default", Barista.root)
5
+ @default_framework ||= self.new(:name => "default", :root => Barista.root)
6
6
  end
7
7
 
8
8
  def self.default_framework=(value)
@@ -3,6 +3,6 @@ module Barista
3
3
  MAJOR = 0
4
4
  MINOR = 7
5
5
  PATCH = 0
6
- STRING = [MAJOR, MINOR, PATCH, 'pre2'].join(".")
6
+ STRING = [MAJOR, MINOR, PATCH, 'pre3'].join(".")
7
7
  end
8
8
  end
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: -1876988199
4
+ hash: -1876988218
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
9
  - 0
10
- - pre2
11
- version: 0.7.0.pre2
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-11-26 00:00:00 +08:00
19
+ date: 2010-12-10 00:00:00 +08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency