spark-component 1.0.0.pre.alpha.6 → 1.0.0.pre.alpha.7
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -2
- data/Gemfile.lock +1 -1
- data/lib/spark/component/attribute.rb +2 -2
- data/lib/spark/component/element.rb +4 -3
- data/lib/spark/component/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86d32b9fd4b98d7c78a45af6c600b89e4ed0531adc4958e7a8650284312fa490
|
4
|
+
data.tar.gz: 9a02c2a947afe7efd7aeba3afdca9730540e552828d09f0e6cb4f4d8038c64a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f954ef9c28ab18a21e9f81987f732500d9d9e3c1fe769d554761dde7ada5160b3e4d9d589b91109282cd24415af860ec936fc08fbc1248568a1ccac2f761d930
|
7
|
+
data.tar.gz: 79474575d0f33c5b7532106385cc67c555949ef7de5dee7985d800b6b7f296259ce3b426a9b2b580765abecc4706f7bd4cc86d403b22ecba324366a327625668
|
data/.rubocop.yml
CHANGED
@@ -25,7 +25,7 @@ Metrics/ClassLength:
|
|
25
25
|
- 'test/**/*.rb'
|
26
26
|
- 'lib/spark_components/element.rb'
|
27
27
|
|
28
|
-
Layout/
|
28
|
+
Layout/TrailingEmptyLines:
|
29
29
|
EnforcedStyle: final_newline
|
30
30
|
|
31
31
|
Naming/VariableNumber:
|
@@ -52,4 +52,3 @@ Style/StringLiterals:
|
|
52
52
|
Style/FrozenStringLiteralComment:
|
53
53
|
Exclude:
|
54
54
|
- 'test/**/*.rb'
|
55
|
-
|
data/Gemfile.lock
CHANGED
@@ -100,9 +100,9 @@ module Spark
|
|
100
100
|
val = instance_variable_get(:"@#{name}")
|
101
101
|
next if val.nil?
|
102
102
|
|
103
|
-
#
|
103
|
+
# Stringify true values to ensure the value is set in tag attributes
|
104
104
|
# This helps tags write `data-foo="true"` instead of `data-foo`
|
105
|
-
obj[name] = val
|
105
|
+
obj[name] = val == true ? val.to_s : val
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
@@ -228,10 +228,11 @@ module Spark
|
|
228
228
|
# Prevent an element method from overwriting an existing method
|
229
229
|
def define_method_if_able(method_name, &block)
|
230
230
|
# Protect instance methods which are crucial to components and elements
|
231
|
-
|
232
|
-
methods
|
231
|
+
methods = [self, Element, Attribute, superclass]
|
232
|
+
methods << Integration.base_class if defined? Spark::Component::Integration
|
233
|
+
methods.map! { |c| c.instance_methods(false) }
|
233
234
|
|
234
|
-
if methods.include?(method_name.to_sym)
|
235
|
+
if methods.flatten.include?(method_name.to_sym)
|
235
236
|
raise(Element::Error, "Method '#{method_name}' already exists.")
|
236
237
|
end
|
237
238
|
|