styleguide-api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +41 -0
- data/Rakefile +12 -0
- data/lib/styleguide-api.rb +99 -0
- data/lib/styleguide-api/helpers.rb +13 -0
- data/lib/styleguide-api/middleman.rb +43 -0
- data/lib/styleguide-api/version.rb +3 -0
- data/styleguide-api.gemspec +27 -0
- data/test/fixtures/load_test/products/_ball.erb +1 -0
- data/test/fixtures/load_test/style.json +10 -0
- data/test/fixtures/load_test/user.haml +1 -0
- data/test/fixtures/render_test/block.haml +2 -0
- data/test/fixtures/render_test/user.haml +1 -0
- data/test/fixtures/themes_test/blue/user.haml +1 -0
- data/test/fixtures/themes_test/red/user.haml +1 -0
- data/test/helper_test.rb +50 -0
- data/test/load_test.rb +60 -0
- data/test/provider_test.rb +34 -0
- data/test/render_test.rb +33 -0
- data/test/test_helper.rb +3 -0
- data/test/themes_test.rb +26 -0
- metadata +152 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 07294314006ad4217991f4b26ff1040cbe0fb67b
|
4
|
+
data.tar.gz: 8b0b554d67165c9b4ccd49f79bbcee5431ab3399
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c2795266f07d5a29c4a31df12f769f95b42924c94db9316143de48e360b71bb9daadde920156c1427c8d388891711416d25110ec5ef064d1ff1ba609e4ac70b1
|
7
|
+
data.tar.gz: 029fb948f604ac22484b7ae9eb8dd11b1df98171b4cc42a5f08936acbe1fab33258e5a43448a66bc93f6e50750a06682a07764808fbf47c5a665ab9f195cb6e2
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Nico Hagenburger
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Style Guide API
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application’s Gemfile:
|
9
|
+
|
10
|
+
``` ruby
|
11
|
+
gem "styleguide-api"
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install styleguide-api
|
21
|
+
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
|
28
|
+
## Contributing
|
29
|
+
|
30
|
+
1. Fork it ( https://github.com/livingstyleguide/styleguide-api/fork )
|
31
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
32
|
+
3. Commit your changes (`git commit -am "Add some feature"`)
|
33
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
34
|
+
5. Create a new Pull Request
|
35
|
+
|
36
|
+
|
37
|
+
## Copyright
|
38
|
+
|
39
|
+
Copyright 2015 [Nico Hagenburger](http://www.hagenburger.net).
|
40
|
+
Released under [MIT License](LICENSE.txt).
|
41
|
+
Get in touch with [@hagenburger](http://twitter.com/hagenburger) on Twitter or [open an issue](https://github.com/livingstyleguide/styleguide-api/issues/new).
|
data/Rakefile
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
require "styleguide-api/version"
|
2
|
+
require "styleguide-api/helpers"
|
3
|
+
require "tilt"
|
4
|
+
require "open-uri"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module StyleGuideAPI
|
8
|
+
class << self
|
9
|
+
attr_accessor :live
|
10
|
+
attr_accessor :theme
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.initialize
|
14
|
+
@live = false
|
15
|
+
@templates = {}
|
16
|
+
@template_paths = {}
|
17
|
+
@data = nil
|
18
|
+
@theme = nil
|
19
|
+
@stylesheets = {}
|
20
|
+
end
|
21
|
+
initialize
|
22
|
+
|
23
|
+
def self.data
|
24
|
+
return @data if @data and not (live and @template_paths.any?)
|
25
|
+
@data = {}
|
26
|
+
load_templates
|
27
|
+
@data
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.load(uri)
|
31
|
+
json = open(uri).read
|
32
|
+
@data = JSON.parse(json)
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.add_templates(glob, options = {})
|
36
|
+
current_theme = options[:theme] || theme
|
37
|
+
@template_paths[current_theme] ||= []
|
38
|
+
@template_paths[current_theme] << glob
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.add_stylesheet(file)
|
42
|
+
@stylesheets[theme] ||= []
|
43
|
+
@stylesheets[theme] << file
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.render(template_name, locals = {}, &block)
|
47
|
+
scope = locals.delete(:scope) || Object.new
|
48
|
+
template = template_for(template_name)
|
49
|
+
template.render(scope, locals, &block)
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.template_for(name)
|
53
|
+
@templates[theme][name] if @templates[theme] && @templates[theme][name]
|
54
|
+
template = data[theme]["templates"][name]
|
55
|
+
@templates[theme] ||= {}
|
56
|
+
@templates[theme][name] = Tilt[template["type"]].new { template["source"] }
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.theme
|
60
|
+
@theme ||= themes.first || "default"
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.themes
|
64
|
+
(@template_paths.keys + (@data ? @data.keys : [])).uniq
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.to_json
|
68
|
+
data.to_json
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.stylesheets
|
72
|
+
data[theme]["stylesheets"] || []
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
def self.load_templates
|
77
|
+
themes.each do |theme|
|
78
|
+
@data[theme] ||= {
|
79
|
+
"templates" => {},
|
80
|
+
"stylesheets" => @stylesheets[theme]
|
81
|
+
}
|
82
|
+
@template_paths[theme].each do |glob|
|
83
|
+
path = glob.split("*").first
|
84
|
+
Dir.glob(glob).each do |file|
|
85
|
+
key, type = file.sub("/_", "/").sub(/^#{path}(.+?)\.(\w+)$/, "\\1"), $2
|
86
|
+
if Tilt[type]
|
87
|
+
@data[theme]["templates"][key] = {
|
88
|
+
"source" => File.read(file).strip,
|
89
|
+
"type" => type
|
90
|
+
}
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
require "styleguide-api/middleman" if defined?(Middleman)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module StyleGuideAPI::Helpers
|
2
|
+
|
3
|
+
def style_template(name, locals = {}, &block)
|
4
|
+
StyleGuideAPI::render(name, locals, &block)
|
5
|
+
end
|
6
|
+
|
7
|
+
def style_css
|
8
|
+
StyleGuideAPI.stylesheets.map do |url|
|
9
|
+
%Q(<link href="#{url}" rel="stylesheet">)
|
10
|
+
end.join("\n")
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'middleman-core'
|
2
|
+
|
3
|
+
class StyleGuideAPI::MiddlemanExtension < ::Middleman::Extension
|
4
|
+
option :templates, '', 'Glob to load templates'
|
5
|
+
|
6
|
+
def initialize(app, options_hash = {}, &block)
|
7
|
+
super
|
8
|
+
|
9
|
+
app.configure :development do
|
10
|
+
StyleGuideAPI.live = true
|
11
|
+
end
|
12
|
+
|
13
|
+
if options_hash.has_key?(:templates)
|
14
|
+
StyleGuideAPI.add_templates options_hash[:templates]
|
15
|
+
end
|
16
|
+
|
17
|
+
if options_hash.has_key?(:load)
|
18
|
+
StyleGuideAPI.load options_hash[:load]
|
19
|
+
end
|
20
|
+
|
21
|
+
if options_hash.has_key?(:theme)
|
22
|
+
StyleGuideAPI.theme = options_hash[:theme]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
helpers StyleGuideAPI::Helpers
|
27
|
+
|
28
|
+
helpers do
|
29
|
+
def style_template(name, locals = {}, &block)
|
30
|
+
locals[:scope] = self
|
31
|
+
if block_given?
|
32
|
+
template = StyleGuideAPI.data[StyleGuideAPI.theme]["templates"][name]
|
33
|
+
type = template["type"].to_sym
|
34
|
+
handler_class = ::Padrino::Helpers::OutputHelpers.handlers[type]
|
35
|
+
html = handler_class.new(self).capture_from_template(&block)
|
36
|
+
block = Proc.new { html }
|
37
|
+
end
|
38
|
+
StyleGuideAPI::render(name, locals, &block)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
StyleGuideAPI::MiddlemanExtension.register(:styleguide_api)
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "styleguide-api/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "styleguide-api"
|
8
|
+
spec.version = StyleGuideAPI::VERSION
|
9
|
+
spec.authors = ["Nico Hagenburger"]
|
10
|
+
spec.email = ["nico@hagenburger.net"]
|
11
|
+
spec.summary = %q{Helpers for creating a style guide API}
|
12
|
+
spec.description = %q{Helpers for a style guide API provider and consumer with Tilt templates}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "tilt"
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "minitest"
|
26
|
+
spec.add_development_dependency "heredoc_unindent"
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<div class="product"><%= name %></div>
|
@@ -0,0 +1 @@
|
|
1
|
+
.user= name
|
@@ -0,0 +1 @@
|
|
1
|
+
.user= name
|
@@ -0,0 +1 @@
|
|
1
|
+
.user-blue= name
|
@@ -0,0 +1 @@
|
|
1
|
+
.user-red= name
|
data/test/helper_test.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
describe StyleGuideAPI::Helpers do
|
4
|
+
|
5
|
+
before do
|
6
|
+
StyleGuideAPI.add_templates "test/fixtures/render_test/*.haml"
|
7
|
+
StyleGuideAPI.add_stylesheet "base.css"
|
8
|
+
StyleGuideAPI.add_stylesheet "more.css"
|
9
|
+
@helpers = Class.new do
|
10
|
+
extend StyleGuideAPI::Helpers
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
after do
|
15
|
+
StyleGuideAPI.initialize
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "rendering templates" do
|
19
|
+
|
20
|
+
it "should render templates" do
|
21
|
+
result = @helpers.style_template("user", name: "Homer")
|
22
|
+
assert_equal <<-HTML.strip, result.strip
|
23
|
+
<div class='user'>Homer</div>
|
24
|
+
HTML
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should accept blocks" do
|
28
|
+
result = @helpers.style_template("block", name: "Homer") { "Simpson" }
|
29
|
+
assert_equal <<-HTML.unindent.strip, result.strip
|
30
|
+
<div class='first-name'>Homer</div>
|
31
|
+
<div class='last-name'>Simpson</div>
|
32
|
+
HTML
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "stylesheets" do
|
38
|
+
|
39
|
+
it "should create stylesheet link tags" do
|
40
|
+
result = @helpers.style_css
|
41
|
+
assert_equal <<-HTML.unindent.strip, result
|
42
|
+
<link href="base.css" rel="stylesheet">
|
43
|
+
<link href="more.css" rel="stylesheet">
|
44
|
+
HTML
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
data/test/load_test.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
describe StyleGuideAPI do
|
4
|
+
|
5
|
+
after do
|
6
|
+
StyleGuideAPI.initialize
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "loading templates" do
|
10
|
+
|
11
|
+
it "should load templates" do
|
12
|
+
StyleGuideAPI.add_templates "test/fixtures/load_test/**/*.*"
|
13
|
+
data = {
|
14
|
+
"user" => {
|
15
|
+
"source" => ".user= name",
|
16
|
+
"type" => "haml"
|
17
|
+
},
|
18
|
+
"products/ball" => {
|
19
|
+
"source" => "<div class=\"product\"><%= name %></div>",
|
20
|
+
"type" => "erb"
|
21
|
+
}
|
22
|
+
}
|
23
|
+
assert_equal(data, StyleGuideAPI.data["default"]["templates"])
|
24
|
+
|
25
|
+
FileUtils.cp "test/fixtures/load_test/user.haml",
|
26
|
+
"test/fixtures/load_test/new-user.haml"
|
27
|
+
assert_equal(data, StyleGuideAPI.data["default"]["templates"])
|
28
|
+
|
29
|
+
FileUtils.rm "test/fixtures/load_test/new-user.haml"
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should dynamically load templates" do
|
33
|
+
StyleGuideAPI.live = true
|
34
|
+
StyleGuideAPI.add_templates "test/fixtures/load_test/**/*.*"
|
35
|
+
assert_equal %w(products/ball user),
|
36
|
+
StyleGuideAPI.data["default"]["templates"].keys.sort
|
37
|
+
|
38
|
+
FileUtils.cp "test/fixtures/load_test/user.haml",
|
39
|
+
"test/fixtures/load_test/new-user.haml"
|
40
|
+
assert_equal %w(new-user products/ball user),
|
41
|
+
StyleGuideAPI.data["default"]["templates"].keys.sort
|
42
|
+
|
43
|
+
FileUtils.rm "test/fixtures/load_test/new-user.haml"
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should load templates from JSON" do
|
47
|
+
StyleGuideAPI.load("test/fixtures/load_test/style.json")
|
48
|
+
assert_equal "my-theme", StyleGuideAPI.theme
|
49
|
+
assert_equal "<div class='my-template'></div>", StyleGuideAPI.render("my-template").strip
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should add a CSS file" do
|
53
|
+
StyleGuideAPI.add_templates "test/fixtures/load_test/**/*.*"
|
54
|
+
StyleGuideAPI.add_stylesheet "styles.css"
|
55
|
+
assert_equal %w(styles.css), StyleGuideAPI.data["default"]["stylesheets"]
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "json"
|
3
|
+
|
4
|
+
describe StyleGuideAPI do
|
5
|
+
|
6
|
+
after do
|
7
|
+
StyleGuideAPI.initialize
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "providing templates" do
|
11
|
+
|
12
|
+
it "should provide templates as JSON" do
|
13
|
+
StyleGuideAPI.add_templates "test/fixtures/load_test/*.haml"
|
14
|
+
StyleGuideAPI.add_stylesheet "http://abc.xy/styles.css"
|
15
|
+
json = <<-JSON
|
16
|
+
{
|
17
|
+
"default": {
|
18
|
+
"stylesheets": ["http://abc.xy/styles.css"],
|
19
|
+
"templates": {
|
20
|
+
"user": {
|
21
|
+
"source": ".user= name",
|
22
|
+
"type": "haml"
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
JSON
|
28
|
+
assert_equal(JSON.parse(json), JSON.parse(StyleGuideAPI.to_json))
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
data/test/render_test.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "tilt/haml"
|
3
|
+
|
4
|
+
describe StyleGuideAPI do
|
5
|
+
|
6
|
+
before do
|
7
|
+
StyleGuideAPI.add_templates "test/fixtures/render_test/*.haml"
|
8
|
+
end
|
9
|
+
|
10
|
+
after do
|
11
|
+
StyleGuideAPI.initialize
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "rendering templates" do
|
15
|
+
|
16
|
+
it "should render templates" do
|
17
|
+
result = StyleGuideAPI.render("user", name: "Homer")
|
18
|
+
assert_equal <<-HTML.strip, result.strip
|
19
|
+
<div class='user'>Homer</div>
|
20
|
+
HTML
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should accept blocks" do
|
24
|
+
result = StyleGuideAPI.render("block", name: "Homer") { "Simpson" }
|
25
|
+
assert_equal <<-HTML.unindent.strip, result.strip
|
26
|
+
<div class='first-name'>Homer</div>
|
27
|
+
<div class='last-name'>Simpson</div>
|
28
|
+
HTML
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
data/test/test_helper.rb
ADDED
data/test/themes_test.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "tilt/haml"
|
3
|
+
|
4
|
+
describe StyleGuideAPI do
|
5
|
+
|
6
|
+
after do
|
7
|
+
StyleGuideAPI.initialize
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "rendering templates" do
|
11
|
+
|
12
|
+
it "should render templates" do
|
13
|
+
StyleGuideAPI.add_templates "test/fixtures/themes_test/red/*.haml", theme: "red"
|
14
|
+
StyleGuideAPI.add_templates "test/fixtures/themes_test/blue/*.haml", theme: "blue"
|
15
|
+
|
16
|
+
result = StyleGuideAPI.render("user", name: "Homer")
|
17
|
+
assert_match "user-red", result.strip
|
18
|
+
|
19
|
+
StyleGuideAPI.theme = "blue"
|
20
|
+
result = StyleGuideAPI.render("user", name: "Homer")
|
21
|
+
assert_match "user-blue", result.strip
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: styleguide-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nico Hagenburger
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-05-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: tilt
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: heredoc_unindent
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Helpers for a style guide API provider and consumer with Tilt templates
|
84
|
+
email:
|
85
|
+
- nico@hagenburger.net
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- CHANGELOG.md
|
92
|
+
- Gemfile
|
93
|
+
- LICENSE.txt
|
94
|
+
- README.md
|
95
|
+
- Rakefile
|
96
|
+
- lib/styleguide-api.rb
|
97
|
+
- lib/styleguide-api/helpers.rb
|
98
|
+
- lib/styleguide-api/middleman.rb
|
99
|
+
- lib/styleguide-api/version.rb
|
100
|
+
- styleguide-api.gemspec
|
101
|
+
- test/fixtures/load_test/products/_ball.erb
|
102
|
+
- test/fixtures/load_test/style.json
|
103
|
+
- test/fixtures/load_test/user.haml
|
104
|
+
- test/fixtures/render_test/block.haml
|
105
|
+
- test/fixtures/render_test/user.haml
|
106
|
+
- test/fixtures/themes_test/blue/user.haml
|
107
|
+
- test/fixtures/themes_test/red/user.haml
|
108
|
+
- test/helper_test.rb
|
109
|
+
- test/load_test.rb
|
110
|
+
- test/provider_test.rb
|
111
|
+
- test/render_test.rb
|
112
|
+
- test/test_helper.rb
|
113
|
+
- test/themes_test.rb
|
114
|
+
homepage: ''
|
115
|
+
licenses:
|
116
|
+
- MIT
|
117
|
+
metadata: {}
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
requirements: []
|
133
|
+
rubyforge_project:
|
134
|
+
rubygems_version: 2.2.2
|
135
|
+
signing_key:
|
136
|
+
specification_version: 4
|
137
|
+
summary: Helpers for creating a style guide API
|
138
|
+
test_files:
|
139
|
+
- test/fixtures/load_test/products/_ball.erb
|
140
|
+
- test/fixtures/load_test/style.json
|
141
|
+
- test/fixtures/load_test/user.haml
|
142
|
+
- test/fixtures/render_test/block.haml
|
143
|
+
- test/fixtures/render_test/user.haml
|
144
|
+
- test/fixtures/themes_test/blue/user.haml
|
145
|
+
- test/fixtures/themes_test/red/user.haml
|
146
|
+
- test/helper_test.rb
|
147
|
+
- test/load_test.rb
|
148
|
+
- test/provider_test.rb
|
149
|
+
- test/render_test.rb
|
150
|
+
- test/test_helper.rb
|
151
|
+
- test/themes_test.rb
|
152
|
+
has_rdoc:
|