rails-styleguide 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +18 -2
- data/VERSION +1 -1
- data/app/controllers/styleguide_controller.rb +3 -1
- metadata +13 -13
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -19,7 +19,23 @@ mount Styleguide::Engine => "/styleguide"
|
|
19
19
|
|
20
20
|
Visit [http://localhost:3000/styleguide](http://localhost:3000/styleguide)
|
21
21
|
|
22
|
-
Override [`app/views/styleguide/
|
23
|
-
styleguide.
|
22
|
+
Override [`app/views/styleguide/default.html.erb`](https://github.com/cbeer/rails-styleguide/blob/master/app/views/styleguide/default.html.erb) in your local application to build your own styleguide.
|
24
23
|
|
24
|
+
## Configuration
|
25
25
|
|
26
|
+
By default, this engine will look in the host application `./app/assets/stylesheets` for
|
27
|
+
stylesheets to consume. You can change this default, or add additional
|
28
|
+
styleguides, by adding an initalizer to your application, e.g.:
|
29
|
+
|
30
|
+
`config/initializers/styleguide_config.rb`
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
StyleguideController.config.stylesheets_path[:default] = '/path/to/stylesheets'
|
34
|
+
StyleguideController.config.stylesheets_path[:other_plugin_stylesheets] = '/path/to/my_plugin/app/assets/stylesheets'
|
35
|
+
```
|
36
|
+
|
37
|
+
In this example, when you visit
|
38
|
+
[http://localhost:3000/styleguide](http://localhost:3000/styleguide),
|
39
|
+
the styleguide will use stylesheets from
|
40
|
+
`/path/to/stylesheets`. If you visit
|
41
|
+
[http://localhost:3000/styleguide/other_plugin_stylesheets](http://localhost:3000/styleguide/other_plugin_stylesheets), the stylesheets from `/path/to/my_plugin/app/assets/stylesheets` will be used instead.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
@@ -21,7 +21,9 @@ class StyleguideController < ActionController::Base
|
|
21
21
|
|
22
22
|
protected
|
23
23
|
def stylesheets_path id
|
24
|
-
self.class.config.stylesheets_path[id.to_sym]
|
24
|
+
config = self.class.config.stylesheets_path[id.to_sym]
|
25
|
+
raise RoutingError unless config
|
26
|
+
config
|
25
27
|
end
|
26
28
|
|
27
29
|
def styleguide id
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-styleguide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: kss
|
16
|
-
requirement: &
|
16
|
+
requirement: &2164338760 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2164338760
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &2164352320 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2164352320
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec-rails
|
38
|
-
requirement: &
|
38
|
+
requirement: &2164349680 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2164349680
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: capybara
|
49
|
-
requirement: &
|
49
|
+
requirement: &2164362420 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2164362420
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rails
|
60
|
-
requirement: &
|
60
|
+
requirement: &2164358500 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: 3.1.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2164358500
|
69
69
|
description: Insert Styleguide description.
|
70
70
|
email:
|
71
71
|
executables: []
|
@@ -154,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
segments:
|
156
156
|
- 0
|
157
|
-
hash:
|
157
|
+
hash: 3873801164108943302
|
158
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
159
|
none: false
|
160
160
|
requirements:
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
segments:
|
165
165
|
- 0
|
166
|
-
hash:
|
166
|
+
hash: 3873801164108943302
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
169
|
rubygems_version: 1.8.10
|