massimo 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +4 -0
- data/Gemfile +0 -0
- data/README.md +22 -10
- data/Rakefile +1 -1
- data/bin/massimo +1 -0
- data/lib/massimo/cli.rb +3 -3
- data/lib/massimo/config.rb +80 -0
- data/lib/massimo/javascript.rb +11 -36
- data/lib/massimo/page.rb +1 -1
- data/lib/massimo/site.rb +12 -1
- data/lib/massimo/stylesheet.rb +3 -1
- data/lib/massimo/templates/site/Gemfile.tt +8 -0
- data/lib/massimo/templates/site/config.rb +2 -8
- data/lib/massimo/templates/site/config.ru +1 -1
- data/lib/massimo/templates/site/pages/{index.erb → index.html.erb} +0 -0
- data/lib/massimo/templates/site/stylesheets/{main.scss → main.css.scss} +0 -0
- data/lib/massimo/templates/site/views/layouts/{main.erb → main.html.erb} +2 -2
- data/lib/massimo/version.rb +1 -1
- data/massimo.gemspec +20 -24
- data/spec/massimo/cli_spec.rb +38 -27
- data/spec/massimo/config_spec.rb +67 -12
- data/spec/massimo/javascript_spec.rb +46 -22
- data/spec/massimo/page_spec.rb +2 -1
- data/spec/massimo/stylesheet_spec.rb +60 -0
- data/spec/massimo/ui_spec.rb +3 -3
- data/spec/spec_helper.rb +27 -20
- metadata +76 -154
data/.travis.yml
ADDED
data/Gemfile
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -1,30 +1,42 @@
|
|
1
|
-
|
1
|
+
Massimo
|
2
|
+
=======
|
2
3
|
|
3
4
|
Massimo is a static website builder that allows you to use dynamic technologies such as Haml & Sass for rapid development.
|
4
5
|
|
5
6
|
*Massimo's code is inspired by other website generators like [Jekyll](http://github.com/mojombo/jekyll) and [Webby](http://webby.rubyforge.org/).*
|
6
7
|
|
7
|
-
|
8
|
+
Features
|
9
|
+
--------
|
8
10
|
|
9
11
|
* Renders templates and views using [Tilt](http://github.com/rtomayko/tilt)
|
10
12
|
* Uses familiar helper methods from [Padrino::Helpers](http://github.com/padrino/padrino-framework)
|
11
13
|
* Supports custom helper methods like [Rails](http://rubyonrails.org/) and [Sinatra](http://www.sinatrarb.com/)
|
12
14
|
* Concats javascripts using [Sprockets](http://getsprockets.org/)
|
13
|
-
and then
|
15
|
+
and then compresses them using whichever library you want.
|
14
16
|
* Renders stylesheets using either [Sass](http://sass-lang.com/) or [Less](http://lesscss.org/)
|
15
17
|
* Automatically creates pretty URLs
|
16
18
|
|
17
|
-
|
19
|
+
Installation
|
20
|
+
-----------
|
21
|
+
|
22
|
+
``` bash
|
23
|
+
$ gem install massimo
|
24
|
+
```
|
25
|
+
|
26
|
+
Getting Started
|
27
|
+
---------------
|
18
28
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
29
|
+
``` bash
|
30
|
+
$ massimo new my-site
|
31
|
+
$ cd my-site
|
32
|
+
$ massimo build
|
33
|
+
```
|
23
34
|
|
24
35
|
For more information, visit [http://massimo.petebrowne.com/](http://massimo.petebrowne.com/).
|
25
36
|
|
26
37
|
For an example of a site built by massimo, visit [http://github.com/petebrowne/massimo-site](http://github.com/petebrowne/massimo-site).
|
27
38
|
|
28
|
-
|
39
|
+
Copyright
|
40
|
+
---------
|
29
41
|
|
30
|
-
Copyright (c)
|
42
|
+
Copyright (c) 2011 [Peter Browne](http://petebrowne.com). See LICENSE for details.
|
data/Rakefile
CHANGED
data/bin/massimo
CHANGED
data/lib/massimo/cli.rb
CHANGED
@@ -24,11 +24,11 @@ module Massimo
|
|
24
24
|
end
|
25
25
|
map 'b' => :build
|
26
26
|
|
27
|
-
desc '
|
28
|
-
def
|
27
|
+
desc 'new SITE_NAME', 'Generates a new site with the give name'
|
28
|
+
def new(site_name)
|
29
29
|
directory 'site', site_name
|
30
30
|
end
|
31
|
-
map
|
31
|
+
map %w(n generate g) => :new
|
32
32
|
|
33
33
|
desc 'server [PORT]', 'Runs a local Rack based web server on the given port'
|
34
34
|
def server(port = 3000)
|
data/lib/massimo/config.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'active_support/core_ext/hash/keys'
|
2
2
|
require 'active_support/string_inquirer'
|
3
|
+
require 'crush'
|
3
4
|
require 'ostruct'
|
5
|
+
require 'tilt'
|
4
6
|
require 'yaml'
|
5
7
|
|
6
8
|
module Massimo
|
@@ -17,6 +19,20 @@ module Massimo
|
|
17
19
|
:stylesheets_url => '/stylesheets'
|
18
20
|
}.freeze
|
19
21
|
|
22
|
+
JS_COMPRESSORS = {
|
23
|
+
:jsmin => Crush::JSMin,
|
24
|
+
:packr => Crush::Packr,
|
25
|
+
:yui => Crush::YUI::JavaScriptCompressor,
|
26
|
+
:closure => Crush::Closure::Compiler,
|
27
|
+
:uglifier => Crush::Uglifier
|
28
|
+
}
|
29
|
+
|
30
|
+
CSS_COMPRESSORS = {
|
31
|
+
:cssmin => Crush::CSSMin,
|
32
|
+
:rainpress => Crush::Rainpress,
|
33
|
+
:yui => Crush::YUI::CssCompressor
|
34
|
+
}
|
35
|
+
|
20
36
|
# Creates a new configuration. Takes either a hash of options
|
21
37
|
# or a file path to a .yaml file.
|
22
38
|
def initialize(options = nil)
|
@@ -46,6 +62,69 @@ module Massimo
|
|
46
62
|
ActiveSupport::StringInquirer.new(super)
|
47
63
|
end
|
48
64
|
|
65
|
+
# Sets up Massimo to compress both JavaScript and CSS files.
|
66
|
+
#
|
67
|
+
# @param [Boolean] compress Wether or not to compress.
|
68
|
+
def compress=(compress)
|
69
|
+
Crush.register if compress
|
70
|
+
end
|
71
|
+
|
72
|
+
# Sets up Massimo to compress JavaScript files. By default,
|
73
|
+
# whichever JavaScript compression library is available, is used.
|
74
|
+
# To set the one you want to use see #js_compressor=.
|
75
|
+
#
|
76
|
+
# @param [Boolean] compress Wether or not to compress.
|
77
|
+
def compress_js=(compress)
|
78
|
+
Crush.register_js if compress
|
79
|
+
end
|
80
|
+
|
81
|
+
# Sets the JavaScript compressor to use. The compressor can
|
82
|
+
# be either a symbol mapping to the recognized Crush::Engines
|
83
|
+
# (see JS_COMPRESSORS) or any Tilt::Template.
|
84
|
+
#
|
85
|
+
# @param [Tilt::Template, Symbol] compressor The compressor to use.
|
86
|
+
def js_compressor=(compressor)
|
87
|
+
if compressor.respond_to?(:to_sym)
|
88
|
+
compressor = JS_COMPRESSORS[compressor.to_sym]
|
89
|
+
end
|
90
|
+
Tilt.prefer compressor, 'js'
|
91
|
+
end
|
92
|
+
|
93
|
+
# Sets the options used by the JavaScript compressor.
|
94
|
+
#
|
95
|
+
# @param [Hash] options The hash of options to use.
|
96
|
+
def js_compressor_options=(options)
|
97
|
+
self.js = options
|
98
|
+
end
|
99
|
+
|
100
|
+
# Sets up Massimo to compress CSS files. By default,
|
101
|
+
# whichever CSS compression library is available, is used.
|
102
|
+
# To set the one you want to use see #css_compressor=.
|
103
|
+
#
|
104
|
+
# @param [Boolean] compress Wether or not to compress.
|
105
|
+
def compress_css=(compress)
|
106
|
+
Crush.register_css if compress
|
107
|
+
end
|
108
|
+
|
109
|
+
# Sets the CSS compressor to use. The compressor can
|
110
|
+
# be either a symbol mapping to the recognized Crush::Engines
|
111
|
+
# (see CSS_COMPRESSORS) or any Tilt::Template.
|
112
|
+
#
|
113
|
+
# @param [Tilt::Template, Symbol] compressor The compressor to use.
|
114
|
+
def css_compressor=(compressor)
|
115
|
+
if compressor.respond_to?(:to_sym)
|
116
|
+
compressor = CSS_COMPRESSORS[compressor.to_sym]
|
117
|
+
end
|
118
|
+
Tilt.prefer compressor, 'css'
|
119
|
+
end
|
120
|
+
|
121
|
+
# Sets the options used by the CSS compressor.
|
122
|
+
#
|
123
|
+
# @param [Hash] options The hash of options to use.
|
124
|
+
def css_compressor_options=(options)
|
125
|
+
self.css = options
|
126
|
+
end
|
127
|
+
|
49
128
|
# Get a full, expanded path for the given resource name. This is either set
|
50
129
|
# in the configuration or determined dynamically based on the name.
|
51
130
|
def path_for(resource_name)
|
@@ -70,6 +149,7 @@ module Massimo
|
|
70
149
|
# Convience method for getting options for a given library name. For instance,
|
71
150
|
# this is how we get the options set for Haml or Sass during processing.
|
72
151
|
def options_for(lib_name)
|
152
|
+
return options_for("sass") if lib_name == "scss"
|
73
153
|
send(lib_name) || {}
|
74
154
|
end
|
75
155
|
end
|
data/lib/massimo/javascript.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'sprockets'
|
2
|
+
require 'tilt'
|
2
3
|
|
3
4
|
module Massimo
|
4
5
|
class Javascript < Massimo::Resource
|
@@ -11,42 +12,16 @@ module Massimo
|
|
11
12
|
end
|
12
13
|
|
13
14
|
def render
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
else
|
23
|
-
super
|
24
|
-
end
|
25
|
-
compress(output)
|
26
|
-
end
|
27
|
-
|
28
|
-
protected
|
29
|
-
|
30
|
-
def compress(javascript)
|
31
|
-
case Massimo.config.javascripts_compressor.to_s
|
32
|
-
when 'min', 'jsmin'
|
33
|
-
require 'jsmin' unless defined?(JSMin)
|
34
|
-
JSMin.minify(javascript)
|
35
|
-
when 'pack', 'packr'
|
36
|
-
require 'packr' unless defined?(Packr)
|
37
|
-
options = { :shrink_vars => true }.merge Massimo.config.options_for(:packr)
|
38
|
-
Packr.pack(javascript, options)
|
39
|
-
when 'yui', 'yui-compressor', 'yui/compressor'
|
40
|
-
require 'yui/compressor' unless defined?(YUI)
|
41
|
-
options = { :munge => true }.merge Massimo.config.options_for(:yui)
|
42
|
-
YUI::JavaScriptCompressor.new(options).compress(javascript)
|
43
|
-
when 'closure', 'closure-compiler', 'closure/compiler'
|
44
|
-
require 'closure-compiler' unless defined?(Closure)
|
45
|
-
options = Massimo.config.options_for(:closure)
|
46
|
-
Closure::Compiler.new(options).compile(javascript)
|
47
|
-
else
|
48
|
-
javascript
|
49
|
-
end.strip
|
15
|
+
if source_path.extname == '.js'
|
16
|
+
options = Massimo.config.options_for(:sprockets).merge(
|
17
|
+
:assert_root => Massimo.config.output_path,
|
18
|
+
:source_files => [ source_path.to_s ]
|
19
|
+
)
|
20
|
+
secretary = Sprockets::Secretary.new(options)
|
21
|
+
secretary.install_assets
|
22
|
+
@content = secretary.concatenation.to_s
|
50
23
|
end
|
24
|
+
super
|
25
|
+
end
|
51
26
|
end
|
52
27
|
end
|
data/lib/massimo/page.rb
CHANGED
data/lib/massimo/site.rb
CHANGED
@@ -17,6 +17,8 @@ module Massimo
|
|
17
17
|
@template_scope_extensions = []
|
18
18
|
Massimo.site = self
|
19
19
|
|
20
|
+
setup_bundle unless bundled?
|
21
|
+
|
20
22
|
Massimo::Reloader.reload(:config) do
|
21
23
|
instance_eval File.read(config.config_path) if File.exist?(config.config_path)
|
22
24
|
instance_eval(&block) if block_given?
|
@@ -45,7 +47,7 @@ module Massimo
|
|
45
47
|
# The scope used for templating. It includes helpers from Massimo::Helpers along
|
46
48
|
# with any custom helpers.
|
47
49
|
def template_scope
|
48
|
-
Object.new.extend(Massimo::Helpers
|
50
|
+
Object.new.extend(Massimo::Helpers).tap do |scope|
|
49
51
|
add_template_scope_blocks(scope)
|
50
52
|
add_template_scope_extensions(scope)
|
51
53
|
add_template_scope_helpers(scope)
|
@@ -71,6 +73,15 @@ module Massimo
|
|
71
73
|
|
72
74
|
protected
|
73
75
|
|
76
|
+
def bundled?
|
77
|
+
!!@bundled
|
78
|
+
end
|
79
|
+
|
80
|
+
def setup_bundle
|
81
|
+
Bundler.require(:default, config.environment.to_sym) if defined?(Bundler)
|
82
|
+
@bundled = true
|
83
|
+
end
|
84
|
+
|
74
85
|
def add_template_scope_blocks(scope)
|
75
86
|
@template_scope_blocks.each do |block|
|
76
87
|
scope.instance_eval(&block)
|
data/lib/massimo/stylesheet.rb
CHANGED
@@ -1,16 +1,10 @@
|
|
1
|
-
require 'sass'
|
2
|
-
require 'sprockets'
|
3
|
-
|
4
1
|
# This is an example configuration File
|
5
2
|
# Look here for all the available options:
|
6
3
|
# http://massimo.petebrowne.com/configuration/
|
7
4
|
|
8
5
|
if config.environment.production?
|
9
|
-
#
|
10
|
-
|
11
|
-
|
12
|
-
# Compress the output of Sass stylesheets
|
13
|
-
# config.sass = { :style => :compressed }
|
6
|
+
# Compress javascripts and stylesheets
|
7
|
+
config.compress = true
|
14
8
|
end
|
15
9
|
|
16
10
|
helpers do
|
@@ -1,2 +1,2 @@
|
|
1
|
-
require
|
1
|
+
require "massimo"
|
2
2
|
run Massimo::Server.new
|
File without changes
|
File without changes
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<head lang="en">
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<title><%= page.title %></title>
|
6
|
-
<%= stylesheet_link_tag
|
7
|
-
<%= javascript_include_tag
|
6
|
+
<%= stylesheet_link_tag "main" %>
|
7
|
+
<%= javascript_include_tag "main" %>
|
8
8
|
</head>
|
9
9
|
<body>
|
10
10
|
<%= yield %>
|
data/lib/massimo/version.rb
CHANGED
data/massimo.gemspec
CHANGED
@@ -7,33 +7,29 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.summary = 'Massimo is a static website builder.'
|
8
8
|
s.description = 'Massimo builds HTML, Javascript, and CSS Files from your source.'
|
9
9
|
|
10
|
-
s.authors = 'Pete Browne'
|
11
|
-
s.email = 'me@petebrowne.com'
|
10
|
+
s.authors = ['Pete Browne']
|
11
|
+
s.email = ['me@petebrowne.com']
|
12
12
|
s.homepage = 'http://massimo.petebrowne.com/'
|
13
13
|
s.rubyforge_project = 'massimo'
|
14
14
|
|
15
|
-
s.add_dependency 'activesupport', '~> 3.0
|
16
|
-
s.add_dependency 'i18n', '~> 0.4
|
17
|
-
s.add_dependency 'rack', '~> 1.
|
18
|
-
s.add_dependency 'padrino-helpers', '~> 0.9
|
19
|
-
s.add_dependency 'thor', '~> 0.14
|
20
|
-
s.add_dependency 'tilt', '~> 1.3
|
21
|
-
s.add_dependency '
|
22
|
-
s.add_dependency '
|
23
|
-
s.
|
24
|
-
s.add_development_dependency '
|
25
|
-
s.add_development_dependency '
|
26
|
-
s.add_development_dependency '
|
27
|
-
s.add_development_dependency '
|
28
|
-
s.add_development_dependency '
|
29
|
-
s.add_development_dependency '
|
30
|
-
s.add_development_dependency '
|
31
|
-
s.add_development_dependency '
|
32
|
-
s.add_development_dependency '
|
33
|
-
s.add_development_dependency 'packr', '~> 3.1.0'
|
34
|
-
s.add_development_dependency 'yui-compressor', '~> 0.9.0'
|
35
|
-
s.add_development_dependency 'closure-compiler', '~> 0.3.0'
|
36
|
-
s.add_development_dependency 'growl', '~> 1.0.0'
|
15
|
+
s.add_dependency 'activesupport', '~> 3.0'
|
16
|
+
s.add_dependency 'i18n', '~> 0.4'
|
17
|
+
s.add_dependency 'rack', '~> 1.1'
|
18
|
+
s.add_dependency 'padrino-helpers', '~> 0.9'
|
19
|
+
s.add_dependency 'thor', '~> 0.14'
|
20
|
+
s.add_dependency 'tilt', '~> 1.3'
|
21
|
+
s.add_dependency 'crush', '~> 0.3'
|
22
|
+
s.add_dependency 'tzinfo', '~> 0.3'
|
23
|
+
s.add_dependency 'sprockets', '~> 1.0'
|
24
|
+
s.add_development_dependency 'rake', '>= 0.8.7'
|
25
|
+
s.add_development_dependency 'rspec', '~> 2.6'
|
26
|
+
s.add_development_dependency 'rr', '~> 1.0'
|
27
|
+
s.add_development_dependency 'test-construct', '~> 1.2'
|
28
|
+
s.add_development_dependency 'rack-test', '~> 0.5'
|
29
|
+
s.add_development_dependency 'unindent', '~> 0.9'
|
30
|
+
s.add_development_dependency 'haml', '~> 3.1'
|
31
|
+
s.add_development_dependency 'sass', '~> 3.1'
|
32
|
+
s.add_development_dependency 'less', '~> 1.2'
|
37
33
|
|
38
34
|
s.files = `git ls-files`.split("\n")
|
39
35
|
s.executables = `git ls-files`.split("\n").map{ |f| f =~ /^bin\/(.*)/ ? $1 : nil }.compact
|
data/spec/massimo/cli_spec.rb
CHANGED
@@ -78,17 +78,17 @@ describe Massimo::CLI do
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
-
describe '#
|
81
|
+
describe '#new' do
|
82
82
|
it 'creates a massimo site directory' do
|
83
83
|
within_construct do |c|
|
84
|
-
massimo '
|
84
|
+
massimo 'new my_site'
|
85
85
|
'my_site'.should be_a_directory
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
89
|
it 'creates resource directories' do
|
90
90
|
within_construct do |c|
|
91
|
-
massimo '
|
91
|
+
massimo 'new my_site'
|
92
92
|
'my_site/pages'.should be_a_directory
|
93
93
|
'my_site/views'.should be_a_directory
|
94
94
|
'my_site/javascripts'.should be_a_directory
|
@@ -98,14 +98,14 @@ describe Massimo::CLI do
|
|
98
98
|
|
99
99
|
it 'creates an output path' do
|
100
100
|
within_construct do |c|
|
101
|
-
massimo '
|
101
|
+
massimo 'new my_site'
|
102
102
|
'my_site/public'.should be_a_directory
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
106
|
it 'creates an default index page' do
|
107
107
|
within_construct do |c|
|
108
|
-
massimo '
|
108
|
+
massimo 'new my_site'
|
109
109
|
content = <<-EOS.unindent
|
110
110
|
---
|
111
111
|
title: Home Page
|
@@ -113,64 +113,75 @@ describe Massimo::CLI do
|
|
113
113
|
<h1><%= title %></h1>
|
114
114
|
<p>Find me in pages/index.erb</p>
|
115
115
|
EOS
|
116
|
-
'my_site/pages/index.erb'.should be_a_file.with_content(content)
|
116
|
+
'my_site/pages/index.html.erb'.should be_a_file.with_content(content)
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
120
|
it 'creates a default layout' do
|
121
121
|
within_construct do |c|
|
122
|
-
massimo '
|
122
|
+
massimo 'new my_site'
|
123
123
|
content = <<-EOS.unindent
|
124
124
|
<!doctype html>
|
125
125
|
<html>
|
126
126
|
<head lang="en">
|
127
127
|
<meta charset="utf-8">
|
128
128
|
<title><%= page.title %></title>
|
129
|
-
<%= stylesheet_link_tag
|
130
|
-
<%= javascript_include_tag
|
129
|
+
<%= stylesheet_link_tag "main" %>
|
130
|
+
<%= javascript_include_tag "main" %>
|
131
131
|
</head>
|
132
132
|
<body>
|
133
133
|
<%= yield %>
|
134
134
|
</body>
|
135
135
|
</html>
|
136
136
|
EOS
|
137
|
-
'my_site/views/layouts/main.erb'.should be_a_file.with_content(content)
|
137
|
+
'my_site/views/layouts/main.html.erb'.should be_a_file.with_content(content)
|
138
138
|
end
|
139
139
|
end
|
140
140
|
|
141
141
|
it 'creates a default javascript file' do
|
142
142
|
within_construct do |c|
|
143
|
-
massimo '
|
143
|
+
massimo 'new my_site'
|
144
144
|
'my_site/javascripts/main.js'.should be_a_file
|
145
145
|
end
|
146
146
|
end
|
147
147
|
|
148
148
|
it 'creates a default stylesheet file' do
|
149
149
|
within_construct do |c|
|
150
|
-
massimo '
|
151
|
-
'my_site/stylesheets/main.scss'.should be_a_file
|
150
|
+
massimo 'new my_site'
|
151
|
+
'my_site/stylesheets/main.css.scss'.should be_a_file
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
it 'creates a default Gemfile' do
|
156
|
+
within_construct do |c|
|
157
|
+
massimo 'new my_site'
|
158
|
+
content = <<-EOS.unindent
|
159
|
+
source :rubygems
|
160
|
+
|
161
|
+
gem "massimo", "#{Massimo::VERSION}"
|
162
|
+
gem "sass", "~> 3.1"
|
163
|
+
|
164
|
+
group :production do
|
165
|
+
gem "uglifier", "~> 1.0"
|
166
|
+
end
|
167
|
+
EOS
|
168
|
+
'my_site/Gemfile'.should be_a_file.with_content(content)
|
152
169
|
end
|
153
170
|
end
|
154
171
|
|
155
172
|
it 'creates a default config file' do
|
156
173
|
within_construct do |c|
|
157
|
-
massimo '
|
174
|
+
massimo 'new my_site'
|
158
175
|
content = <<-EOS.unindent
|
159
|
-
require 'sass'
|
160
|
-
require 'sprockets'
|
161
|
-
|
162
176
|
# This is an example configuration File
|
163
177
|
# Look here for all the available options:
|
164
178
|
# http://massimo.petebrowne.com/configuration/
|
165
|
-
|
179
|
+
|
166
180
|
if config.environment.production?
|
167
|
-
#
|
168
|
-
|
169
|
-
|
170
|
-
# Compress the output of Sass stylesheets
|
171
|
-
# config.sass = { :style => :compressed }
|
181
|
+
# Compress javascripts and stylesheets
|
182
|
+
config.compress = true
|
172
183
|
end
|
173
|
-
|
184
|
+
|
174
185
|
helpers do
|
175
186
|
# Define helper methods here
|
176
187
|
end
|
@@ -181,9 +192,9 @@ describe Massimo::CLI do
|
|
181
192
|
|
182
193
|
it 'creates a default rackup file' do
|
183
194
|
within_construct do |c|
|
184
|
-
massimo '
|
195
|
+
massimo 'new my_site'
|
185
196
|
content = <<-EOS.unindent
|
186
|
-
require
|
197
|
+
require "massimo"
|
187
198
|
run Massimo::Server.new
|
188
199
|
EOS
|
189
200
|
'my_site/config.ru'.should be_a_file.with_content(content)
|
@@ -194,7 +205,7 @@ describe Massimo::CLI do
|
|
194
205
|
it 'creates a massimo site directory' do
|
195
206
|
within_construct do |c|
|
196
207
|
silence(:stdout) do
|
197
|
-
massimo '
|
208
|
+
massimo 'n my_site'
|
198
209
|
'my_site'.should be_a_directory
|
199
210
|
end
|
200
211
|
end
|