auto_js 1.0.0 → 1.0.1

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: 92fb93c7d2fca03b028a77d3250b85d2713bffcc
4
- data.tar.gz: 4919afeb5e28f21c1aa478a8e303f3d0210646eb
3
+ metadata.gz: ecce5d98ab63df01071d973cad66ba0441dd59d3
4
+ data.tar.gz: 33a8264d20888c1d9a422ce034c76db8b320f9bd
5
5
  SHA512:
6
- metadata.gz: 538bc4e887c79d35326424ad9b2afde8a3c148eb3c3c0ed72569af2981e2ec90ab014349ee49183d56b6724c6ef5f4bf2d153e8c2806f61937055eb5a19eef31
7
- data.tar.gz: 2e9732f1591022d5cb0b9bd4f364a924037f9478b25fbfb805cf7c53f6392d7f90db3400bf5e56760d63219b5cd7b0f7f5be1569a94368cfbf843a462e9ff217
6
+ metadata.gz: 5a854ddabff6c1adc46801ef4128cbe2c1e422dc20f311479d1aab71196e7d0b626d374b4dc9d5ce6ea1b6da5e022c947d3be92d881547edb11fe055641c5398
7
+ data.tar.gz: 840cc795990f151c4532b3d24b20d6b12d62b96b3cf2f1b4b938ac1c79323bfa2ba072e6ab30d96597dccdfd3fe25453130e874bcb813466861d3599fb6b9401
@@ -93,8 +93,13 @@ do ->
93
93
  if self.vars._page_initialized
94
94
  return
95
95
 
96
- controller = document.body.getAttribute('data-controller').replace("/","-")
97
- action = document.body.getAttribute('data-action').replace("/","-")
96
+ controller = document.body.getAttribute('data-controller')
97
+
98
+ while (n = controller.indexOf("/")) != -1
99
+ controller = controller.replace /\//, ""
100
+ controller = controller.substr(0,n) + controller.charAt(n).toUpperCase() + controller.substr(n+1)
101
+
102
+ action = document.body.getAttribute('data-action')
98
103
 
99
104
  self.scopes._exec controller
100
105
  self.scopes._exec controller, action
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Fuller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-20 00:00:00.000000000 Z
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Easily organizes a project's custom javascript and executes appropriate
14
14
  snippits automatically. Turbolinks compatible. Fills the gap between rails default
@@ -29,17 +29,17 @@ require_paths:
29
29
  - lib
30
30
  required_ruby_version: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - '>='
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  requirements: []
41
41
  rubyforge_project:
42
- rubygems_version: 2.4.5
42
+ rubygems_version: 2.0.14
43
43
  signing_key:
44
44
  specification_version: 4
45
45
  summary: Auto-executes javascript based on current view