vivus 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74338e129d64d87bfbf7075e592d2a8dce5a409a
4
- data.tar.gz: 9e27c6b9eeed2c6c535f125e2185930d3178fd9f
3
+ metadata.gz: 13980c33f9caddae4de3d035348884f27c3f23c2
4
+ data.tar.gz: cc900d231364964155a39df81819c8a83e0aa17c
5
5
  SHA512:
6
- metadata.gz: 8d857a1343b84a21ecf9456ef3800f4501c7d0e580dbd56c852667ed7b491cd0f5d3578d5d96417efbd69dbe3a99e8d370d2fa4a0612dadc68313eab8f0e29f5
7
- data.tar.gz: 96d4e7ad39a5d35c712cb70ea6d31ef59bbb1869137666b89fbd951cb589309f0132c15c9d66243cecc9fe7d21837d1f1156e976b7b0088fccd17a4bb415b546
6
+ metadata.gz: 418bc84b3972d05a4ac4ad1775986898ccd4d90eda741a6402ef4a26d077f98335251330079d66414afa0421a4661cea7335fd29a63083c0463d5a10e404d567
7
+ data.tar.gz: 4a782a7a5e5cdfb12d27dd70b2cdbc6e17295a944bdb94e5f181660e590315f05b5f2214f051912fb116a4f74190a419bdac6497cd2aa914363402b4a65f86a8
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2013 YOURNAME
1
+ Copyright 2013 Mark Cipolla
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -8,7 +8,11 @@ class Vivus::StylesController < Vivus::ApplicationController
8
8
  item.is_a?(String) && item[-4,4] == ".css"
9
9
  }
10
10
 
11
- @stylesheets = @css_paths.map{|file_path| Stylesheet.new(css: sprockets[file_path].body)}
11
+ @stylesheets = @css_paths
12
+ .map{|file_path| Stylesheet.new(css: sprockets[file_path].body)}
13
+ .map{|stylesheet| stylesheet.parse}
14
+ .reject{|stylesheet| stylesheet.empty?}
15
+ .inject({}){ |a,b| a.merge(b) }
12
16
  end
13
17
 
14
18
  private
@@ -35,7 +35,6 @@ class Stylesheet
35
35
  documentation << component
36
36
  end
37
37
  end
38
-
39
38
  group_by_section(documentation)
40
39
  end
41
40
 
@@ -6,28 +6,21 @@
6
6
  </div>
7
7
  <div id="vivus-body">
8
8
  <ul class="vivus-sections">
9
- <% @stylesheets.each do |stylesheet| %>
10
-
11
- <% stylesheet.parse.each do |title, components| %>
12
- <li class="vivus-section">
13
- <h1 class="vivus-section-title"><%= title %></h1>
14
- <ul class="vivus-components">
15
- <%= render partial: "component", collection: components %>
16
- </ul>
17
- </li>
18
- <% end %>
9
+ <% @stylesheets.each do |title, components| %>
10
+ <li class="vivus-section">
11
+ <h1 class="vivus-section-title"><%= title %></h1>
12
+ <ul class="vivus-components">
13
+ <%= render partial: "component", collection: components %>
14
+ </ul>
15
+ </li>
19
16
  <% end %>
20
17
 
21
- <% if @stylesheets.collect{|s| s.parse}.flatten.blank? %>
22
- <li>
23
- <h2>Let's begin!</h2>
24
- <p>Above each block of code in your CSS, start documenting your styleguide by writing co
25
- <p>The important bits are:</p>
26
- <ul>
27
- <li><code>// Description</code> indicates this is a Vivus comment, and will be parsed accord
28
- <li><code>// Example</code> marks the start and end of the HTML example code that
29
- </ul>
30
- <br />
18
+ <% if @stylesheets.flatten.blank? %>
19
+ <li class="vivus-section">
20
+ <h2></h2>
21
+ <h1 class="vivus-section-title">Let's begin!</h1>
22
+ <p>Above each block of code in your CSS, start documenting your styleguide by writing comments.
23
+ <p>Use the below example as a starting point.</p>
31
24
  <pre>
32
25
  /*
33
26
  [Name] The name of the component (e.g. Success Buttons)
data/lib/vivus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vivus
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vivus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Cipolla