sproutcore 0.9.11 → 0.9.12
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/History.txt +98 -73
- data/Manifest.txt +2 -1
- data/README.txt +1 -1
- data/Rakefile +8 -8
- data/app_generators/sproutcore/USAGE +2 -3
- data/app_generators/sproutcore/sproutcore_generator.rb +12 -12
- data/app_generators/sproutcore/templates/README +26 -23
- data/app_generators/sproutcore/templates/{sc-config.rb → sc-config} +32 -17
- data/bin/sc-build +17 -17
- data/bin/sc-server +1 -1
- data/bin/sproutcore +3 -3
- data/clients/sc_test_runner/english.lproj/no_tests.rhtml +0 -1
- data/config/hoe.rb +9 -9
- data/config/requirements.rb +1 -1
- data/frameworks/sproutcore/HISTORY +14 -0
- data/frameworks/sproutcore/core.js +1 -1
- data/frameworks/sproutcore/english.lproj/theme.css +1 -0
- data/frameworks/sproutcore/foundation/binding.js +2 -2
- data/frameworks/sproutcore/foundation/timer.js +55 -22
- data/frameworks/sproutcore/lib/index.rhtml +2 -3
- data/frameworks/sproutcore/models/record.js +204 -63
- data/frameworks/sproutcore/tests/models/model.rhtml +360 -0
- data/frameworks/sproutcore/views/button/button.js +22 -1
- data/frameworks/sproutcore/views/collection/collection.js +6 -2
- data/frameworks/sproutcore/views/collection/list.js +1 -0
- data/frameworks/sproutcore/views/collection/source_list.js +1 -0
- data/frameworks/sproutcore/views/field/text_field.js +11 -2
- data/frameworks/sproutcore/views/inline_text_field.js +3 -2
- data/frameworks/sproutcore/views/menu_item.js +1 -0
- data/frameworks/sproutcore/views/pagination.js +1 -0
- data/frameworks/sproutcore/views/view.js +4 -1
- data/lib/sproutcore/build_tools/html_builder.rb +36 -36
- data/lib/sproutcore/build_tools/resource_builder.rb +55 -54
- data/lib/sproutcore/build_tools.rb +12 -12
- data/lib/sproutcore/bundle.rb +162 -164
- data/lib/sproutcore/bundle_manifest.rb +154 -107
- data/lib/sproutcore/generator_helper.rb +23 -23
- data/lib/sproutcore/helpers/capture_helper.rb +10 -10
- data/lib/sproutcore/helpers/static_helper.rb +39 -26
- data/lib/sproutcore/helpers/tag_helper.rb +10 -10
- data/lib/sproutcore/helpers/text_helper.rb +36 -36
- data/lib/sproutcore/helpers.rb +1 -1
- data/lib/sproutcore/jsdoc.rb +10 -10
- data/lib/sproutcore/jsmin.rb +14 -14
- data/lib/sproutcore/library.rb +135 -87
- data/lib/sproutcore/merb/bundle_controller.rb +77 -54
- data/lib/sproutcore/merb/router.rb +19 -12
- data/lib/sproutcore/merb.rb +1 -1
- data/lib/sproutcore/version.rb +1 -1
- data/lib/sproutcore/view_helpers.rb +121 -121
- data/lib/sproutcore.rb +5 -7
- data/sc-config.rb +6 -0
- data/sc_generators/client/README +1 -1
- data/sc_generators/client/USAGE +1 -2
- data/sc_generators/client/client_generator.rb +6 -6
- data/sc_generators/client/templates/core.js +2 -2
- data/sc_generators/client/templates/english.lproj/body.css +79 -81
- data/sc_generators/client/templates/english.lproj/strings.js +1 -2
- data/sc_generators/client/templates/main.js +6 -8
- data/sc_generators/controller/USAGE +1 -2
- data/sc_generators/controller/controller_generator.rb +7 -7
- data/sc_generators/controller/templates/controller.js +3 -3
- data/sc_generators/controller/templates/test.rhtml +1 -1
- data/sc_generators/framework/README +1 -2
- data/sc_generators/framework/USAGE +2 -3
- data/sc_generators/framework/framework_generator.rb +5 -5
- data/sc_generators/framework/templates/core.js +3 -3
- data/sc_generators/framework/templates/english.lproj/strings.js +1 -2
- data/sc_generators/language/USAGE +1 -2
- data/sc_generators/language/language_generator.rb +6 -6
- data/sc_generators/language/templates/strings.js +1 -2
- data/sc_generators/model/USAGE +1 -2
- data/sc_generators/model/model_generator.rb +7 -7
- data/sc_generators/model/templates/fixture.js +26 -26
- data/sc_generators/model/templates/model.js +5 -5
- data/sc_generators/model/templates/test.rhtml +2 -2
- data/sc_generators/test/USAGE +1 -2
- data/sc_generators/test/templates/test.rhtml +2 -2
- data/sc_generators/test/test_generator.rb +6 -6
- data/sc_generators/view/USAGE +1 -2
- data/sc_generators/view/templates/test.rhtml +2 -2
- data/sc_generators/view/templates/view.js +3 -3
- data/sc_generators/view/view_generator.rb +7 -7
- data/spec/spec.opts +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/sproutcore_spec.rb +3 -3
- data/tasks/deployment.rake +4 -4
- metadata +4 -3
|
@@ -9,35 +9,35 @@ require('core') ;
|
|
|
9
9
|
// TODO: Add your data fixtures here.
|
|
10
10
|
// All fixture records must have a unique guid and a type matching the
|
|
11
11
|
// name of your contact. See the example below.
|
|
12
|
-
|
|
13
|
-
// { guid: 1,
|
|
14
|
-
// type: 'Contact',
|
|
15
|
-
// firstName: "Michael",
|
|
16
|
-
// lastName: "Scott"
|
|
12
|
+
|
|
13
|
+
// { guid: 1,
|
|
14
|
+
// type: 'Contact',
|
|
15
|
+
// firstName: "Michael",
|
|
16
|
+
// lastName: "Scott"
|
|
17
17
|
// },
|
|
18
|
-
//
|
|
19
|
-
// { guid: 2,
|
|
20
|
-
// type: 'Contact',
|
|
21
|
-
// firstName: "Dwight",
|
|
22
|
-
// lastName: "Schrute"
|
|
18
|
+
//
|
|
19
|
+
// { guid: 2,
|
|
20
|
+
// type: 'Contact',
|
|
21
|
+
// firstName: "Dwight",
|
|
22
|
+
// lastName: "Schrute"
|
|
23
23
|
// },
|
|
24
|
-
//
|
|
25
|
-
// { guid: 3,
|
|
26
|
-
// type: 'Contact',
|
|
27
|
-
// firstName: "Jim",
|
|
28
|
-
// lastName: "Halpert"
|
|
24
|
+
//
|
|
25
|
+
// { guid: 3,
|
|
26
|
+
// type: 'Contact',
|
|
27
|
+
// firstName: "Jim",
|
|
28
|
+
// lastName: "Halpert"
|
|
29
29
|
// },
|
|
30
|
-
//
|
|
31
|
-
// { guid: 4,
|
|
32
|
-
// type: 'Contact',
|
|
33
|
-
// firstName: "Pam",
|
|
34
|
-
// lastName: "Beesly"
|
|
30
|
+
//
|
|
31
|
+
// { guid: 4,
|
|
32
|
+
// type: 'Contact',
|
|
33
|
+
// firstName: "Pam",
|
|
34
|
+
// lastName: "Beesly"
|
|
35
35
|
// },
|
|
36
|
-
//
|
|
37
|
-
// { guid: 5,
|
|
38
|
-
// type: 'Contact',
|
|
39
|
-
// firstName: "Ryan",
|
|
40
|
-
// lastName: "Howard"
|
|
41
|
-
// }
|
|
36
|
+
//
|
|
37
|
+
// { guid: 5,
|
|
38
|
+
// type: 'Contact',
|
|
39
|
+
// firstName: "Ryan",
|
|
40
|
+
// lastName: "Howard"
|
|
41
|
+
// }
|
|
42
42
|
|
|
43
43
|
]);
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
require('core');
|
|
6
6
|
|
|
7
7
|
/** @class
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
(Document your class here)
|
|
10
10
|
|
|
11
11
|
@extends <%= base_class_name 'SC.Record' %>
|
|
12
|
-
@author
|
|
12
|
+
@author AuthorName
|
|
13
13
|
@version 0.1
|
|
14
|
-
*/
|
|
14
|
+
*/
|
|
15
15
|
<%= client_class_name %> = <%= base_class_name 'SC.Record' %>.extend(
|
|
16
16
|
/** @scope <%= client_class_name %>.prototype */ {
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
// TODO: Add your own code here.
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
}) ;
|
data/sc_generators/test/USAGE
CHANGED
|
@@ -3,7 +3,7 @@ test - Create a new unit test in your SproutCore client.
|
|
|
3
3
|
USAGE:
|
|
4
4
|
|
|
5
5
|
./script/generate test client_name/test_name [CLASS]
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
DISCUSSION:
|
|
8
8
|
|
|
9
9
|
This generator will create a new SproutCore unit test in your client. You should pass as the first parameter your client directory name/the test you want to create. For example:
|
|
@@ -13,4 +13,3 @@ This generator will create a new SproutCore unit test in your client. You shoul
|
|
|
13
13
|
defines a new test called called "Task" in the file clients/todos/tests/task.rhtml.
|
|
14
14
|
|
|
15
15
|
The default test simply returns true. Add your own tests to do something useful.
|
|
16
|
-
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
require 'sproutcore/generator_helper'
|
|
2
2
|
|
|
3
3
|
class TestGenerator < RubiGen::Base
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
include SproutCore::GeneratorHelper
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
default_options :author => nil
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
attr_reader :name, :client_location
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
def initialize(runtime_args, runtime_options = {})
|
|
12
12
|
super
|
|
13
13
|
usage if args.empty?
|
|
@@ -36,7 +36,7 @@ EOS
|
|
|
36
36
|
def add_options!(opts)
|
|
37
37
|
opts.on("-l", '--loc="Location"', String, "Location of build. If not passed, search clients and frameworks dirs", "Default: none") { |options[:loc]| }
|
|
38
38
|
end
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
def extract_options
|
|
41
41
|
@client_location = options[:loc]
|
|
42
42
|
# for each option, extract it into a local variable (and create an "attr_reader :author" at the top)
|
|
@@ -44,4 +44,4 @@ EOS
|
|
|
44
44
|
# raw instance variable value.
|
|
45
45
|
# @author = options[:author]
|
|
46
46
|
end
|
|
47
|
-
end
|
|
47
|
+
end
|
data/sc_generators/view/USAGE
CHANGED
|
@@ -3,7 +3,7 @@ sc_view - Create a new view class in your SproutCore client.
|
|
|
3
3
|
USAGE:
|
|
4
4
|
|
|
5
5
|
./script/generate view client_name/view_name [CLASS]
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
DISCUSSION:
|
|
8
8
|
|
|
9
9
|
This generator will create a new SproutCore view class in your client. You should pass as the first parameter your client directory name/the view you want to create. For example:
|
|
@@ -13,4 +13,3 @@ This generator will create a new SproutCore view class in your client. You shou
|
|
|
13
13
|
defines a new class called Todos.TaskView in the file clients/todos/views/task.js.
|
|
14
14
|
|
|
15
15
|
This generator creates view that inherit from SC.View but you can override this by passing the name of the view class you want as the second argument.
|
|
16
|
-
|
|
@@ -9,12 +9,12 @@ require('core');
|
|
|
9
9
|
(Document Your View Here)
|
|
10
10
|
|
|
11
11
|
@extends <%= base_class_name 'SC.View' %>
|
|
12
|
-
@author
|
|
12
|
+
@author AuthorName
|
|
13
13
|
@version 0.1
|
|
14
14
|
*/
|
|
15
15
|
<%= view_class_name %> = <%= base_class_name 'SC.View' %>.extend(
|
|
16
16
|
/** @scope <%= view_class_name %>.prototype */ {
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
// TODO: Add your own code here.
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
}) ;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
require 'sproutcore/generator_helper'
|
|
2
2
|
|
|
3
3
|
class ViewGenerator < RubiGen::Base
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
include SproutCore::GeneratorHelper
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
default_options :author => nil
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
attr_reader :name, :client_location
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
def initialize(runtime_args, runtime_options = {})
|
|
12
12
|
super
|
|
13
13
|
usage if args.empty?
|
|
@@ -21,7 +21,7 @@ class ViewGenerator < RubiGen::Base
|
|
|
21
21
|
fp = client_file_path('views','js','view')
|
|
22
22
|
build_client_directories(m, fp)
|
|
23
23
|
m.template 'view.js', fp
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
fp = client_file_path('tests/views', 'rhtml')
|
|
26
26
|
build_client_directories(m, fp)
|
|
27
27
|
m.template 'test.rhtml', fp
|
|
@@ -40,7 +40,7 @@ EOS
|
|
|
40
40
|
def add_options!(opts)
|
|
41
41
|
opts.on("-l", '--loc="Location"', String, "Location of build. If not passed, search clients and frameworks dirs", "Default: none") { |options[:loc]| }
|
|
42
42
|
end
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
def extract_options
|
|
45
45
|
@client_location = options[:loc]
|
|
46
46
|
# for each option, extract it into a local variable (and create an "attr_reader :author" at the top)
|
|
@@ -48,4 +48,4 @@ EOS
|
|
|
48
48
|
# raw instance variable value.
|
|
49
49
|
# @author = options[:author]
|
|
50
50
|
end
|
|
51
|
-
end
|
|
51
|
+
end
|
data/spec/spec.opts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
--colour
|
|
1
|
+
--colour
|
data/spec/spec_helper.rb
CHANGED
data/spec/sproutcore_spec.rb
CHANGED
|
@@ -3,9 +3,9 @@ require File.dirname(__FILE__) + '/spec_helper.rb'
|
|
|
3
3
|
# Time to add your specs!
|
|
4
4
|
# http://rspec.rubyforge.org/
|
|
5
5
|
describe "Place your specs here" do
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
it "find this spec in spec directory" do
|
|
8
8
|
violated "Be sure to write your specs"
|
|
9
9
|
end
|
|
10
|
-
|
|
11
|
-
end
|
|
10
|
+
|
|
11
|
+
end
|
data/tasks/deployment.rake
CHANGED
|
@@ -34,14 +34,14 @@ namespace :manifest do
|
|
|
34
34
|
Dir.chdir(APP_ROOT)
|
|
35
35
|
files = Dir.glob(File.join('**','*'))
|
|
36
36
|
puts "IGNORE_DIRS = #{IGNORE_DIRS.join(',')}"
|
|
37
|
-
files.reject! do |x|
|
|
37
|
+
files.reject! do |x|
|
|
38
38
|
path_parts = x.split('/')
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
(path_parts.last[0..0] == '.') || File.directory?(x) || IGNORE_DIRS.include?(path_parts.first)
|
|
41
41
|
end
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
f = File.open(File.join(APP_ROOT, 'Manifest.txt'), 'w')
|
|
44
44
|
f.write(files.join("\n"))
|
|
45
45
|
f.close
|
|
46
46
|
end
|
|
47
|
-
end
|
|
47
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sproutcore
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Charles Jolley
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-
|
|
12
|
+
date: 2008-07-01 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -76,7 +76,7 @@ extra_rdoc_files:
|
|
|
76
76
|
files:
|
|
77
77
|
- app_generators/sproutcore/sproutcore_generator.rb
|
|
78
78
|
- app_generators/sproutcore/templates/README
|
|
79
|
-
- app_generators/sproutcore/templates/sc-config
|
|
79
|
+
- app_generators/sproutcore/templates/sc-config
|
|
80
80
|
- app_generators/sproutcore/USAGE
|
|
81
81
|
- bin/sc-build
|
|
82
82
|
- bin/sc-gen
|
|
@@ -232,6 +232,7 @@ files:
|
|
|
232
232
|
- frameworks/sproutcore/tests/foundation/timer/isPaused.rhtml
|
|
233
233
|
- frameworks/sproutcore/tests/foundation/timer/schedule.rhtml
|
|
234
234
|
- frameworks/sproutcore/tests/globals/window.rhtml
|
|
235
|
+
- frameworks/sproutcore/tests/models/model.rhtml
|
|
235
236
|
- frameworks/sproutcore/tests/panes/pane.rhtml
|
|
236
237
|
- frameworks/sproutcore/tests/views/checkbox.rhtml
|
|
237
238
|
- frameworks/sproutcore/tests/views/collection/base.rhtml
|