spark-component 1.0.0.pre.alpha.6 → 1.0.0.pre.alpha.7

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
  SHA256:
3
- metadata.gz: 16dc509f88b2a463a677f1555e6dc8b4efa2f2bbbb2a217744b8d18201a5871e
4
- data.tar.gz: b79ee41368ecfe23ce8ef837633952ef8ae1cb76c26f09f0d1903f0e9882f3a0
3
+ metadata.gz: 86d32b9fd4b98d7c78a45af6c600b89e4ed0531adc4958e7a8650284312fa490
4
+ data.tar.gz: 9a02c2a947afe7efd7aeba3afdca9730540e552828d09f0e6cb4f4d8038c64a4
5
5
  SHA512:
6
- metadata.gz: 94c760eadafa597cedacdbae6f70a3d99ec66a92909b8c5c3dc3232f7b2f8f46b02a233857f350f8d1fac236ce6a4fabc505de5c70a674ab4801d4cbd549b90c
7
- data.tar.gz: 8413af62841c97e08b7898e28d17ddf63d5e1a3fda5ce6b8e9964f8ccdd223793b2319d72e386b6cd49357af7240da2898be9f74e20d43fa107a5316f387a3e7
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/TrailingBlankLines:
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spark-component (1.0.0.pre.alpha.6)
4
+ spark-component (1.0.0.pre.alpha.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -100,9 +100,9 @@ module Spark
100
100
  val = instance_variable_get(:"@#{name}")
101
101
  next if val.nil?
102
102
 
103
- # Symbolize `true` values to ensure the value is set in tag attributes
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 === true ? :true : 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
- # Consider adding ActionView::Component::Base core instance methods to reserved list
232
- methods = [Element, Attribute, superclass].map { |c| c.instance_methods(false) }.flatten
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Spark
4
4
  module Component
5
- VERSION = "1.0.0.pre.alpha.6"
5
+ VERSION = "1.0.0.pre.alpha.7"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spark-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha.6
4
+ version: 1.0.0.pre.alpha.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis