serve 1.5.0.pre5 → 1.5.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/CHANGELOG.rdoc +4 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +13 -8
- data/VERSION +1 -1
- data/lib/serve/application.rb +34 -17
- data/lib/serve/{templates → bootstrap}/Gemfile +3 -3
- data/lib/serve/{templates/README.markdown → bootstrap/README.md} +0 -0
- data/lib/serve/{templates → bootstrap}/compass.config +0 -0
- data/lib/serve/{templates → bootstrap}/config.ru +1 -1
- data/lib/serve/{templates → bootstrap}/gitignore +0 -0
- data/lib/serve/export.rb +3 -12
- data/lib/serve/path.rb +24 -0
- data/lib/serve/project.rb +96 -53
- data/lib/serve/templates/default/public/images/serve-logo.png +0 -0
- data/lib/serve/templates/default/stylesheets/modules/_all.scss +3 -0
- data/lib/serve/templates/default/stylesheets/modules/_links.scss +15 -0
- data/lib/serve/templates/default/stylesheets/modules/_typography.scss +133 -0
- data/lib/serve/templates/default/stylesheets/modules/_utility.scss +15 -0
- data/lib/serve/templates/default/stylesheets/partials/_base.scss +47 -0
- data/lib/serve/templates/default/stylesheets/partials/_content.scss +37 -0
- data/lib/serve/templates/default/stylesheets/partials/_layout.scss +42 -0
- data/lib/serve/templates/default/stylesheets/screen.scss +7 -0
- data/lib/serve/templates/default/views/_layout.html.erb +1 -0
- data/lib/serve/templates/default/views/index.redirect +15 -0
- data/lib/serve/templates/default/views/layouts/default.html.erb +31 -0
- data/lib/serve/templates/default/views/view_helpers.rb +25 -0
- data/lib/serve/templates/default/views/welcome.html.erb +36 -0
- data/spec/application_spec.rb +21 -19
- data/spec/project_spec.rb +34 -34
- data/{lib/serve/templates → spec/stylesheets}/application.scss +0 -0
- data/{lib/serve/templates → spec/views}/_layout.html.erb +0 -0
- data/{lib/serve/templates → spec/views}/hello.html.erb +0 -0
- data/{lib/serve/templates → spec/views}/index.redirect +0 -0
- data/{lib/serve/templates → spec/views}/view_helpers.rb +0 -0
- metadata +31 -24
data/spec/project_spec.rb
CHANGED
@@ -4,101 +4,101 @@ require 'fileutils'
|
|
4
4
|
|
5
5
|
describe Serve::Project do
|
6
6
|
|
7
|
-
describe "Creating a new
|
7
|
+
describe "Creating a new Serve project" do
|
8
8
|
|
9
9
|
class SilentOut
|
10
10
|
def puts(*args); end
|
11
11
|
def print(*args); end
|
12
12
|
end
|
13
13
|
|
14
|
+
include Serve::Path
|
15
|
+
|
14
16
|
before(:all) do
|
15
17
|
@options = {
|
16
|
-
:port
|
17
|
-
:address
|
18
|
-
|
19
|
-
:name => 'test_mockup',
|
20
|
-
:directory => File.dirname(__FILE__),
|
18
|
+
:port => 4000,
|
19
|
+
:address => '0.0.0.0',
|
20
|
+
:directory => 'serve_project_for_tests',
|
21
21
|
:framework => 'jquery'
|
22
22
|
}
|
23
23
|
|
24
|
-
@
|
25
|
-
@
|
26
|
-
@
|
24
|
+
@project = Serve::Project.new(@options)
|
25
|
+
@project.stdout = SilentOut.new
|
26
|
+
@project.stderr = SilentOut.new
|
27
27
|
|
28
|
-
@
|
29
|
-
end
|
30
|
-
|
31
|
-
after(:all) do
|
32
|
-
FileUtils.rm_rf(@mockup_file)
|
28
|
+
@project_root = normalize_path(@options[:directory])
|
33
29
|
end
|
34
30
|
|
35
|
-
|
36
|
-
|
31
|
+
after :all do
|
32
|
+
FileUtils.rm_rf @project_root
|
37
33
|
end
|
38
34
|
|
39
35
|
it "should have a project directory" do
|
40
|
-
@
|
36
|
+
@project.location.should == 'serve_project_for_tests'
|
41
37
|
end
|
42
38
|
|
43
39
|
it "should have a framework" do
|
44
|
-
@
|
40
|
+
@project.framework.should == 'jquery'
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should have a default template" do
|
44
|
+
@project.template.should == 'default'
|
45
45
|
end
|
46
46
|
|
47
47
|
describe "The created files" do
|
48
48
|
before(:all) do
|
49
|
-
@
|
49
|
+
@project.create
|
50
50
|
end
|
51
51
|
|
52
52
|
it "should create a directory" do
|
53
|
-
|
53
|
+
exists?('.').should be_true
|
54
54
|
end
|
55
55
|
|
56
56
|
it "should have a public directory" do
|
57
|
-
|
57
|
+
exists?('public').should be_true
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should have a javascript directory" do
|
61
|
-
|
61
|
+
exists?('public/javascripts').should be_true
|
62
62
|
end
|
63
63
|
|
64
64
|
it "should have a stylesheets directory" do
|
65
|
-
|
65
|
+
exists?('public/stylesheets').should be_true
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should have an images directory" do
|
69
|
-
|
69
|
+
exists?('public/images').should be_true
|
70
70
|
end
|
71
71
|
|
72
72
|
it "should have a sass directory" do
|
73
|
-
|
73
|
+
exists?('stylesheets').should be_true
|
74
74
|
end
|
75
75
|
|
76
76
|
it "should have a tmp directory" do
|
77
|
-
|
77
|
+
exists?('tmp').should be_true
|
78
78
|
end
|
79
79
|
|
80
80
|
it "should have a views directory" do
|
81
|
-
|
81
|
+
exists?('views').should be_true
|
82
82
|
end
|
83
83
|
|
84
84
|
it "should have config.ru file" do
|
85
|
-
|
85
|
+
exists?('config.ru').should be_true
|
86
86
|
end
|
87
87
|
|
88
88
|
it "should have a compass.config file" do
|
89
|
-
|
89
|
+
exists?('compass.config').should be_true
|
90
90
|
end
|
91
91
|
|
92
92
|
it "should have a dot gitignore file" do
|
93
|
-
|
93
|
+
exists?('.gitignore').should be_true
|
94
94
|
end
|
95
95
|
|
96
|
-
it "should have a
|
97
|
-
|
96
|
+
it "should have a restart file" do
|
97
|
+
exists?('tmp/restart.txt').should be_true
|
98
98
|
end
|
99
99
|
|
100
|
-
|
101
|
-
File.exists?(File.join(@
|
100
|
+
def exists?(filename)
|
101
|
+
File.exists?(File.join(@project_root, filename))
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 1.5.0
|
4
|
+
prerelease:
|
5
|
+
version: 1.5.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- John W. Long
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2011-07-
|
15
|
+
date: 2011-07-12 00:00:00 -04:00
|
16
16
|
default_executable: serve
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
@@ -255,6 +255,11 @@ files:
|
|
255
255
|
- bin/serve
|
256
256
|
- lib/serve.rb
|
257
257
|
- lib/serve/application.rb
|
258
|
+
- lib/serve/bootstrap/Gemfile
|
259
|
+
- lib/serve/bootstrap/README.md
|
260
|
+
- lib/serve/bootstrap/compass.config
|
261
|
+
- lib/serve/bootstrap/config.ru
|
262
|
+
- lib/serve/bootstrap/gitignore
|
258
263
|
- lib/serve/export.rb
|
259
264
|
- lib/serve/handlers/dynamic_handler.rb
|
260
265
|
- lib/serve/handlers/email_handler.rb
|
@@ -268,16 +273,20 @@ files:
|
|
268
273
|
- lib/serve/project.rb
|
269
274
|
- lib/serve/rack.rb
|
270
275
|
- lib/serve/router.rb
|
271
|
-
- lib/serve/templates/
|
272
|
-
- lib/serve/templates/
|
273
|
-
- lib/serve/templates/
|
274
|
-
- lib/serve/templates/
|
275
|
-
- lib/serve/templates/
|
276
|
-
- lib/serve/templates/
|
277
|
-
- lib/serve/templates/
|
278
|
-
- lib/serve/templates/
|
279
|
-
- lib/serve/templates/
|
280
|
-
- lib/serve/templates/
|
276
|
+
- lib/serve/templates/default/public/images/serve-logo.png
|
277
|
+
- lib/serve/templates/default/stylesheets/modules/_all.scss
|
278
|
+
- lib/serve/templates/default/stylesheets/modules/_links.scss
|
279
|
+
- lib/serve/templates/default/stylesheets/modules/_typography.scss
|
280
|
+
- lib/serve/templates/default/stylesheets/modules/_utility.scss
|
281
|
+
- lib/serve/templates/default/stylesheets/partials/_base.scss
|
282
|
+
- lib/serve/templates/default/stylesheets/partials/_content.scss
|
283
|
+
- lib/serve/templates/default/stylesheets/partials/_layout.scss
|
284
|
+
- lib/serve/templates/default/stylesheets/screen.scss
|
285
|
+
- lib/serve/templates/default/views/_layout.html.erb
|
286
|
+
- lib/serve/templates/default/views/index.redirect
|
287
|
+
- lib/serve/templates/default/views/layouts/default.html.erb
|
288
|
+
- lib/serve/templates/default/views/view_helpers.rb
|
289
|
+
- lib/serve/templates/default/views/welcome.html.erb
|
281
290
|
- lib/serve/version.rb
|
282
291
|
- lib/serve/view_helpers.rb
|
283
292
|
- spec/application_spec.rb
|
@@ -287,18 +296,16 @@ files:
|
|
287
296
|
- spec/project_spec.rb
|
288
297
|
- spec/router_spec.rb
|
289
298
|
- spec/spec_helper.rb
|
299
|
+
- spec/stylesheets/application.scss
|
300
|
+
- spec/views/_layout.html.erb
|
301
|
+
- spec/views/hello.html.erb
|
302
|
+
- spec/views/index.redirect
|
303
|
+
- spec/views/view_helpers.rb
|
290
304
|
has_rdoc: true
|
291
305
|
homepage: http://get-serve.com
|
292
306
|
licenses:
|
293
307
|
- MIT
|
294
|
-
post_install_message:
|
295
|
-
Thanks for installing Serve! If you plan to use Serve with another
|
296
|
-
template language (apart from ERB), don't forget to install it.
|
297
|
-
|
298
|
-
If you want use Sass or Compass remember to install them, too!
|
299
|
-
|
300
|
-
Serve doesn't install these dependencies by default, so that you can
|
301
|
-
make your own decisions about what you want to use.
|
308
|
+
post_install_message:
|
302
309
|
rdoc_options: []
|
303
310
|
|
304
311
|
require_paths:
|
@@ -308,16 +315,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
308
315
|
requirements:
|
309
316
|
- - ">="
|
310
317
|
- !ruby/object:Gem::Version
|
311
|
-
hash:
|
318
|
+
hash: -400107684497950535
|
312
319
|
segments:
|
313
320
|
- 0
|
314
321
|
version: "0"
|
315
322
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
316
323
|
none: false
|
317
324
|
requirements:
|
318
|
-
- - "
|
325
|
+
- - ">="
|
319
326
|
- !ruby/object:Gem::Version
|
320
|
-
version:
|
327
|
+
version: "0"
|
321
328
|
requirements: []
|
322
329
|
|
323
330
|
rubyforge_project:
|