rails_script 0.3.1 → 0.3.2

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: 6197061a840ea8852e564dfcc2d456362866834e
4
- data.tar.gz: 304e6bda5fab18bf4f8579cc5507725f421caffe
3
+ metadata.gz: e992abc59f4c61c61138d81747fd2f696d9eeb15
4
+ data.tar.gz: e4f9ac79d9c520704107e873b2c5a1c42e2a0fc4
5
5
  SHA512:
6
- metadata.gz: 9259d6e1a66ca0f80574c0f880910eec9a08949613aa8c127afe46ffa80a1c622faa5060e0830c6ade711c7d460e02400a939e0f487668706239b0649494ada5
7
- data.tar.gz: 8d2468b993f087e0885468b0bd3fae3c1d3c3db10a40aee0fab918fdea634c5b5b742fe26fe6ec6259f2bba5ee8afb0c66fd86511f06ab73cd540132cf0e1d80
6
+ metadata.gz: e20b7739f2d1fb925de399d8ef56b970bd3ddbb0ef462692c26216b53b36815580bd234b775066b46a16ce65ad1859897bb5d448b10bae130de27c81362dc117
7
+ data.tar.gz: 7b5c16458e222262e61e0f30f89e75fcd517535ba7694dd3dbba31f544e13a420bf23d30afe6d8e152472a79f955d94763b4fa503076947469ca8c4957f5f8e5
data/README.md CHANGED
@@ -6,7 +6,7 @@ RailsScript is a Rails-centric, object oriented, featherweight framework for wri
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'rails_script'
9
+ gem 'rails_script', '~> 0.3.1'
10
10
 
11
11
  And then execute:
12
12
 
@@ -16,7 +16,7 @@ After bundling you need to run the initial installation generator:
16
16
 
17
17
  $ rails g rails_script:install
18
18
 
19
- After the generator finishes, you will be prompted to add helper call to your application layout. The generated code is responsible for initializing and calling the action specific JavaScript. This helper shouyld be called before the closing body tag.
19
+ After the generator finishes, you will be prompted to add helper call to your application layout. The generated code is responsible for initializing and calling the action specific JavaScript. This helper should be called before the closing body tag.
20
20
 
21
21
  ```
22
22
  <%= include_rails_script %>
@@ -141,16 +141,16 @@ class Utility.Modal
141
141
 
142
142
  toggle: (event) =>
143
143
  event.preventDefault()
144
- if @isShowing then @close() else @open()
144
+ if @isOpen then @close() else @open()
145
145
 
146
146
 
147
147
  open: =>
148
- @isShowing = true
148
+ @isOpen = true
149
149
  @element.show()
150
150
 
151
151
 
152
152
  close: =>
153
- @isShowing = false
153
+ @isOpen = false
154
154
  @element.fadeOut('fast')
155
155
  ```
156
156
 
@@ -310,8 +310,8 @@ window.App ||= {}
310
310
  class App.Users extends App.Base
311
311
 
312
312
  index: =>
313
- console.log App.Utility.RailsVars.user
314
- console.log App.Utility.RailsVars.friends
313
+ console.log Utility.RailsVars.user
314
+ console.log Utility.RailsVars.friends
315
315
  ```
316
316
 
317
317
 
@@ -30,8 +30,9 @@ class App.Base
30
30
  loads, i.e. "$(window).on 'scroll.app', myHandler"
31
31
  ###
32
32
  setClearEventHandlers: ->
33
- jQuery(document).on 'page:before-change', ->
33
+ $(document).on 'page:before-change', ->
34
34
  for element in [window, document]
35
- for event, handlers in jQuery._data(element, 'events')
35
+ for event, handlers of ($._data(element, 'events') || {})
36
36
  for handler in handlers
37
- if handler.namespace == '' then $(element).off event, handler.handler
37
+ if handler? && handler.namespace == ''
38
+ $(element).off event, handler.handler
@@ -1,3 +1,3 @@
1
1
  module RailsScript
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_script
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Pheasey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-17 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler