style-guide 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/README.md +59 -47
- data/app/assets/javascripts/style_guide/docs.js +10 -0
- data/app/assets/stylesheets/style_guide/partial.css +18 -1
- data/app/assets/stylesheets/style_guide/prettify.css +9 -10
- data/app/controllers/style_guide/application_controller.rb +1 -4
- data/app/views/{style_guide → bootstrap}/buttons/_disabled_anchor.erb +0 -0
- data/app/views/{style_guide → bootstrap}/buttons/_disabled_element.erb +0 -0
- data/app/views/{style_guide → bootstrap}/buttons/_sizes.erb +0 -0
- data/app/views/{style_guide → bootstrap}/buttons/_types.erb +0 -0
- data/app/views/{style_guide → bootstrap}/forms/_controls:_checkbox_and_radio.erb +0 -0
- data/app/views/{style_guide → bootstrap}/forms/_controls:_input.erb +0 -0
- data/app/views/{style_guide → bootstrap}/forms/_controls:_select.erb +0 -0
- data/app/views/{style_guide → bootstrap}/forms/_controls:_textarea.erb +0 -0
- data/app/views/{style_guide → bootstrap}/forms/_default_styles.erb +0 -0
- data/app/views/{style_guide → bootstrap}/forms/_horizontal.erb +0 -0
- data/app/views/{style_guide → bootstrap}/forms/_inline.erb +0 -0
- data/app/views/{style_guide → bootstrap}/forms/_search.erb +0 -0
- data/app/views/{style_guide → bootstrap}/images/_dropdown_icons.erb +0 -0
- data/app/views/{style_guide → bootstrap}/images/_form_fields.erb +0 -0
- data/app/views/{style_guide → bootstrap}/images/_icon_buttons.erb +0 -0
- data/app/views/{style_guide → bootstrap}/images/_navigation.erb +0 -0
- data/app/views/{style_guide → bootstrap}/images/_placeholders.erb +0 -0
- data/app/views/{style_guide → bootstrap}/images/_small_button.erb +0 -0
- data/app/views/{style_guide → bootstrap}/tables/_bordered.erb +0 -0
- data/app/views/{style_guide → bootstrap}/tables/_condensed.erb +0 -0
- data/app/views/{style_guide → bootstrap}/tables/_default_style.erb +0 -0
- data/app/views/{style_guide → bootstrap}/tables/_hover.erb +0 -0
- data/app/views/{style_guide → bootstrap}/tables/_row_classes.erb +0 -0
- data/app/views/{style_guide → bootstrap}/tables/_striped.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_abbreviation.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_address.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_blockquote.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_body_copy.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_code.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_description_list.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_emphasis.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_emphasis_classes.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_headings.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_ordered_list.erb +0 -0
- data/app/views/{style_guide → bootstrap}/typography/_unordered_list.erb +0 -0
- data/config/routes.rb +1 -1
- data/lib/generators/style_guide/install_generator.rb +107 -0
- data/lib/style-guide.rb +1 -0
- data/lib/style_guide/config.rb +21 -11
- data/lib/style_guide/section.rb +16 -6
- data/lib/style_guide/version.rb +1 -1
- data/spec/controllers/style_guide/style_controller_spec.rb +3 -5
- data/spec/dummy/app/views/{styles → style-guide/styles}/_00swatches.erb +0 -0
- data/spec/dummy/app/views/{styles → style-guide/styles}/_three_dee.erb +0 -0
- data/spec/dummy/config/application.rb +1 -1
- data/spec/lib/generators/style_guide/install_generator_spec.rb +150 -0
- data/spec/lib/style_guide/config_spec.rb +53 -9
- data/spec/lib/style_guide/partial_spec.rb +1 -1
- data/spec/lib/style_guide/section_spec.rb +34 -13
- data/spec/spec_helper.rb +2 -1
- data/style-guide.gemspec +6 -4
- metadata +55 -51
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,85 +1,97 @@
|
|
1
|
-
|
1
|
+
Style Guide [![Build Status](https://secure.travis-ci.org/pivotalexperimental/style-guide.png?branch=master)](https://travis-ci.org/pivotalexperimental/style-guide) [![Dependency Status](https://gemnasium.com/pivotalexperimental/style-guide.png)](https://gemnasium.com/pivotalexperimental/style-guide) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/pivotalexperimental/style-guide)
|
2
|
+
===
|
2
3
|
|
3
|
-
|
4
|
+
Style Guide is a mountable Rails engine where you curate and view your site's visual elements.
|
4
5
|
|
5
|
-
Style Guide
|
6
|
-
visual elements and iterate on them in a controlled environment. It is
|
7
|
-
implemented as a Rails engine in order to stay close to the application being
|
8
|
-
styled.
|
6
|
+
Tutorials on important topics, such as creating your own Style Guide sections, writing documentation for visual elements and more can be found in the [Style Guide wiki](https://github.com/pivotalexperimental/style-guide/wiki).
|
9
7
|
|
10
|
-
When used with [guard-livereload](https://github.com/guard/guard-livereload),
|
11
|
-
Style Guide automatically reloads itself when you make changes to the CSS,
|
12
|
-
Javascript or HTML in your site.
|
13
8
|
|
9
|
+
Features
|
10
|
+
--------
|
14
11
|
|
15
|
-
|
12
|
+
* Simple: just directories of partials
|
13
|
+
* Responsive: see how everything looks on a mobile device
|
14
|
+
* Live: file changes are presented immediately when using [LiveReload](http://livereload.com)
|
15
|
+
* Documentation-aware: each partial can be documented with an i18n scope
|
16
16
|
|
17
|
-
First, require the StyleGuide gem in `application.rb`:
|
18
17
|
|
19
|
-
|
18
|
+
Anti-Features
|
19
|
+
-------------
|
20
20
|
|
21
|
+
* Not a Layout Guide: visual elements should not be composed
|
22
|
+
* Not a linting tool: no warnings or errors are displayed
|
23
|
+
* Curated, not magic: providing fake data for partials is not covered
|
21
24
|
|
22
|
-
Then, append a directory of partials in `application.rb`:
|
23
25
|
|
24
|
-
|
26
|
+
Example
|
27
|
+
-------
|
25
28
|
|
29
|
+
You can see an example of Style Guide at swivel's automatically-deployed
|
30
|
+
testing instance: [http://swivel.herokuapp.com](http://swivel.herokuapp.com)
|
26
31
|
|
27
|
-
Next, mount the StyleGuide application in `routes.rb`:
|
28
|
-
|
29
|
-
mount StyleGuide::Engine => "/style-guide" unless Rails.env.production?
|
30
32
|
|
33
|
+
Installation
|
34
|
+
------------
|
31
35
|
|
32
|
-
|
36
|
+
The simplest way to install Style Guide is to use [Bundler](http://gembundler.com).
|
33
37
|
|
34
|
-
|
38
|
+
Add Style Guide to your `Gemfile`:
|
35
39
|
|
40
|
+
```ruby
|
41
|
+
group :development do
|
42
|
+
gem 'style-guide'
|
43
|
+
end
|
44
|
+
```
|
36
45
|
|
37
|
-
|
46
|
+
Then, use Bundler to install the gem and its dependencies:
|
38
47
|
|
39
|
-
|
48
|
+
```bash
|
49
|
+
$ bundle install
|
50
|
+
```
|
40
51
|
|
41
|
-
|
42
|
-
INFO - livereload guard added to Guardfile, feel free to edit it
|
43
|
-
$ guard
|
44
|
-
INFO - LiveReload is waiting for a browser to connect.
|
52
|
+
Last, run the Rails generator to configure your app:
|
45
53
|
|
46
|
-
|
47
|
-
|
54
|
+
```bash
|
55
|
+
$ rails g style_guide:install
|
56
|
+
```
|
48
57
|
|
49
|
-
|
50
|
-
Add this line to the top of your `Guardfile`:
|
58
|
+
The generator will install [guard-livereload](https://github.com/guard/guard-livereload) and [rack-livereload](https://github.com/johnbintz/rack-livereload).
|
51
59
|
|
52
|
-
|
60
|
+
Consult the [Style Guide wiki](https://github.com/pivotalexperimental/style-guide/wiki) for more information about what the generator does.
|
53
61
|
|
54
|
-
Then add the following lines to `Procfile`, located in the root of your app:
|
55
62
|
|
56
|
-
|
57
|
-
|
63
|
+
Contributing
|
64
|
+
------------
|
58
65
|
|
66
|
+
* Fork the project.
|
67
|
+
* Make your feature addition or bug fix.
|
68
|
+
* Add tests for it. This is important because breaking your feature in a future version unintentionally is sad.
|
69
|
+
* Issue a pull request. Bonus points for topic branches.
|
59
70
|
|
60
|
-
## Best Practices
|
61
71
|
|
62
|
-
|
63
|
-
|
72
|
+
Authors
|
73
|
+
-------
|
64
74
|
|
65
|
-
*
|
66
|
-
|
75
|
+
* Doc Ritezel
|
76
|
+
* Ofri Afek
|
67
77
|
|
68
|
-
config.style_guide.partial_paths << Rails.root.join("app/views/style_guide/*")
|
69
78
|
|
70
|
-
|
71
|
-
|
79
|
+
Contributors
|
80
|
+
------------
|
72
81
|
|
73
|
-
*
|
74
|
-
|
82
|
+
* Rob Head
|
83
|
+
* Can Berk Güder
|
84
|
+
* Dennis Schmidt
|
75
85
|
|
76
86
|
|
77
|
-
|
87
|
+
Special Thanks
|
88
|
+
--------------
|
78
89
|
|
79
|
-
|
80
|
-
|
90
|
+
* [@tildewill](https://twitter.com/TildeWill), [@emstar](https://twitter.com/emstar) and [@ajmurmann](https://twitter.com/ajmurmann) for fantastic input during the initial development process
|
91
|
+
* Dmitriy Kalinin for being himself
|
81
92
|
|
82
93
|
|
83
|
-
|
94
|
+
License
|
95
|
+
-------
|
84
96
|
|
85
97
|
See `LICENSE` for more information.
|
@@ -3,6 +3,16 @@
|
|
3
3
|
$(".style-guide-partial [href^=#], .style-guide-partial-source").click(function(e) {
|
4
4
|
e.preventDefault();
|
5
5
|
});
|
6
|
+
|
7
|
+
$(".style-guide-partial-identifiers code").mouseover(function() {
|
8
|
+
var identifier = $(this).text();
|
9
|
+
$(this).closest(".style-guide-partial")
|
10
|
+
.find(identifier)
|
11
|
+
.addClass("style-guide-identifier-highlight");
|
12
|
+
}).mouseout(function() {
|
13
|
+
$(".style-guide-identifier-highlight").removeClass("style-guide-identifier-highlight");
|
14
|
+
});
|
15
|
+
|
6
16
|
window.prettyPrint && prettyPrint();
|
7
17
|
});
|
8
18
|
})(window.jQuery);
|
@@ -16,23 +16,40 @@
|
|
16
16
|
}
|
17
17
|
|
18
18
|
.style-guide-partial-description {
|
19
|
+
font-size: 14px;
|
19
20
|
margin-bottom: 15px;
|
20
21
|
color: #5D5C5C;
|
21
22
|
}
|
22
23
|
|
24
|
+
.style-guide-partial-source,
|
25
|
+
.style-guide-partial-identifiers code,
|
26
|
+
.style-guide-partial-description code {
|
27
|
+
font-size: 12px;
|
28
|
+
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
29
|
+
}
|
30
|
+
|
23
31
|
.style-guide-partial-identifiers code,
|
24
32
|
.style-guide-partial-description code {
|
25
33
|
color: #d14;
|
26
34
|
background-color: #f5f5f5;
|
27
35
|
padding: 0 4px;
|
28
36
|
border: 1px solid #ddd;
|
29
|
-
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
30
37
|
white-space: nowrap;
|
31
38
|
-webkit-border-radius: 0;
|
32
39
|
-moz-border-radius: 0;
|
33
40
|
border-radius: 0;
|
34
41
|
}
|
35
42
|
|
43
|
+
.style-guide-partial-identifiers code {
|
44
|
+
cursor: pointer;
|
45
|
+
}
|
46
|
+
|
47
|
+
.style-guide-identifier-highlight {
|
48
|
+
-webkit-box-shadow: 0 1px 1px rgba(255, 0, 0, 1), 1px 0 1px rgba(255, 0, 0, 1), 0 -1px 1px rgba(255, 0, 0, 1), -1px 0 1px rgba(255, 0, 0, 1);
|
49
|
+
-moz-box-shadow: 0 1px 1px rgba(255, 0, 0, 1), 1px 0 1px rgba(255, 0, 0, 1), 0 -1px 1px rgba(255, 0, 0, 1), -1px 0 1px rgba(255, 0, 0, 1);
|
50
|
+
box-shadow: 0 1px 1px rgba(255, 0, 0, 1), 1px 0 1px rgba(255, 0, 0, 1), 0 -1px 1px rgba(255, 0, 0, 1), -1px 0 1px rgba(255, 0, 0, 1);
|
51
|
+
}
|
52
|
+
|
36
53
|
.style-guide-partial-rendered,
|
37
54
|
.style-guide-partial-identifiers {
|
38
55
|
position: relative;
|
@@ -6,21 +6,20 @@
|
|
6
6
|
.kwd, .prettyprint .tag { color: navy; }
|
7
7
|
.typ, .atn, .dec, .var { color: teal; }
|
8
8
|
|
9
|
-
.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
-webkit-box-shadow: inset 40px 0 0 #ECECEC, inset 41px 0 0 #ddd;
|
14
|
-
-moz-box-shadow: inset 40px 0 0 #ECECEC, inset 41px 0 0 #ddd;
|
15
|
-
box-shadow: inset 40px 0 0 #ECECEC, inset 41px 0 0 #ddd;
|
9
|
+
.style-guide-partial-source {
|
10
|
+
-webkit-box-shadow: inset 40px 0 0 #f5f5f5, inset 41px 0 0 #ddd;
|
11
|
+
-moz-box-shadow: inset 40px 0 0 #f5f5f5, inset 41px 0 0 #ddd;
|
12
|
+
box-shadow: inset 40px 0 0 #f5f5f5, inset 41px 0 0 #ddd;
|
16
13
|
}
|
17
14
|
|
18
|
-
|
15
|
+
.style-guide-partial-source ol {
|
16
|
+
padding: 0;
|
19
17
|
margin: 0 0 0 33px; /* IE indents via margin-left */
|
20
18
|
}
|
21
|
-
|
19
|
+
.style-guide-partial-source li {
|
22
20
|
font-size: 12px;
|
23
|
-
|
21
|
+
margin: 0;
|
22
|
+
padding: 0 0 0 5px;
|
24
23
|
color: #888;
|
25
24
|
line-height: 20px;
|
26
25
|
text-shadow: 0 1px 0 #fff;
|
@@ -1,10 +1,7 @@
|
|
1
1
|
module StyleGuide
|
2
2
|
class ApplicationController < ActionController::Base
|
3
3
|
def load_sections
|
4
|
-
@sections =
|
5
|
-
StyleGuide::Engine.config.style_guide.partial_paths.map do |path|
|
6
|
-
StyleGuide::Section.new(path)
|
7
|
-
end
|
4
|
+
@sections = StyleGuide::Engine.config.style_guide.sections
|
8
5
|
end
|
9
6
|
end
|
10
7
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/config/routes.rb
CHANGED
@@ -0,0 +1,107 @@
|
|
1
|
+
require "rails/generators"
|
2
|
+
|
3
|
+
module StyleGuide
|
4
|
+
class InstallGenerator < ::Rails::Generators::Base
|
5
|
+
desc "Style Guide installation generator"
|
6
|
+
def install
|
7
|
+
should_bundle = ensure_rack_livereload.nil?
|
8
|
+
should_bundle = ensure_guard_livereload.nil? || should_bundle
|
9
|
+
bundle_command("install") if should_bundle
|
10
|
+
|
11
|
+
configure_guard_livereload
|
12
|
+
configure_application
|
13
|
+
configure_development
|
14
|
+
mount_style_guide
|
15
|
+
end
|
16
|
+
|
17
|
+
no_tasks do
|
18
|
+
def guardfile
|
19
|
+
@guardfile ||= if File.exists?(guardfile_path)
|
20
|
+
File.open(guardfile_path).read
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def application_rb
|
25
|
+
@application_rb ||= File.open(application_rb_path).read
|
26
|
+
end
|
27
|
+
|
28
|
+
def development_rb
|
29
|
+
@development_rb ||= File.open(development_rb_path).read
|
30
|
+
end
|
31
|
+
|
32
|
+
def routes_rb
|
33
|
+
@routes_rb ||= File.open(routes_rb_path).read
|
34
|
+
end
|
35
|
+
|
36
|
+
def default_partial_path
|
37
|
+
'Rails.root.join("app/views/style-guide/**/*")'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
def guardfile_path
|
43
|
+
Rails.root.join("Guardfile")
|
44
|
+
end
|
45
|
+
|
46
|
+
def application_rb_path
|
47
|
+
Rails.root.join("config", "application.rb")
|
48
|
+
end
|
49
|
+
|
50
|
+
def development_rb_path
|
51
|
+
Rails.root.join("config", "environments", "development.rb")
|
52
|
+
end
|
53
|
+
|
54
|
+
def routes_rb_path
|
55
|
+
Rails.root.join("config", "routes.rb")
|
56
|
+
end
|
57
|
+
|
58
|
+
def ensure_rack_livereload
|
59
|
+
Rack.const_get("LiveReload")
|
60
|
+
rescue NameError
|
61
|
+
gem "rack-livereload", :group => "development"
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
|
65
|
+
def ensure_guard_livereload
|
66
|
+
Guard.const_get("LiveReload")
|
67
|
+
rescue NameError
|
68
|
+
gem "guard-livereload", :group => "development"
|
69
|
+
nil
|
70
|
+
end
|
71
|
+
|
72
|
+
def bundle_command(command)
|
73
|
+
say_status :run, "bundle #{command}"
|
74
|
+
|
75
|
+
Dir.chdir(Rails.root) do
|
76
|
+
oldrubyopt = ENV["RUBYOPT"]
|
77
|
+
ENV["RUBYOPT"] = nil
|
78
|
+
system("#{Gem.bin_path('bundler', 'bundle')} #{command}")
|
79
|
+
ENV["RUBYOPT"] = oldrubyopt
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def configure_guard_livereload
|
84
|
+
unless guardfile && guardfile.include?("guard 'livereload'")
|
85
|
+
bundle_command("exec guard init livereload")
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def configure_application
|
90
|
+
unless application_rb && application_rb.include?("config.style_guide.paths")
|
91
|
+
application("config.style_guide.paths << #{default_partial_path}")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def configure_development
|
96
|
+
unless development_rb && development_rb.include?("Rack::LiveReload")
|
97
|
+
application("config.middleware.insert_before(::Rack::Lock, ::Rack::LiveReload, :min_delay => 500) if defined?(Rack::LiveReload)", :env => "development")
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def mount_style_guide
|
102
|
+
unless routes_rb && routes_rb.include?("mount StyleGuide::Engine")
|
103
|
+
route(%(mount StyleGuide::Engine => "/style-guide"))
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
data/lib/style-guide.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "style_guide"
|
data/lib/style_guide/config.rb
CHANGED
@@ -1,25 +1,35 @@
|
|
1
1
|
module StyleGuide
|
2
2
|
class Config
|
3
|
-
attr_reader :
|
3
|
+
attr_reader :paths
|
4
4
|
|
5
|
-
def self.
|
6
|
-
StyleGuide::Engine.root.join("app", "views", "
|
7
|
-
end
|
8
|
-
|
9
|
-
def self.style_guide_views_directories
|
10
|
-
style_guide_views_path.children.select(&:directory?).reject { |d| d.basename.to_s == "style" }
|
5
|
+
def self.bootstrap_glob
|
6
|
+
StyleGuide::Engine.root.join("app", "views", "bootstrap", "*")
|
11
7
|
end
|
12
8
|
|
13
9
|
def initialize(options = {})
|
14
|
-
@
|
10
|
+
@paths = options[:paths] || [self.class.bootstrap_glob]
|
15
11
|
end
|
16
12
|
|
17
|
-
def
|
13
|
+
def paths=(paths)
|
18
14
|
if paths.is_a?(Array)
|
19
|
-
@
|
15
|
+
@paths = paths
|
20
16
|
else
|
21
|
-
@
|
17
|
+
@paths = [paths]
|
22
18
|
end
|
23
19
|
end
|
20
|
+
|
21
|
+
def sections
|
22
|
+
StyleGuide::Section.from_paths(expanded_paths)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def expanded_paths
|
28
|
+
globbed_paths.flatten.uniq.select(&:directory?)
|
29
|
+
end
|
30
|
+
|
31
|
+
def globbed_paths
|
32
|
+
paths.map { |path| Pathname.glob(path) }
|
33
|
+
end
|
24
34
|
end
|
25
35
|
end
|
data/lib/style_guide/section.rb
CHANGED
@@ -2,14 +2,24 @@ require "style_guide/partial"
|
|
2
2
|
|
3
3
|
module StyleGuide
|
4
4
|
class Section
|
5
|
-
attr_reader :path
|
5
|
+
attr_reader :path, :id
|
6
6
|
|
7
|
-
def
|
8
|
-
|
7
|
+
def self.id_from_path(path)
|
8
|
+
File.basename(path).downcase.gsub(/[^a-zA-Z0-9]/, " ").strip.gsub(/\s+/, "_")
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.from_paths(paths)
|
12
|
+
[*paths].reduce({}) do |sections, path|
|
13
|
+
id = id_from_path(path)
|
14
|
+
section = sections[id] ||= []
|
15
|
+
section << new("#{id}#{section.empty? ? '' : section.count}", path)
|
16
|
+
sections
|
17
|
+
end.values.flatten
|
9
18
|
end
|
10
19
|
|
11
|
-
def id
|
12
|
-
@id
|
20
|
+
def initialize(id, path)
|
21
|
+
@id = id
|
22
|
+
@path = path
|
13
23
|
end
|
14
24
|
|
15
25
|
def title
|
@@ -23,7 +33,7 @@ module StyleGuide
|
|
23
33
|
private
|
24
34
|
|
25
35
|
def partial_paths
|
26
|
-
@partial_paths ||= Dir.glob(File.expand_path("
|
36
|
+
@partial_paths ||= Dir.glob(File.expand_path("_*.erb", path))
|
27
37
|
end
|
28
38
|
end
|
29
39
|
end
|
data/lib/style_guide/version.rb
CHANGED
@@ -6,7 +6,7 @@ describe StyleGuide::StyleController do
|
|
6
6
|
|
7
7
|
before do
|
8
8
|
FileUtils.mkdir_p(partial_path)
|
9
|
-
StyleGuide::Engine.config.style_guide.
|
9
|
+
StyleGuide::Engine.config.style_guide.paths = "#{temp_path}/*"
|
10
10
|
end
|
11
11
|
|
12
12
|
describe "#index" do
|
@@ -25,17 +25,15 @@ describe StyleGuide::StyleController do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "#show" do
|
28
|
-
let(:fake_section) { StyleGuide::Section.new(partial_path) }
|
29
|
-
|
30
28
|
it "assigns sections" do
|
31
|
-
get :show, id:
|
29
|
+
get :show, id: "monkey_hammer", use_route: :styles
|
32
30
|
assigns(:sections).should be
|
33
31
|
assigns(:sections).should have(1).section
|
34
32
|
assigns(:sections).first.should be_a StyleGuide::Section
|
35
33
|
end
|
36
34
|
|
37
35
|
it "assigns the section" do
|
38
|
-
get :show, id:
|
36
|
+
get :show, id: "monkey_hammer", use_route: :styles
|
39
37
|
assigns(:current_section).should be_a StyleGuide::Section
|
40
38
|
assigns(:current_section).title.should == "Monkey Hammer"
|
41
39
|
end
|
File without changes
|
File without changes
|
@@ -26,7 +26,7 @@ module Dummy
|
|
26
26
|
# Version of your assets, change this if you want to expire all your assets
|
27
27
|
config.assets.version = '1.0'
|
28
28
|
|
29
|
-
config.style_guide.
|
29
|
+
config.style_guide.paths << Rails.root.join("app/views/style-guide/**/*")
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -0,0 +1,150 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe StyleGuide::InstallGenerator do
|
4
|
+
describe "#install" do
|
5
|
+
before do
|
6
|
+
subject.stub(:gem)
|
7
|
+
subject.stub(:route)
|
8
|
+
subject.stub(:bundle_command)
|
9
|
+
subject.stub(:application)
|
10
|
+
Rack.stub(:const_get).and_return("constant")
|
11
|
+
Guard.stub(:const_get).and_return("constant")
|
12
|
+
subject.stub(:routes_rb).and_return("mount StyleGuide::Engine")
|
13
|
+
subject.stub(:guardfile).and_return("guard 'livereload'")
|
14
|
+
subject.stub(:application_rb).and_return("config.style_guide.paths")
|
15
|
+
subject.stub(:development_rb).and_return("Rack::LiveReload")
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "rack livereload dependency" do
|
19
|
+
context "when rack-livereload is installed" do
|
20
|
+
it "does not add rack-livereload to the Gemfile" do
|
21
|
+
subject.should_not_receive(:gem).with("rack-livereload", anything)
|
22
|
+
subject.install
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "when rack-livereload is not installed" do
|
27
|
+
before { Rack.stub(:const_get).and_raise(NameError) }
|
28
|
+
|
29
|
+
it "adds rack-livereload to the Gemfile" do
|
30
|
+
subject.should_receive(:gem).with("rack-livereload", anything)
|
31
|
+
subject.install
|
32
|
+
end
|
33
|
+
|
34
|
+
it "runs bundle install" do
|
35
|
+
subject.should_receive(:bundle_command).with("install")
|
36
|
+
subject.install
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "guard livereload dependency" do
|
42
|
+
context "when guard-livereload is installed" do
|
43
|
+
it "does not add guard-livereload to the Gemfile" do
|
44
|
+
subject.should_not_receive(:gem).with("guard-livereload", anything)
|
45
|
+
subject.install
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context "when guard-livereload is not installed" do
|
50
|
+
before { Guard.stub(:const_get).and_raise(NameError) }
|
51
|
+
|
52
|
+
it "adds guard-livereload to the Gemfile" do
|
53
|
+
subject.should_receive(:gem).with("guard-livereload", anything)
|
54
|
+
subject.install
|
55
|
+
end
|
56
|
+
|
57
|
+
it "runs bundle install" do
|
58
|
+
subject.should_receive(:bundle_command).with("install")
|
59
|
+
subject.install
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe "guard livereload configuration" do
|
65
|
+
context "when guard-livereload is in the Guardfile" do
|
66
|
+
it "does not add guard-livereload to the Guardfile" do
|
67
|
+
subject.should_not_receive(:bundle_command)
|
68
|
+
subject.install
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
context "when guard-livereload is not in the Guardfile" do
|
73
|
+
before { subject.stub(:guardfile).and_return("meat") }
|
74
|
+
|
75
|
+
it "adds guard-livereload to the Guardfile" do
|
76
|
+
subject.should_receive(:bundle_command).with("exec guard init livereload")
|
77
|
+
subject.install
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "rails configuration" do
|
83
|
+
context "when style guide is not configured in application.rb" do
|
84
|
+
before { subject.stub(:application_rb).and_return("") }
|
85
|
+
|
86
|
+
it "adds an entry for style guide partial paths" do
|
87
|
+
subject.should_receive(:application).once do |config, options|
|
88
|
+
options.should == nil
|
89
|
+
config.should include "config.style_guide.paths"
|
90
|
+
config.should include subject.default_partial_path
|
91
|
+
end
|
92
|
+
subject.install
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
context "when style guide is configured in application.rb" do
|
97
|
+
before { subject.stub(:application_rb).and_return("config.style_guide.paths") }
|
98
|
+
|
99
|
+
it "does not modify application.rb" do
|
100
|
+
subject.should_not_receive(:application)
|
101
|
+
subject.install
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
describe "development configuration" do
|
107
|
+
context "when livereload is not configured in development.rb" do
|
108
|
+
before { subject.stub(:development_rb).and_return("") }
|
109
|
+
|
110
|
+
it "adds an entry for livereload" do
|
111
|
+
subject.should_receive(:application).once do |config, options|
|
112
|
+
options.should == {:env => "development"}
|
113
|
+
config.should include "config.middleware.insert_before"
|
114
|
+
config.should include "Rack::LiveReload"
|
115
|
+
end
|
116
|
+
subject.install
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
context "when livereload is already configured in development.rb" do
|
121
|
+
before { subject.stub(:development_rb).and_return("Rack::LiveReload") }
|
122
|
+
|
123
|
+
it "does not modify development.rb" do
|
124
|
+
subject.should_not_receive(:application)
|
125
|
+
subject.install
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
describe "mounting" do
|
131
|
+
context "when style guide is not mounted" do
|
132
|
+
before { subject.stub(:routes_rb).and_return("") }
|
133
|
+
|
134
|
+
it "mounts the style guide" do
|
135
|
+
subject.should_receive(:route).with('mount StyleGuide::Engine => "/style-guide"')
|
136
|
+
subject.install
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
context "when style guide is not mounted" do
|
141
|
+
before { subject.stub(:routes_rb).and_return("mount StyleGuide::Engine") }
|
142
|
+
|
143
|
+
it "does not mount the style guide" do
|
144
|
+
subject.should_not_receive(:route)
|
145
|
+
subject.install
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -1,32 +1,76 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe StyleGuide::Config do
|
4
|
-
describe "#
|
4
|
+
describe "#paths" do
|
5
5
|
context "when no paths have been added" do
|
6
|
-
it { should have_at_least(1).
|
7
|
-
its(:partial_paths) { should_not include StyleGuide::Engine.root.join("app/views/style_guide/style") }
|
6
|
+
it { should have_at_least(1).path }
|
8
7
|
end
|
9
8
|
|
10
9
|
context "when adding a path" do
|
11
10
|
it "modifies the partial paths" do
|
12
11
|
expect do
|
13
|
-
subject.
|
14
|
-
end.to change{ subject.
|
12
|
+
subject.paths << "disappointment"
|
13
|
+
end.to change{ subject.paths.count }.by(1)
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
18
17
|
context "when setting the paths" do
|
19
18
|
it "sets the partial paths" do
|
20
19
|
expect do
|
21
|
-
subject.
|
22
|
-
end.to change { subject.
|
20
|
+
subject.paths = "loathing"
|
21
|
+
end.to change { subject.paths }.to(["loathing"])
|
23
22
|
end
|
24
23
|
end
|
25
24
|
|
26
25
|
context "after a path has been added" do
|
27
|
-
before { subject.
|
26
|
+
before { subject.paths << "partials-and-magic-beans" }
|
28
27
|
|
29
|
-
its(:
|
28
|
+
its(:paths) { should include "partials-and-magic-beans" }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#sections" do
|
33
|
+
context "when no paths have been added" do
|
34
|
+
it { should have_at_least(1).section }
|
35
|
+
its(:'sections.first') { should be_a StyleGuide::Section }
|
36
|
+
end
|
37
|
+
|
38
|
+
context "when adding a nonexistent path" do
|
39
|
+
it "has no impact on the sections" do
|
40
|
+
expect do
|
41
|
+
subject.paths << "disappointment"
|
42
|
+
end.not_to change{ subject.sections.count }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "when adding a non-globbed path" do
|
47
|
+
let(:path) { StyleGuide::Engine.root.join("app", "views") }
|
48
|
+
|
49
|
+
it "only adds that base path" do
|
50
|
+
expect do
|
51
|
+
subject.paths << path
|
52
|
+
end.to change { subject.sections.count }.by(1)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "when adding a globbed path" do
|
57
|
+
let(:path) { StyleGuide::Engine.root.join("app", "views", "layouts", "*") }
|
58
|
+
|
59
|
+
it "obeys globbing" do
|
60
|
+
expect do
|
61
|
+
subject.paths << path
|
62
|
+
end.to change { subject.sections.count }.by(1)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
context "when adding existing paths" do
|
67
|
+
let(:path) { StyleGuide::Engine.root.join("app", "views", "bootstrap", "**", "*") }
|
68
|
+
|
69
|
+
it "deduplicates existing paths" do
|
70
|
+
expect do
|
71
|
+
subject.paths << path
|
72
|
+
end.not_to change { subject.sections.count }
|
73
|
+
end
|
30
74
|
end
|
31
75
|
end
|
32
76
|
end
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe StyleGuide::Partial do
|
4
4
|
let(:path) { "/hygenic/_gargling.erb" }
|
5
|
-
let(:section) { StyleGuide::Section.
|
5
|
+
let(:section) { StyleGuide::Section.from_paths("/flaky/gangrene").first }
|
6
6
|
let(:partial) { StyleGuide::Partial.new(path, section) }
|
7
7
|
|
8
8
|
describe "#title" do
|
@@ -2,45 +2,66 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe StyleGuide::Section do
|
4
4
|
let(:path) { "/magnetic/sputum" }
|
5
|
-
let(:section) { StyleGuide::Section.new(path) }
|
5
|
+
let(:section) { StyleGuide::Section.new("sputum", path) }
|
6
6
|
|
7
|
-
describe "
|
8
|
-
subject {
|
7
|
+
describe ".id_from_path" do
|
8
|
+
subject { StyleGuide::Section.id_from_path(path) }
|
9
9
|
|
10
10
|
context "with a simple path" do
|
11
|
-
it { should == "
|
11
|
+
it { should == "sputum" }
|
12
12
|
end
|
13
13
|
|
14
|
-
context "with a
|
14
|
+
context "with a good activerecord path" do
|
15
15
|
let(:path) { "/tasty/bicycle_tires" }
|
16
16
|
|
17
|
-
it { should == "
|
17
|
+
it { should == "bicycle_tires" }
|
18
18
|
end
|
19
19
|
|
20
20
|
context "with a path containing extra stuff" do
|
21
21
|
let(:path) { "/help/kocher%has-m1y=keyb^oaard" }
|
22
22
|
|
23
|
-
it { should == "
|
23
|
+
it { should == "kocher_has_m1y_keyb_oaard" }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
describe "
|
28
|
-
|
27
|
+
describe ".from_paths" do
|
28
|
+
let(:paths) { path }
|
29
|
+
subject { StyleGuide::Section.from_paths(paths).map(&:id) }
|
30
|
+
|
31
|
+
context "with a single path" do
|
32
|
+
it { should =~ ["sputum"] }
|
33
|
+
end
|
34
|
+
|
35
|
+
context "with multiple paths" do
|
36
|
+
let(:paths) { ["/bat/wings", "/thinning/hair"] }
|
37
|
+
|
38
|
+
it { should =~ ["wings", "hair"] }
|
39
|
+
end
|
40
|
+
|
41
|
+
context "with multiple paths having the same basename" do
|
42
|
+
let(:paths) { ["/neck/wattle", "/underarm/wattle"] }
|
43
|
+
|
44
|
+
it { should =~ ["wattle", "wattle1"] }
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe "#title" do
|
49
|
+
subject { section.title }
|
29
50
|
|
30
51
|
context "with a simple path" do
|
31
|
-
it { should == "
|
52
|
+
it { should == "Sputum" }
|
32
53
|
end
|
33
54
|
|
34
|
-
context "with a
|
55
|
+
context "with a path activerecord would be good at" do
|
35
56
|
let(:path) { "/tasty/bicycle_tires" }
|
36
57
|
|
37
|
-
it { should == "
|
58
|
+
it { should == "Bicycle Tires" }
|
38
59
|
end
|
39
60
|
|
40
61
|
context "with a path containing extra stuff" do
|
41
62
|
let(:path) { "/help/kocher%has-m1y=keyb^oaard" }
|
42
63
|
|
43
|
-
it { should == "
|
64
|
+
it { should == "Kocher%Has M1y=Keyb^Oaard" }
|
44
65
|
end
|
45
66
|
end
|
46
67
|
|
data/spec/spec_helper.rb
CHANGED
@@ -3,5 +3,6 @@ require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
|
3
3
|
|
4
4
|
require "tmpdir"
|
5
5
|
require "rspec/rails"
|
6
|
-
|
6
|
+
require "generators/style_guide/install_generator"
|
7
|
+
|
7
8
|
Dir.glob(File.expand_path("../support/**/*.rb")).each {|f| require f }
|
data/style-guide.gemspec
CHANGED
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.authors = ["Doc Ritezel"]
|
8
8
|
s.email = ["doc@pivotallabs.com"]
|
9
9
|
s.homepage = "https://github.com/pivotal/style-guide"
|
10
|
-
s.summary = "A
|
11
|
-
s.description = "
|
10
|
+
s.summary = "A style guide for your Rails application."
|
11
|
+
s.description = "A mountable Rails engine where you curate and view your site's visual elements."
|
12
12
|
|
13
13
|
s.files = `git ls-files`.split( "\n" ) - %w(Gemfile.lock)
|
14
14
|
s.test_files = `git ls-files -- spec/*`.split( "\n" )
|
@@ -19,12 +19,14 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_dependency "nokogiri", "~> 1.5"
|
20
20
|
s.add_dependency "github-markdown", "~> 0.5"
|
21
21
|
|
22
|
+
# super-relevant in development, but super-irrelevant in staging
|
23
|
+
s.add_development_dependency "rack-livereload"
|
24
|
+
s.add_development_dependency "guard-livereload"
|
25
|
+
|
22
26
|
s.add_development_dependency "foreman"
|
23
27
|
s.add_development_dependency "rb-fsevent"
|
24
28
|
s.add_development_dependency "rspec-rails"
|
25
29
|
s.add_development_dependency "guard-rspec"
|
26
30
|
s.add_development_dependency "guard-bundler"
|
27
|
-
s.add_development_dependency "rack-livereload"
|
28
|
-
s.add_development_dependency "guard-livereload"
|
29
31
|
s.add_development_dependency "terminal-notifier-guard"
|
30
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: style-guide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0.5'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
79
|
+
name: rack-livereload
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
@@ -92,7 +92,7 @@ dependencies:
|
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
|
-
name:
|
95
|
+
name: guard-livereload
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
|
-
name:
|
111
|
+
name: foreman
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
@@ -124,7 +124,7 @@ dependencies:
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
127
|
+
name: rb-fsevent
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
@@ -140,7 +140,7 @@ dependencies:
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
|
-
name:
|
143
|
+
name: rspec-rails
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
none: false
|
146
146
|
requirements:
|
@@ -156,7 +156,7 @@ dependencies:
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
|
-
name:
|
159
|
+
name: guard-rspec
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
none: false
|
162
162
|
requirements:
|
@@ -172,7 +172,7 @@ dependencies:
|
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
|
-
name: guard-
|
175
|
+
name: guard-bundler
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|
177
177
|
none: false
|
178
178
|
requirements:
|
@@ -203,8 +203,8 @@ dependencies:
|
|
203
203
|
- - ! '>='
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
|
-
description:
|
207
|
-
|
206
|
+
description: A mountable Rails engine where you curate and view your site's visual
|
207
|
+
elements.
|
208
208
|
email:
|
209
209
|
- doc@pivotallabs.com
|
210
210
|
executables: []
|
@@ -295,48 +295,50 @@ files:
|
|
295
295
|
- app/controllers/style_guide/application_controller.rb
|
296
296
|
- app/controllers/style_guide/style_controller.rb
|
297
297
|
- app/helpers/style_guide/application_helper.rb
|
298
|
+
- app/views/bootstrap/buttons/_disabled_anchor.erb
|
299
|
+
- app/views/bootstrap/buttons/_disabled_element.erb
|
300
|
+
- app/views/bootstrap/buttons/_sizes.erb
|
301
|
+
- app/views/bootstrap/buttons/_types.erb
|
302
|
+
- app/views/bootstrap/forms/_controls:_checkbox_and_radio.erb
|
303
|
+
- app/views/bootstrap/forms/_controls:_input.erb
|
304
|
+
- app/views/bootstrap/forms/_controls:_select.erb
|
305
|
+
- app/views/bootstrap/forms/_controls:_textarea.erb
|
306
|
+
- app/views/bootstrap/forms/_default_styles.erb
|
307
|
+
- app/views/bootstrap/forms/_horizontal.erb
|
308
|
+
- app/views/bootstrap/forms/_inline.erb
|
309
|
+
- app/views/bootstrap/forms/_search.erb
|
310
|
+
- app/views/bootstrap/images/_dropdown_icons.erb
|
311
|
+
- app/views/bootstrap/images/_form_fields.erb
|
312
|
+
- app/views/bootstrap/images/_icon_buttons.erb
|
313
|
+
- app/views/bootstrap/images/_navigation.erb
|
314
|
+
- app/views/bootstrap/images/_placeholders.erb
|
315
|
+
- app/views/bootstrap/images/_small_button.erb
|
316
|
+
- app/views/bootstrap/tables/_bordered.erb
|
317
|
+
- app/views/bootstrap/tables/_condensed.erb
|
318
|
+
- app/views/bootstrap/tables/_default_style.erb
|
319
|
+
- app/views/bootstrap/tables/_hover.erb
|
320
|
+
- app/views/bootstrap/tables/_row_classes.erb
|
321
|
+
- app/views/bootstrap/tables/_striped.erb
|
322
|
+
- app/views/bootstrap/typography/_abbreviation.erb
|
323
|
+
- app/views/bootstrap/typography/_address.erb
|
324
|
+
- app/views/bootstrap/typography/_blockquote.erb
|
325
|
+
- app/views/bootstrap/typography/_body_copy.erb
|
326
|
+
- app/views/bootstrap/typography/_code.erb
|
327
|
+
- app/views/bootstrap/typography/_description_list.erb
|
328
|
+
- app/views/bootstrap/typography/_emphasis.erb
|
329
|
+
- app/views/bootstrap/typography/_emphasis_classes.erb
|
330
|
+
- app/views/bootstrap/typography/_headings.erb
|
331
|
+
- app/views/bootstrap/typography/_ordered_list.erb
|
332
|
+
- app/views/bootstrap/typography/_unordered_list.erb
|
298
333
|
- app/views/layouts/style_guide/application.html.erb
|
299
|
-
- app/views/style_guide/buttons/_disabled_anchor.erb
|
300
|
-
- app/views/style_guide/buttons/_disabled_element.erb
|
301
|
-
- app/views/style_guide/buttons/_sizes.erb
|
302
|
-
- app/views/style_guide/buttons/_types.erb
|
303
|
-
- app/views/style_guide/forms/_controls:_checkbox_and_radio.erb
|
304
|
-
- app/views/style_guide/forms/_controls:_input.erb
|
305
|
-
- app/views/style_guide/forms/_controls:_select.erb
|
306
|
-
- app/views/style_guide/forms/_controls:_textarea.erb
|
307
|
-
- app/views/style_guide/forms/_default_styles.erb
|
308
|
-
- app/views/style_guide/forms/_horizontal.erb
|
309
|
-
- app/views/style_guide/forms/_inline.erb
|
310
|
-
- app/views/style_guide/forms/_search.erb
|
311
|
-
- app/views/style_guide/images/_dropdown_icons.erb
|
312
|
-
- app/views/style_guide/images/_form_fields.erb
|
313
|
-
- app/views/style_guide/images/_icon_buttons.erb
|
314
|
-
- app/views/style_guide/images/_navigation.erb
|
315
|
-
- app/views/style_guide/images/_placeholders.erb
|
316
|
-
- app/views/style_guide/images/_small_button.erb
|
317
334
|
- app/views/style_guide/style/_header.erb
|
318
335
|
- app/views/style_guide/style/_partial.erb
|
319
336
|
- app/views/style_guide/style/_sidebar.erb
|
320
337
|
- app/views/style_guide/style/show.html.erb
|
321
|
-
- app/views/style_guide/tables/_bordered.erb
|
322
|
-
- app/views/style_guide/tables/_condensed.erb
|
323
|
-
- app/views/style_guide/tables/_default_style.erb
|
324
|
-
- app/views/style_guide/tables/_hover.erb
|
325
|
-
- app/views/style_guide/tables/_row_classes.erb
|
326
|
-
- app/views/style_guide/tables/_striped.erb
|
327
|
-
- app/views/style_guide/typography/_abbreviation.erb
|
328
|
-
- app/views/style_guide/typography/_address.erb
|
329
|
-
- app/views/style_guide/typography/_blockquote.erb
|
330
|
-
- app/views/style_guide/typography/_body_copy.erb
|
331
|
-
- app/views/style_guide/typography/_code.erb
|
332
|
-
- app/views/style_guide/typography/_description_list.erb
|
333
|
-
- app/views/style_guide/typography/_emphasis.erb
|
334
|
-
- app/views/style_guide/typography/_emphasis_classes.erb
|
335
|
-
- app/views/style_guide/typography/_headings.erb
|
336
|
-
- app/views/style_guide/typography/_ordered_list.erb
|
337
|
-
- app/views/style_guide/typography/_unordered_list.erb
|
338
338
|
- config/locales/en.yml
|
339
339
|
- config/routes.rb
|
340
|
+
- lib/generators/style_guide/install_generator.rb
|
341
|
+
- lib/style-guide.rb
|
340
342
|
- lib/style_guide.rb
|
341
343
|
- lib/style_guide/config.rb
|
342
344
|
- lib/style_guide/engine.rb
|
@@ -383,8 +385,8 @@ files:
|
|
383
385
|
- spec/dummy/app/mailers/.gitkeep
|
384
386
|
- spec/dummy/app/models/.gitkeep
|
385
387
|
- spec/dummy/app/views/layouts/application.html.erb
|
386
|
-
- spec/dummy/app/views/styles/_00swatches.erb
|
387
|
-
- spec/dummy/app/views/styles/_three_dee.erb
|
388
|
+
- spec/dummy/app/views/style-guide/styles/_00swatches.erb
|
389
|
+
- spec/dummy/app/views/style-guide/styles/_three_dee.erb
|
388
390
|
- spec/dummy/config.ru
|
389
391
|
- spec/dummy/config/application.rb
|
390
392
|
- spec/dummy/config/boot.rb
|
@@ -417,6 +419,7 @@ files:
|
|
417
419
|
- spec/dummy/public/img/glyphicons/glyphicons_214_resize_small.png
|
418
420
|
- spec/dummy/public/img/glyphicons/glyphicons_266_book_open.png
|
419
421
|
- spec/dummy/script/rails
|
422
|
+
- spec/lib/generators/style_guide/install_generator_spec.rb
|
420
423
|
- spec/lib/style_guide/config_spec.rb
|
421
424
|
- spec/lib/style_guide/partial_spec.rb
|
422
425
|
- spec/lib/style_guide/section_spec.rb
|
@@ -445,7 +448,7 @@ rubyforge_project:
|
|
445
448
|
rubygems_version: 1.8.24
|
446
449
|
signing_key:
|
447
450
|
specification_version: 3
|
448
|
-
summary: A
|
451
|
+
summary: A style guide for your Rails application.
|
449
452
|
test_files:
|
450
453
|
- spec/controllers/style_guide/style_controller_spec.rb
|
451
454
|
- spec/dummy/README.rdoc
|
@@ -485,8 +488,8 @@ test_files:
|
|
485
488
|
- spec/dummy/app/mailers/.gitkeep
|
486
489
|
- spec/dummy/app/models/.gitkeep
|
487
490
|
- spec/dummy/app/views/layouts/application.html.erb
|
488
|
-
- spec/dummy/app/views/styles/_00swatches.erb
|
489
|
-
- spec/dummy/app/views/styles/_three_dee.erb
|
491
|
+
- spec/dummy/app/views/style-guide/styles/_00swatches.erb
|
492
|
+
- spec/dummy/app/views/style-guide/styles/_three_dee.erb
|
490
493
|
- spec/dummy/config.ru
|
491
494
|
- spec/dummy/config/application.rb
|
492
495
|
- spec/dummy/config/boot.rb
|
@@ -519,6 +522,7 @@ test_files:
|
|
519
522
|
- spec/dummy/public/img/glyphicons/glyphicons_214_resize_small.png
|
520
523
|
- spec/dummy/public/img/glyphicons/glyphicons_266_book_open.png
|
521
524
|
- spec/dummy/script/rails
|
525
|
+
- spec/lib/generators/style_guide/install_generator_spec.rb
|
522
526
|
- spec/lib/style_guide/config_spec.rb
|
523
527
|
- spec/lib/style_guide/partial_spec.rb
|
524
528
|
- spec/lib/style_guide/section_spec.rb
|