coolerator.vision 0.1.0 → 0.2.0
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/.gitmodules +3 -0
- data/.screwrc +15 -0
- data/VERSION +1 -1
- data/coolerator.vision.gemspec +46 -3
- data/public/javascripts/vendor/coolerator/coolerator.base.js +1 -0
- data/public/javascripts/vendor/coolerator/coolerator.filter.js +1 -1
- data/public/javascripts/vendor/coolerator/coolerator.module.js +5 -1
- data/public/javascripts/vendor/coolerator/coolerator.remote.js +7 -2
- data/public/javascripts/vendor/coolerator/coolerator.view.js +38 -18
- data/script/pair +61 -0
- data/spec/javascripts/support/spec_helper.js +8 -0
- data/spec/javascripts/vendor/coolerator/coolerator.base_spec.js +9 -0
- data/spec/javascripts/vendor/coolerator/coolerator.filter_spec.js +9 -0
- data/spec/javascripts/vendor/coolerator/coolerator.module_spec.js +9 -0
- data/spec/javascripts/vendor/coolerator/coolerator.registrar_spec.js +9 -0
- data/spec/javascripts/vendor/coolerator/coolerator.remote_spec.js +9 -0
- data/spec/javascripts/vendor/coolerator/coolerator.view_spec.js +87 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit.rb +19 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/array_extension.rb +10 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/asset_location.rb +67 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/asset_manager.rb +68 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/configuration.rb +91 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/dispatcher.rb +41 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/js_file.rb +60 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources.rb +9 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources/dir.rb +24 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources/file.rb +40 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources/file_not_found.rb +24 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources/root.rb +27 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources/spec_dir.rb +30 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources/spec_runner.rb +88 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources/streaming_spec_runner.rb +27 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/resources/suite_completion.rb +25 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/server.rb +43 -0
- data/spec/support/vendor/screw-unit/lib/screw_unit/string_extension.rb +9 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/array_extension_spec.rb +15 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/asset_location_spec.rb +31 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/asset_manager_spec.rb +92 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/configuration_spec.rb +51 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/dispatcher_spec.rb +60 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/js_file_spec.rb +24 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/resources/dir_spec.rb +68 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/resources/file_spec.rb +97 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/resources/root_spec.rb +48 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/resources/spec_dir_spec.rb +52 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/resources/spec_suite_spec.rb +46 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/resources/suite_completion_spec.rb +68 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit/server_spec.rb +15 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit_spec_helper.rb +13 -0
- data/spec/support/vendor/screw-unit/spec/screw_unit_spec_suite.rb +4 -0
- metadata +45 -2
data/.gitmodules
ADDED
data/.screwrc
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ScrewUnit.configure do
|
|
2
|
+
def absolutize_path(relative_path)
|
|
3
|
+
basepath = relative_path.match(/^\//) ? '' : path_containing_screwrc
|
|
4
|
+
File.expand_path(File.join(basepath, relative_path))
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
port 8081
|
|
8
|
+
|
|
9
|
+
add_js_location "/engine", "public/javascripts"
|
|
10
|
+
add_js_location("/screw_unit_core", "spec/support/vendor/screw-unit/client/lib")
|
|
11
|
+
add_js_location("/screw_unit_vendor", "spec/support/vendor/screw-unit/client/vendor")
|
|
12
|
+
add_js_location("/screw_unit_stylesheets", "spec/support/vendor/screw-unit/client/stylesheets")
|
|
13
|
+
|
|
14
|
+
add_js_location "/specs", "spec/javascripts"
|
|
15
|
+
end
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.2.0
|
data/coolerator.vision.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{coolerator.vision}
|
|
8
|
-
s.version = "0.
|
|
8
|
+
s.version = "0.2.0"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Corey Innis"]
|
|
12
|
-
s.date = %q{2009-11-
|
|
12
|
+
s.date = %q{2009-11-12}
|
|
13
13
|
s.description = %q{A Rails plugin}
|
|
14
14
|
s.email = %q{corey@coolerator.net}
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -19,6 +19,8 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
s.files = [
|
|
20
20
|
".document",
|
|
21
21
|
".gitignore",
|
|
22
|
+
".gitmodules",
|
|
23
|
+
".screwrc",
|
|
22
24
|
"LICENSE",
|
|
23
25
|
"README.rdoc",
|
|
24
26
|
"Rakefile",
|
|
@@ -46,7 +48,15 @@ Gem::Specification.new do |s|
|
|
|
46
48
|
"public/javascripts/vendor/prez/prez.js",
|
|
47
49
|
"public/javascripts/vendor/prez/prez.js",
|
|
48
50
|
"rails/init.rb",
|
|
51
|
+
"script/pair",
|
|
49
52
|
"spec/coolerator.vision_spec.rb",
|
|
53
|
+
"spec/javascripts/support/spec_helper.js",
|
|
54
|
+
"spec/javascripts/vendor/coolerator/coolerator.base_spec.js",
|
|
55
|
+
"spec/javascripts/vendor/coolerator/coolerator.filter_spec.js",
|
|
56
|
+
"spec/javascripts/vendor/coolerator/coolerator.module_spec.js",
|
|
57
|
+
"spec/javascripts/vendor/coolerator/coolerator.registrar_spec.js",
|
|
58
|
+
"spec/javascripts/vendor/coolerator/coolerator.remote_spec.js",
|
|
59
|
+
"spec/javascripts/vendor/coolerator/coolerator.view_spec.js",
|
|
50
60
|
"spec/spec.opts",
|
|
51
61
|
"spec/spec_helper.rb"
|
|
52
62
|
]
|
|
@@ -57,7 +67,40 @@ Gem::Specification.new do |s|
|
|
|
57
67
|
s.summary = %q{A Rails plugin}
|
|
58
68
|
s.test_files = [
|
|
59
69
|
"spec/coolerator.vision_spec.rb",
|
|
60
|
-
"spec/spec_helper.rb"
|
|
70
|
+
"spec/spec_helper.rb",
|
|
71
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/array_extension.rb",
|
|
72
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/asset_location.rb",
|
|
73
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/asset_manager.rb",
|
|
74
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/configuration.rb",
|
|
75
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/dispatcher.rb",
|
|
76
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/js_file.rb",
|
|
77
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources/dir.rb",
|
|
78
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources/file.rb",
|
|
79
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources/file_not_found.rb",
|
|
80
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources/root.rb",
|
|
81
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources/spec_dir.rb",
|
|
82
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources/spec_runner.rb",
|
|
83
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources/streaming_spec_runner.rb",
|
|
84
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources/suite_completion.rb",
|
|
85
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/resources.rb",
|
|
86
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/server.rb",
|
|
87
|
+
"spec/support/vendor/screw-unit/lib/screw_unit/string_extension.rb",
|
|
88
|
+
"spec/support/vendor/screw-unit/lib/screw_unit.rb",
|
|
89
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/array_extension_spec.rb",
|
|
90
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/asset_location_spec.rb",
|
|
91
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/asset_manager_spec.rb",
|
|
92
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/configuration_spec.rb",
|
|
93
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/dispatcher_spec.rb",
|
|
94
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/js_file_spec.rb",
|
|
95
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/resources/dir_spec.rb",
|
|
96
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/resources/file_spec.rb",
|
|
97
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/resources/root_spec.rb",
|
|
98
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/resources/spec_dir_spec.rb",
|
|
99
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/resources/spec_suite_spec.rb",
|
|
100
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/resources/suite_completion_spec.rb",
|
|
101
|
+
"spec/support/vendor/screw-unit/spec/screw_unit/server_spec.rb",
|
|
102
|
+
"spec/support/vendor/screw-unit/spec/screw_unit_spec_helper.rb",
|
|
103
|
+
"spec/support/vendor/screw-unit/spec/screw_unit_spec_suite.rb"
|
|
61
104
|
]
|
|
62
105
|
|
|
63
106
|
if s.respond_to? :specification_version then
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
},
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
del : function del() {
|
|
33
33
|
|
|
34
34
|
},
|
|
35
35
|
|
|
@@ -64,6 +64,9 @@
|
|
|
64
64
|
function subscribe() {
|
|
65
65
|
Coolerator.Registrar.subscribe(self, function(registrar) {
|
|
66
66
|
with(registrar) {
|
|
67
|
+
use(this.link.handle)
|
|
68
|
+
.on('click', selectors.link);
|
|
69
|
+
|
|
67
70
|
on('click', selectors.link)
|
|
68
71
|
.use(this.link.handle);
|
|
69
72
|
|
|
@@ -171,6 +174,7 @@
|
|
|
171
174
|
},
|
|
172
175
|
|
|
173
176
|
on_keypress : function on_keypress(e) {
|
|
177
|
+
// TODO: if the field is a textarea, only submit with a modifier key.
|
|
174
178
|
if(e.which === 13) {
|
|
175
179
|
this.closest('form').submit();
|
|
176
180
|
return false;
|
|
@@ -207,9 +211,10 @@
|
|
|
207
211
|
|
|
208
212
|
filters : {
|
|
209
213
|
prepare : function prepare(response) {
|
|
214
|
+
response.filters = Coolerator.Filters.get(response.trigger);
|
|
215
|
+
|
|
210
216
|
$.each(response.templates, function prepare_views(name, content) {
|
|
211
217
|
response.templates[name] = $(content);
|
|
212
|
-
response.filters = Coolerator.Filters.get(response.trigger);
|
|
213
218
|
});
|
|
214
219
|
},
|
|
215
220
|
|
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
$.extend(Coolerator, {
|
|
3
3
|
View : function View(classifier) {
|
|
4
4
|
this.classifier = classifier;
|
|
5
|
+
|
|
6
|
+
$.extend(this, {
|
|
7
|
+
instance : {
|
|
8
|
+
content : function content(builder, attributes) {
|
|
9
|
+
var html_attributes = attributes.classifier ? { 'class' : attributes.classifier } : {};
|
|
10
|
+
|
|
11
|
+
with(builder) {
|
|
12
|
+
div(html_attributes);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
methods : {
|
|
17
|
+
initialize : function initialize() {
|
|
18
|
+
if(this.content) {
|
|
19
|
+
this.html(this.content);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
5
25
|
}
|
|
6
26
|
});
|
|
7
27
|
|
|
@@ -25,7 +45,7 @@
|
|
|
25
45
|
});
|
|
26
46
|
|
|
27
47
|
$.extend(true, this.instance, extension.instance);
|
|
28
|
-
$.extend(true, this, extension.collection.methods, extension.collection.configuration);
|
|
48
|
+
extension.collection && $.extend(true, this, extension.collection.methods, extension.collection.configuration);
|
|
29
49
|
},
|
|
30
50
|
|
|
31
51
|
subscribe : function subscribe(callback) {
|
|
@@ -61,22 +81,22 @@
|
|
|
61
81
|
return result;
|
|
62
82
|
},
|
|
63
83
|
|
|
64
|
-
instance : {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
84
|
+
// instance : {
|
|
85
|
+
// content : function content(builder, attributes) {
|
|
86
|
+
// var html_attributes = attributes.classifier ? { 'class' : attributes.classifier } : {};
|
|
87
|
+
//
|
|
88
|
+
// with(builder) {
|
|
89
|
+
// div(html_attributes);
|
|
90
|
+
// }
|
|
91
|
+
// },
|
|
92
|
+
//
|
|
93
|
+
// methods : {
|
|
94
|
+
// initialize : function initialize() {
|
|
95
|
+
// if(this.content) {
|
|
96
|
+
// this.html(this.content);
|
|
97
|
+
// }
|
|
98
|
+
// }
|
|
99
|
+
// }
|
|
100
|
+
// }
|
|
81
101
|
});
|
|
82
102
|
})(jQuery);
|
data/script/pair
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# Configures the git author to a list of developers when pair programming
|
|
4
|
+
#
|
|
5
|
+
# Usage: pair lm bh (Sets the author to 'Luke Melia and Bryan Helmkamp')
|
|
6
|
+
# pair (Unsets the author so the git global config takes effect)
|
|
7
|
+
#
|
|
8
|
+
# Author: Bryan Helmkamp (http://brynary.com)
|
|
9
|
+
|
|
10
|
+
#######################################################################
|
|
11
|
+
## Configuration
|
|
12
|
+
|
|
13
|
+
# PAIR_EMAIL = "developers@weplay.com"
|
|
14
|
+
|
|
15
|
+
AUTHORS = {
|
|
16
|
+
"ci" => "Corey Innis",
|
|
17
|
+
"rh" => "Rachel Heaton"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
## End of configuration
|
|
21
|
+
#######################################################################
|
|
22
|
+
|
|
23
|
+
unless File.exists?(".git")
|
|
24
|
+
puts "This doesn't look like a git repository."
|
|
25
|
+
exit 1
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
authors = ARGV.map do |initials|
|
|
29
|
+
if AUTHORS[initials.downcase]
|
|
30
|
+
AUTHORS[initials.downcase]
|
|
31
|
+
else
|
|
32
|
+
puts "Couldn't find author name for initials: #{initials}"
|
|
33
|
+
exit 1
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
if authors.any?
|
|
38
|
+
if authors.size == 1
|
|
39
|
+
authors = authors.first
|
|
40
|
+
if ENV['SOLO'].nil?
|
|
41
|
+
puts "\n"
|
|
42
|
+
puts " **If you are soloing, please create a separate branch** "
|
|
43
|
+
puts "\n"
|
|
44
|
+
end
|
|
45
|
+
elsif authors.size == 2
|
|
46
|
+
authors = authors.join(" and ")
|
|
47
|
+
else
|
|
48
|
+
authors = authors[0..-2].join(", ") + " and " + authors.last
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
`git config user.name '#{authors}'`
|
|
52
|
+
# `git config user.email '#{PAIR_EMAIL}'`
|
|
53
|
+
|
|
54
|
+
puts "user.name = #{authors}"
|
|
55
|
+
# puts "user.email = #{PAIR_EMAIL}"
|
|
56
|
+
else
|
|
57
|
+
`git config --unset user.name`
|
|
58
|
+
# `git config --unset user.email`
|
|
59
|
+
|
|
60
|
+
puts "Unset user.name"
|
|
61
|
+
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//= require <vendor/jquery/jquery>
|
|
2
|
+
//= require <vendor/prez/prez>
|
|
3
|
+
//= require <vendor/coolerator/coolerator.base>
|
|
4
|
+
//= require <vendor/coolerator/coolerator.registrar>
|
|
5
|
+
//= require <vendor/coolerator/coolerator.remote>
|
|
6
|
+
//= require <vendor/coolerator/coolerator.module>
|
|
7
|
+
//= require <vendor/coolerator/coolerator.view>
|
|
8
|
+
//= require <vendor/coolerator/coolerator.filter>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//= require <support/spec_helper>
|
|
2
|
+
|
|
3
|
+
Screw.Unit(function(c) { with(c) {
|
|
4
|
+
describe("Coolerator.View", function() {
|
|
5
|
+
it("is added to the Coolerator namespace", function() {
|
|
6
|
+
expect(typeof Coolerator.View).to(equal, 'function');
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
describe("collection", function() {
|
|
10
|
+
it("is optional", function() {
|
|
11
|
+
var fn = function() {
|
|
12
|
+
var view = new Coolerator.View('one');
|
|
13
|
+
|
|
14
|
+
view.extend({
|
|
15
|
+
instance : {
|
|
16
|
+
methods : {}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
expect(fn).to_not(throw_exception);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe("instance", function() {
|
|
26
|
+
describe("methods which are implemented in super and child objects", function() {
|
|
27
|
+
var view, other;
|
|
28
|
+
|
|
29
|
+
before(function() {
|
|
30
|
+
other = new Coolerator.View('other');
|
|
31
|
+
view = new Coolerator.View('child');
|
|
32
|
+
|
|
33
|
+
view.extend({
|
|
34
|
+
instance : {
|
|
35
|
+
methods : {
|
|
36
|
+
initialize : function initialize() {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("provides a mechanism for calling #super", function() {
|
|
43
|
+
var instance = view.build();
|
|
44
|
+
expect(instance.initialize.super).to(equal, other.instance.methods.initialize);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
describe("when two or more Views implement the same method", function() {
|
|
49
|
+
var instance1, instance2;
|
|
50
|
+
|
|
51
|
+
before(function() {
|
|
52
|
+
view1 = new Coolerator.View('one');
|
|
53
|
+
|
|
54
|
+
view1.extend({
|
|
55
|
+
instance : {
|
|
56
|
+
methods : {
|
|
57
|
+
foo : function foo() {
|
|
58
|
+
return "foo an instance of view1";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
view2 = new Coolerator.View('two');
|
|
65
|
+
|
|
66
|
+
view2.extend({
|
|
67
|
+
instance : {
|
|
68
|
+
methods : {
|
|
69
|
+
foo : function foo() {
|
|
70
|
+
return "foo an instance of view2";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
instance1 = view1.build();
|
|
77
|
+
instance2 = view2.build();
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it("allows them to coexist", function() {
|
|
81
|
+
expect(instance1.foo()).to(equal, "foo an instance of view1");
|
|
82
|
+
expect(instance2.foo()).to(equal, "foo an instance of view2");
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}});
|