barista 0.5.1 → 0.6.0
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/.rspec +2 -0
- data/.rvmrc +1 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +27 -0
- data/README.md +35 -9
- data/Rakefile +6 -0
- data/barista.gemspec +33 -5
- data/lib/barista.rb +20 -3
- data/lib/barista/compiler.rb +30 -65
- data/lib/barista/compilers.rb +9 -0
- data/lib/barista/compilers/base.rb +39 -0
- data/lib/barista/compilers/native.rb +55 -0
- data/lib/barista/compilers/node.rb +59 -0
- data/lib/barista/version.rb +2 -2
- data/lib/coffee-script/coffee-script-0.9.4.js +469 -0
- data/lib/generators/{barista_install → barista/install}/USAGE +1 -1
- data/lib/generators/barista/install/install_generator.rb +13 -0
- data/lib/generators/{barista_install → barista/install}/templates/initializer.rb +26 -0
- data/lib/generators/barista_install_generator.rb +4 -0
- data/spec/barista_spec.rb +15 -0
- data/spec/spec_helper.rb +11 -0
- metadata +85 -10
- data/lib/generators/barista_install/barista_install_generator.rb +0 -11
@@ -0,0 +1,13 @@
|
|
1
|
+
module Barista
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
|
5
|
+
source_root File.expand_path("templates", File.dirname(__FILE__))
|
6
|
+
|
7
|
+
def create_initializer
|
8
|
+
copy_file 'initializer.rb', 'config/initializers/barista_config.rb'
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -7,6 +7,8 @@ Barista.configure do |c|
|
|
7
7
|
# Change the output root, causing Barista to compile into public/coffeescripts
|
8
8
|
# c.output_root = Rails.root.join("public", "coffeescripts")
|
9
9
|
|
10
|
+
# Set the compiler
|
11
|
+
|
10
12
|
# Disable wrapping in a closure:
|
11
13
|
# c.no_wrap = true
|
12
14
|
# ... or ...
|
@@ -33,4 +35,28 @@ Barista.configure do |c|
|
|
33
35
|
# c.on_compilation_error { |path, output| puts "Barista: Compilation of #{path} failed with:\n#{output}" }
|
34
36
|
# c.on_compilation_with_warning { |path, output| puts "Barista: Compilation of #{path} had a warning:\n#{output}" }
|
35
37
|
|
38
|
+
# Turn off preambles and exceptions on failure
|
39
|
+
|
40
|
+
# c.verbose = false
|
41
|
+
|
42
|
+
# Or, make sure it is always on
|
43
|
+
# c.verbose!
|
44
|
+
|
45
|
+
# Changing the compiler
|
46
|
+
|
47
|
+
# To use a customer compiler class:
|
48
|
+
# c.compiler_klass = MyAwesomeCompilerClass
|
49
|
+
# c.compiler = :null # Barista::Compilers::Null
|
50
|
+
|
51
|
+
# To switch between the built in compilers:
|
52
|
+
# c.compiler = :native
|
53
|
+
# or...
|
54
|
+
# c.compiler = :node
|
55
|
+
|
56
|
+
# The default compiler is auto detected.
|
57
|
+
|
58
|
+
# If you want to use a custom JS file, you can as well
|
59
|
+
# e.g. vendoring CoffeeScript in your application:
|
60
|
+
# c.js_path = Rails.root.join('public', 'javascripts', 'coffee-script.js')
|
61
|
+
|
36
62
|
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barista
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Darcy Laycock
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-15 00:00:00 +08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -32,6 +32,68 @@ dependencies:
|
|
32
32
|
version: "0"
|
33
33
|
type: :runtime
|
34
34
|
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: railties
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 7
|
44
|
+
segments:
|
45
|
+
- 3
|
46
|
+
- 0
|
47
|
+
version: "3.0"
|
48
|
+
type: :runtime
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: rspec
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ~>
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 62196431
|
59
|
+
segments:
|
60
|
+
- 2
|
61
|
+
- 0
|
62
|
+
- 0
|
63
|
+
- beta
|
64
|
+
- 22
|
65
|
+
version: 2.0.0.beta.22
|
66
|
+
type: :development
|
67
|
+
version_requirements: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rr
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 15
|
77
|
+
segments:
|
78
|
+
- 1
|
79
|
+
- 0
|
80
|
+
version: "1.0"
|
81
|
+
type: :development
|
82
|
+
version_requirements: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: therubyracer
|
85
|
+
prerelease: false
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
hash: 3
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
version: "0"
|
95
|
+
type: :development
|
96
|
+
version_requirements: *id005
|
35
97
|
description: Automatically compiles app/coffeescripts/*.coffee to javascript for rails awesomesauce.
|
36
98
|
email: sutto@sutto.net
|
37
99
|
executables: []
|
@@ -44,6 +106,10 @@ extra_rdoc_files:
|
|
44
106
|
files:
|
45
107
|
- .document
|
46
108
|
- .gitignore
|
109
|
+
- .rspec
|
110
|
+
- .rvmrc
|
111
|
+
- Gemfile
|
112
|
+
- Gemfile.lock
|
47
113
|
- LICENSE
|
48
114
|
- README.md
|
49
115
|
- Rakefile
|
@@ -52,14 +118,22 @@ files:
|
|
52
118
|
- config/routes.rb
|
53
119
|
- lib/barista.rb
|
54
120
|
- lib/barista/compiler.rb
|
121
|
+
- lib/barista/compilers.rb
|
122
|
+
- lib/barista/compilers/base.rb
|
123
|
+
- lib/barista/compilers/native.rb
|
124
|
+
- lib/barista/compilers/node.rb
|
55
125
|
- lib/barista/filter.rb
|
56
126
|
- lib/barista/framework.rb
|
57
127
|
- lib/barista/hooks.rb
|
58
128
|
- lib/barista/tasks/barista.rake
|
59
129
|
- lib/barista/version.rb
|
60
|
-
- lib/
|
61
|
-
- lib/generators/
|
62
|
-
- lib/generators/
|
130
|
+
- lib/coffee-script/coffee-script-0.9.4.js
|
131
|
+
- lib/generators/barista/install/USAGE
|
132
|
+
- lib/generators/barista/install/install_generator.rb
|
133
|
+
- lib/generators/barista/install/templates/initializer.rb
|
134
|
+
- lib/generators/barista_install_generator.rb
|
135
|
+
- spec/barista_spec.rb
|
136
|
+
- spec/spec_helper.rb
|
63
137
|
has_rdoc: true
|
64
138
|
homepage: http://github.com/Sutto/barista
|
65
139
|
licenses: []
|
@@ -94,5 +168,6 @@ rubygems_version: 1.3.7
|
|
94
168
|
signing_key:
|
95
169
|
specification_version: 3
|
96
170
|
summary: Transparent coffeescript support for rails 3.
|
97
|
-
test_files:
|
98
|
-
|
171
|
+
test_files:
|
172
|
+
- spec/barista_spec.rb
|
173
|
+
- spec/spec_helper.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
class BaristaInstallGenerator < Rails::Generators::Base
|
2
|
-
|
3
|
-
def self.source_root
|
4
|
-
@_ps_source_root ||= File.expand_path("templates", File.dirname(__FILE__))
|
5
|
-
end
|
6
|
-
|
7
|
-
def create_initializer
|
8
|
-
copy_file 'initializer.rb', 'config/initializers/barista_config.rb'
|
9
|
-
end
|
10
|
-
|
11
|
-
end
|