mountain_view 0.12.1 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/controllers/mountain_view/styleguide_controller.rb +2 -0
- data/app/helpers/mountain_view/styleguide_helper.rb +28 -0
- data/lib/mountain_view/engine.rb +0 -1
- data/lib/mountain_view/version.rb +1 -1
- metadata +2 -3
- data/app/helpers/mountain_view/application_helper.rb +0 -31
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b7aca00f1f26c7b7f5a616e3ec468ab0b443357
|
|
4
|
+
data.tar.gz: 4542ed852a96fddcaad467f5c533f565f769719a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91af0bd4bda81680b236ced488f162a50722a0a1336c21c8b85b62bee145a3efd473dc247e9e72910ba19cedf71ec302ce5f582ae78e87c62eed8401d1024781
|
|
7
|
+
data.tar.gz: 50a833870f00e9b491082ed63b77b207967b6edbf5da677c90ce46cefe73b26453a776011b7e16be49094c039a5c5183e35c6f3cbf07270e4bf76882aaea12f4
|
data/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
[](https://travis-ci.org/devnacho/mountain_view)
|
|
5
|
-
[](https://codeclimate.com/github/jgnatch/mountain_view)
|
|
6
|
+
|
|
6
7
|
|
|
7
8
|
With Mountain View you create reusable components for your Rails frontend, while generating a living style guide.
|
|
8
9
|
|
|
@@ -160,7 +161,6 @@ For SASS mixins, variables, functions, etc (anything that doesn't generate
|
|
|
160
161
|
code), you'd need to explicitly do and `@import` in each component stylesheet.
|
|
161
162
|
As that doesn't generate extra CSS this won't cause any issues with the
|
|
162
163
|
generated CSS, you're only giving that stylesheet access to those definitions.
|
|
163
|
-
=======
|
|
164
164
|
|
|
165
165
|
|
|
166
166
|
### Adding extra pages to the styleguide
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
module MountainView
|
|
2
2
|
module StyleguideHelper
|
|
3
|
+
def method_missing(method, *args, &block)
|
|
4
|
+
if method.to_s.end_with?("_path") || method.to_s.end_with?("_url")
|
|
5
|
+
if main_app.respond_to?(method)
|
|
6
|
+
main_app.send(method, *args)
|
|
7
|
+
else
|
|
8
|
+
super
|
|
9
|
+
end
|
|
10
|
+
else
|
|
11
|
+
super
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def respond_to?(method, include_all = false)
|
|
16
|
+
if method.to_s.end_with?("_path") || method.to_s.end_with?("_url")
|
|
17
|
+
if main_app.respond_to?(method, include_all)
|
|
18
|
+
true
|
|
19
|
+
else
|
|
20
|
+
super
|
|
21
|
+
end
|
|
22
|
+
else
|
|
23
|
+
super
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
3
27
|
def prettify_word(word)
|
|
4
28
|
word.to_s.split("_").map(&:capitalize).join(" ")
|
|
5
29
|
end
|
|
@@ -10,5 +34,9 @@ module MountainView
|
|
|
10
34
|
MountainView::Component.new File.basename(component_dir)
|
|
11
35
|
end
|
|
12
36
|
end
|
|
37
|
+
|
|
38
|
+
def extra_pages
|
|
39
|
+
MountainView.configuration.extra_pages
|
|
40
|
+
end
|
|
13
41
|
end
|
|
14
42
|
end
|
data/lib/mountain_view/engine.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mountain_view
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ignacio Gutierrez
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2017-07
|
|
12
|
+
date: 2017-08-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
@@ -59,7 +59,6 @@ files:
|
|
|
59
59
|
- app/assets/stylesheets/mountain_view/styleguide.css
|
|
60
60
|
- app/controllers/mountain_view/extra_pages_controller.rb
|
|
61
61
|
- app/controllers/mountain_view/styleguide_controller.rb
|
|
62
|
-
- app/helpers/mountain_view/application_helper.rb
|
|
63
62
|
- app/helpers/mountain_view/component_helper.rb
|
|
64
63
|
- app/helpers/mountain_view/styleguide_helper.rb
|
|
65
64
|
- app/views/layouts/mountain_view.html.erb
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
module MountainView
|
|
2
|
-
module ApplicationHelper
|
|
3
|
-
def method_missing(method, *args, &block)
|
|
4
|
-
if method.to_s.end_with?("_path") || method.to_s.end_with?("_url")
|
|
5
|
-
if main_app.respond_to?(method)
|
|
6
|
-
main_app.send(method, *args)
|
|
7
|
-
else
|
|
8
|
-
super
|
|
9
|
-
end
|
|
10
|
-
else
|
|
11
|
-
super
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def respond_to?(method, include_all = false)
|
|
16
|
-
if method.to_s.end_with?("_path") || method.to_s.end_with?("_url")
|
|
17
|
-
if main_app.respond_to?(method, include_all)
|
|
18
|
-
true
|
|
19
|
-
else
|
|
20
|
-
super
|
|
21
|
-
end
|
|
22
|
-
else
|
|
23
|
-
super
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def extra_pages
|
|
28
|
-
MountainView.configuration.extra_pages
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|