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.
Files changed (88) hide show
  1. data/History.txt +98 -73
  2. data/Manifest.txt +2 -1
  3. data/README.txt +1 -1
  4. data/Rakefile +8 -8
  5. data/app_generators/sproutcore/USAGE +2 -3
  6. data/app_generators/sproutcore/sproutcore_generator.rb +12 -12
  7. data/app_generators/sproutcore/templates/README +26 -23
  8. data/app_generators/sproutcore/templates/{sc-config.rb → sc-config} +32 -17
  9. data/bin/sc-build +17 -17
  10. data/bin/sc-server +1 -1
  11. data/bin/sproutcore +3 -3
  12. data/clients/sc_test_runner/english.lproj/no_tests.rhtml +0 -1
  13. data/config/hoe.rb +9 -9
  14. data/config/requirements.rb +1 -1
  15. data/frameworks/sproutcore/HISTORY +14 -0
  16. data/frameworks/sproutcore/core.js +1 -1
  17. data/frameworks/sproutcore/english.lproj/theme.css +1 -0
  18. data/frameworks/sproutcore/foundation/binding.js +2 -2
  19. data/frameworks/sproutcore/foundation/timer.js +55 -22
  20. data/frameworks/sproutcore/lib/index.rhtml +2 -3
  21. data/frameworks/sproutcore/models/record.js +204 -63
  22. data/frameworks/sproutcore/tests/models/model.rhtml +360 -0
  23. data/frameworks/sproutcore/views/button/button.js +22 -1
  24. data/frameworks/sproutcore/views/collection/collection.js +6 -2
  25. data/frameworks/sproutcore/views/collection/list.js +1 -0
  26. data/frameworks/sproutcore/views/collection/source_list.js +1 -0
  27. data/frameworks/sproutcore/views/field/text_field.js +11 -2
  28. data/frameworks/sproutcore/views/inline_text_field.js +3 -2
  29. data/frameworks/sproutcore/views/menu_item.js +1 -0
  30. data/frameworks/sproutcore/views/pagination.js +1 -0
  31. data/frameworks/sproutcore/views/view.js +4 -1
  32. data/lib/sproutcore/build_tools/html_builder.rb +36 -36
  33. data/lib/sproutcore/build_tools/resource_builder.rb +55 -54
  34. data/lib/sproutcore/build_tools.rb +12 -12
  35. data/lib/sproutcore/bundle.rb +162 -164
  36. data/lib/sproutcore/bundle_manifest.rb +154 -107
  37. data/lib/sproutcore/generator_helper.rb +23 -23
  38. data/lib/sproutcore/helpers/capture_helper.rb +10 -10
  39. data/lib/sproutcore/helpers/static_helper.rb +39 -26
  40. data/lib/sproutcore/helpers/tag_helper.rb +10 -10
  41. data/lib/sproutcore/helpers/text_helper.rb +36 -36
  42. data/lib/sproutcore/helpers.rb +1 -1
  43. data/lib/sproutcore/jsdoc.rb +10 -10
  44. data/lib/sproutcore/jsmin.rb +14 -14
  45. data/lib/sproutcore/library.rb +135 -87
  46. data/lib/sproutcore/merb/bundle_controller.rb +77 -54
  47. data/lib/sproutcore/merb/router.rb +19 -12
  48. data/lib/sproutcore/merb.rb +1 -1
  49. data/lib/sproutcore/version.rb +1 -1
  50. data/lib/sproutcore/view_helpers.rb +121 -121
  51. data/lib/sproutcore.rb +5 -7
  52. data/sc-config.rb +6 -0
  53. data/sc_generators/client/README +1 -1
  54. data/sc_generators/client/USAGE +1 -2
  55. data/sc_generators/client/client_generator.rb +6 -6
  56. data/sc_generators/client/templates/core.js +2 -2
  57. data/sc_generators/client/templates/english.lproj/body.css +79 -81
  58. data/sc_generators/client/templates/english.lproj/strings.js +1 -2
  59. data/sc_generators/client/templates/main.js +6 -8
  60. data/sc_generators/controller/USAGE +1 -2
  61. data/sc_generators/controller/controller_generator.rb +7 -7
  62. data/sc_generators/controller/templates/controller.js +3 -3
  63. data/sc_generators/controller/templates/test.rhtml +1 -1
  64. data/sc_generators/framework/README +1 -2
  65. data/sc_generators/framework/USAGE +2 -3
  66. data/sc_generators/framework/framework_generator.rb +5 -5
  67. data/sc_generators/framework/templates/core.js +3 -3
  68. data/sc_generators/framework/templates/english.lproj/strings.js +1 -2
  69. data/sc_generators/language/USAGE +1 -2
  70. data/sc_generators/language/language_generator.rb +6 -6
  71. data/sc_generators/language/templates/strings.js +1 -2
  72. data/sc_generators/model/USAGE +1 -2
  73. data/sc_generators/model/model_generator.rb +7 -7
  74. data/sc_generators/model/templates/fixture.js +26 -26
  75. data/sc_generators/model/templates/model.js +5 -5
  76. data/sc_generators/model/templates/test.rhtml +2 -2
  77. data/sc_generators/test/USAGE +1 -2
  78. data/sc_generators/test/templates/test.rhtml +2 -2
  79. data/sc_generators/test/test_generator.rb +6 -6
  80. data/sc_generators/view/USAGE +1 -2
  81. data/sc_generators/view/templates/test.rhtml +2 -2
  82. data/sc_generators/view/templates/view.js +3 -3
  83. data/sc_generators/view/view_generator.rb +7 -7
  84. data/spec/spec.opts +1 -1
  85. data/spec/spec_helper.rb +1 -1
  86. data/spec/sproutcore_spec.rb +3 -3
  87. data/tasks/deployment.rake +4 -4
  88. 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 AuthorName
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
  }) ;
@@ -14,8 +14,8 @@ Test.context("<%= client_class_name %>",{
14
14
 
15
15
  }) ;
16
16
 
17
- if (window.main && (appMain = main)) main = null ;
17
+ if (window.main && (appMain = main)) main = null ;
18
18
 
19
19
  </script>
20
20
 
21
- <%% end %>
21
+ <%% end %>
@@ -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
-
@@ -14,8 +14,8 @@ Test.context("<%= file_name.gsub('_', ' ').titleize %>",{
14
14
 
15
15
  }) ;
16
16
 
17
- if (window.main && (appMain = main)) main = null ;
17
+ if (window.main && (appMain = main)) main = null ;
18
18
 
19
19
  </script>
20
20
 
21
- <%% end %>
21
+ <%% end %>
@@ -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
@@ -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
-
@@ -14,8 +14,8 @@ Test.context("<%= view_class_name %>",{
14
14
 
15
15
  }) ;
16
16
 
17
- if (window.main && (appMain = main)) main = null ;
17
+ if (window.main && (appMain = main)) main = null ;
18
18
 
19
19
  </script>
20
20
 
21
- <%% end %>
21
+ <%% end %>
@@ -9,12 +9,12 @@ require('core');
9
9
  (Document Your View Here)
10
10
 
11
11
  @extends <%= base_class_name 'SC.View' %>
12
- @author AuthorName
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
@@ -4,4 +4,4 @@ rescue LoadError
4
4
  require 'rubygems'
5
5
  gem 'rspec'
6
6
  require 'spec'
7
- end
7
+ end
@@ -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
@@ -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.11
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-06-24 00:00:00 -07:00
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.rb
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