flutie 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +11 -0
- data/LICENSE +21 -0
- data/README.md +11 -7
- data/Rakefile +14 -12
- data/{public → app/assets}/stylesheets/flutie.css +0 -0
- data/{public → app/assets}/stylesheets/sass/flutie/_defaults.scss +0 -0
- data/{public → app/assets}/stylesheets/sass/flutie/_forms.scss +0 -0
- data/{public → app/assets}/stylesheets/sass/flutie/_lists.scss +0 -0
- data/{public → app/assets}/stylesheets/sass/flutie/_reset.scss +0 -0
- data/{public → app/assets}/stylesheets/sass/flutie/_screen.scss +0 -0
- data/{public → app/assets}/stylesheets/sass/flutie/_tables.scss +0 -0
- data/{public → app/assets}/stylesheets/sass/flutie/_type.scss +0 -0
- data/{public → app/assets}/stylesheets/sass/flutie/flutie.scss +2 -3
- data/app/helpers/body_class_helper.rb +6 -0
- data/app/helpers/page_title_helper.rb +13 -0
- data/lib/tasks/flutie.rake +7 -2
- metadata +50 -56
data/Gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
gem "rails", "3.0.10"
|
4
|
+
gem "capybara", ">= 0.4.0"
|
5
|
+
gem "sqlite3"
|
6
|
+
|
7
|
+
gem "rspec-rails", ">= 2.0.0.beta"
|
8
|
+
|
9
|
+
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
|
10
|
+
# gem 'ruby-debug'
|
11
|
+
# gem 'ruby-debug19'
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2010 Mike Burns
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Flutie is recommended to be run as a gem and included in your Gemfile:
|
|
12
12
|
|
13
13
|
gem "flutie"
|
14
14
|
|
15
|
-
After you've bundled, run the installer:
|
15
|
+
After you've bundled, if you are using Rails < 3.1, run the installer:
|
16
16
|
|
17
17
|
rake flutie:install
|
18
18
|
|
@@ -24,6 +24,10 @@ Click on the "Default styles" link to view the same markup with a barebones layo
|
|
24
24
|
|
25
25
|
To upgrade, bump the gem version in your Gemfile, and then run 'rake flutie:install' again to get the latest changes moved into your application.
|
26
26
|
|
27
|
+
If you are using rails 3.1 or greater with asset pipelining enabled, you don't need to run the installer. Simply add
|
28
|
+
= require 'flutie'
|
29
|
+
in the application stylesheet manifest (app/assets/stylesheets/application.css).
|
30
|
+
|
27
31
|
Usage
|
28
32
|
-----
|
29
33
|
|
@@ -41,9 +45,7 @@ If you use Sass in your application, the flutie stylesheets are also available a
|
|
41
45
|
|
42
46
|
You'll want to import flutie before any of your own styles so that you can do things like extend your classes with flutie classes.
|
43
47
|
|
44
|
-
We have a [
|
45
|
-
|
46
|
-
You should either add that repository as a git submodule in your project, or find some other way to copy the files into sass's load path.
|
48
|
+
We also have a [Bourbon](https://github.com/thoughtbot/bourbon) gem available, which can be used to extend flutie with a set of vanilla sass mixins.
|
47
49
|
|
48
50
|
### Custom Styles
|
49
51
|
|
@@ -69,15 +71,17 @@ Plugin authors can also add to the styleguide by ensuring that their view path i
|
|
69
71
|
Suggestions, Bugs, Refactoring?
|
70
72
|
-------------------------------
|
71
73
|
|
72
|
-
Fork away and create a
|
74
|
+
Fork away and create a [Github Issue](http://github.com/thoughtbot/flutie/issues). Please don't send pull requests.
|
75
|
+
|
76
|
+
Please see CONTRIBUTING.md for details.
|
73
77
|
|
74
78
|
Development
|
75
79
|
-----------
|
76
80
|
|
77
|
-
The actual stylesheet source files are sass, so edit the files in
|
81
|
+
The actual stylesheet source files are sass, so edit the files in app/assets/stylesheets/sass/flutie.
|
78
82
|
To rebuild the normal scss run:
|
79
83
|
|
80
|
-
sass -C --update
|
84
|
+
sass -C --update app/assets/stylesheets/sass/flutie:app/assets/stylesheets
|
81
85
|
|
82
86
|
You can run a server which will allow you to view the flutie styleguide locally:
|
83
87
|
|
data/Rakefile
CHANGED
@@ -1,23 +1,25 @@
|
|
1
|
-
# encoding:
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'rubygems'
|
3
|
+
begin
|
4
|
+
require 'bundler/setup'
|
5
|
+
rescue LoadError
|
6
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
|
+
end
|
2
8
|
|
3
9
|
require 'rake'
|
4
|
-
require '
|
5
|
-
require 'rake/rdoctask'
|
10
|
+
require 'rdoc/task'
|
6
11
|
|
7
|
-
|
8
|
-
|
12
|
+
require 'rspec/core'
|
13
|
+
require 'rspec/core/rake_task'
|
9
14
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
t.pattern = 'test/**/*_test.rb'
|
14
|
-
t.verbose = true
|
15
|
-
end
|
15
|
+
RSpec::Core::RakeTask.new(:spec)
|
16
|
+
|
17
|
+
task :default => :spec
|
16
18
|
|
17
19
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
18
20
|
rdoc.rdoc_dir = 'rdoc'
|
19
21
|
rdoc.title = 'Flutie'
|
20
22
|
rdoc.options << '--line-numbers' << '--inline-source'
|
21
|
-
rdoc.rdoc_files.include('README')
|
23
|
+
rdoc.rdoc_files.include('README.rdoc')
|
22
24
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
23
25
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
|
-
// Optional import of sass mixins. See read me for instructions.
|
2
|
-
// @import '
|
1
|
+
// Optional import of sass mixins from bourbon. See read me for instructions.
|
2
|
+
// @import 'bourbon/bourbon';
|
3
3
|
@import 'reset';
|
4
4
|
@import 'defaults';
|
5
5
|
@import 'type';
|
@@ -7,4 +7,3 @@
|
|
7
7
|
@import 'tables';
|
8
8
|
@import 'lists';
|
9
9
|
@import 'screen';
|
10
|
-
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module PageTitleHelper
|
2
|
+
def page_title(options = {})
|
3
|
+
app_name = options[:app_name] || Rails.application.class.to_s.split('::').first
|
4
|
+
page_title_symbol = options[:page_title_symbol] || :page_title
|
5
|
+
separator = options[:separator] || ' : '
|
6
|
+
|
7
|
+
if content_for?(page_title_symbol)
|
8
|
+
[app_name, content_for(page_title_symbol)].join(separator)
|
9
|
+
else
|
10
|
+
app_name
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/tasks/flutie.rake
CHANGED
@@ -11,7 +11,12 @@ directory = File.dirname(__FILE__)
|
|
11
11
|
namespace :flutie do
|
12
12
|
desc 'install flutie stylesheets into public/ directory'
|
13
13
|
task :install => :environment do
|
14
|
-
|
15
|
-
|
14
|
+
if Rails.application.config.respond_to?(:assets) && Rails.application.config.assets.enabled
|
15
|
+
# No copy is needed when asset pipelining is enabled
|
16
|
+
puts "Flutie stylesheets are provided via asset pipelining."
|
17
|
+
else
|
18
|
+
# Copy the flutie stylesheets into rails_root/public/flutie
|
19
|
+
copy_files("../../app/assets/stylesheets", "/public/flutie", directory)
|
20
|
+
end
|
16
21
|
end
|
17
22
|
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: flutie
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.3
|
4
5
|
prerelease:
|
5
|
-
version: 1.2.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Chad Pytel
|
9
9
|
- Kevin Burg
|
10
10
|
- Matt Jankowski
|
@@ -13,44 +13,48 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
16
|
+
date: 2011-09-02 00:00:00.000000000Z
|
17
|
+
dependencies:
|
18
|
+
- !ruby/object:Gem::Dependency
|
21
19
|
name: sass
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
requirement: &2168765400 !ruby/object:Gem::Requirement
|
24
21
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version:
|
22
|
+
requirements:
|
23
|
+
- - ! '>='
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0'
|
29
26
|
type: :development
|
30
|
-
version_requirements: *id001
|
31
|
-
- !ruby/object:Gem::Dependency
|
32
|
-
name: rails
|
33
27
|
prerelease: false
|
34
|
-
|
28
|
+
version_requirements: *2168765400
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: rails
|
31
|
+
requirement: &2168761900 !ruby/object:Gem::Requirement
|
35
32
|
none: false
|
36
|
-
requirements:
|
37
|
-
- -
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 3.0.
|
33
|
+
requirements:
|
34
|
+
- - =
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 3.0.10
|
40
37
|
type: :development
|
41
|
-
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: *2168761900
|
42
40
|
description: Flutie is a starting point for personal discovery
|
43
41
|
email: support@thoughtbot.com
|
44
42
|
executables: []
|
45
|
-
|
46
43
|
extensions: []
|
47
|
-
|
48
44
|
extra_rdoc_files: []
|
49
|
-
|
50
|
-
|
51
|
-
-
|
52
|
-
-
|
45
|
+
files:
|
46
|
+
- app/assets/stylesheets/flutie.css
|
47
|
+
- app/assets/stylesheets/sass/flutie/_defaults.scss
|
48
|
+
- app/assets/stylesheets/sass/flutie/_forms.scss
|
49
|
+
- app/assets/stylesheets/sass/flutie/_lists.scss
|
50
|
+
- app/assets/stylesheets/sass/flutie/_reset.scss
|
51
|
+
- app/assets/stylesheets/sass/flutie/_screen.scss
|
52
|
+
- app/assets/stylesheets/sass/flutie/_tables.scss
|
53
|
+
- app/assets/stylesheets/sass/flutie/_type.scss
|
54
|
+
- app/assets/stylesheets/sass/flutie/flutie.scss
|
53
55
|
- app/controllers/flutie/styleguides_controller.rb
|
56
|
+
- app/helpers/body_class_helper.rb
|
57
|
+
- app/helpers/page_title_helper.rb
|
54
58
|
- app/views/flutie/styleguides/show.erb
|
55
59
|
- app/views/layouts/flutie.erb
|
56
60
|
- config/initializers/expansion.rb
|
@@ -58,42 +62,32 @@ files:
|
|
58
62
|
- lib/flutie/engine.rb
|
59
63
|
- lib/flutie.rb
|
60
64
|
- lib/tasks/flutie.rake
|
61
|
-
-
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
65
|
-
- public/stylesheets/sass/flutie/_reset.scss
|
66
|
-
- public/stylesheets/sass/flutie/_screen.scss
|
67
|
-
- public/stylesheets/sass/flutie/_tables.scss
|
68
|
-
- public/stylesheets/sass/flutie/_type.scss
|
69
|
-
- public/stylesheets/sass/flutie/flutie.scss
|
70
|
-
has_rdoc: true
|
65
|
+
- LICENSE
|
66
|
+
- Rakefile
|
67
|
+
- Gemfile
|
68
|
+
- README.md
|
71
69
|
homepage: http://github.com/thoughtbot/flutie
|
72
70
|
licenses: []
|
73
|
-
|
74
71
|
post_install_message:
|
75
72
|
rdoc_options: []
|
76
|
-
|
77
|
-
require_paths:
|
73
|
+
require_paths:
|
78
74
|
- lib
|
79
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
76
|
none: false
|
81
|
-
requirements:
|
82
|
-
- -
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version:
|
85
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ! '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
82
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version:
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
91
87
|
requirements: []
|
92
|
-
|
93
88
|
rubyforge_project:
|
94
|
-
rubygems_version: 1.6
|
89
|
+
rubygems_version: 1.8.6
|
95
90
|
signing_key:
|
96
91
|
specification_version: 3
|
97
92
|
summary: Flutie adds default stylesheets to web apps
|
98
93
|
test_files: []
|
99
|
-
|