rails_events 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/rails_events_generator.rb +7 -7
- data/lib/rails_events/version.rb +1 -1
- metadata +20 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3bb30fea8f91cab7948219a238b56de1140fbe5
|
4
|
+
data.tar.gz: 301bd730f5838f8a70420d09ce68da6e635c3967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a3304ade59de45baf519fd76f2986c494debd6e64f6d72e88fa364b7bb1cd745cdf7ccecb822c0553b8eb9d78558ecb4805bc6c183b0a11f6d28cf3f2df6387
|
7
|
+
data.tar.gz: 6b066bf398ebe8764de3d1f36a1d499c23067d6eb4074951774f895ddf664d9bf194381a8d6e98d1f14c4693e0a2035e5fe718625295dabcf3e9ae7a1e437f4d
|
@@ -22,10 +22,10 @@ window.#{project_name_camel} = {
|
|
22
22
|
setView: function() {
|
23
23
|
if(!!#{project_name_camel}.view && #{project_name_camel}.view.close)
|
24
24
|
#{project_name_camel}.view.close();
|
25
|
-
|
26
|
-
if(!_.isFunction(#{project_name_camel}.Views[
|
25
|
+
viewName = $('body').data('view-render');
|
26
|
+
if(!_.isFunction(#{project_name_camel}.Views[viewName]))
|
27
27
|
return;
|
28
|
-
#{project_name_camel}.view = new #{project_name_camel}.Views[
|
28
|
+
#{project_name_camel}.view = new #{project_name_camel}.Views[viewName]();
|
29
29
|
}
|
30
30
|
}
|
31
31
|
|
@@ -59,7 +59,7 @@ FILE
|
|
59
59
|
function View(options) {
|
60
60
|
this.close = _.bind(this.close, this);
|
61
61
|
options || (options = {});
|
62
|
-
this.
|
62
|
+
this.viewName = this.__proto__.constructor.name;
|
63
63
|
if (this.render)
|
64
64
|
this.render(options);
|
65
65
|
this.delegateEvents();
|
@@ -87,9 +87,9 @@ FILE
|
|
87
87
|
};
|
88
88
|
|
89
89
|
View.prototype.close = function() {
|
90
|
-
$('body').off('.' + this.
|
91
|
-
$(window).off('.' + this.
|
92
|
-
$(document).off('.' + this.
|
90
|
+
$('body').off('.' + this.viewName);
|
91
|
+
$(window).off('.' + this.viewName);
|
92
|
+
$(document).off('.' + this.viewName);
|
93
93
|
$('body').off('.#{project_name_camel}Events');
|
94
94
|
$(window).off('.#{project_name_camel}Events');
|
95
95
|
$(document).off('.#{project_name_camel}Events');
|
data/lib/rails_events/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Burt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: underscore-rails
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: underscore-string-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,31 +58,22 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.0.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
description: Creates a backbone events hash for your webapp
|
68
|
+
version: 1.0.0
|
69
|
+
description: Add Backbone style events without using the whole framework. This will
|
70
|
+
provide a bare bones micro front-end framework for developing multi-page Rails applications
|
71
|
+
with Javascript or CoffeeScript. This will increase the speed of all event based
|
72
|
+
development, creation of dynamic content, and will add clear organization to Javascript/Coffeescript
|
73
|
+
files. See <a href='https://github.com/Dbz/rails_events'>https://github.com/Dbz/rails_events</a>
|
74
|
+
for more information
|
84
75
|
email:
|
85
|
-
-
|
76
|
+
- burtdaniel@gmail.com
|
86
77
|
executables: []
|
87
78
|
extensions: []
|
88
79
|
extra_rdoc_files: []
|
@@ -154,7 +145,11 @@ rubyforge_project:
|
|
154
145
|
rubygems_version: 2.2.2
|
155
146
|
signing_key:
|
156
147
|
specification_version: 4
|
157
|
-
summary:
|
148
|
+
summary: Add Backbone style events without using the whole framework. This will provide
|
149
|
+
a bare bones micro front-end framework for developing multi-page Rails applications
|
150
|
+
with Javascript or CoffeeScript. This will increase the speed of all event based
|
151
|
+
development, creation of dynamic content, and will add clear organization to Javascript/Coffeescript
|
152
|
+
files. See https://github.com/Dbz/rails_events for more information
|
158
153
|
test_files:
|
159
154
|
- test/dummy/app/assets/javascripts/application.js
|
160
155
|
- test/dummy/app/assets/stylesheets/application.css
|