clearwater 1.0.0.beta4 → 1.0.0.beta5

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: 252e364a39c3d73e7e056b0209411d92d55a6a48
4
- data.tar.gz: f43ad3eac92c94faff4fdfa8c000bfc5307ad7ae
3
+ metadata.gz: 0c83b9a2ad7fe21e4f47f356a63f64e787f8f7ac
4
+ data.tar.gz: f35bd0d6f10bc01809b33b9eadaf53f7276edbce
5
5
  SHA512:
6
- metadata.gz: 4d02fb2d91600e1f61e842f36b4bc4d06da201c6049f420d7a18ef19a296887adfd2c97a90ed265d3a2cc65aea72fc5077c9ee388d2340d825d74383f3d495c9
7
- data.tar.gz: 2237acc5c21b6786413c323e1ce7330fa94e2fff5e59061eb607549ccda94dd3329d03b718d7006dd1968843ca305a8703c8402306cf24faf555151ce118f0d9
6
+ metadata.gz: 4c72ec18e0557aa59bebba66aaca56ad70d4543f7065193e4519be52532453f29937037d01b6495308dad4746988c63b9db94bc1b056b2ee5fa4532b9fce34bd
7
+ data.tar.gz: d58b23dbe9b28e15197902a4e25e3f4e33e678ea0681756fe440b192a660f4f8f67b30b56b6b052b78831c15e6e4620a3a40839c243fd7a9d839b7505daff284
@@ -1,3 +1,3 @@
1
1
  module Clearwater
2
- VERSION = "1.0.0.beta4"
2
+ VERSION = "1.0.0.beta5"
3
3
  end
@@ -11,7 +11,6 @@ class Link
11
11
  @onclick = attributes.dup.delete(:onclick)
12
12
  @attributes = attributes.merge(
13
13
  onclick: method(:handle_click),
14
- ontouchstart: method(:handle_touch),
15
14
  key: attributes[:href]
16
15
  )
17
16
 
@@ -25,11 +24,6 @@ class Link
25
24
  @onclick.call event
26
25
  end
27
26
 
28
- if touch?
29
- event.prevent
30
- return
31
- end
32
-
33
27
  if event.prevented?
34
28
  warn "You are preventing the default behavior of a `Link` component. " +
35
29
  "In this case, you could just use an `a` element."
@@ -38,39 +32,6 @@ class Link
38
32
  end
39
33
  end
40
34
 
41
- def handle_touch event
42
- document = Bowser.document
43
-
44
- # All links will treat this as touch because this is a touch device
45
- @@touch = true
46
- moved = false
47
- x_start = event.x
48
- y_start = event.y
49
-
50
- touch_move_handler = proc do |event|
51
- x_now = event.x
52
- y_now = event.y
53
-
54
- # Count this gesture as a non-click if user moves over 30px
55
- if ((x_now - x_start) ** 2 + (y_now - y_start) ** 2) ** 0.5 > 30
56
- moved = true
57
- end
58
- end
59
-
60
- touch_end_handler = proc do
61
- unless moved
62
- @onclick.call event if @onclick
63
- navigate event
64
- end
65
-
66
- document.off 'touchmove', &touch_move_handler
67
- document.off 'touchend', &touch_end_handler
68
- end
69
-
70
- document.on 'touchmove', &touch_move_handler
71
- document.on 'touchend', &touch_end_handler
72
- end
73
-
74
35
  def navigate event
75
36
  # Don't handle middle-button clicks and clicks with modifier keys. Let them
76
37
  # pass through to the browser's default handling or the user's modified handling.
@@ -100,10 +61,6 @@ class Link
100
61
  a(attributes, content)
101
62
  end
102
63
 
103
- def touch?
104
- !!@@touch
105
- end
106
-
107
64
  def check_active href
108
65
  if Bowser.window.location.path == href
109
66
  class_name = (
metadata CHANGED
@@ -1,94 +1,94 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearwater
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta4
4
+ version: 1.0.0.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Gaskins
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-05 00:00:00.000000000 Z
11
+ date: 2016-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: opal
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
19
  version: '0.7'
19
- name: opal
20
- prerelease: false
21
20
  type: :runtime
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.7'
27
27
  - !ruby/object:Gem::Dependency
28
+ name: bowser
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - "~>"
31
32
  - !ruby/object:Gem::Version
32
33
  version: 0.1.2
33
- name: bowser
34
- prerelease: false
35
34
  type: :runtime
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.1.2
41
41
  - !ruby/object:Gem::Dependency
42
+ name: bundler
42
43
  requirement: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - "~>"
45
46
  - !ruby/object:Gem::Version
46
47
  version: '1.3'
47
- name: bundler
48
- prerelease: false
49
48
  type: :development
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
+ name: opal-rspec
56
57
  requirement: !ruby/object:Gem::Requirement
57
58
  requirements:
58
59
  - - "~>"
59
60
  - !ruby/object:Gem::Version
60
61
  version: 0.5.0.beta2
61
- name: opal-rspec
62
- prerelease: false
63
62
  type: :development
63
+ prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.5.0.beta2
69
69
  - !ruby/object:Gem::Dependency
70
+ name: rake
70
71
  requirement: !ruby/object:Gem::Requirement
71
72
  requirements:
72
73
  - - "~>"
73
74
  - !ruby/object:Gem::Version
74
75
  version: '10.1'
75
- name: rake
76
- prerelease: false
77
76
  type: :development
77
+ prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.1'
83
83
  - !ruby/object:Gem::Dependency
84
+ name: pry
84
85
  requirement: !ruby/object:Gem::Requirement
85
86
  requirements:
86
87
  - - "~>"
87
88
  - !ruby/object:Gem::Version
88
89
  version: '0.9'
89
- name: pry
90
- prerelease: false
91
90
  type: :development
91
+ prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
@@ -127,7 +127,7 @@ homepage: https://clearwater-rb.github.io/
127
127
  licenses:
128
128
  - MIT
129
129
  metadata: {}
130
- post_install_message:
130
+ post_install_message:
131
131
  rdoc_options: []
132
132
  require_paths:
133
133
  - lib
@@ -142,15 +142,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  version: 1.3.1
144
144
  requirements: []
145
- rubyforge_project:
146
- rubygems_version: 2.4.8
147
- signing_key:
145
+ rubyforge_project:
146
+ rubygems_version: 2.5.1
147
+ signing_key:
148
148
  specification_version: 4
149
149
  summary: Front-end Ruby web framework for fast, reasonable, and composable applications
150
150
  test_files:
151
- - spec/component_spec.rb
152
151
  - spec/clearwater/application_spec.rb
153
152
  - spec/clearwater/black_box_node_spec.rb
154
153
  - spec/clearwater/cached_render_spec.rb
155
154
  - spec/clearwater/dom_reference_spec.rb
156
155
  - spec/clearwater/router_spec.rb
156
+ - spec/component_spec.rb
157
+ has_rdoc: