opal-virtual-dom 0.5.1 → 0.6.0

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
- SHA1:
3
- metadata.gz: 5d1742e56e1a41c661d1e5187dfb2039b7659cb4
4
- data.tar.gz: ae392be98fcf7b952ffb88199ae557589905fac8
2
+ SHA256:
3
+ metadata.gz: acbfeb7303b1878ef7f109d52e92607f0fdd7f3b6b2b0fce5612acbff2dda4f0
4
+ data.tar.gz: a9f7f89db46aef3ce791cbc5d8f92c4eb8a7af3db0f75e962be1baae92d0980d
5
5
  SHA512:
6
- metadata.gz: e498df234779e09b5dff8bd0f86eb5f45c5833a82c3b19dbed4b74c97b1f879536127193418dd2861409a394eb4b5eb9094247bfd44b56fef7bfdfa98cef3e61
7
- data.tar.gz: e81c93af95ca6f2d3602b83e5d410a14465e05cdf426ae007d2cf2ef8633e1259b39a1a89100e90ab5323824b42997bbe302920408a1da0cfbd32f81efbbbe8a
6
+ metadata.gz: 6da5534d294ba74f91bb38c363ffb355bbe4e7413eb5f82bf9ac3ee537f21e1a6fab3952fdfb57999cd83e31eb6205a3e05d32e063522a7119cd4e1e3fbb1f87
7
+ data.tar.gz: b88f394599fdac396bd1d863ce51913e45e2957b35e094e815314935826caf8abd50d785fd3232eaacea7f84faaee8ae907134f434856a238cab0a0bed88faca
data/README.md CHANGED
@@ -21,7 +21,7 @@ require 'opal'
21
21
  require 'browser' # not required
22
22
  require 'virtual_dom'
23
23
 
24
- # if you're using broser and you want to have events and elements wrapped
24
+ # if you're using browser and you want to have events and elements wrapped
25
25
  require 'virtual_dom/support/browser'
26
26
 
27
27
  class SampleList
@@ -40,7 +40,9 @@ class SampleList
40
40
  # to add class to elements
41
41
  # use bang method to define element id
42
42
 
43
- p.id! do
43
+ # <p id="example">
44
+ p.example! do
45
+ # <ul class="simple-list">
44
46
  ul.simple_list.list(hook: Hook.method(method(:create_hook))) do
45
47
  @elements.each do |string|
46
48
  li class: class_names({empty: string.empty?}) do
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'opal-virtual-dom'
3
- s.version = '0.5.1'
3
+ s.version = '0.6.0'
4
4
  s.authors = ['Michał Kalbarczyk']
5
5
  s.email = 'fazibear@gmail.com'
6
6
  s.homepage = 'http://github.com/fazibear/opal-virtual-dom'
@@ -13,6 +13,6 @@ Gem::Specification.new do |s|
13
13
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
14
  s.require_paths = ['lib']
15
15
 
16
- s.add_dependency 'opal'
17
- s.add_development_dependency 'rake'
16
+ s.add_dependency 'opal', '~> 0'
17
+ s.add_development_dependency 'rake', '~> 0'
18
18
  end
@@ -51,7 +51,7 @@ module VirtualDOM
51
51
  { id: clazz[0..-2],
52
52
  class: merge_string(class_params, params[:class]) }
53
53
  else
54
- { class: merge_string(class_params, params[:class], clazz) }
54
+ { class: merge_string(class_params, params[:class], clazz.gsub('_', '-').gsub('--', '_')) }
55
55
  end
56
56
  params = @__last_virtual_node__.params.merge(params).merge(method_params)
57
57
  process_tag(@__last_virtual_node__.name, params, block, children)
@@ -69,6 +69,8 @@ module VirtualDOM
69
69
  def process_params(params)
70
70
  params.dup.each do |k, v|
71
71
  case k
72
+ when 'for'
73
+ params['htmlFor'] = params.delete('for')
72
74
  when 'class'
73
75
  params['className'] = params.delete('class')
74
76
  when 'data'
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-virtual-dom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Kalbarczyk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-21 00:00:00.000000000 Z
11
+ date: 2018-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: virtual-dom wrapper for opal
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 2.6.13
85
+ rubygems_version: 2.7.6
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: virtual-dom wrapper for opal