livingstyleguide 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/lib/livingstyleguide/version.rb +1 -1
  3. data/stylesheets/_livingstyleguide.scss +26 -0
  4. data/stylesheets/livingstyleguide/_code.scss +8 -5
  5. data/stylesheets/livingstyleguide/_color-swatches.scss +8 -9
  6. data/stylesheets/livingstyleguide/_content.scss +11 -8
  7. data/stylesheets/livingstyleguide/_layout.scss +6 -2
  8. metadata +31 -161
  9. data/.gitignore +0 -19
  10. data/.travis.yml +0 -5
  11. data/CHANGELOG.md +0 -95
  12. data/Gemfile +0 -4
  13. data/MIT-LICENSE.md +0 -11
  14. data/README.md +0 -111
  15. data/Rakefile +0 -25
  16. data/livingstyleguide.gemspec +0 -33
  17. data/sache.json +0 -6
  18. data/test/example_test_helper.rb +0 -22
  19. data/test/fixtures/markdown/code-block-and-example.md +0 -8
  20. data/test/fixtures/markdown/code-with-highlight-block.md +0 -6
  21. data/test/fixtures/markdown/code-with-highlight.md +0 -4
  22. data/test/fixtures/markdown/code.md +0 -6
  23. data/test/fixtures/markdown/example-with-highlight.md +0 -5
  24. data/test/fixtures/markdown/example.md +0 -4
  25. data/test/fixtures/markdown/font-example.md +0 -4
  26. data/test/fixtures/markdown/full-width-example.md +0 -5
  27. data/test/fixtures/markdown/haml-example-with-highlight.md +0 -5
  28. data/test/fixtures/markdown/haml-example.md +0 -5
  29. data/test/fixtures/markdown/text.md +0 -15
  30. data/test/fixtures/markdown/variables.md +0 -4
  31. data/test/fixtures/standalone/config.rb +0 -0
  32. data/test/fixtures/standalone/modules/_buttons.md +0 -6
  33. data/test/fixtures/standalone/modules/_buttons.scss +0 -4
  34. data/test/fixtures/standalone/style.html.lsg +0 -0
  35. data/test/fixtures/standalone/style.scss +0 -5
  36. data/test/fixtures/standalone/styleguide-as-json.html.lsg +0 -9
  37. data/test/fixtures/standalone/styleguide-with-header-footer.html.lsg +0 -7
  38. data/test/fixtures/standalone/styleguide-with-javascript.html.lsg +0 -8
  39. data/test/fixtures/standalone/styleguide-with-sass.html.lsg +0 -6
  40. data/test/fixtures/standalone/styleguide-with-scss.html.lsg +0 -7
  41. data/test/fixtures/standalone/styleguide-with-style.html.lsg +0 -7
  42. data/test/fixtures/standalone/styleguide.html.lsg +0 -3
  43. data/test/fixtures/stylesheets/variables/_more-other-colors.sass +0 -2
  44. data/test/fixtures/stylesheets/variables/colors.scss +0 -2
  45. data/test/fixtures/stylesheets/variables/other-colors.sass +0 -2
  46. data/test/integration/command_line_test.rb +0 -12
  47. data/test/integration/markdown_test.rb +0 -136
  48. data/test/integration/sprockets_test.rb +0 -19
  49. data/test/integration/standalone_test.rb +0 -68
  50. data/test/integration/variables_test.rb +0 -33
  51. data/test/test_helper.rb +0 -28
  52. data/test/unit/code_block_test.rb +0 -53
  53. data/test/unit/example_test.rb +0 -142
  54. data/test/unit/filter_hooks_test.rb +0 -46
  55. data/test/unit/filters/add_wrapper_class_test.rb +0 -15
  56. data/test/unit/filters/coffee_script_test.rb +0 -19
  57. data/test/unit/filters/colors_test.rb +0 -65
  58. data/test/unit/filters/font_example_test.rb +0 -47
  59. data/test/unit/filters/full_width_test.rb +0 -16
  60. data/test/unit/filters/haml_test.rb +0 -20
  61. data/test/unit/filters/highlights_test.rb +0 -26
  62. data/test/unit/filters/javascript_test.rb +0 -18
  63. data/test/unit/sass_extensions_test.rb +0 -28
  64. data/website/.gitignore +0 -22
  65. data/website/Gemfile +0 -13
  66. data/website/README.md +0 -32
  67. data/website/config.rb +0 -37
  68. data/website/source/.htaccess +0 -144
  69. data/website/source/changelog.html.md +0 -95
  70. data/website/source/images/graphics-2x/example-project.png +0 -0
  71. data/website/source/images/graphics-2x/github.png +0 -0
  72. data/website/source/images/graphics-2x/hagenburger.png +0 -0
  73. data/website/source/images/graphics-2x/issues.png +0 -0
  74. data/website/source/images/graphics-2x/livingstyleguide.png +0 -0
  75. data/website/source/images/graphics-2x/made-in-berlin.png +0 -0
  76. data/website/source/images/graphics-2x/rubygems.png +0 -0
  77. data/website/source/images/graphics-2x/twitter.png +0 -0
  78. data/website/source/images/graphics/example-project.png +0 -0
  79. data/website/source/images/graphics/github.png +0 -0
  80. data/website/source/images/graphics/hagenburger.png +0 -0
  81. data/website/source/images/graphics/issues.png +0 -0
  82. data/website/source/images/graphics/livingstyleguide.png +0 -0
  83. data/website/source/images/graphics/made-in-berlin.png +0 -0
  84. data/website/source/images/graphics/rubygems.png +0 -0
  85. data/website/source/images/graphics/twitter.png +0 -0
  86. data/website/source/index.html.haml +0 -49
  87. data/website/source/layouts/markdown.html.haml +0 -40
  88. data/website/source/style/components/_markdown.md +0 -23
  89. data/website/source/style/components/_markdown.sass +0 -52
  90. data/website/source/style/styles.sass +0 -286
  91. data/website/source/styleguide.html.lsg +0 -11
data/.gitignore DELETED
@@ -1,19 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- .rvmrc
19
- .sass-cache/
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.0
data/CHANGELOG.md DELETED
@@ -1,95 +0,0 @@
1
- # Changelog
2
-
3
- ## 1.0.2
4
-
5
- * Fixed an issue where the command line interface used the input
6
- filename as the output filename
7
- * Fixed an error causes by Compass’ `brightness()` function in 1.0.0
8
- alpha versions
9
- * Fixed asset URL handling with Middleman and Sprockets
10
- * **Internal:**
11
- * Integrated the website into the repository
12
- * Added the
13
- [changelog](http://livingstyleguide.org/changelog.html) to the website
14
- * Automated website deployment after a new version of the gem is
15
- released
16
-
17
-
18
- ## 1.0.1
19
-
20
- * Fixed dependencies for broken gems
21
-
22
-
23
- ## 1.0.0
24
-
25
- * New design and API for colors
26
- * [Show anchors naxt to headlines](https://github.com/hagenburger/livingstyleguide/issues/23)
27
- * [JSON for config files](https://github.com/hagenburger/livingstyleguide/issues/37)
28
- * Updated styling of the style guide
29
-
30
-
31
- ## 1.0.0.alpha.3
32
-
33
- * [Cache control for Sprockets](https://github.com/hagenburger/livingstyleguide/issues/25)
34
- * API to provide [filters in examples](https://github.com/hagenburger/livingstyleguide/issues/22)
35
- * Dropped `haml-example`, `layout-example`, `javascript-example` and `haml-layout-example`;
36
- moved into [filters](https://github.com/hagenburger/livingstyleguide/issues/28)
37
- * [A set of pre-defined filters](https://github.com/hagenburger/livingstyleguide/tree/master/lib/livingstyleguide/filters)
38
- * [Default filters](https://github.com/hagenburger/livingstyleguide/issues/31) (e. g. all templates should use Haml)
39
- * [CoffeeScript examples](https://github.com/hagenburger/livingstyleguide/issues/34)
40
-
41
-
42
- ## 0.6.0.alpha.2
43
-
44
- * Better support for load paths in Rails
45
- * Fix for colors
46
- * New YAML based configuration
47
- ([see this gist](https://gist.github.com/hagenburger/7945859#file-styleguide-1-html-lsg))
48
- * Option to set the HTML title
49
- * Custom footer and header HTML
50
- ([example](https://github.com/hagenburger/livingstyleguide/blob/master/test/fixtures/standalone/styleguide-with-header-footer.html.lsg))
51
- * Linking of JavaScript files (like jQuery, application.js, …) into the
52
- style guide
53
- ([example](https://github.com/hagenburger/livingstyleguide/blob/master/test/fixtures/standalone/styleguide-with-javascript.html.lsg))
54
- * Custom styles can be set within YAML configuration
55
- ([example](https://github.com/hagenburger/livingstyleguide/blob/master/test/fixtures/standalone/styleguide-with-style.html.lsg))
56
-
57
-
58
- ## 0.6.0.alpha.1
59
-
60
- * Added Rails support
61
- * Removed globbing
62
- * Set .html.lsg as default file extension
63
-
64
-
65
- ## 0.6.0.alpha.0
66
-
67
- * Implemented command line interface
68
-
69
-
70
- ## 0.5.2
71
-
72
- * More stable CSS
73
-
74
-
75
- ## 0.5.1
76
-
77
- * Fixed highlighting in Haml code examples
78
- * Use the Haml syntax highlighter
79
-
80
-
81
- ## 0.5.0
82
-
83
- * Added support for Haml code in examples (`haml-example`,
84
- `haml-layout-example`)
85
-
86
-
87
- ## 0.4.2
88
-
89
- * Added `display` properties to avoid conflicts with resets
90
-
91
-
92
- ## 0.4.1
93
-
94
- * Added anchors (ids) to headlines
95
-
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in livingstyleguide.gemspec
4
- gemspec
data/MIT-LICENSE.md DELETED
@@ -1,11 +0,0 @@
1
- Copyright (c) 2012++ Nico Hagenburger
2
-
3
- http://www.hagenburger.net
4
- http://twitter.com/hagenburger
5
- http://github.com/hagenburger
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
-
9
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
-
11
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md DELETED
@@ -1,111 +0,0 @@
1
- # Living Style Guide
2
-
3
- Easily create living style guides by adding Markdown documentation to
4
- your Sass.
5
-
6
- ![Build Status Images](https://travis-ci.org/hagenburger/livingstyleguide.png)
7
-
8
- ## Rails Integration
9
-
10
- 1) Create *_app/assets/stylesheets/styleguide.html.lsg_* with:
11
- ``` yaml
12
- source: application.css.scss # replace with your default Sass/SCSS file name
13
- title: "My Living Style Guide"
14
- ```
15
-
16
- 2) Write documentation for each module *app/assets/stylesheets/partials/_buttons.md* (to describe *_buttons.sass* in the same folder):
17
-
18
- Buttons
19
- =======
20
-
21
- ~~~ example
22
- <button class="button">Example button</button>
23
- ~~~ 
24
-
25
- ~~~ example
26
- <button class="button -is-primary">Example button</button>
27
- ~~~ 
28
-
29
- 3) Open <http://localhost:3000/assets/styleguide.html>.
30
- This will automatically:
31
- * Combine all Markdown files and convert them to HTML
32
- * Create a beautyful style guide
33
- * Show the HTML source syntax highlighted close to each example
34
-
35
-
36
- ## More
37
-
38
- ### Haml Examples
39
-
40
- This will output the code as HTML but display the syntax highlighted
41
- source as Haml:
42
-
43
- ~~~
44
- @haml
45
- %button.button Example button
46
- ~~~
47
-
48
-
49
- ### JavaScript example
50
-
51
- This will show and execute the JavaScript, e. g. you designed tabs and
52
- need few lines of jQuery to bring them alive.
53
-
54
- ~~~ example
55
- @javascript
56
- $('.button').click(function() {
57
- alert('Hello World!');
58
- });
59
- ~~~
60
-
61
-
62
- ### CoffeeScript example
63
-
64
- Same example but using [CoffeeScript](http://coffeescript.org). It will be
65
- executed as JavaScript and displayed as CoffeeScript:
66
-
67
- ~~~ example
68
- @javascript
69
- $('.button').click ->
70
- alert 'Hello World!'
71
- ~~~
72
-
73
-
74
- ### Font example
75
-
76
- Show which fonts should be used on your website—this will output and example text block (A—Z, a—z, 0—9, and some special characters) of the given font. It accepts valid CSS like for `font: 32px Comic Sans;`.
77
-
78
- ~~~ example
79
- @font-example 32px Comic Sans
80
- ~~~
81
-
82
-
83
- ## Installation
84
-
85
- Add this line to your application's Gemfile:
86
-
87
- gem 'livingstyleguide'
88
-
89
- And then execute:
90
-
91
- $ bundle
92
-
93
- Or install it yourself as:
94
-
95
- $ gem install livingstyleguide
96
-
97
-
98
- ## Contributing
99
-
100
- 1. Fork it
101
- 2. Create your feature branch (`git checkout -b my-new-feature`)
102
- 3. Commit your changes (`git commit -am 'Add some feature'`)
103
- 4. Push to the branch (`git push origin my-new-feature`)
104
- 5. Create new Pull Request
105
-
106
-
107
- ## Copyright
108
-
109
- Copyright (c) 2012 – 2014 [Nico Hagenburger](http://www.hagenburger.net).
110
- See [MIT-LICENSE.md](MIT-LICENSE.md) for details.
111
- Get in touch with [@hagenburger](http://twitter.com/hagenburger) on Twitter.
data/Rakefile DELETED
@@ -1,25 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rake/testtask'
3
-
4
- Rake::TestTask.new :test do |t|
5
- t.libs << 'lib'
6
- t.libs << 'test'
7
- test_files = FileList['test/**/*_test.rb']
8
- t.test_files = test_files
9
- t.verbose = true
10
- end
11
-
12
- desc 'Deploys the website to livingstyleguide.org'
13
- task :deploy do
14
- Bundler.with_clean_env do
15
- system 'cd website && bundle && bundle exec middleman build'
16
- system 'rsync -avz website/build/ lsg@livingstyleguide.org:/home/lsg/html/'
17
- end
18
- end
19
-
20
- task :release do
21
- Rake::Task['deploy'].execute
22
- end
23
-
24
- task :default => [:test]
25
-
@@ -1,33 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'livingstyleguide/version'
5
-
6
- Gem::Specification.new do |gem|
7
- gem.name = "livingstyleguide"
8
- gem.version = LivingStyleGuide::VERSION
9
- gem.authors = ["Nico Hagenburger"]
10
- gem.email = ["nico@hagenburger.net"]
11
- gem.description = %q{Automatically generate beautiful frontend style guides with Sass and Markdown. See http://livingstyleguide.org for details.}
12
- gem.summary = %q{Generate beautiful frontend style guides}
13
- gem.homepage = ""
14
-
15
- gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
19
-
20
- gem.add_dependency 'minisyntax'
21
- gem.add_dependency 'compass'
22
- gem.add_dependency 'sass'
23
- gem.add_dependency 'redcarpet', '~> 3.0.0'
24
- gem.add_dependency 'tilt'
25
- gem.add_dependency 'thor'
26
- gem.add_dependency 'hooks', '0.3.3'
27
-
28
- gem.add_development_dependency 'rake'
29
- gem.add_development_dependency 'haml'
30
- gem.add_development_dependency 'heredoc_unindent'
31
- gem.add_development_dependency 'minitest'
32
- gem.add_development_dependency 'coffee-script'
33
- end
data/sache.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "name": "The LivingStyleGuide",
3
- "tags": ["livingstyleguide", "documentation", "testing", "dry"],
4
- "description": "Automatically generate beautiful frontend style guides with Sass and Markdown. See http://livingstyleguide.org for details."
5
- }
6
-
@@ -1,22 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ExampleTestCase < Minitest::Test
4
-
5
- def setup
6
- @class = Class.new(LivingStyleGuide::Example)
7
- end
8
-
9
- def assert_render_equals(input, expected_output, options = nil)
10
- options ||= LivingStyleGuide::Engine.default_options
11
- output = @class.new(input.unindent, options).render
12
- assert_equal(normalize(expected_output), normalize(output))
13
- end
14
-
15
- def assert_render_match(input, expected_output, options = nil)
16
- options ||= LivingStyleGuide::Engine.default_options
17
- output = @class.new(input.unindent, options).render
18
- assert_match(/#{normalize(expected_output)}/, normalize(output))
19
- end
20
-
21
- end
22
-
@@ -1,8 +0,0 @@
1
- ~~~
2
- Normal code block
3
- ~~~
4
-
5
- ~~~ example
6
- Example
7
- ~~~
8
-
@@ -1,6 +0,0 @@
1
- ~~~ html
2
- ***
3
- <p>Block example</p>
4
- ***
5
- ~~~
6
-
@@ -1,4 +0,0 @@
1
- ~~~ html
2
- <img class="inline ***example***">
3
- ~~~
4
-
@@ -1,6 +0,0 @@
1
- ~~~ css
2
- .my-class {
3
- color: red;
4
- }
5
- ~~~
6
-
@@ -1,5 +0,0 @@
1
- ~~~
2
- <img class="inline ***example***">
3
- <img class="inline ***ex-1*** ***ex-2***">
4
- ~~~
5
-
@@ -1,4 +0,0 @@
1
- ~~~
2
- <button class="button">Test</button>
3
- ~~~
4
-
@@ -1,4 +0,0 @@
1
- ~~~
2
- @font-example 16px Courier
3
- ~~~
4
-
@@ -1,5 +0,0 @@
1
- ~~~
2
- @full-width
3
- <button class="button">Test</button>
4
- ~~~
5
-
@@ -1,5 +0,0 @@
1
- ~~~
2
- @haml
3
- %button***.button*** Test
4
- ~~~
5
-
@@ -1,5 +0,0 @@
1
- ~~~
2
- @haml
3
- %button.button Test
4
- ~~~
5
-
@@ -1,15 +0,0 @@
1
- # Hello World
2
-
3
- Lorem ipsum **dolor** sit amet, `<consectetur> adipiscing` elit. Sed a pulvinar turpis.
4
-
5
- * Lorem
6
- * Ipsum
7
- * Dolor
8
-
9
- ## More Lorem
10
-
11
- 1. Lorem
12
- 2. Ipsum
13
- 3. Dolor
14
-
15
- ### Even More Lorem
@@ -1,4 +0,0 @@
1
- ~~~
2
- @colors variables/other-colors
3
- ~~~
4
-