emerson 0.1.0.pre.2 → 0.1.0.pre.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- emerson (0.1.0.pre.2)
12
+ emerson (0.1.0.pre.3)
13
13
  jquery-rails
14
14
  rails (>= 3.2.0)
15
15
 
@@ -1,3 +1,3 @@
1
1
  module Emerson
2
- VERSION = "0.1.0.pre.2"
2
+ VERSION = "0.1.0.pre.3"
3
3
  end
@@ -87,6 +87,30 @@
87
87
  };
88
88
 
89
89
 
90
+ // jQuery Extension
91
+ // --------------------------------------------------------------------------
92
+
93
+ // ### $.fn.emerson
94
+ //
95
+ // $(document).emerson()
96
+ //
97
+ // Enables/inits Emerson on page load. Also handles `page:load` events, as
98
+ // fired by the Rails jquery-ujs package.
99
+ //
100
+ $.fn.emerson = function emerson() {
101
+ _.each(this, function(e) {
102
+ $(document).ready(function() {
103
+ Emerson.init();
104
+ });
105
+
106
+ $(document).on('page:load', function() {
107
+ Emerson.init();
108
+ });
109
+ });
110
+
111
+ return this;
112
+ };
113
+
90
114
  // Underscore Extension
91
115
  // --------------------------------------------------------------------------
92
116
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emerson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.2
4
+ version: 0.1.0.pre.3
5
5
  prerelease: 6
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: 2013-09-12 00:00:00.000000000 Z
12
+ date: 2013-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -320,7 +320,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
320
320
  version: '0'
321
321
  segments:
322
322
  - 0
323
- hash: 240429688139327647
323
+ hash: -60152427240549318
324
324
  required_rubygems_version: !ruby/object:Gem::Requirement
325
325
  none: false
326
326
  requirements: