mercury 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/coffee_script.rb +13 -0
- data/lib/mercury.rb +7 -0
- data/lib/mercury/helpers.rb +6 -0
- metadata +3 -2
data/lib/mercury.rb
CHANGED
@@ -4,12 +4,19 @@ require 'fileutils'
|
|
4
4
|
require 'faker'
|
5
5
|
require File.dirname(__FILE__) + '/mercury/helpers'
|
6
6
|
require File.dirname(__FILE__) + '/mercury/images'
|
7
|
+
require 'coffee_script'
|
8
|
+
require 'sass/plugin/rack'
|
9
|
+
|
7
10
|
|
8
11
|
# Core Sinatra application to run mercury apps
|
9
12
|
class Mercury < Sinatra::Application
|
13
|
+
use Sass::Plugin::Rack
|
14
|
+
|
10
15
|
helpers Sinatra::MercuryHelpers
|
11
16
|
register Sinatra::MercuryImages
|
12
17
|
|
18
|
+
|
19
|
+
|
13
20
|
set :root, FileUtils.pwd.gsub("\n",'')
|
14
21
|
set :public, File.dirname(__FILE__) + '/public'
|
15
22
|
set :views, FileUtils.pwd.gsub("\n",'') + '/wwwroot'
|
data/lib/mercury/helpers.rb
CHANGED
@@ -18,6 +18,12 @@ module Sinatra
|
|
18
18
|
COFFEE = 'coffee'
|
19
19
|
CSS = 'css'
|
20
20
|
SCSS = 'scss'
|
21
|
+
RUBY = 'rb'
|
22
|
+
|
23
|
+
def ruby(rubyfile)
|
24
|
+
instance_eval(open_file(find_file(rubyfile, RUBY)))
|
25
|
+
end
|
26
|
+
|
21
27
|
|
22
28
|
def css(cssfile)
|
23
29
|
render_script open_file(find_file(cssfile, CSS)), 'css'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mercury
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Wilson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-04-
|
12
|
+
date: 2010-04-08 00:00:00 -04:00
|
13
13
|
default_executable: mercury
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -62,6 +62,7 @@ extra_rdoc_files:
|
|
62
62
|
- LICENSE
|
63
63
|
- README.rdoc
|
64
64
|
files:
|
65
|
+
- lib/coffee_script.rb
|
65
66
|
- lib/mercury.rb
|
66
67
|
- lib/mercury/helpers.rb
|
67
68
|
- lib/mercury/images.rb
|