batman-rails 0.0.9 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +1 -1
- data/LICENSE.txt +22 -0
- data/README.md +43 -39
- data/Rakefile +2 -9
- data/batman-rails.gemspec +20 -21
- data/lib/batman-rails.rb +8 -1
- data/lib/batman-rails/version.rb +6 -0
- data/lib/generators/batman/app_generator.rb +117 -0
- data/lib/generators/batman/controller_generator.rb +8 -17
- data/lib/generators/batman/html_generator.rb +42 -0
- data/lib/generators/batman/model_generator.rb +2 -2
- data/lib/generators/batman/scaffold_generator.rb +14 -4
- data/lib/generators/batman/view_generator.rb +18 -0
- data/lib/generators/{batman/common.rb → common.rb} +19 -5
- data/lib/templates/batman/application_controller.coffee +1 -0
- data/lib/templates/batman/batman_app.coffee +20 -0
- data/lib/templates/batman/controller.coffee +7 -0
- data/lib/templates/batman/html/edit.html +2 -0
- data/lib/templates/batman/html/index.html +2 -0
- data/lib/templates/batman/html/main_index.html +259 -0
- data/lib/templates/batman/html/show.html +2 -0
- data/lib/templates/batman/main_controller.coffee +8 -0
- data/lib/templates/batman/model.coffee +13 -0
- data/lib/templates/batman/view.coffee +7 -0
- data/lib/templates/rails/controller.rb +7 -0
- data/lib/templates/rails/index.html +0 -0
- data/lib/templates/rails/layout.html +15 -0
- data/test/app_generator_test.rb +111 -0
- data/test/controller_generator_test.rb +41 -15
- data/test/model_generator_test.rb +47 -16
- data/test/test_helper.rb +3 -3
- data/test/view_generator_test.rb +36 -0
- data/vendor/assets/images/batman/bullet.png +0 -0
- data/vendor/assets/images/batman/content-bg-fade.png +0 -0
- data/vendor/assets/images/batman/content-bg.png +0 -0
- data/vendor/assets/images/batman/header-wrapper-bg.jpg +0 -0
- data/vendor/assets/images/batman/logo.png +0 -0
- data/vendor/assets/javascripts/batman/batman.jquery.js +16 -74
- data/vendor/assets/javascripts/batman/batman.js +8951 -8551
- data/vendor/assets/javascripts/batman/batman.paginator.js +216 -0
- data/vendor/assets/javascripts/batman/batman.rails.js +78 -33
- data/vendor/assets/javascripts/batman/es5-shim.js +0 -0
- metadata +76 -57
- data/lib/batman/rails.rb +0 -6
- data/lib/batman/rails/engine.rb +0 -6
- data/lib/batman/rails/version.rb +0 -6
- data/lib/generators/batman/helper_generator.rb +0 -14
- data/lib/generators/batman/install_generator.rb +0 -93
- data/lib/generators/batman/templates/batman_app.coffee +0 -24
- data/lib/generators/batman/templates/controller.coffee +0 -5
- data/lib/generators/batman/templates/helper.coffee +0 -5
- data/lib/generators/batman/templates/model.coffee +0 -7
- data/test/install_generator_test.rb +0 -105
- data/vendor/assets/javascripts/batman/batman.i18n.js +0 -116
- data/vendor/assets/javascripts/batman/batman.solo.js +0 -558
@@ -0,0 +1,216 @@
|
|
1
|
+
(function() {
|
2
|
+
var __hasProp = {}.hasOwnProperty,
|
3
|
+
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
4
|
+
|
5
|
+
Batman.Paginator = (function(_super) {
|
6
|
+
|
7
|
+
__extends(Paginator, _super);
|
8
|
+
|
9
|
+
function Paginator() {
|
10
|
+
return Paginator.__super__.constructor.apply(this, arguments);
|
11
|
+
}
|
12
|
+
|
13
|
+
Paginator.Range = (function() {
|
14
|
+
|
15
|
+
function Range(offset, limit) {
|
16
|
+
this.offset = offset;
|
17
|
+
this.limit = limit;
|
18
|
+
this.reach = offset + limit;
|
19
|
+
}
|
20
|
+
|
21
|
+
Range.prototype.coversOffsetAndLimit = function(offset, limit) {
|
22
|
+
return offset >= this.offset && (offset + limit) <= this.reach;
|
23
|
+
};
|
24
|
+
|
25
|
+
return Range;
|
26
|
+
|
27
|
+
})();
|
28
|
+
|
29
|
+
Paginator.Cache = (function(_super1) {
|
30
|
+
|
31
|
+
__extends(Cache, _super1);
|
32
|
+
|
33
|
+
function Cache(offset, limit, items) {
|
34
|
+
this.offset = offset;
|
35
|
+
this.limit = limit;
|
36
|
+
this.items = items;
|
37
|
+
Cache.__super__.constructor.apply(this, arguments);
|
38
|
+
this.length = items.length;
|
39
|
+
}
|
40
|
+
|
41
|
+
Cache.prototype.itemsForOffsetAndLimit = function(offset, limit) {
|
42
|
+
var begin, end, padding, slice;
|
43
|
+
begin = offset - this.offset;
|
44
|
+
end = begin + limit;
|
45
|
+
if (begin < 0) {
|
46
|
+
padding = new Array(-begin);
|
47
|
+
begin = 0;
|
48
|
+
}
|
49
|
+
slice = this.items.slice(begin, end);
|
50
|
+
if (padding) {
|
51
|
+
return padding.concat(slice);
|
52
|
+
} else {
|
53
|
+
return slice;
|
54
|
+
}
|
55
|
+
};
|
56
|
+
|
57
|
+
return Cache;
|
58
|
+
|
59
|
+
})(Paginator.Range);
|
60
|
+
|
61
|
+
Paginator.prototype.offset = 0;
|
62
|
+
|
63
|
+
Paginator.prototype.limit = 10;
|
64
|
+
|
65
|
+
Paginator.prototype.totalCount = 0;
|
66
|
+
|
67
|
+
Paginator.prototype.markAsLoadingOffsetAndLimit = function(offset, limit) {
|
68
|
+
return this.loadingRange = new Batman.Paginator.Range(offset, limit);
|
69
|
+
};
|
70
|
+
|
71
|
+
Paginator.prototype.markAsFinishedLoading = function() {
|
72
|
+
return delete this.loadingRange;
|
73
|
+
};
|
74
|
+
|
75
|
+
Paginator.prototype.offsetFromPageAndLimit = function(page, limit) {
|
76
|
+
return Math.round((+page - 1) * limit);
|
77
|
+
};
|
78
|
+
|
79
|
+
Paginator.prototype.pageFromOffsetAndLimit = function(offset, limit) {
|
80
|
+
return offset / limit + 1;
|
81
|
+
};
|
82
|
+
|
83
|
+
Paginator.prototype._load = function(offset, limit) {
|
84
|
+
var _ref;
|
85
|
+
if ((_ref = this.loadingRange) != null ? _ref.coversOffsetAndLimit(offset, limit) : void 0) {
|
86
|
+
return;
|
87
|
+
}
|
88
|
+
this.markAsLoadingOffsetAndLimit(offset, limit);
|
89
|
+
return this.loadItemsForOffsetAndLimit(offset, limit);
|
90
|
+
};
|
91
|
+
|
92
|
+
Paginator.prototype.toArray = function() {
|
93
|
+
var cache, limit, offset;
|
94
|
+
cache = this.get('cache');
|
95
|
+
offset = this.get('offset');
|
96
|
+
limit = this.get('limit');
|
97
|
+
if (!(cache != null ? cache.coversOffsetAndLimit(offset, limit) : void 0)) {
|
98
|
+
this._load(offset, limit);
|
99
|
+
}
|
100
|
+
return (cache != null ? cache.itemsForOffsetAndLimit(offset, limit) : void 0) || [];
|
101
|
+
};
|
102
|
+
|
103
|
+
Paginator.prototype.page = function() {
|
104
|
+
return this.pageFromOffsetAndLimit(this.get('offset'), this.get('limit'));
|
105
|
+
};
|
106
|
+
|
107
|
+
Paginator.prototype.pageCount = function() {
|
108
|
+
return Math.ceil(this.get('totalCount') / this.get('limit'));
|
109
|
+
};
|
110
|
+
|
111
|
+
Paginator.prototype.previousPage = function() {
|
112
|
+
return this.set('page', this.get('page') - 1);
|
113
|
+
};
|
114
|
+
|
115
|
+
Paginator.prototype.nextPage = function() {
|
116
|
+
return this.set('page', this.get('page') + 1);
|
117
|
+
};
|
118
|
+
|
119
|
+
Paginator.prototype.loadItemsForOffsetAndLimit = function(offset, limit) {};
|
120
|
+
|
121
|
+
Paginator.prototype.updateCache = function(offset, limit, items) {
|
122
|
+
var cache;
|
123
|
+
cache = new Batman.Paginator.Cache(offset, limit, items);
|
124
|
+
if ((this.loadingRange != null) && !cache.coversOffsetAndLimit(this.loadingRange.offset, this.loadingRange.limit)) {
|
125
|
+
return;
|
126
|
+
}
|
127
|
+
this.markAsFinishedLoading();
|
128
|
+
return this.set('cache', cache);
|
129
|
+
};
|
130
|
+
|
131
|
+
Paginator.accessor('toArray', Paginator.prototype.toArray);
|
132
|
+
|
133
|
+
Paginator.accessor('offset', 'limit', 'totalCount', {
|
134
|
+
get: Batman.Property.defaultAccessor.get,
|
135
|
+
set: function(key, value) {
|
136
|
+
return Batman.Property.defaultAccessor.set.call(this, key, +value);
|
137
|
+
}
|
138
|
+
});
|
139
|
+
|
140
|
+
Paginator.accessor('page', {
|
141
|
+
get: Paginator.prototype.page,
|
142
|
+
set: function(_, value) {
|
143
|
+
value = +value;
|
144
|
+
this.set('offset', this.offsetFromPageAndLimit(value, this.get('limit')));
|
145
|
+
return value;
|
146
|
+
}
|
147
|
+
});
|
148
|
+
|
149
|
+
Paginator.accessor('pageCount', Paginator.prototype.pageCount);
|
150
|
+
|
151
|
+
return Paginator;
|
152
|
+
|
153
|
+
})(Batman.Object);
|
154
|
+
|
155
|
+
Batman.ModelPaginator = (function(_super) {
|
156
|
+
|
157
|
+
__extends(ModelPaginator, _super);
|
158
|
+
|
159
|
+
function ModelPaginator() {
|
160
|
+
return ModelPaginator.__super__.constructor.apply(this, arguments);
|
161
|
+
}
|
162
|
+
|
163
|
+
ModelPaginator.prototype.cachePadding = 0;
|
164
|
+
|
165
|
+
ModelPaginator.prototype.paddedOffset = function(offset) {
|
166
|
+
offset -= this.cachePadding;
|
167
|
+
if (offset < 0) {
|
168
|
+
return 0;
|
169
|
+
} else {
|
170
|
+
return offset;
|
171
|
+
}
|
172
|
+
};
|
173
|
+
|
174
|
+
ModelPaginator.prototype.paddedLimit = function(limit) {
|
175
|
+
return limit + this.cachePadding * 2;
|
176
|
+
};
|
177
|
+
|
178
|
+
ModelPaginator.prototype.loadItemsForOffsetAndLimit = function(offset, limit) {
|
179
|
+
var k, params, v, _ref,
|
180
|
+
_this = this;
|
181
|
+
params = this.paramsForOffsetAndLimit(offset, limit);
|
182
|
+
_ref = this.params;
|
183
|
+
for (k in _ref) {
|
184
|
+
v = _ref[k];
|
185
|
+
params[k] = v;
|
186
|
+
}
|
187
|
+
return this.model.load(params, function(err, records) {
|
188
|
+
if (err != null) {
|
189
|
+
_this.markAsFinishedLoading();
|
190
|
+
return _this.fire('error', err);
|
191
|
+
} else {
|
192
|
+
return _this.updateCache(_this.offsetFromParams(params), _this.limitFromParams(params), records);
|
193
|
+
}
|
194
|
+
});
|
195
|
+
};
|
196
|
+
|
197
|
+
ModelPaginator.prototype.paramsForOffsetAndLimit = function(offset, limit) {
|
198
|
+
return {
|
199
|
+
offset: this.paddedOffset(offset),
|
200
|
+
limit: this.paddedLimit(limit)
|
201
|
+
};
|
202
|
+
};
|
203
|
+
|
204
|
+
ModelPaginator.prototype.offsetFromParams = function(params) {
|
205
|
+
return params.offset;
|
206
|
+
};
|
207
|
+
|
208
|
+
ModelPaginator.prototype.limitFromParams = function(params) {
|
209
|
+
return params.limit;
|
210
|
+
};
|
211
|
+
|
212
|
+
return ModelPaginator;
|
213
|
+
|
214
|
+
})(Batman.Paginator);
|
215
|
+
|
216
|
+
}).call(this);
|
@@ -1,52 +1,69 @@
|
|
1
1
|
(function() {
|
2
|
-
var date_re, numericKeys,
|
2
|
+
var date_re, numericKeys, _ref,
|
3
|
+
__slice = [].slice,
|
3
4
|
__hasProp = {}.hasOwnProperty,
|
4
5
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
5
6
|
|
7
|
+
Batman.config.pathToHTML = '/assets/batman/html';
|
8
|
+
|
9
|
+
Batman.config.protectFromCSRF = true;
|
10
|
+
|
11
|
+
Batman.config.metaNameForCSRFToken = 'csrf-token';
|
12
|
+
|
6
13
|
numericKeys = [1, 2, 3, 4, 5, 6, 7, 10, 11];
|
7
14
|
|
8
15
|
date_re = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/;
|
9
16
|
|
10
|
-
Batman.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
if (
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
minutesOffset = 0 - minutesOffset;
|
30
|
-
}
|
31
|
-
} else {
|
32
|
-
minutesOffset = Batman.Encoders.railsDate.defaultTimezoneOffset;
|
17
|
+
Batman.Encoders.railsDate = {
|
18
|
+
defaultTimezoneOffset: (new Date()).getTimezoneOffset(),
|
19
|
+
encode: function(value) {
|
20
|
+
return value;
|
21
|
+
},
|
22
|
+
decode: function(value) {
|
23
|
+
var key, minutesOffset, obj, _i, _len;
|
24
|
+
if (value != null) {
|
25
|
+
if ((obj = date_re.exec(value))) {
|
26
|
+
for (_i = 0, _len = numericKeys.length; _i < _len; _i++) {
|
27
|
+
key = numericKeys[_i];
|
28
|
+
obj[key] = +obj[key] || 0;
|
29
|
+
}
|
30
|
+
obj[2] = (+obj[2] || 1) - 1;
|
31
|
+
obj[3] = +obj[3] || 1;
|
32
|
+
if (obj[8] !== "Z" && obj[9] !== void 0) {
|
33
|
+
minutesOffset = obj[10] * 60 + obj[11];
|
34
|
+
if (obj[9] === "+") {
|
35
|
+
minutesOffset = 0 - minutesOffset;
|
33
36
|
}
|
34
|
-
return new Date(Date.UTC(obj[1], obj[2], obj[3], obj[4], obj[5] + minutesOffset, obj[6], obj[7]));
|
35
37
|
} else {
|
36
|
-
Batman.
|
37
|
-
return Date.parse(value);
|
38
|
+
minutesOffset = Batman.Encoders.railsDate.defaultTimezoneOffset;
|
38
39
|
}
|
40
|
+
return new Date(Date.UTC(obj[1], obj[2], obj[3], obj[4], obj[5] + minutesOffset, obj[6], obj[7]));
|
41
|
+
} else {
|
42
|
+
Batman.developer.warn("Unrecognized rails date " + value + "!");
|
43
|
+
return Date.parse(value);
|
39
44
|
}
|
40
45
|
}
|
41
46
|
}
|
42
|
-
}
|
47
|
+
};
|
43
48
|
|
44
|
-
Batman.
|
49
|
+
Batman.Model.encodeTimestamps = function() {
|
50
|
+
var attrs;
|
51
|
+
attrs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
|
52
|
+
if (attrs.length === 0) {
|
53
|
+
attrs = ['created_at', 'updated_at'];
|
54
|
+
}
|
55
|
+
return this.encode.apply(this, __slice.call(attrs).concat([{
|
56
|
+
encode: false,
|
57
|
+
decode: Batman.Encoders.railsDate.decode
|
58
|
+
}]));
|
59
|
+
};
|
45
60
|
|
61
|
+
Batman.RailsStorage = (function(_super) {
|
46
62
|
__extends(RailsStorage, _super);
|
47
63
|
|
48
64
|
function RailsStorage() {
|
49
|
-
|
65
|
+
_ref = RailsStorage.__super__.constructor.apply(this, arguments);
|
66
|
+
return _ref;
|
50
67
|
}
|
51
68
|
|
52
69
|
RailsStorage.prototype.urlForRecord = function() {
|
@@ -65,18 +82,46 @@
|
|
65
82
|
};
|
66
83
|
|
67
84
|
RailsStorage.prototype._errorsFrom422Response = function(response) {
|
68
|
-
|
85
|
+
var parsedResponse;
|
86
|
+
parsedResponse = JSON.parse(response);
|
87
|
+
if ('errors' in parsedResponse) {
|
88
|
+
return parsedResponse.errors;
|
89
|
+
} else {
|
90
|
+
return parsedResponse;
|
91
|
+
}
|
69
92
|
};
|
70
93
|
|
94
|
+
RailsStorage.prototype.before('all', function(env, next) {
|
95
|
+
var headers, tag, token, _base;
|
96
|
+
if (!Batman.config.protectFromCSRF) {
|
97
|
+
return next();
|
98
|
+
}
|
99
|
+
if (Batman.config.CSRF_TOKEN == null) {
|
100
|
+
if (tag = Batman.DOM.querySelector(document.head, "meta[name=\"" + Batman.config.metaNameForCSRFToken + "\"]")) {
|
101
|
+
Batman.config.CSRF_TOKEN = tag.getAttribute('content');
|
102
|
+
} else {
|
103
|
+
Batman.config.CSRF_TOKEN = null;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
if (token = Batman.config.CSRF_TOKEN) {
|
107
|
+
headers = (_base = env.options).headers || (_base.headers = {});
|
108
|
+
if (headers['X-CSRF-Token'] == null) {
|
109
|
+
headers['X-CSRF-Token'] = token;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
return next();
|
113
|
+
});
|
114
|
+
|
71
115
|
RailsStorage.prototype.after('update', 'create', function(env, next) {
|
72
|
-
var error, errorsArray, key, record, response, validationError, validationErrors, _i, _len;
|
116
|
+
var error, errorsArray, extractionError, key, record, response, validationError, validationErrors, _i, _len;
|
73
117
|
record = env.subject;
|
74
118
|
error = env.error, response = env.response;
|
75
119
|
if (error) {
|
76
120
|
if (error instanceof Batman.StorageAdapter.UnprocessableRecordError) {
|
77
121
|
try {
|
78
122
|
validationErrors = this._errorsFrom422Response(response);
|
79
|
-
} catch (
|
123
|
+
} catch (_error) {
|
124
|
+
extractionError = _error;
|
80
125
|
env.error = extractionError;
|
81
126
|
return next();
|
82
127
|
}
|
File without changes
|
metadata
CHANGED
@@ -1,113 +1,127 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: batman-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.15.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
7
|
+
- Nick Small
|
8
|
+
- Matt Helm
|
8
9
|
- John Duff
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2013-08-16 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
16
|
-
requirement: &70345619286860 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
17
|
requirements:
|
19
18
|
- - ! '>='
|
20
19
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.
|
20
|
+
version: '3.2'
|
22
21
|
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
name: thor
|
27
|
-
requirement: &70345619286360 !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
23
|
+
name: railties
|
24
|
+
requirement: !ruby/object:Gem::Requirement
|
29
25
|
requirements:
|
30
26
|
- - ! '>='
|
31
27
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
33
|
-
type: :runtime
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *70345619286360
|
28
|
+
version: '3.2'
|
36
29
|
- !ruby/object:Gem::Dependency
|
37
|
-
|
38
|
-
requirement: &70345619285900 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
31
|
requirements:
|
41
32
|
- - ! '>='
|
42
33
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
34
|
+
version: '0'
|
44
35
|
type: :development
|
45
36
|
prerelease: false
|
46
|
-
|
37
|
+
name: bundler
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ! '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
47
43
|
- !ruby/object:Gem::Dependency
|
48
|
-
|
49
|
-
requirement: &70345619285440 !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
45
|
requirements:
|
52
46
|
- - ! '>='
|
53
47
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
48
|
+
version: '0'
|
55
49
|
type: :development
|
56
50
|
prerelease: false
|
57
|
-
|
51
|
+
name: rails
|
52
|
+
requirement: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
58
57
|
- !ruby/object:Gem::Dependency
|
59
|
-
|
60
|
-
requirement: &70345619285060 !ruby/object:Gem::Requirement
|
61
|
-
none: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
59
|
requirements:
|
63
60
|
- - ! '>='
|
64
61
|
- !ruby/object:Gem::Version
|
65
62
|
version: '0'
|
66
63
|
type: :development
|
67
64
|
prerelease: false
|
68
|
-
|
65
|
+
name: mocha
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
69
71
|
- !ruby/object:Gem::Dependency
|
70
|
-
|
71
|
-
requirement: &70345619284600 !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
name: sqlite3
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ! '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
description: Quickly get started with batman.js in a Rails app. Provides generators
|
86
|
+
to get started and bundles in the latest version of batman.js.
|
82
87
|
email:
|
83
|
-
-
|
88
|
+
- batmanjs@shopify.com
|
84
89
|
executables: []
|
85
90
|
extensions: []
|
86
91
|
extra_rdoc_files: []
|
87
92
|
files:
|
88
93
|
- .gitignore
|
89
94
|
- Gemfile
|
95
|
+
- LICENSE.txt
|
90
96
|
- README.md
|
91
97
|
- Rakefile
|
92
98
|
- batman-rails.gemspec
|
93
99
|
- lib/batman-rails.rb
|
94
|
-
- lib/batman/
|
95
|
-
- lib/batman/
|
96
|
-
- lib/batman/rails/version.rb
|
97
|
-
- lib/generators/batman/common.rb
|
100
|
+
- lib/batman-rails/version.rb
|
101
|
+
- lib/generators/batman/app_generator.rb
|
98
102
|
- lib/generators/batman/controller_generator.rb
|
99
|
-
- lib/generators/batman/
|
100
|
-
- lib/generators/batman/install_generator.rb
|
103
|
+
- lib/generators/batman/html_generator.rb
|
101
104
|
- lib/generators/batman/model_generator.rb
|
102
105
|
- lib/generators/batman/scaffold_generator.rb
|
103
|
-
- lib/generators/batman/
|
104
|
-
- lib/generators/
|
105
|
-
- lib/
|
106
|
-
- lib/
|
106
|
+
- lib/generators/batman/view_generator.rb
|
107
|
+
- lib/generators/common.rb
|
108
|
+
- lib/templates/batman/application_controller.coffee
|
109
|
+
- lib/templates/batman/batman_app.coffee
|
110
|
+
- lib/templates/batman/controller.coffee
|
111
|
+
- lib/templates/batman/html/edit.html
|
112
|
+
- lib/templates/batman/html/index.html
|
113
|
+
- lib/templates/batman/html/main_index.html
|
114
|
+
- lib/templates/batman/html/show.html
|
115
|
+
- lib/templates/batman/main_controller.coffee
|
116
|
+
- lib/templates/batman/model.coffee
|
117
|
+
- lib/templates/batman/view.coffee
|
118
|
+
- lib/templates/rails/controller.rb
|
119
|
+
- lib/templates/rails/index.html
|
120
|
+
- lib/templates/rails/layout.html
|
121
|
+
- test/app_generator_test.rb
|
107
122
|
- test/controller_generator_test.rb
|
108
123
|
- test/fixtures/application.js
|
109
124
|
- test/fixtures/application.js.coffee
|
110
|
-
- test/install_generator_test.rb
|
111
125
|
- test/model_generator_test.rb
|
112
126
|
- test/sample/.gitignore
|
113
127
|
- test/sample/Gemfile
|
@@ -158,41 +172,45 @@ files:
|
|
158
172
|
- test/sample/vendor/assets/stylesheets/.gitkeep
|
159
173
|
- test/sample/vendor/plugins/.gitkeep
|
160
174
|
- test/test_helper.rb
|
161
|
-
-
|
175
|
+
- test/view_generator_test.rb
|
176
|
+
- vendor/assets/images/batman/bullet.png
|
177
|
+
- vendor/assets/images/batman/content-bg-fade.png
|
178
|
+
- vendor/assets/images/batman/content-bg.png
|
179
|
+
- vendor/assets/images/batman/header-wrapper-bg.jpg
|
180
|
+
- vendor/assets/images/batman/logo.png
|
162
181
|
- vendor/assets/javascripts/batman/batman.jquery.js
|
163
182
|
- vendor/assets/javascripts/batman/batman.js
|
183
|
+
- vendor/assets/javascripts/batman/batman.paginator.js
|
164
184
|
- vendor/assets/javascripts/batman/batman.rails.js
|
165
|
-
- vendor/assets/javascripts/batman/batman.solo.js
|
166
185
|
- vendor/assets/javascripts/batman/es5-shim.js
|
167
186
|
homepage: https://github.com/Shopify/batman-rails
|
168
187
|
licenses: []
|
188
|
+
metadata: {}
|
169
189
|
post_install_message:
|
170
190
|
rdoc_options: []
|
171
191
|
require_paths:
|
172
192
|
- lib
|
173
193
|
required_ruby_version: !ruby/object:Gem::Requirement
|
174
|
-
none: false
|
175
194
|
requirements:
|
176
195
|
- - ! '>='
|
177
196
|
- !ruby/object:Gem::Version
|
178
197
|
version: '0'
|
179
198
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
|
-
none: false
|
181
199
|
requirements:
|
182
200
|
- - ! '>='
|
183
201
|
- !ruby/object:Gem::Version
|
184
202
|
version: '0'
|
185
203
|
requirements: []
|
186
|
-
rubyforge_project:
|
187
|
-
rubygems_version:
|
204
|
+
rubyforge_project:
|
205
|
+
rubygems_version: 2.0.7
|
188
206
|
signing_key:
|
189
|
-
specification_version:
|
190
|
-
summary: Use
|
207
|
+
specification_version: 4
|
208
|
+
summary: Use batman.js with Rails
|
191
209
|
test_files:
|
210
|
+
- test/app_generator_test.rb
|
192
211
|
- test/controller_generator_test.rb
|
193
212
|
- test/fixtures/application.js
|
194
213
|
- test/fixtures/application.js.coffee
|
195
|
-
- test/install_generator_test.rb
|
196
214
|
- test/model_generator_test.rb
|
197
215
|
- test/sample/.gitignore
|
198
216
|
- test/sample/Gemfile
|
@@ -243,3 +261,4 @@ test_files:
|
|
243
261
|
- test/sample/vendor/assets/stylesheets/.gitkeep
|
244
262
|
- test/sample/vendor/plugins/.gitkeep
|
245
263
|
- test/test_helper.rb
|
264
|
+
- test/view_generator_test.rb
|