mabtie 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <%= stylesheet_link_tag :flutie %>
7
+ <title>Flutie v1</title>
8
+
9
+ <style type="text/css">
10
+ /* These are styles to make the page look nice */
11
+
12
+ body { background-color: #dadada;}
13
+ .content {
14
+ background: #fff;
15
+ padding: 40px;
16
+ margin: 40px auto;
17
+ width: 880px;
18
+ -moz-border-radius: 24px;
19
+ -webkit-border-radius: 24px;
20
+ }
21
+ </style>
22
+
23
+ </head>
24
+
25
+ <body>
26
+ <div class="content">
27
+ <%= yield %>
28
+ </div>
29
+ </body>
30
+ </html>
@@ -0,0 +1 @@
1
+ ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :flutie => [ '/flutie/stylesheets/flutie' ]
@@ -0,0 +1,3 @@
1
+ if defined?(Sass::Plugin) && defined?(Rails)
2
+ Sass::Plugin.add_template_location(Rails.root.join('public', 'flutie', 'stylesheets', 'sass').to_s)
3
+ end
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+
3
+ resource :styleguides, :as => :styleguide, :controller => 'flutie/styleguides', :only => [:show]
4
+
5
+ end
@@ -0,0 +1,6 @@
1
+ module Flutie
2
+
3
+ class Engine < Rails::Engine
4
+ end
5
+
6
+ end
data/lib/flutie.rb ADDED
@@ -0,0 +1,3 @@
1
+ module Flutie
2
+ require 'flutie/engine' if defined?(Rails)
3
+ end
@@ -0,0 +1,17 @@
1
+ require 'fileutils'
2
+
3
+ def copy_files(source_path, destination_path, directory)
4
+ source, destination = File.join(directory, source_path), File.join(Rails.root, destination_path)
5
+ FileUtils.mkdir_p(destination, :verbose => true) unless File.exist?(destination)
6
+ FileUtils.cp_r(source, destination, :verbose => true)
7
+ end
8
+
9
+ directory = File.dirname(__FILE__)
10
+
11
+ namespace :flutie do
12
+ desc 'install flutie stylesheets into public/ directory'
13
+ task :install => :environment do
14
+ # Copy the flutie stylesheets into rails_root/public/flutie
15
+ copy_files("../../public/stylesheets", "/public/flutie", directory)
16
+ end
17
+ end