style_guide 0.0.1

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.
Files changed (159) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/Gemfile +14 -0
  4. data/Gemfile.lock +92 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.md +91 -0
  7. data/Rakefile +34 -0
  8. data/app/assets/images/style_guide/.keep +0 -0
  9. data/app/assets/javascripts/style_guides.js +97 -0
  10. data/app/assets/javascripts/style_guides_plugins.js +31 -0
  11. data/app/assets/stylesheets/style.css +116 -0
  12. data/app/assets/stylesheets/style_guides.css +405 -0
  13. data/app/controllers/.keep +0 -0
  14. data/app/controllers/style_guide_controller.rb +16 -0
  15. data/app/helpers/.keep +0 -0
  16. data/app/helpers/style_guide_helper.rb +28 -0
  17. data/app/mailers/.keep +0 -0
  18. data/app/models/.keep +0 -0
  19. data/app/views/.keep +0 -0
  20. data/app/views/layouts/style_guide.html.erb +25 -0
  21. data/app/views/style_guide/index.html.erb +105 -0
  22. data/bin/rails +12 -0
  23. data/config/routes.rb +4 -0
  24. data/lib/assets/.keep +0 -0
  25. data/lib/assets/style_guide/doc/base/address.html +1 -0
  26. data/lib/assets/style_guide/doc/base/blockquote.html +1 -0
  27. data/lib/assets/style_guide/doc/base/details.html +1 -0
  28. data/lib/assets/style_guide/doc/base/figure.html +1 -0
  29. data/lib/assets/style_guide/doc/base/form-buttons.html +1 -0
  30. data/lib/assets/style_guide/doc/base/form-fields-default.html +1 -0
  31. data/lib/assets/style_guide/doc/base/form-fields-disabled.html +1 -0
  32. data/lib/assets/style_guide/doc/base/form-fields-readonly.html +1 -0
  33. data/lib/assets/style_guide/doc/base/form-fields-with-datalist.html +1 -0
  34. data/lib/assets/style_guide/doc/base/form-fieldset.html +1 -0
  35. data/lib/assets/style_guide/doc/base/headings-1.html +1 -0
  36. data/lib/assets/style_guide/doc/base/headings-2.html +1 -0
  37. data/lib/assets/style_guide/doc/base/headings-3.html +1 -0
  38. data/lib/assets/style_guide/doc/base/hr.html +1 -0
  39. data/lib/assets/style_guide/doc/base/list-definition.html +1 -0
  40. data/lib/assets/style_guide/doc/base/list-ordered.html +1 -0
  41. data/lib/assets/style_guide/doc/base/list-unordered.html +1 -0
  42. data/lib/assets/style_guide/doc/base/media.html +1 -0
  43. data/lib/assets/style_guide/doc/base/meter-and-progress.html +1 -0
  44. data/lib/assets/style_guide/doc/base/preformated-text.html +1 -0
  45. data/lib/assets/style_guide/doc/base/sample-content-block.html +1 -0
  46. data/lib/assets/style_guide/doc/base/tabular-data.html +1 -0
  47. data/lib/assets/style_guide/doc/base/text-elements.html +1 -0
  48. data/lib/assets/style_guide/doc/base/time.html +1 -0
  49. data/lib/assets/style_guide/doc/patterns/alerts.html +1 -0
  50. data/lib/assets/style_guide/doc/patterns/breadcrumbs.html +1 -0
  51. data/lib/assets/style_guide/markup/base/address.html +6 -0
  52. data/lib/assets/style_guide/markup/base/blockquote.html +5 -0
  53. data/lib/assets/style_guide/markup/base/details.html +30 -0
  54. data/lib/assets/style_guide/markup/base/figure.html +12 -0
  55. data/lib/assets/style_guide/markup/base/form-buttons.html +13 -0
  56. data/lib/assets/style_guide/markup/base/form-fields-default.html +41 -0
  57. data/lib/assets/style_guide/markup/base/form-fields-disabled.html +13 -0
  58. data/lib/assets/style_guide/markup/base/form-fields-readonly.html +9 -0
  59. data/lib/assets/style_guide/markup/base/form-fields-with-datalist.html +94 -0
  60. data/lib/assets/style_guide/markup/base/form-fieldset.html +19 -0
  61. data/lib/assets/style_guide/markup/base/headings-1.html +6 -0
  62. data/lib/assets/style_guide/markup/base/headings-2.html +8 -0
  63. data/lib/assets/style_guide/markup/base/headings-3.html +8 -0
  64. data/lib/assets/style_guide/markup/base/hr.html +1 -0
  65. data/lib/assets/style_guide/markup/base/list-definition.html +10 -0
  66. data/lib/assets/style_guide/markup/base/list-ordered.html +18 -0
  67. data/lib/assets/style_guide/markup/base/list-unordered.html +18 -0
  68. data/lib/assets/style_guide/markup/base/media.html +36 -0
  69. data/lib/assets/style_guide/markup/base/meter-and-progress.html +11 -0
  70. data/lib/assets/style_guide/markup/base/preformated-text.html +18 -0
  71. data/lib/assets/style_guide/markup/base/sample-content-block.html +17 -0
  72. data/lib/assets/style_guide/markup/base/tabular-data.html +68 -0
  73. data/lib/assets/style_guide/markup/base/text-elements.html +23 -0
  74. data/lib/assets/style_guide/markup/base/time.html +1 -0
  75. data/lib/assets/style_guide/markup/patterns/alerts.html +16 -0
  76. data/lib/assets/style_guide/markup/patterns/breadcrumbs.html +6 -0
  77. data/lib/style_guide/engine.rb +11 -0
  78. data/lib/style_guide/version.rb +3 -0
  79. data/lib/style_guide.rb +7 -0
  80. data/lib/tasks/style_guide_tasks.rake +4 -0
  81. data/style_guide.gemspec +26 -0
  82. data/test/controllers/style_guide_controller_test.rb +7 -0
  83. data/test/dummy/README.rdoc +28 -0
  84. data/test/dummy/Rakefile +6 -0
  85. data/test/dummy/app/assets/images/.keep +0 -0
  86. data/test/dummy/app/assets/javascripts/application.js +13 -0
  87. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  88. data/test/dummy/app/controllers/application_controller.rb +5 -0
  89. data/test/dummy/app/controllers/concerns/.keep +0 -0
  90. data/test/dummy/app/helpers/application_helper.rb +2 -0
  91. data/test/dummy/app/mailers/.keep +0 -0
  92. data/test/dummy/app/models/.keep +0 -0
  93. data/test/dummy/app/models/concerns/.keep +0 -0
  94. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  95. data/test/dummy/bin/bundle +3 -0
  96. data/test/dummy/bin/rails +4 -0
  97. data/test/dummy/bin/rake +4 -0
  98. data/test/dummy/config/application.rb +23 -0
  99. data/test/dummy/config/boot.rb +5 -0
  100. data/test/dummy/config/database.yml +25 -0
  101. data/test/dummy/config/environment.rb +5 -0
  102. data/test/dummy/config/environments/development.rb +37 -0
  103. data/test/dummy/config/environments/production.rb +82 -0
  104. data/test/dummy/config/environments/test.rb +39 -0
  105. data/test/dummy/config/initializers/assets.rb +8 -0
  106. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  107. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  108. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  109. data/test/dummy/config/initializers/inflections.rb +16 -0
  110. data/test/dummy/config/initializers/mime_types.rb +4 -0
  111. data/test/dummy/config/initializers/session_store.rb +3 -0
  112. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  113. data/test/dummy/config/locales/en.yml +23 -0
  114. data/test/dummy/config/routes.rb +56 -0
  115. data/test/dummy/config/secrets.yml +22 -0
  116. data/test/dummy/config.ru +4 -0
  117. data/test/dummy/db/development.sqlite3 +0 -0
  118. data/test/dummy/lib/assets/.keep +0 -0
  119. data/test/dummy/log/.keep +0 -0
  120. data/test/dummy/log/development.log +3212 -0
  121. data/test/dummy/public/404.html +67 -0
  122. data/test/dummy/public/422.html +67 -0
  123. data/test/dummy/public/500.html +66 -0
  124. data/test/dummy/public/favicon.ico +0 -0
  125. data/test/dummy/tmp/cache/assets/development/sprockets/004eafe024778b45bd76b68aaba4ac15 +0 -0
  126. data/test/dummy/tmp/cache/assets/development/sprockets/02b9d9c6edce2d06f23d37980b4ee800 +0 -0
  127. data/test/dummy/tmp/cache/assets/development/sprockets/077546dcfe9730fd178069bbd08aabcd +0 -0
  128. data/test/dummy/tmp/cache/assets/development/sprockets/12cfd2d3d39780df1fa5a909e8d44377 +0 -0
  129. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  130. data/test/dummy/tmp/cache/assets/development/sprockets/146550a0272c7c23525da1a6bae7129c +0 -0
  131. data/test/dummy/tmp/cache/assets/development/sprockets/1a165ceceb0f8a97466552db5a2e9117 +0 -0
  132. data/test/dummy/tmp/cache/assets/development/sprockets/2cf006db500529f607744ffa0f89471c +0 -0
  133. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  134. data/test/dummy/tmp/cache/assets/development/sprockets/32a1ac63db3780b8a111e5485be56982 +0 -0
  135. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  136. data/test/dummy/tmp/cache/assets/development/sprockets/4e4e3e3a5771df9cae4d26bc6baf46c7 +0 -0
  137. data/test/dummy/tmp/cache/assets/development/sprockets/58173999e48afe09e8884356c79609f3 +0 -0
  138. data/test/dummy/tmp/cache/assets/development/sprockets/68e2d01c68da66c13b0d9e1476d859d6 +0 -0
  139. data/test/dummy/tmp/cache/assets/development/sprockets/7db7b6b32d1463ec5d4d358ad5e016cd +0 -0
  140. data/test/dummy/tmp/cache/assets/development/sprockets/81de5a8f8e9be0339dc42a8d3478ef61 +0 -0
  141. data/test/dummy/tmp/cache/assets/development/sprockets/8b14c1fcb69f343941b217e79224b573 +0 -0
  142. data/test/dummy/tmp/cache/assets/development/sprockets/a74b3d31d1ee9251adb48ec3f6b692db +0 -0
  143. data/test/dummy/tmp/cache/assets/development/sprockets/c080f0d6d4225e1a2e99b5f69ab934f8 +0 -0
  144. data/test/dummy/tmp/cache/assets/development/sprockets/c5ae04ae7418d8ea47212cf5f39ad45c +0 -0
  145. data/test/dummy/tmp/cache/assets/development/sprockets/cb475082e4e87eebe72cca39328e75fc +0 -0
  146. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  147. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  148. data/test/dummy/tmp/cache/assets/development/sprockets/e70c6cc21a053bd60db4b0b2751a3842 +0 -0
  149. data/test/dummy/tmp/cache/assets/development/sprockets/f13b97266d7293a648da96110bd0828d +0 -0
  150. data/test/dummy/tmp/cache/assets/development/sprockets/f39c3d50409be057fc18747ecf424bf0 +0 -0
  151. data/test/dummy/tmp/cache/assets/development/sprockets/f6d4686b27f2d3d964bf69c90a281e75 +0 -0
  152. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  153. data/test/dummy/tmp/cache/assets/development/sprockets/faf31f12c745fa3dfaa9180a7f6fb546 +0 -0
  154. data/test/dummy/tmp/cache/assets/development/sprockets/fb37ec5c5023032c53cd43bed0105798 +0 -0
  155. data/test/helpers/style_guide_helper_test.rb +4 -0
  156. data/test/integration/navigation_test.rb +10 -0
  157. data/test/style_guide_test.rb +7 -0
  158. data/test/test_helper.rb +15 -0
  159. metadata +302 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f22e74453c988b2be288e815163b34de6dead898
4
+ data.tar.gz: 46f949b997c1d71fbff64314bd78d116cd37a8fb
5
+ SHA512:
6
+ metadata.gz: 237d45cd356b0435937dc7b2c68b8ade2fa6eb7c24fd307488fe5426450992eedd4dc1fc4193d4b4d77b900d7416da360bdd31b3f847a834ca5614a58e9af0e2
7
+ data.tar.gz: 8587b41105dab3316568987edd5c806d87fc3686e64eb7e956fde218c7a9d449856a1871e14f680089396b4f08e9d2dde6d96030fa41a9aebe0aabb17632d915
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ test/dummy/db/*.sqlite3
5
+ test/dummy/db/*.sqlite3-journal
6
+ test/dummy/log/*.log
7
+ test/dummy/tmp/
8
+ test/dummy/.sass-cache
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in style_guide.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # Declare any dependencies that are still in development here instead of in
9
+ # your gemspec. These might include edge Rails or gems from your path or
10
+ # Git. Remember to move these dependencies to your gemspec before releasing
11
+ # your gem to rubygems.org.
12
+
13
+ # To use debugger
14
+ # gem 'debugger'
data/Gemfile.lock ADDED
@@ -0,0 +1,92 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ style_guide (0.0.1)
5
+ rails (~> 4.1.4)
6
+ sqlite3
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.1.4)
12
+ actionpack (= 4.1.4)
13
+ actionview (= 4.1.4)
14
+ mail (~> 2.5.4)
15
+ actionpack (4.1.4)
16
+ actionview (= 4.1.4)
17
+ activesupport (= 4.1.4)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ actionview (4.1.4)
21
+ activesupport (= 4.1.4)
22
+ builder (~> 3.1)
23
+ erubis (~> 2.7.0)
24
+ activemodel (4.1.4)
25
+ activesupport (= 4.1.4)
26
+ builder (~> 3.1)
27
+ activerecord (4.1.4)
28
+ activemodel (= 4.1.4)
29
+ activesupport (= 4.1.4)
30
+ arel (~> 5.0.0)
31
+ activesupport (4.1.4)
32
+ i18n (~> 0.6, >= 0.6.9)
33
+ json (~> 1.7, >= 1.7.7)
34
+ minitest (~> 5.1)
35
+ thread_safe (~> 0.1)
36
+ tzinfo (~> 1.1)
37
+ arel (5.0.1.20140414130214)
38
+ builder (3.2.2)
39
+ erubis (2.7.0)
40
+ hike (1.2.3)
41
+ i18n (0.6.11)
42
+ json (1.8.1)
43
+ mail (2.5.4)
44
+ mime-types (~> 1.16)
45
+ treetop (~> 1.4.8)
46
+ mime-types (1.25.1)
47
+ minitest (5.4.0)
48
+ multi_json (1.10.1)
49
+ polyglot (0.3.5)
50
+ rack (1.5.2)
51
+ rack-test (0.6.2)
52
+ rack (>= 1.0)
53
+ rails (4.1.4)
54
+ actionmailer (= 4.1.4)
55
+ actionpack (= 4.1.4)
56
+ actionview (= 4.1.4)
57
+ activemodel (= 4.1.4)
58
+ activerecord (= 4.1.4)
59
+ activesupport (= 4.1.4)
60
+ bundler (>= 1.3.0, < 2.0)
61
+ railties (= 4.1.4)
62
+ sprockets-rails (~> 2.0)
63
+ railties (4.1.4)
64
+ actionpack (= 4.1.4)
65
+ activesupport (= 4.1.4)
66
+ rake (>= 0.8.7)
67
+ thor (>= 0.18.1, < 2.0)
68
+ rake (10.3.2)
69
+ sprockets (2.12.1)
70
+ hike (~> 1.2)
71
+ multi_json (~> 1.0)
72
+ rack (~> 1.0)
73
+ tilt (~> 1.1, != 1.3.0)
74
+ sprockets-rails (2.1.3)
75
+ actionpack (>= 3.0)
76
+ activesupport (>= 3.0)
77
+ sprockets (~> 2.8)
78
+ sqlite3 (1.3.9)
79
+ thor (0.19.1)
80
+ thread_safe (0.3.4)
81
+ tilt (1.4.1)
82
+ treetop (1.4.15)
83
+ polyglot
84
+ polyglot (>= 0.3.1)
85
+ tzinfo (1.2.1)
86
+ thread_safe (~> 0.1)
87
+
88
+ PLATFORMS
89
+ ruby
90
+
91
+ DEPENDENCIES
92
+ style_guide!
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2014 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,91 @@
1
+ Style-Guide-Boilerplate v0.0.1
2
+ ==============================
3
+
4
+ A starting point for crafting living style guides.
5
+
6
+ [View Demo](http://quiet-citadel-4316.herokuapp.com/style_guides/index)
7
+
8
+ *Note: Sample patterns have been included in the demo. Your site will have it's own unique patterns.*
9
+
10
+ ![Screenshot](http://bjankord.github.io/Style-Guide-Boilerplate/assets/screenshot-1.jpg)
11
+
12
+ ## Getting Started With Style Guide Boilerplate
13
+
14
+ ### Download the Style Guide Boilerplate
15
+ Include
16
+ gem 'style_guide', :git => 'git://github.com/JoshuaMSchultz/Rails_App_Style_Guide'
17
+
18
+ ### Hook up your own CSS into the style guide
19
+ In the `<head>` in the style_guide_layout.html.erb are custom styles for the boilerplate itself. These have all been prefixed with sg- so they hopefully shouldn't cause any conflicts with your website's own styles.
20
+
21
+ Below the custom styles for the boilerplate, you will add in your own custom stylesheet(s) which you use on your live site.
22
+
23
+ ### Review your live site CSS
24
+ You should be able to go to `yoursite.com/style-guide/` and see how your live site's CSS affects base elements.
25
+ The last step is creating your sites custom patterns/modules.
26
+
27
+ ### Create custom patterns
28
+ To create custom patterns like buttons, breadcrumbs, alert messages, etc., create a new .html file and add your HTML markup into the file.
29
+
30
+ Save the file as `pattern-name.html` into the `markup/patterns` directory inside of your `style-guide` directory.
31
+
32
+ You should now be able to see the new patterns at `yoursite.com/style-guide/`
33
+
34
+ ### Create personalized documentation
35
+ To create personalized documentation for your markup examples, create a new .html file and name it whatever your markup snippet is named.
36
+
37
+ Save the file as `markup-name.html` into the `doc/base` or `doc/patterns` directory inside of your `style-guide` directory.
38
+
39
+ For example, if you want to create doc for `markup/patterns/breadcrumbs.html`, create a file called `breadcrumbs.html` and save it into `doc/patterns`.
40
+
41
+ You should now be able to see the new doc at `yoursite.com/style-guide/`
42
+
43
+ ## Browser Support
44
+ I've built **Style Guide Boilerplate** with progressive enhancement in mind to work on a wide range of browsers.
45
+
46
+ Known supported browsers include:
47
+
48
+ * Chrome
49
+ * Firefox
50
+ * Safari
51
+ * Opera
52
+ * IE6+
53
+ * Stock Android Browser (4.0+)
54
+ * Chrome for Android
55
+ * Firefox for Android
56
+ * Opera Mini
57
+ * Opera Mobile
58
+ * Safari for iOS
59
+ * Chrome for iOS
60
+
61
+ If you come across any bugs, or have any other issues with the boilerplate, please open an issue here on GitHub.
62
+
63
+
64
+ ## Additional Resources
65
+ [Front-end Style Guides](http://24ways.org/2011/front-end-style-guides/)
66
+
67
+ [Front-end Style Guide Roundup](https://gimmebar.com/collection/4ecd439c2f0aaad734000022/front-end-styleguides)
68
+
69
+ [Future-Friendly Style Guides](https://speakerdeck.com/lukebrooker/future-friendly-style-guides)
70
+
71
+ [HTML KickStart](http://www.99lime.com/elements/)
72
+
73
+ [Oli.jp Style Guide](http://oli.jp/2011/style-guide/)
74
+
75
+ [Jeremy Keith's Pattern Primer](http://adactio.com/journal/5028/)
76
+
77
+ [Paul Robert Llyod's Style Guide](http://www.paulrobertlloyd.com/about/styleguide/)
78
+
79
+ [Pears](http://pea.rs/)
80
+
81
+ [Starbucks Style Guide](http://www.starbucks.com/static/reference/styleguide/)
82
+
83
+ ## Credit
84
+ Thanks to:
85
+
86
+ Jeremy Keith for letting me build on top of [Pattern Primer](https://github.com/adactio/Pattern-Primer).
87
+
88
+ ## Licensing
89
+ **Style Guide Boilerplate** is licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
90
+
91
+ Use it, build upon it, make awesome shit with it.
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'StyleGuide'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task default: :test
File without changes
@@ -0,0 +1,97 @@
1
+ /**
2
+ * sg-scripts.js
3
+ */
4
+ (function (document, undefined) {
5
+ "use strict";
6
+
7
+ // Add js class to body
8
+ document.getElementsByTagName('body')[0].className+=' js';
9
+
10
+
11
+ // Add functionality to toggle classes on elements
12
+ var hasClass = function (el, cl) {
13
+ var regex = new RegExp('(?:\\s|^)' + cl + '(?:\\s|$)');
14
+ return !!el.className.match(regex);
15
+ },
16
+
17
+ addClass = function (el, cl) {
18
+ el.className += ' ' + cl;
19
+ },
20
+
21
+ removeClass = function (el, cl) {
22
+ var regex = new RegExp('(?:\\s|^)' + cl + '(?:\\s|$)');
23
+ el.className = el.className.replace(regex, ' ');
24
+ },
25
+
26
+ toggleClass = function (el, cl) {
27
+ hasClass(el, cl) ? removeClass(el, cl) : addClass(el, cl);
28
+ };
29
+
30
+ var selectText = function(text) {
31
+ var doc = document;
32
+ if (doc.body.createTextRange) {
33
+ var range = doc.body.createTextRange();
34
+ range.moveToElementText(text);
35
+ range.select();
36
+ } else if (window.getSelection) {
37
+ var selection = window.getSelection();
38
+ var range = doc.createRange();
39
+ range.selectNodeContents(text);
40
+ selection.removeAllRanges();
41
+ selection.addRange(range);
42
+ }
43
+ };
44
+
45
+
46
+ // Cut the mustard
47
+ if ( !Array.prototype.forEach ) {
48
+
49
+ // Add legacy class for older browsers
50
+ document.getElementsByTagName('body')[0].className+=' legacy';
51
+
52
+ } else {
53
+
54
+ // View Source Toggle
55
+ [].forEach.call( document.querySelectorAll('.sg-btn--source'), function(el) {
56
+ el.onclick = function() {
57
+ var that = this;
58
+ var sourceCode = that.parentNode.nextElementSibling;
59
+ toggleClass(sourceCode, 'is-active');
60
+ return false;
61
+ };
62
+ }, false);
63
+
64
+ // Select Code Button
65
+ [].forEach.call( document.querySelectorAll('.sg-btn--select'), function(el) {
66
+ el.onclick = function() {
67
+ selectText(this.nextSibling);
68
+ toggleClass(this, 'is-active');
69
+ return false;
70
+ };
71
+ }, false);
72
+ }
73
+
74
+
75
+ // Add operamini class to body
76
+ if (window.operamini) {
77
+ document.getElementsByTagName('body')[0].className+=' operamini';
78
+ }
79
+ // Opera Mini has trouble with these enhancements
80
+ // So we'll make sure they don't get them
81
+ else {
82
+ // Init prettyprint
83
+ prettyPrint();
84
+
85
+ // Get nav form
86
+ var nav = document.getElementById('js-sg-section-switcher');
87
+
88
+ // Toggle active class on navToggle click
89
+ nav.onchange = function() {
90
+ var val = this.value;
91
+ if (val !== "") {
92
+ window.location = val;
93
+ }
94
+ };
95
+ }
96
+
97
+ })(document);
@@ -0,0 +1,31 @@
1
+ // https://code.google.com/p/google-code-prettify/
2
+ !function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
3
+ (function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
4
+ b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
5
+ h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
6
+ (a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
7
+ f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
8
+ a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
9
+ if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
10
+ g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
11
+ q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
12
+ /^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
13
+ s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
14
+ q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
15
+ c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
16
+ r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
17
+ a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
18
+ t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
19
+ "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
20
+ O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
21
+ Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
22
+ V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
23
+ /^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
24
+ ["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
25
+ ["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
26
+ hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
27
+ p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
28
+ return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
29
+ o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
30
+ {h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
31
+ h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}();
@@ -0,0 +1,116 @@
1
+ body {
2
+ font-family: "HelveticaNeue", "Helvetica", Arial, sans-serif;
3
+ }
4
+
5
+ /* -------------------------------------------------------------------------
6
+ Colors
7
+ ---------------------------------------------------------------------------- */
8
+ .sg-color--a .sg-color-swatch {background: #88ffda;}
9
+
10
+ .sg-color--b .sg-color-swatch {background: #4dd3c9;}
11
+
12
+ .sg-color--c .sg-color-swatch {background: #339db0;}
13
+
14
+ .sg-color--d .sg-color-swatch {background: #2078aa;}
15
+
16
+ .sg-color--e .sg-color-swatch {background: #3a517a;}
17
+
18
+ .sg-color--f .sg-color-swatch {background: #384355;}
19
+
20
+
21
+ /* -------------------------------------------------------------------------
22
+ Fonts
23
+ ---------------------------------------------------------------------------- */
24
+ .sg-font-primary {font-family: "HelveticaNeue", "Helvetica", Arial, sans-serif;}
25
+
26
+ .sg-font-secondary {font-family: Georgia, Times, "Times New Roman", serif;}
27
+
28
+
29
+ /* -------------------------------------------------------------------------
30
+ Alerts
31
+ ---------------------------------------------------------------------------- */
32
+ /**
33
+ * Alert styles. Your patterns/styles will vary.
34
+ * You should link your main stylesheet up with Style Guide Boilerplate for
35
+ * best results. When you update your site's styles, your style guide will
36
+ * update as well.
37
+ */
38
+ .alert {
39
+ border: 1px solid #fbeed5;
40
+ -webkit-border-radius: 4px;
41
+ -moz-border-radius: 4px;
42
+ border-radius: 4px;
43
+ margin-bottom: 20px;
44
+ padding: 8px 35px 8px 14px;
45
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
46
+ }
47
+
48
+ .alert-warning {
49
+ background-color: #fcf8e3;
50
+ border-color: #fbeed5;
51
+ color: #c09853;
52
+ }
53
+
54
+ .alert-error {
55
+ background-color: #f2dede;
56
+ border-color: #eed3d7;
57
+ color: #b94a48;
58
+ }
59
+
60
+ .alert-success {
61
+ background-color: #dff0d8;
62
+ border-color: #d6e9c6;
63
+ color: #468847;
64
+ }
65
+
66
+ .alert-info {
67
+ background-color: #d9edf7;
68
+ border-color: #bce8f1;
69
+ color: #3a87ad;
70
+ }
71
+
72
+
73
+
74
+ /* -------------------------------------------------------------------------
75
+ Breadcrumbs
76
+ ---------------------------------------------------------------------------- */
77
+ /**
78
+ * Breadcrumb styles for first pattern. Your patterns/styles will vary.
79
+ * You should link your main stylesheet up with Style Guide Boilerplate for
80
+ * best results. When you update your site's styles, your style guide will
81
+ * update as well.
82
+ */
83
+ .breadcrumb {
84
+ background-color: #eee;
85
+ -webkit-border-radius: 4px;
86
+ -moz-border-radius: 4px;
87
+ border-radius: 4px;
88
+ list-style: none;
89
+ margin: 0 0 20px;
90
+ padding: 8px 15px;
91
+ }
92
+
93
+ .breadcrumb li {
94
+ display: inline-block;
95
+ *display: inline;
96
+ text-shadow: 0 1px 0 #fff;
97
+ *zoom: 1;
98
+ }
99
+
100
+ .breadcrumb li a {
101
+ color: #007f96;
102
+ text-decoration: none;
103
+ }
104
+
105
+ .breadcrumb li a:hover {
106
+ color: #004068;
107
+ }
108
+
109
+ .breadcrumb li .divider {
110
+ color: #aaa;
111
+ padding: 0 5px;
112
+ }
113
+
114
+ .breadcrumb .active {
115
+ color: #555;
116
+ }