tipsy 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +6 -11
- data/README.md +24 -1
- data/Rakefile +13 -9
- data/bin/tipsy +4 -2
- data/lib/templates/server/htaccess.erb +14 -0
- data/lib/templates/site/Gemfile +19 -0
- data/lib/templates/site/assets/stylesheets/_config.css.scss +1 -0
- data/lib/templates/site/assets/stylesheets/screen.css.scss +1 -0
- data/lib/templates/site/config.rb +52 -0
- data/lib/templates/site/deploy.yml +27 -0
- data/lib/templates/site/layouts/default.html.erb +41 -0
- data/lib/templates/site/views/index.html.erb +2 -0
- data/lib/tipsy/compressors/{css.rb → css_compressor.rb} +0 -0
- data/lib/tipsy/compressors/javascript_compressor.rb +44 -0
- data/lib/tipsy/configuration.rb +9 -0
- data/lib/tipsy/handler/all.rb +4 -0
- data/lib/tipsy/handler/asset.rb +93 -0
- data/lib/tipsy/handler/erb.rb +42 -0
- data/lib/tipsy/handler/php.rb +36 -0
- data/lib/tipsy/{sass/template.rb → handler/sass/importer.rb} +15 -53
- data/lib/tipsy/handler/sass/resolver.rb +30 -0
- data/lib/tipsy/handler/sass.rb +36 -0
- data/lib/tipsy/handler/static.rb +30 -0
- data/lib/tipsy/helpers/asset_paths.rb +29 -1
- data/lib/tipsy/helpers/asset_tags.rb +1 -1
- data/lib/tipsy/helpers/capture.rb +12 -41
- data/lib/tipsy/helpers/rendering.rb +46 -0
- data/lib/tipsy/helpers/sass.rb +17 -6
- data/lib/tipsy/helpers/tag.rb +6 -9
- data/lib/tipsy/helpers.rb +13 -16
- data/lib/tipsy/runner.rb +82 -0
- data/lib/tipsy/runners/compiler.rb +189 -0
- data/lib/tipsy/runners/deployer.rb +7 -0
- data/lib/tipsy/runners/generator.rb +24 -0
- data/lib/tipsy/server.rb +56 -114
- data/lib/tipsy/site.rb +88 -0
- data/lib/tipsy/utils/logger.rb +47 -0
- data/lib/tipsy/utils/system.rb +115 -0
- data/lib/tipsy/utils/system_test.rb +103 -0
- data/lib/tipsy/version.rb +1 -1
- data/lib/tipsy/view/base.rb +55 -0
- data/lib/tipsy/view/context.rb +28 -0
- data/lib/tipsy/view/path.rb +44 -0
- data/lib/tipsy/view.rb +14 -68
- data/lib/tipsy.rb +30 -67
- data/{lib/tipsy/project/assets/javascripts/site.js → test/fixtures/capture.html.erb} +0 -0
- data/test/helpers/tag_test.rb +22 -0
- data/{lib/tipsy/project/assets/stylesheets/screen.css.scss → test/root/compiled/fake.txt} +0 -0
- data/test/root/{test/assets/javascripts/test.js → compiled/sub-path/fake.txt} +0 -0
- data/test/root/{development/assets/javascripts/test.js → compiled/sub-path-with-skip/fake.txt} +0 -0
- data/test/root/layouts/default.html.erb +0 -0
- data/test/root/views/index.html.erb +0 -0
- data/test/root/views/page.html.erb +0 -0
- data/test/root/views/sub/page.html.erb +0 -0
- data/test/root/views/sub/tertiary/index.html.erb +0 -0
- data/test/runner/compiler_test.rb +49 -0
- data/test/test_helper.rb +160 -21
- data/test/unit/site_test.rb +23 -0
- data/test/unit/tipsy_test.rb +13 -0
- data/test/unit/utils/system_test.rb +26 -0
- data/test/view/base_test.rb +34 -0
- data/test/view/path_test.rb +34 -0
- data/tipsy.gemspec +10 -7
- metadata +113 -84
- data/lib/tipsy/application.rb +0 -86
- data/lib/tipsy/builder.rb +0 -26
- data/lib/tipsy/builders/base.rb +0 -64
- data/lib/tipsy/builders/export.rb +0 -16
- data/lib/tipsy/builders/project.rb +0 -40
- data/lib/tipsy/builders/remote.rb +0 -14
- data/lib/tipsy/compressors/javascript.rb +0 -25
- data/lib/tipsy/logger.rb +0 -62
- data/lib/tipsy/project/Gemfile +0 -8
- data/lib/tipsy/project/config.erb +0 -19
- data/lib/tipsy/project/helpers/site_helper.rb +0 -4
- data/lib/tipsy/project/views/_layout.html.erb +0 -16
- data/test/fixtures/about.html +0 -1
- data/test/fixtures/contact.html +0 -1
- data/test/fixtures/index.html +0 -1
- data/test/functional/page_test.rb +0 -33
- data/test/root/.gitignore +0 -7
- data/test/root/development/assets/stylesheets/screen.css.scss +0 -3
- data/test/root/development/config.rb +0 -6
- data/test/root/development/views/_layout.html.erb +0 -20
- data/test/root/development/views/index.html.erb +0 -3
- data/test/root/test/assets/stylesheets/screen.css.scss +0 -3
- data/test/root/test/config.rb +0 -6
- data/test/root/test/views/_layout.html.erb +0 -1
- data/test/root/test/views/about/index.html +0 -1
- data/test/root/test/views/contact.html +0 -1
- data/test/root/test/views/index.html.erb +0 -1
- data/test/unit/helpers/asset_paths_test.rb +0 -14
- data/test/unit/helpers_test.rb +0 -22
- data/test/unit/server_test.rb +0 -1
@@ -1,16 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8"/>
|
5
|
-
<title></title>
|
6
|
-
<meta name="keywords" content=""/>
|
7
|
-
<meta name="description" content=""/>
|
8
|
-
<!--[if lte IE 8]>
|
9
|
-
<![endif]-->
|
10
|
-
<!--[if IE 8]>
|
11
|
-
<![endif]-->
|
12
|
-
</head>
|
13
|
-
<body>
|
14
|
-
<%= yield %>
|
15
|
-
</body>
|
16
|
-
</html>
|
data/test/fixtures/about.html
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
about page
|
data/test/fixtures/contact.html
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
test contact
|
data/test/fixtures/index.html
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
index file
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class PageTest < Test::Unit::TestCase
|
4
|
-
include Rack::Test::Methods
|
5
|
-
include Tipsy::Test::Helpers
|
6
|
-
|
7
|
-
def app
|
8
|
-
Tipsy::Test.app
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_the_home_page_is_successful
|
12
|
-
get "/"
|
13
|
-
assert last_response.ok?
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_the_home_page_renders_index
|
17
|
-
get "/"
|
18
|
-
to_html(last_response.body).should == fixture('index.html')
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_the_about_page_renders_about
|
22
|
-
get '/about'
|
23
|
-
assert last_response.ok?
|
24
|
-
to_html(last_response.body).should == fixture('about.html')
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_find_page_above_folder
|
28
|
-
get '/contact'
|
29
|
-
assert last_response.ok?
|
30
|
-
to_html(last_response.body).should == fixture('contact.html')
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
data/test/root/.gitignore
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<?xml version="1.0" encoding="utf-8"?>
|
3
|
-
<!DOCTYPE html>
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<meta charset="utf-8"/>
|
7
|
-
<title></title>
|
8
|
-
<meta name="keywords" content=""/>
|
9
|
-
<meta name="description" content=""/>
|
10
|
-
<!--[if lte IE 8]>
|
11
|
-
<![endif]-->
|
12
|
-
<!--[if IE 8]>
|
13
|
-
<![endif]-->
|
14
|
-
</head>
|
15
|
-
<body>
|
16
|
-
<p> I wrap the <%= yield %> in a layout</p>
|
17
|
-
<p>I'm a var set in the view: <%= @poop %></p>
|
18
|
-
<p>Some bold text set in the view: <%= content_for(:text) %></p>
|
19
|
-
</body>
|
20
|
-
</html>
|
data/test/root/test/config.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
<%= yield %>
|
@@ -1 +0,0 @@
|
|
1
|
-
about page
|
@@ -1 +0,0 @@
|
|
1
|
-
test contact
|
@@ -1 +0,0 @@
|
|
1
|
-
index file
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class AssetPathsTest < Test::Unit::TestCase
|
4
|
-
include Tipsy::Helpers
|
5
|
-
|
6
|
-
def test_asset_path_helper
|
7
|
-
asset_path("something.js").should == '/assets/something.js'
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_absolute_asset_path
|
11
|
-
asset_path("/js/something.js").should == '/js/something.js'
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
data/test/unit/helpers_test.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class HelpersTest < Test::Unit::TestCase
|
4
|
-
include Tipsy::Helpers
|
5
|
-
|
6
|
-
def test_tag_helper
|
7
|
-
tag(:img, :src => 'test.png').should == '<img src="test.png" />'
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_content_tag_helper
|
11
|
-
content_tag(:p, 'hello', :class => 'test').should == '<p class="test">hello</p>'
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_link_to_helper
|
15
|
-
link_to('link', '/home').should == '<a href="/home">link</a>'
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_mail_to_helper
|
19
|
-
mail_to('test@test.com').should == '<a href="mailto:test@test.com">test@test.com</a>'
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
data/test/unit/server_test.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'test_helper'
|