sproutcore 1.9.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/frameworks/sproutcore/CHANGELOG.md +212 -11
  3. data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +17 -17
  4. data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +103 -86
  5. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +1 -1
  6. data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +33 -21
  7. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +3 -1
  8. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +7 -2
  9. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +5 -2
  10. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +7 -0
  11. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +1 -1
  12. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +36 -30
  13. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/many_array/core_methods.js +84 -42
  14. data/lib/frameworks/sproutcore/frameworks/desktop/{resources/debug → debug/resources}/a_sample_image.jpg +0 -0
  15. data/lib/frameworks/sproutcore/frameworks/desktop/{resources/debug → debug/resources}/iframe.html +1 -1
  16. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +68 -68
  17. data/lib/frameworks/sproutcore/frameworks/desktop/resources/list_item.css +1 -0
  18. data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu_item_view.css +1 -0
  19. data/lib/frameworks/sproutcore/frameworks/desktop/resources/slider.css +6 -5
  20. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +1 -1
  21. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +1 -1
  22. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +2 -0
  23. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +45 -36
  24. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/{gestureable.js → gesturable.js} +0 -0
  25. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +2 -4
  26. data/lib/frameworks/sproutcore/frameworks/foundation/resources/benchmark.css +1 -0
  27. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +13 -0
  28. data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +4 -33
  29. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +31 -17
  30. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +59 -1
  31. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
  32. data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +4 -0
  33. data/lib/gen/app/templates/apps/@target_name@/Buildfile +3 -1
  34. data/lib/gen/app/templates/apps/@target_name@/core.js +3 -3
  35. data/lib/gen/app/templates/apps/@target_name@/main.js +7 -5
  36. data/lib/gen/app/templates/apps/@target_name@/resources/main_page.css +20 -0
  37. data/lib/gen/app/templates/apps/@target_name@/resources/main_page.js +7 -7
  38. data/lib/gen/controller/templates/controllers/@filename@_controller.js +2 -2
  39. data/lib/gen/data-source/templates/data_sources/@filename@_data_source.js +21 -21
  40. data/lib/gen/design/templates/resources/@filename@.css +12 -0
  41. data/lib/gen/framework/templates/frameworks/@target_name@/core.js +3 -3
  42. data/lib/gen/framework/templates/frameworks/@target_name@/english.lproj/strings.js +1 -1
  43. data/lib/gen/language/templates/@filename@/strings.js +1 -1
  44. data/lib/gen/model/templates/models/@filename@_model.js +1 -1
  45. data/lib/gen/page/templates/pages/@target_name@/core.js +3 -3
  46. data/lib/gen/project/templates/@filename@/Buildfile +29 -5
  47. data/lib/gen/{responder → state}/Buildfile +3 -2
  48. data/lib/gen/state/README +1 -0
  49. data/lib/gen/state/USAGE +15 -0
  50. data/lib/gen/state/templates/states/@filename@_state.js +24 -0
  51. data/lib/gen/state/templates/tests/states/@filename@_test.js +12 -0
  52. data/lib/gen/statechart_app/templates/apps/@target_name@/Buildfile +3 -1
  53. data/lib/gen/statechart_app/templates/apps/@target_name@/core.js +3 -3
  54. data/lib/gen/statechart_app/templates/apps/@target_name@/main.js +3 -10
  55. data/lib/gen/statechart_app/templates/apps/@target_name@/resources/main_page.css +20 -0
  56. data/lib/gen/statechart_app/templates/apps/@target_name@/resources/main_page.js +7 -7
  57. data/lib/gen/statechart_app/templates/apps/@target_name@/statechart.js +3 -3
  58. data/lib/sproutcore/models/generator.rb +1 -1
  59. data/spec/lib/models/generator/snake_case_spec.rb +26 -0
  60. data/sproutcore.gemspec +16 -16
  61. data/vendor/chance/lib/chance/instance/spriting.rb +32 -30
  62. metadata +30 -26
  63. data/lib/frameworks/sproutcore/frameworks/desktop/resources/debug/apple-logo1.jpeg +0 -0
  64. data/lib/gen/responder/README +0 -1
  65. data/lib/gen/responder/USAGE +0 -15
  66. data/lib/gen/responder/templates/states/@filename@_state.js +0 -36
@@ -0,0 +1,24 @@
1
+ <%= copyright_block(namespace) %>
2
+ /*globals <%= namespace %> */
3
+
4
+ /** @class
5
+
6
+ (Document Your State Here)
7
+
8
+ @extends <%= base_class_name || 'SC.State' %>
9
+ @version 0.1
10
+ */
11
+ <%= namespace_class_name %> = <%= base_class_name || 'SC.State' %>.extend(
12
+ /** @scope <%= namespace_class_name %>.prototype */ {
13
+
14
+ // TODO: Add your own code here.
15
+
16
+ enterState: function() {
17
+ <%= namespace %>.mainPage.get('mainPane').append();
18
+ },
19
+
20
+ exitState: function() {
21
+ <%= namespace %>.mainPage.get('mainPane').remove();
22
+ }
23
+
24
+ });
@@ -0,0 +1,12 @@
1
+ <%= copyright_block("#{namespace_class_name} Unit Test") %>
2
+ /*globals <%= namespace %> module test ok equals same stop start */
3
+
4
+ module("<%= namespace_class_name %>");
5
+
6
+ // TODO: Replace with real unit test for <%= class_name %>
7
+ test("test description", function() {
8
+ var expected = "test";
9
+ var result = "test";
10
+ equals(result, expected, "test should equal test");
11
+ });
12
+
@@ -3,7 +3,9 @@
3
3
  # This is your Buildfile for your app, <%= namespace %>. This tells SproutCore
4
4
  # how to build your app. These settings override those in your project
5
5
  # Buildfile, which contains default settings for all apps in your project.
6
+ #
7
+ # To learn more about configuring the Buildfile, please visit
8
+ # http://guides.sproutcore.com/build_tools.html.
6
9
 
7
10
  # It is better to add :required targets here than in the global Buildfile.
8
11
  config :<%= target_name %>, :required => :sproutcore
9
-
@@ -4,7 +4,7 @@
4
4
  /** @namespace
5
5
 
6
6
  My cool new app. Describe your application.
7
-
7
+
8
8
  @extends SC.Object
9
9
  */
10
10
  <%= namespace %> = SC.Application.create(
@@ -18,7 +18,7 @@
18
18
  // connect to a backend server. The default setup below connects the store
19
19
  // to any fixtures you define.
20
20
  store: SC.Store.create().from(SC.Record.fixtures)
21
-
21
+
22
22
  // TODO: Add global constants or singleton objects needed by your app here.
23
23
 
24
- }) ;
24
+ });
@@ -9,18 +9,11 @@
9
9
  // See comments for some pointers on what to do next.
10
10
  //
11
11
  <%= namespace %>.main = function main() {
12
-
13
- // Step 1: Tell your app it will load via states
14
12
  var statechart = <%= namespace %>.statechart;
15
- SC.RootResponder.responder.set('defaultResponder', statechart);
16
- statechart.initStatechart();
17
13
 
18
- // Step 2. Set the content property on your primary controller.
19
- // This will make your app come alive!
20
-
21
- // TODO: Set the content property on your primary controller
22
- // ex: MyApp.contactsController.set('content', MyApp.contacts);
14
+ SC.RootResponder.responder.set('defaultResponder', statechart);
15
+ statechart.initStatechart();
16
+ };
23
17
 
24
- } ;
25
18
 
26
19
  function main() { <%= namespace %>.main(); }
@@ -0,0 +1,20 @@
1
+ // Add your custom CSS styles here.
2
+ //
3
+ // You may want to create additional stylesheet files for every page or pane
4
+ // within your application rather than placing all your CSS in here. In any
5
+ // case, all stylesheet files will be combined into a single stylesheet on
6
+ // build to let it load super fast.
7
+ //
8
+ // Remember, Compass (http://compass-style.org) is built in and you can use
9
+ // SCSS syntax (http://sass-lang.com/) even though stylesheet files should end
10
+ // with the .css extension.
11
+ //
12
+ // Learn more on styling your app here: http://sproutcore.com/guides/chance.html
13
+
14
+ // Example. This style is applied to the labelView child view.
15
+ $theme.sc-label-view.welcome-label {
16
+ font-size: 16px;
17
+ line-height: 24px;
18
+ text-align: center;
19
+ text-shadow: rgba(255, 255, 255, 0.5) 0 1px 1px;
20
+ }
@@ -1,19 +1,19 @@
1
1
  <%= copyright_block("#{namespace} - mainPage") %>
2
2
  /*globals <%= namespace %> */
3
3
 
4
- // This page describes the main user interface for your application.
4
+ // This page describes the main user interface for your application.
5
5
  <%= namespace %>.mainPage = SC.Page.design({
6
6
 
7
7
  // The main pane is made visible on screen as soon as your app is loaded.
8
- // Add childViews to this pane for views to display immediately on page
8
+ // Add childViews to this pane for views to display immediately on page
9
9
  // load.
10
10
  mainPane: SC.MainPane.design({
11
- childViews: 'labelView'.w(),
12
-
11
+ childViews: ['labelView'],
12
+
13
13
  labelView: SC.LabelView.design({
14
- layout: { centerX: 0, centerY: 0, width: 200, height: 18 },
15
- textAlign: SC.ALIGN_CENTER,
16
- tagName: "h1",
14
+ classNames: ['welcome-label'],
15
+ layout: { centerX: 0, centerY: 0, width: 300, height: 24 },
16
+ tagName: "h1",
17
17
  value: "Welcome to SproutCore!"
18
18
  })
19
19
  })
@@ -1,8 +1,8 @@
1
1
  <%= namespace %>.statechart = SC.Statechart.create({
2
2
 
3
3
  initialState: 'readyState',
4
-
5
- readyState: SC.State.plugin('<%= namespace %>.ReadyState'),
4
+
5
+ readyState: SC.State.plugin('<%= namespace %>.ReadyState')
6
6
  // someOtherState: SC.State.plugin('<%= namespace %>.SomeOtherState')
7
7
 
8
- });
8
+ });
@@ -439,7 +439,7 @@ module SC
439
439
  def snake_case(str='')
440
440
  str = str.gsub(/-/, '_')
441
441
  str = str.gsub(/([^A-Z_])([A-Z][^A-Z]?)/,'\1_\2') # most cases
442
- str = str.gsub(/([^_])([A-Z][^A-Z])/,'\1_\2') # HeadlineCNNNews
442
+ str = str.gsub(/([^_])([A-Z][^A-Z_])/,'\1_\2') # HeadlineCNNNews
443
443
  str.downcase
444
444
  end
445
445
 
@@ -0,0 +1,26 @@
1
+ require "spec_helper"
2
+
3
+ describe SC::Generator, 'snake_case' do
4
+
5
+ test_hashes = [
6
+ { :input => "FooBar", :output => "foo_bar" },
7
+ { :input => "HeadlineCNNNews", :output => "headline_cnn_news" },
8
+ { :input => "CNN", :output => "cnn" },
9
+ { :input => "innerHTML", :output => "inner_html" },
10
+ { :input => "Foo_Bar", :output => "foo_bar" },
11
+ { :input => "Foo-Bar", :output => "foo_bar" },
12
+ { :input => "LOGGED_IN", :output => "logged_in" },
13
+ ]
14
+
15
+ test_hashes.each do |test_hash|
16
+ input = test_hash[:input]
17
+ output = test_hash[:output]
18
+
19
+ it "should snake_case #{input} to #{output}" do
20
+ a = SC::Generator.new("test")
21
+
22
+ a.snake_case(input).should eql(output)
23
+ end
24
+ end
25
+
26
+ end
data/sproutcore.gemspec CHANGED
@@ -15,36 +15,36 @@ Gem::Specification.new do |s|
15
15
  s.platform = 'java' if is_jruby
16
16
 
17
17
  s.add_dependency 'rack', '~> 1.2'
18
- s.add_dependency 'json_pure', "~> 1.4.6"
19
- s.add_dependency 'extlib', "~> 0.9.15"
18
+ s.add_dependency 'json_pure', "~> 1.4"
19
+ s.add_dependency 'extlib', "~> 0.9"
20
20
  s.add_dependency 'erubis', "~> 2.6"
21
- s.add_dependency 'thor', '~> 0.14.3'
22
- s.add_dependency 'sass', '~> 3.1.3'
23
- s.add_dependency 'haml', '~> 3.1.2'
21
+ s.add_dependency 'thor', '~> 0.14'
22
+ s.add_dependency 'sass', '~> 3.1'
23
+ s.add_dependency 'haml', '~> 3.1'
24
24
 
25
- s.add_dependency 'compass', '~> 0.11.3'
26
- s.add_dependency 'chunky_png', '~> 1.2.0'
25
+ s.add_dependency 'compass', '~> 0.11'
26
+ s.add_dependency 'chunky_png', '~> 1.2'
27
27
 
28
- # We need to add two eventmachine dependencies so that thin (EM >= 0.12.6) and em-http (EM >= 1.0.0.beta.3) don't cause bundler to throw a dependency exception.
28
+ # We need to add two eventmachine dependencies so that `thin` (eventmachine >= 0.12.6) and `em-http-request` (eventmachine ~> 1.0.0.beta.4) don't cause bundler to throw a dependency exception.
29
29
  s.add_dependency 'eventmachine', '>= 0.12.6'
30
- s.add_dependency 'eventmachine', '>= 1.0.0.beta.3'
30
+ s.add_dependency 'eventmachine', '~> 1.0'
31
31
 
32
32
  s.add_dependency 'em-http-request', '~> 1.0'
33
33
 
34
34
  if is_jruby
35
- s.add_dependency 'mongrel', '~> 1.1.5'
35
+ s.add_dependency 'mongrel', '~> 1.1'
36
36
  else
37
- s.add_dependency 'thin', '~> 1.2.11'
37
+ s.add_dependency 'thin', '~> 1.2'
38
38
  end
39
39
 
40
- s.add_development_dependency 'gemcutter', "~> 0.6.0"
41
- s.add_development_dependency 'rspec', "~> 2.5.0"
40
+ s.add_development_dependency 'gemcutter', "~> 0.6"
41
+ s.add_development_dependency 'rspec', "~> 2.5"
42
42
  s.add_development_dependency 'rake'
43
43
 
44
44
  # Optional features, used in tests
45
- s.add_development_dependency 'less', "~> 1.2.21"
46
- s.add_development_dependency 'RedCloth', "~> 4.2.3"
47
- s.add_development_dependency 'BlueCloth', "~> 1.0.1"
45
+ s.add_development_dependency 'less', "~> 1.2"
46
+ s.add_development_dependency 'RedCloth', "~> 4.2"
47
+ s.add_development_dependency 'BlueCloth', "~> 1.0"
48
48
 
49
49
  s.require_paths << 'lib'
50
50
  s.require_paths << 'vendor/chance/lib'
@@ -15,10 +15,10 @@ module Chance
15
15
  # out within the sprites, and generating the final sprite images.
16
16
  module Spriting
17
17
  # Performs the spriting process on all of the @slices, creating sprite
18
- # images in the class's @sprites property and updating the individual slices
18
+ # images in the class's @sprites property and updating the individual slices
19
19
  # with a :sprite property containing the identifier of the sprite, and offset
20
20
  # properties for the offsets within the image.
21
- def generate_sprite_definitions(opts)
21
+ def generate_sprite_definitions(opts)
22
22
  @sprites = {}
23
23
 
24
24
  group_slices_into_sprites(opts)
@@ -71,7 +71,7 @@ module Chance
71
71
  # by this name may not exist yet.
72
72
  def sprite_name_for_slice(slice, opts)
73
73
  if slice[:repeat] == "repeat"
74
- return slice[:path] + (opts[:x2] ? "@2x" : "")
74
+ return slice[:path][0..(-1 - File.extname(slice[:path]).length)] + (opts[:x2] ? "@2x" : "") + File.extname(slice[:path])
75
75
  end
76
76
 
77
77
  return slice[:repeat] + (opts[:x2] ? "@2x" : "") + File.extname(slice[:path])
@@ -83,17 +83,17 @@ module Chance
83
83
  # The position is the position in the layout direction. In vertical mode
84
84
  # (the usual) it is the Y position.
85
85
  pos = 0
86
-
86
+
87
87
  # Adds some padding that will be painted with a pattern so that it is apparent that
88
88
  # CSS is wrong.
89
89
  # NOTE: though this is only in debug mode, we DO need to make sure it is on a 2px boundary.
90
90
  # This makes sure 2x works properly.
91
91
  padding = @options[:pad_sprites_for_debugging] ? 2 : 0
92
-
92
+
93
93
  # The position within a row. It starts at 0 even if we have padding,
94
94
  # because we always just add padding when we set the individual x/y pos.
95
95
  inset = 0
96
-
96
+
97
97
  # The length of the row. Length, when layout out vertically (the usual), is the height
98
98
  row_length = 0
99
99
 
@@ -107,19 +107,19 @@ module Chance
107
107
  smallest_size = nil
108
108
 
109
109
  is_horizontal = sprite[:use_horizontal_layout]
110
-
110
+
111
111
  # Figure out slice width/heights. We cannot rely on slicing to do this for us
112
112
  # because some images may be being passed through as-is.
113
113
  sprite[:slices].each {|slice|
114
114
  # We must find a canvas either on the slice (if it was actually sliced),
115
115
  # or on the slice's file. Otherwise, we're in big shit.
116
116
  canvas = slice[:canvas] || slice[:file][:canvas]
117
-
117
+
118
118
  # TODO: MAKE A BETTER ERROR.
119
119
  unless canvas
120
120
  throw "Could not sprite image " + slice[:path] + "; if it is not a PNG, make sure you have rmagick installed"
121
121
  end
122
-
122
+
123
123
  # RMagick has a different API than ChunkyPNG; we have to detect
124
124
  # which one we are using, and use the correct API accordingly.
125
125
  if canvas.respond_to?('columns')
@@ -129,10 +129,10 @@ module Chance
129
129
  slice_width = canvas.width
130
130
  slice_height = canvas.height
131
131
  end
132
-
132
+
133
133
  slice_length = is_horizontal ? slice_width : slice_height
134
134
  slice_size = is_horizontal ? slice_height : slice_width
135
-
135
+
136
136
  # When repeating, we must use the least common multiple so that
137
137
  # we can ensure the repeat pattern works even with multiple repeat
138
138
  # sizes. However, we should take into account how much extra we are
@@ -145,11 +145,11 @@ module Chance
145
145
  else
146
146
  size = [size, slice_size + padding * 2].max
147
147
  end
148
-
148
+
149
149
  slice[:slice_width] = slice_width.to_i
150
150
  slice[:slice_height] = slice_height.to_i
151
151
  }
152
-
152
+
153
153
  # Sort slices from widest/tallest (dependent on is_horizontal) or is_vertical
154
154
  # NOTE: This means we are technically sorting reversed
155
155
  sprite[:slices].sort! {|a, b|
@@ -165,19 +165,19 @@ module Chance
165
165
  # We must find a canvas either on the slice (if it was actually sliced),
166
166
  # or on the slice's file. Otherwise, we're in big shit.
167
167
  canvas = slice[:canvas] || slice[:file][:canvas]
168
-
168
+
169
169
  slice_width = slice[:slice_width]
170
170
  slice_height = slice[:slice_height]
171
-
171
+
172
172
  slice_length = is_horizontal ? slice_width : slice_height
173
173
  slice_size = is_horizontal ? slice_height : slice_width
174
-
174
+
175
175
  if slice[:repeat] != "no-repeat" or inset + slice_size + padding * 2 > size or not @options[:optimize_sprites]
176
176
  pos += row_length
177
177
  inset = 0
178
178
  row_length = 0
179
179
  end
180
-
180
+
181
181
 
182
182
  # We have extras for manual tweaking of offsetx/y. We have to make sure there
183
183
  # is padding for this (on either side)
@@ -197,28 +197,28 @@ module Chance
197
197
  elsif slice[:max_offset_y] > 0 and not is_horizontal
198
198
  pos += slice[:max_offset_y]
199
199
  end
200
-
200
+
201
201
  slice[:sprite_slice_x] = (is_horizontal ? pos : inset)
202
202
  slice[:sprite_slice_y] = (is_horizontal ? inset : pos)
203
-
203
+
204
204
  # add padding for x, only if it a) doesn't repeat or b) repeats vertically because it has horizontal layout
205
205
  if slice[:repeat] == "no-repeat" or slice[:repeat] == "repeat-y"
206
206
  slice[:sprite_slice_x] += padding
207
207
  end
208
-
208
+
209
209
  if slice[:repeat] == "no-repeat" or slice[:repeat] == "repeat-x"
210
210
  slice[:sprite_slice_y] += padding
211
211
  end
212
-
212
+
213
213
  slice[:sprite_slice_width] = slice_width
214
214
  slice[:sprite_slice_height] = slice_height
215
215
 
216
216
  inset += slice_size + padding * 2
217
-
217
+
218
218
  # We pad the row length ONLY if it is a repeat-x, repeat-y, or no-repeat image.
219
- # If it is 'repeat', we do not pad it, because it should be processed raw.
219
+ # If it is "repeat", we do not pad it, because it should be processed raw.
220
220
  row_length = [slice_length + (slice[:repeat] != "repeat" ? padding * 2 : 0), row_length].max
221
-
221
+
222
222
  # In 2X, make sure we are aligned on a 2px grid.
223
223
  # We correct this AFTER positioning because we always position on an even grid anyway;
224
224
  # we just may leave that even grid if we have an odd-sized image. We do this after positioning
@@ -227,7 +227,7 @@ module Chance
227
227
  row_length = (row_length.to_f / 2).ceil * 2
228
228
  inset = (inset.to_f / 2).ceil * 2
229
229
  end
230
-
230
+
231
231
  end
232
232
  pos += row_length
233
233
 
@@ -244,12 +244,12 @@ module Chance
244
244
  end
245
245
 
246
246
 
247
- # Generates the image for the specified sprite, putting it in the sprite's
247
+ # Generates the image for the specified sprite, putting it in the sprite's
248
248
  # :image property.
249
249
  def generate_sprite(sprite)
250
250
  canvas = canvas_for_sprite(sprite)
251
251
  sprite[:canvas] = canvas
252
-
252
+
253
253
  # If we are padding sprites, we should paint the background something really
254
254
  # obvious & obnoxious. Say, magenta. That's obnoxious. A nice light purple wouldn't
255
255
  # be bad, but magenta... that will stick out like a sore thumb (I hope)
@@ -336,7 +336,9 @@ module Chance
336
336
  if slice[:x2]
337
337
  width = sprite[:width] / slice[:proportion]
338
338
  height = sprite[:height] / slice[:proportion]
339
- output += "; -webkit-background-size: #{width}px #{height}px"
339
+ output += "; -webkit-background-size: #{width}px #{height}px\n"
340
+ output += "; -moz-background-size: #{width}px #{height}px\n"
341
+ output += "; background-size: #{width}px #{height}px\n"
340
342
  end
341
343
 
342
344
  output
@@ -380,12 +382,12 @@ module Chance
380
382
  generate_sprite(sprite) if not sprite[:has_generated]
381
383
 
382
384
  ret = sprite[:canvas].to_blob
383
-
385
+
384
386
  if Chance.clear_files_immediately
385
387
  sprite[:canvas] = nil
386
388
  sprite[:has_generated] = false
387
389
  end
388
-
390
+
389
391
  ret
390
392
  end
391
393
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sproutcore
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.9.1
5
+ version: 1.9.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Strobe, Inc., Apple Inc. and contributors
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-12-06 00:00:00 Z
13
+ date: 2013-04-11 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -31,7 +31,7 @@ dependencies:
31
31
  requirements:
32
32
  - - ~>
33
33
  - !ruby/object:Gem::Version
34
- version: 1.4.6
34
+ version: "1.4"
35
35
  type: :runtime
36
36
  version_requirements: *id002
37
37
  - !ruby/object:Gem::Dependency
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 0.9.15
45
+ version: "0.9"
46
46
  type: :runtime
47
47
  version_requirements: *id003
48
48
  - !ruby/object:Gem::Dependency
@@ -64,7 +64,7 @@ dependencies:
64
64
  requirements:
65
65
  - - ~>
66
66
  - !ruby/object:Gem::Version
67
- version: 0.14.3
67
+ version: "0.14"
68
68
  type: :runtime
69
69
  version_requirements: *id005
70
70
  - !ruby/object:Gem::Dependency
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- version: 3.1.3
78
+ version: "3.1"
79
79
  type: :runtime
80
80
  version_requirements: *id006
81
81
  - !ruby/object:Gem::Dependency
@@ -86,7 +86,7 @@ dependencies:
86
86
  requirements:
87
87
  - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: 3.1.2
89
+ version: "3.1"
90
90
  type: :runtime
91
91
  version_requirements: *id007
92
92
  - !ruby/object:Gem::Dependency
@@ -97,7 +97,7 @@ dependencies:
97
97
  requirements:
98
98
  - - ~>
99
99
  - !ruby/object:Gem::Version
100
- version: 0.11.3
100
+ version: "0.11"
101
101
  type: :runtime
102
102
  version_requirements: *id008
103
103
  - !ruby/object:Gem::Dependency
@@ -108,7 +108,7 @@ dependencies:
108
108
  requirements:
109
109
  - - ~>
110
110
  - !ruby/object:Gem::Version
111
- version: 1.2.0
111
+ version: "1.2"
112
112
  type: :runtime
113
113
  version_requirements: *id009
114
114
  - !ruby/object:Gem::Dependency
@@ -128,9 +128,9 @@ dependencies:
128
128
  requirement: &id011 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
- - - ">="
131
+ - - ~>
132
132
  - !ruby/object:Gem::Version
133
- version: 1.0.0.beta.3
133
+ version: "1.0"
134
134
  type: :runtime
135
135
  version_requirements: *id011
136
136
  - !ruby/object:Gem::Dependency
@@ -152,7 +152,7 @@ dependencies:
152
152
  requirements:
153
153
  - - ~>
154
154
  - !ruby/object:Gem::Version
155
- version: 1.2.11
155
+ version: "1.2"
156
156
  type: :runtime
157
157
  version_requirements: *id013
158
158
  - !ruby/object:Gem::Dependency
@@ -163,7 +163,7 @@ dependencies:
163
163
  requirements:
164
164
  - - ~>
165
165
  - !ruby/object:Gem::Version
166
- version: 0.6.0
166
+ version: "0.6"
167
167
  type: :development
168
168
  version_requirements: *id014
169
169
  - !ruby/object:Gem::Dependency
@@ -174,7 +174,7 @@ dependencies:
174
174
  requirements:
175
175
  - - ~>
176
176
  - !ruby/object:Gem::Version
177
- version: 2.5.0
177
+ version: "2.5"
178
178
  type: :development
179
179
  version_requirements: *id015
180
180
  - !ruby/object:Gem::Dependency
@@ -196,7 +196,7 @@ dependencies:
196
196
  requirements:
197
197
  - - ~>
198
198
  - !ruby/object:Gem::Version
199
- version: 1.2.21
199
+ version: "1.2"
200
200
  type: :development
201
201
  version_requirements: *id017
202
202
  - !ruby/object:Gem::Dependency
@@ -207,7 +207,7 @@ dependencies:
207
207
  requirements:
208
208
  - - ~>
209
209
  - !ruby/object:Gem::Version
210
- version: 4.2.3
210
+ version: "4.2"
211
211
  type: :development
212
212
  version_requirements: *id018
213
213
  - !ruby/object:Gem::Dependency
@@ -218,7 +218,7 @@ dependencies:
218
218
  requirements:
219
219
  - - ~>
220
220
  - !ruby/object:Gem::Version
221
- version: 1.0.1
221
+ version: "1.0"
222
222
  type: :development
223
223
  version_requirements: *id019
224
224
  description: SproutCore is a platform for building native look-and-feel applications on the web. This Ruby library includes a copy of the SproutCore JavaScript framework as well as a Ruby-based build system called Abbot.
@@ -272,6 +272,7 @@ files:
272
272
  - lib/gen/app/templates/apps/@target_name@/main.js
273
273
  - lib/gen/app/templates/apps/@target_name@/resources/_theme.css
274
274
  - lib/gen/app/templates/apps/@target_name@/resources/loading.rhtml
275
+ - lib/gen/app/templates/apps/@target_name@/resources/main_page.css
275
276
  - lib/gen/app/templates/apps/@target_name@/resources/main_page.js
276
277
  - lib/gen/app/templates/apps/@target_name@/theme.js
277
278
  - lib/gen/controller/Buildfile
@@ -286,6 +287,7 @@ files:
286
287
  - lib/gen/design/Buildfile
287
288
  - lib/gen/design/README
288
289
  - lib/gen/design/USAGE
290
+ - lib/gen/design/templates/resources/@filename@.css
289
291
  - lib/gen/design/templates/resources/@filename@.js
290
292
  - lib/gen/framework/Buildfile
291
293
  - lib/gen/framework/README
@@ -316,10 +318,11 @@ files:
316
318
  - lib/gen/project/USAGE
317
319
  - lib/gen/project/templates/@filename@/Buildfile
318
320
  - lib/gen/project/templates/@filename@/README
319
- - lib/gen/responder/Buildfile
320
- - lib/gen/responder/README
321
- - lib/gen/responder/USAGE
322
- - lib/gen/responder/templates/states/@filename@_state.js
321
+ - lib/gen/state/Buildfile
322
+ - lib/gen/state/README
323
+ - lib/gen/state/USAGE
324
+ - lib/gen/state/templates/states/@filename@_state.js
325
+ - lib/gen/state/templates/tests/states/@filename@_test.js
323
326
  - lib/gen/statechart_app/Buildfile
324
327
  - lib/gen/statechart_app/README
325
328
  - lib/gen/statechart_app/USAGE
@@ -328,6 +331,7 @@ files:
328
331
  - lib/gen/statechart_app/templates/apps/@target_name@/main.js
329
332
  - lib/gen/statechart_app/templates/apps/@target_name@/resources/_theme.css
330
333
  - lib/gen/statechart_app/templates/apps/@target_name@/resources/loading.rhtml
334
+ - lib/gen/statechart_app/templates/apps/@target_name@/resources/main_page.css
331
335
  - lib/gen/statechart_app/templates/apps/@target_name@/resources/main_page.js
332
336
  - lib/gen/statechart_app/templates/apps/@target_name@/statechart.js
333
337
  - lib/gen/statechart_app/templates/apps/@target_name@/states/ready_state.js
@@ -713,6 +717,7 @@ files:
713
717
  - spec/lib/buildfile_commands/task_spec.rb
714
718
  - spec/lib/helpers/minifier.rb
715
719
  - spec/lib/helpers/packing_optimizer/optimize_spec.rb
720
+ - spec/lib/models/generator/snake_case_spec.rb
716
721
  - spec/lib/models/hash_struct/deep_clone_spec.rb
717
722
  - spec/lib/models/hash_struct/has_options_spec.rb
718
723
  - spec/lib/models/hash_struct/hash_spec.rb
@@ -1189,6 +1194,8 @@ files:
1189
1194
  - lib/frameworks/sproutcore/frameworks/debug/core.js
1190
1195
  - lib/frameworks/sproutcore/frameworks/desktop/core.js
1191
1196
  - lib/frameworks/sproutcore/frameworks/desktop/debug/drag.js
1197
+ - lib/frameworks/sproutcore/frameworks/desktop/debug/resources/a_sample_image.jpg
1198
+ - lib/frameworks/sproutcore/frameworks/desktop/debug/resources/iframe.html
1192
1199
  - lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js
1193
1200
  - lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js
1194
1201
  - lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_group.js
@@ -1231,9 +1238,6 @@ files:
1231
1238
  - lib/frameworks/sproutcore/frameworks/desktop/resources/alert.css
1232
1239
  - lib/frameworks/sproutcore/frameworks/desktop/resources/button_view.css
1233
1240
  - lib/frameworks/sproutcore/frameworks/desktop/resources/checkbox_view.css
1234
- - lib/frameworks/sproutcore/frameworks/desktop/resources/debug/a_sample_image.jpg
1235
- - lib/frameworks/sproutcore/frameworks/desktop/resources/debug/apple-logo1.jpeg
1236
- - lib/frameworks/sproutcore/frameworks/desktop/resources/debug/iframe.html
1237
1241
  - lib/frameworks/sproutcore/frameworks/desktop/resources/disclosure.css
1238
1242
  - lib/frameworks/sproutcore/frameworks/desktop/resources/drag.css
1239
1243
  - lib/frameworks/sproutcore/frameworks/desktop/resources/icons.css
@@ -1728,7 +1732,7 @@ files:
1728
1732
  - lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js
1729
1733
  - lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js
1730
1734
  - lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js
1731
- - lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js
1735
+ - lib/frameworks/sproutcore/frameworks/foundation/mixins/gesturable.js
1732
1736
  - lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js
1733
1737
  - lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor.js
1734
1738
  - lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js
@@ -2415,7 +2419,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2415
2419
  requirements: []
2416
2420
 
2417
2421
  rubyforge_project: sproutcore
2418
- rubygems_version: 1.8.17
2422
+ rubygems_version: 1.8.25
2419
2423
  signing_key:
2420
2424
  specification_version: 3
2421
2425
  summary: SproutCore is a platform for building native look-and-feel applications on the web