initjs 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -89,10 +89,13 @@ If you have a commom javascript that you need execute every page, you can put in
89
89
  ```coffee
90
90
  App = window.App =
91
91
  Common:
92
+ initPage: ->
93
+ # If you are using the Turbolinks and you need run a code only one time, put something here.
94
+ # if you're not using the turbolinks, there's no difference between init and initPage.
92
95
  init: ->
93
- # Something here
96
+ # Something here. This is called in every page, with or without Turbolinks.
94
97
  finish: ->
95
- # Something here
98
+ # Something here. This is called in every page, with or without Turbolinks.
96
99
  ```
97
100
 
98
101
 
@@ -101,6 +104,11 @@ App = window.App =
101
104
  * Add proper unit tests
102
105
 
103
106
 
107
+ ## Thanks
108
+
109
+ I have thanks to @diogob, that is my inspiration for this gem and thanks for core of code ([gist:2321526](https://gist.github.com/2321526))
110
+
111
+
104
112
  ## Contributing
105
113
 
106
114
  1. Fork it
data/initjs.gemspec CHANGED
@@ -8,6 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.version = Initjs::VERSION
9
9
  gem.authors = ["Josemar Davi Luedke"]
10
10
  gem.email = ["josemarluedke@gmail.com"]
11
+ gem.homepage = "http://github.com/josemarluedke/initjs"
11
12
  gem.description = %q{Init.js is a Ruby Gem that helps run your javascript only in a page that its necessary}
12
13
  gem.summary = %q{Init.js for your Rails application}
13
14
  gem.homepage = ""
@@ -29,6 +29,7 @@ window.Initjs =
29
29
  App.Common[filterName]()
30
30
 
31
31
  jQuery ->
32
+ window.Initjs.execFilter('initPage') # If you are using the Turbolinks and you need run a code only one time.
32
33
  window.Initjs.initialize()
33
34
 
34
35
  unless window.Turbolinks is undefined
@@ -1,7 +1,12 @@
1
1
  App = window.App =
2
2
  Common:
3
+ initPage: ->
4
+ # If you're using the Turbolinks and you need run a code only one time, put something here.
5
+ # if you're not using the turbolinks, there's no difference between init and initPage.
6
+
3
7
  init: ->
4
- # Something here
8
+ # Something here. This is called in every page, with or without Turbolinks.
9
+
5
10
  finish: ->
6
- # Something here
11
+ # Something here. This is called in every page, with or without Turbolinks.
7
12
 
@@ -1,3 +1,3 @@
1
1
  module Initjs
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: initjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-01 00:00:00.000000000 Z
12
+ date: 2012-10-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails