classy-yaml 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/classy/yaml/component_helpers.rb +2 -2
- data/lib/classy/yaml/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2bed093a5bc06fe6254b29ad1fa7bc10e0b23a790a009ab9f5efca6e4d21432
|
4
|
+
data.tar.gz: 321eb805f8a536ef82117e444c909036d006ede18acbb63b872451cb09588868
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 151b2cc8b260fa4c6546128929b6dae28cbf932bb8540360bf5214db785c1c001506bcd685fc32db3e99f2462eb739ce029c2301eb676b1230b4b505b239dd5f
|
7
|
+
data.tar.gz: cc0b8fa3e737040917f2e05121f5600df4746565883b5d5783e0136519c783b6b97bcdbe702a6cd9d508b49fe34fb174cd74dc2ea1ded77694c1f83a0d289f71
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ btn:
|
|
46
46
|
|
47
47
|
# app/components/example_component/example_component.html.erb
|
48
48
|
|
49
|
-
<button class="<%=
|
49
|
+
<button class="<%=yass(btn: :purple)%>">Classy Button</button>
|
50
50
|
|
51
51
|
# will add the classes "px-3 py-2 text-purple-200 bg-blue-500"
|
52
52
|
```
|
@@ -68,7 +68,7 @@ btn:
|
|
68
68
|
|
69
69
|
# app/components/example_component/example_component.html.erb
|
70
70
|
|
71
|
-
<button class="<%=
|
71
|
+
<button class="<%=yass(btn: :purple)%>">Classy Button</button>
|
72
72
|
|
73
73
|
# will add the classes "px-3 py-2 text-blue-50"
|
74
74
|
```
|
@@ -2,8 +2,8 @@ module Classy
|
|
2
2
|
module Yaml
|
3
3
|
module ComponentHelpers
|
4
4
|
def yass(*args)
|
5
|
-
component_name =
|
6
|
-
calling_path =
|
5
|
+
component_name = self.class.source_location.split("/").last.split(".").first
|
6
|
+
calling_path = self.class.source_location.split("/")[0...-1].join("/")
|
7
7
|
classy_file = if Dir.exist?("#{calling_path}/#{component_name}")
|
8
8
|
"#{calling_path}/#{component_name}/#{component_name}.yml"
|
9
9
|
else
|
data/lib/classy/yaml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classy-yaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tonksthebear
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.2.26
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Rails helper to allow yaml configuration of utility css classes
|