flutie 1.3.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/Gemfile.lock +23 -51
- data/README.md +4 -81
- data/flutie.gemspec +3 -5
- data/lib/flutie.rb +1 -1
- data/{app/helpers → lib/flutie}/body_class_helper.rb +0 -0
- data/{app/helpers → lib/flutie}/page_title_helper.rb +0 -0
- data/lib/flutie/{engine.rb → railtie.rb} +4 -1
- data/lib/flutie/version.rb +1 -1
- data/spec/spec_helper.rb +0 -5
- metadata +6 -66
- data/app/assets/stylesheets/_defaults.scss +0 -103
- data/app/assets/stylesheets/_flashes.scss +0 -41
- data/app/assets/stylesheets/_flutie.scss +0 -7
- data/app/assets/stylesheets/_forms.scss +0 -202
- data/app/assets/stylesheets/_lists.scss +0 -45
- data/app/assets/stylesheets/_reset.scss +0 -95
- data/app/assets/stylesheets/_tables.scss +0 -39
- data/app/assets/stylesheets/_type.scss +0 -133
- data/app/controllers/flutie/styleguides_controller.rb +0 -27
- data/app/views/flutie/styleguides/show.erb +0 -734
- data/app/views/layouts/flutie.erb +0 -47
- data/config/initializers/expansion.rb +0 -1
- data/config/routes.rb +0 -5
- data/lib/tasks/flutie.rake +0 -25
- data/public/stylesheets/flutie.css +0 -556
- data/server.rb +0 -21
- data/spec/controllers/styleguides_controller_spec.rb +0 -62
- data/spec/fixtures/app/views/styleguides/_one.erb +0 -1
- data/spec/fixtures/app/views/styleguides/_two.erb +0 -1
- data/spec/flutie_spec.rb +0 -7
- data/spec/initialization_spec.rb +0 -16
- data/spec/integration/navigation_spec.rb +0 -9
data/server.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'sinatra'
|
3
|
-
require 'sass'
|
4
|
-
|
5
|
-
set :views, ['app/views']
|
6
|
-
set :static, true
|
7
|
-
|
8
|
-
helpers do
|
9
|
-
def stylesheet_link_tag(name)
|
10
|
-
"<link href='/stylesheets/#{name}.css' media='all' rel='Stylesheet' type='text/css' />"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
get '/' do
|
15
|
-
erb :"flutie/styleguides/show", :layout => :"layouts/flutie"
|
16
|
-
end
|
17
|
-
|
18
|
-
get '/stylesheets/flutie.css' do
|
19
|
-
content_type 'text/css', :charset => 'utf-8'
|
20
|
-
scss :_flutie, :views => 'app/assets/stylesheets'
|
21
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
ActionController::Base.prepend_view_path File.join(File.dirname(__FILE__), '..', '..', 'app', 'views')
|
4
|
-
ActionController::Base.prepend_view_path File.join(File.dirname(__FILE__), '..', 'fixtures', 'app', 'views')
|
5
|
-
|
6
|
-
shared_examples_for "Renders valid XML" do
|
7
|
-
it "should render valid xml" do
|
8
|
-
lambda { REXML::Document.new(response.body) }.should_not raise_error
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
shared_examples_for "Renders styleguide partials" do
|
13
|
-
it "should render styleguide partials" do
|
14
|
-
response.body.should =~ %r{fixture partial 1}
|
15
|
-
response.body.should =~ %r{fixture partial 2}
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
shared_examples_for "Renders application layout" do
|
20
|
-
it "should use application layout" do
|
21
|
-
response.should render_template('layouts/application')
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
shared_examples_for "Responds with success and renders show template" do
|
26
|
-
it "should respond with success and render show template" do
|
27
|
-
response.should be_success
|
28
|
-
response.should render_template(:show)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
describe Flutie::StyleguidesController do
|
33
|
-
|
34
|
-
render_views
|
35
|
-
|
36
|
-
describe "GET to /styleguides/show" do
|
37
|
-
before { get :show }
|
38
|
-
it_should_behave_like "Responds with success and renders show template"
|
39
|
-
it_should_behave_like "Renders valid XML"
|
40
|
-
it_should_behave_like "Renders styleguide partials"
|
41
|
-
it_should_behave_like "Renders application layout"
|
42
|
-
end
|
43
|
-
|
44
|
-
describe "GET to /styleguides/show with flutie=false" do
|
45
|
-
before { get :show, :flutie => "false" }
|
46
|
-
it_should_behave_like "Responds with success and renders show template"
|
47
|
-
it_should_behave_like "Renders valid XML"
|
48
|
-
it_should_behave_like "Renders styleguide partials"
|
49
|
-
it_should_behave_like "Renders application layout"
|
50
|
-
end
|
51
|
-
|
52
|
-
describe "GET to /styleguides/show with flutie=true" do
|
53
|
-
before { get :show, :flutie => "true" }
|
54
|
-
it_should_behave_like "Responds with success and renders show template"
|
55
|
-
it_should_behave_like "Renders valid XML"
|
56
|
-
it_should_behave_like "Renders styleguide partials"
|
57
|
-
it "should use flutie layout" do
|
58
|
-
response.should render_template('layouts/flutie')
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
fixture partial 1
|
@@ -1 +0,0 @@
|
|
1
|
-
fixture partial 2
|
data/spec/flutie_spec.rb
DELETED
data/spec/initialization_spec.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "initialize the rails app" do
|
4
|
-
let(:expected) { { :flutie => ['/flutie/stylesheets/flutie'] } }
|
5
|
-
if defined?(ActionView::Helpers::AssetTagHelper::StylesheetIncludeTag)
|
6
|
-
it "should add flutie directory to the stylesheet include tag expansions" do
|
7
|
-
ActionView::Helpers::AssetTagHelper::StylesheetIncludeTag.expansions.should == expected
|
8
|
-
end
|
9
|
-
else
|
10
|
-
it "should add flutie directory to stylesheet expansion" do
|
11
|
-
expected = { :flutie => ['/flutie/stylesheets/flutie'] }
|
12
|
-
ActionView::Helpers::AssetTagHelper.send(:class_variable_get, :@@stylesheet_expansions).should == expected
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|