backbone_extensions 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,11 +14,12 @@
14
14
  },
15
15
 
16
16
  buildAssociation: function(namespace, associationType, associationName, options) {
17
+ function association() {
18
+ var t = (_.isFunction(options.through) && options.through.call(this)) || _.str.camelize(options.through);
19
+ return this[t] && this[t]() && this[t]()[associationName] && this[t]()[associationName]();
20
+ }
21
+
17
22
  function through() {
18
- function association() {
19
- var t = (_.isFunction(options.through) && options.through.call(this)) || _.str.camelize(options.through);
20
- return this[t] && this[t]() && this[t]()[associationName] && this[t]()[associationName]();
21
- }
22
23
  return options.through && association.call(this);
23
24
  }
24
25
 
@@ -89,7 +90,7 @@
89
90
  if (_.isEmpty(parsers)) {
90
91
  this.prototype.parse = _.wrap(this.prototype.parse, function(oldParse, response) {
91
92
  var self = this;
92
- return _.tap(oldParse.call(self, response), function(parsedResponse) {
93
+ return _.tap(oldParse.apply(self, _.rest(arguments)), function(parsedResponse) {
93
94
  _.chain(parsers)
94
95
  .map(function(parser) {
95
96
  return _.tap(parser.parseFn.call(self).call(self, parsedResponse), function(result) {
@@ -66,6 +66,9 @@
66
66
  var self = this, args = _.rest(arguments);
67
67
 
68
68
  if (!args.length) {
69
+ args = _([_.result(self, 'events')]).compact();
70
+ }
71
+ if(!args.length) {
69
72
  return oldDelegateEvents.call(this);
70
73
  }
71
74
 
@@ -1,3 +1,3 @@
1
1
  module BackboneExtensions
2
- VERSION = '0.0.24'
2
+ VERSION = '0.0.25'
3
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backbone_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
5
- prerelease:
4
+ version: 0.0.25
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ryan Dy
@@ -10,102 +9,90 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-03-29 00:00:00.000000000 Z
12
+ date: 2014-01-26 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: fuubar
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - '>='
29
26
  - !ruby/object:Gem::Version
30
27
  version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: jasmine
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
- version: 1.3.2
34
+ version: 2.0.0
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
- version: 1.3.2
41
+ version: 2.0.0
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: jshint_on_rails
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - '>='
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - '>='
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: thin
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - '>='
69
61
  - !ruby/object:Gem::Version
70
62
  version: '0'
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - '>='
77
68
  - !ruby/object:Gem::Version
78
69
  version: '0'
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: yajl-ruby
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>='
74
+ - - '>='
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0'
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>='
81
+ - - '>='
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: rails
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - '>='
101
89
  - !ruby/object:Gem::Version
102
90
  version: '3.1'
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
95
+ - - '>='
109
96
  - !ruby/object:Gem::Version
110
97
  version: '3.1'
111
98
  description: Adds extensions to the backbone javascript library. It adds the javascript
@@ -118,44 +105,38 @@ executables: []
118
105
  extensions: []
119
106
  extra_rdoc_files: []
120
107
  files:
108
+ - MIT-LICENSE
109
+ - README.markdown
110
+ - Rakefile
121
111
  - config/jshint.yml
112
+ - lib/assets/javascripts/backbone.js
122
113
  - lib/assets/javascripts/backbone_extensions/associations.js
123
114
  - lib/assets/javascripts/backbone_extensions/decorator.js
124
115
  - lib/assets/javascripts/backbone_extensions/delegate_events.js
125
116
  - lib/assets/javascripts/backbone_extensions/include.js
126
- - lib/backbone_extensions/version.rb
127
117
  - lib/backbone_extensions.rb
128
- - MIT-LICENSE
129
- - Rakefile
130
- - README.markdown
118
+ - lib/backbone_extensions/version.rb
131
119
  homepage: http://github.com/rdy/underscore_extensions
132
120
  licenses: []
121
+ metadata: {}
133
122
  post_install_message:
134
123
  rdoc_options: []
135
124
  require_paths:
136
125
  - lib
137
126
  required_ruby_version: !ruby/object:Gem::Requirement
138
- none: false
139
127
  requirements:
140
- - - ! '>='
128
+ - - '>='
141
129
  - !ruby/object:Gem::Version
142
130
  version: '0'
143
- segments:
144
- - 0
145
- hash: 3920379791586607175
146
131
  required_rubygems_version: !ruby/object:Gem::Requirement
147
- none: false
148
132
  requirements:
149
- - - ! '>='
133
+ - - '>='
150
134
  - !ruby/object:Gem::Version
151
135
  version: '0'
152
- segments:
153
- - 0
154
- hash: 3920379791586607175
155
136
  requirements: []
156
137
  rubyforge_project:
157
- rubygems_version: 1.8.24
138
+ rubygems_version: 2.2.0
158
139
  signing_key:
159
- specification_version: 3
140
+ specification_version: 4
160
141
  summary: Extensions to backbone javascript library as a rails engine
161
142
  test_files: []