sproutcore 1.4.1 → 1.4.2
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/CHANGELOG +8 -0
- data/VERSION.yml +1 -1
- data/lib/frameworks/sproutcore/CHANGELOG +7 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/datetime.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/datetime.js +8 -0
- data/lib/sproutcore/builders/base.rb +1 -1
- data/lib/sproutcore/helpers/entry_sorter.rb +2 -1
- data/lib/sproutcore/models/manifest.rb +4 -2
- data/lib/sproutcore/tools/init.rb +1 -1
- data/spec/lib/models/manifest/find_entry.rb +10 -0
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
*SproutCore 1.4.2 (October 1, 2010)*
|
2
|
+
|
3
|
+
* Ignore swp files
|
4
|
+
* find_entry should not match partial filenames
|
5
|
+
* Made sc_static RegExp not greedy
|
6
|
+
* Fixed redundancy in sc-init description
|
7
|
+
* Fixes to allow uppercase files to be found by sc_require.
|
8
|
+
|
1
9
|
*SproutCore 1.4.1 (September 21, 2010)*
|
2
10
|
|
3
11
|
* Fixed string escaping issue in call to YUI Compressor [PDW]
|
data/VERSION.yml
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
*SproutCore 1.4.2 (October, 1 2010)*
|
2
|
+
|
3
|
+
* Fixes a DateTime .get('lastMonday') bug
|
4
|
+
* default to using ISO 8601 format for time parsing if none is specified
|
5
|
+
* Allow SelectFieldView to obtain focus if the user presses TAB key from previous field.
|
6
|
+
* Fixed typo
|
7
|
+
|
1
8
|
*SproutCore 1.4.1 (September, 21 2010)*
|
2
9
|
|
3
10
|
* Update the X-SproutCore-Version header to 1.4 [MO]
|
@@ -19,7 +19,7 @@ SC.FixturesDataSource = SC.DataSource.extend(
|
|
19
19
|
/** @scope SC.FixturesDataSource.prototype */ {
|
20
20
|
|
21
21
|
/**
|
22
|
-
If YES then the data source will
|
22
|
+
If YES then the data source will asynchronously respond to data requests
|
23
23
|
from the server. If you plan to replace the fixture data source with a
|
24
24
|
data source that talks to a real remote server (using Ajax for example),
|
25
25
|
you should leave this property set to YES so that Fixtures source will
|
@@ -34,7 +34,7 @@ SC.FixturesDataSource = SC.DataSource.extend(
|
|
34
34
|
simulateRemoteResponse: NO,
|
35
35
|
|
36
36
|
/**
|
37
|
-
If you set simulateRemoteResponse to YES, then the fixtures
|
37
|
+
If you set simulateRemoteResponse to YES, then the fixtures source will
|
38
38
|
assume a response latency from your server equal to the msec specified
|
39
39
|
here. You should tune this to simulate latency based on the expected
|
40
40
|
performance of your server network. Here are some good guidelines:
|
@@ -222,7 +222,9 @@ SC.SelectFieldView = SC.FieldView.extend(
|
|
222
222
|
this.set('cpDidChange', YES);
|
223
223
|
}.observes('valueKey'),
|
224
224
|
|
225
|
-
|
225
|
+
acceptsFirstResponder: function() {
|
226
|
+
return this.get('isEnabled');
|
227
|
+
}.property('isEnabled'),
|
226
228
|
|
227
229
|
// .......................................
|
228
230
|
// PRIVATE
|
@@ -596,7 +596,7 @@ SC.DateTime.mixin(SC.Comparable,
|
|
596
596
|
prefix = key.slice(0, 4);
|
597
597
|
suffix = key.slice(4);
|
598
598
|
if (prefix === 'last' || prefix === 'next') {
|
599
|
-
currentWeekday = this._get('dayOfWeek');
|
599
|
+
currentWeekday = this._get('dayOfWeek', start, timezone);
|
600
600
|
targetWeekday = this._englishDayNames.indexOf(suffix);
|
601
601
|
if (targetWeekday >= 0) {
|
602
602
|
var delta = targetWeekday - currentWeekday;
|
@@ -895,6 +895,9 @@ SC.DateTime.mixin(SC.Comparable,
|
|
895
895
|
parse: function(str, fmt) {
|
896
896
|
var re = /(?:\%([aAbBcdHIjmMpSUWwxXyYZ\%])|(.))/g;
|
897
897
|
var d, parts, opts = {}, check = {}, scanner = SC.Scanner.create({string: str});
|
898
|
+
|
899
|
+
if (SC.none(fmt)) fmt = SC.DATETIME_ISO8601;
|
900
|
+
|
898
901
|
try {
|
899
902
|
while ((parts = re.exec(fmt)) !== null) {
|
900
903
|
switch(parts[1]) {
|
@@ -259,6 +259,10 @@ test('fancy getters', function() {
|
|
259
259
|
equals(dt.get('lastMonday'), dt.advance({ day: -5 }), 'dt.advance(day: -5)');
|
260
260
|
equals(dt.get('nextFriday'), dt.advance({ day: 6 }), 'dt.advance(day: 6)');
|
261
261
|
equals(dt.get('lastWednesday'), dt.advance({ day: -3 }), 'dt.advance(day: -3)');
|
262
|
+
|
263
|
+
equals(
|
264
|
+
SC.DateTime.create({ year: 2010, month: 9, day: 29, hour: 0, minute: 30, timezone: -120 }).adjust({ day: 1 }).get('lastMonday').toISO8601(),
|
265
|
+
"2010-08-30T00:30:00+02:00");
|
262
266
|
});
|
263
267
|
|
264
268
|
test('parse', function() {
|
@@ -294,6 +298,10 @@ test('parse with time zones',function() {
|
|
294
298
|
"2020-01-07T18:33:22+00:00");
|
295
299
|
});
|
296
300
|
|
301
|
+
test('parse without a format uses default ISO8601', function() {
|
302
|
+
equals(SC.DateTime.parse("2010-09-17T18:35:08Z").toISO8601(), "2010-09-17T18:35:08+00:00");
|
303
|
+
});
|
304
|
+
|
297
305
|
test('binding', function() {
|
298
306
|
var fromObject = SC.Object.create({value: dt});
|
299
307
|
var toObject = SC.Object.create({value: ''});
|
@@ -61,7 +61,7 @@ module SC
|
|
61
61
|
|
62
62
|
# Handles occurances of sc_static() or static_url()
|
63
63
|
def replace_static_url(line)
|
64
|
-
line.gsub!(/(sc_static|static_url|sc_target)\(\s*['"](
|
64
|
+
line.gsub!(/(sc_static|static_url|sc_target)\(\s*['"](.+?)['"]\s*\)/) do | rsrc |
|
65
65
|
entry_name = $2
|
66
66
|
entry_name = "#{$2}:index.html" if $1 == 'sc_target'
|
67
67
|
static_entry = entry.manifest.find_entry($2)
|
@@ -101,7 +101,8 @@ module SC
|
|
101
101
|
return [] unless required
|
102
102
|
|
103
103
|
required.map do |filename|
|
104
|
-
|
104
|
+
normalized_filename = filename.downcase
|
105
|
+
entry = all_entries["source/#{normalized_filename}"] || all_entries["source/lproj/#{normalized_filename}"]
|
105
106
|
|
106
107
|
unless entry
|
107
108
|
SC.logger.warn "Could not find entry '#{filename}' required in #{requiring_entry.target[:target_name].to_s.sub(/^\//,'')}:#{requiring_entry[:filename]}"
|
@@ -327,14 +327,16 @@ module SC
|
|
327
327
|
extname = File.extname(fragment)
|
328
328
|
extname = nil if extname.empty?
|
329
329
|
|
330
|
-
|
330
|
+
# Add leading slash and remove extension
|
331
|
+
rootname = fragment.sub(/\/?/, '/').sub(/#{extname}$/, '')
|
331
332
|
|
332
333
|
# look on our own target only if target is named
|
333
334
|
ret = cur_manifest.entries(opts).find do |entry|
|
334
335
|
next unless entry.has_options?(opts)
|
335
336
|
next if extname && (entry.extension != extname)
|
336
337
|
|
337
|
-
entry.rootname
|
338
|
+
normalized_rootname = entry.rootname.sub!(/\/?/, '/') # Add leading slash
|
339
|
+
normalized_rootname[-rootname.length, rootname.length] == rootname
|
338
340
|
end
|
339
341
|
|
340
342
|
return ret if ret
|
@@ -19,6 +19,7 @@ describe SC::Manifest, 'entry_for' do
|
|
19
19
|
@manifest.add_entry 'images/foo.gif'
|
20
20
|
@manifest.add_entry 'images/sprites/foo.png'
|
21
21
|
@manifest.add_entry 'foo.png'
|
22
|
+
@manifest.add_entry 'foobar.png'
|
22
23
|
|
23
24
|
@manifest.add_entry 'bark/bite.png', :foo => :foo
|
24
25
|
@manifest.add_entry 'bark/bite.png', :foo => :bar
|
@@ -43,6 +44,11 @@ describe SC::Manifest, 'entry_for' do
|
|
43
44
|
entry.filename.should == expected_filename
|
44
45
|
end
|
45
46
|
|
47
|
+
def should_not_find(find_str, expected_filename)
|
48
|
+
entry = @manifest.find_entry(find_str)
|
49
|
+
entry.should be_nil
|
50
|
+
end
|
51
|
+
|
46
52
|
it "matches exact path from url_root" do
|
47
53
|
should_find('images/foo.png', 'images/foo.png')
|
48
54
|
end
|
@@ -59,6 +65,10 @@ describe SC::Manifest, 'entry_for' do
|
|
59
65
|
should_find('images/foo', 'images/foo.png')
|
60
66
|
end
|
61
67
|
|
68
|
+
it "will not match a partial filename" do
|
69
|
+
should_not_find('bar.png', 'foobar.png')
|
70
|
+
end
|
71
|
+
|
62
72
|
it "providing extension can force match" do
|
63
73
|
should_find('foo.gif', 'images/foo.gif')
|
64
74
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 1.4.
|
8
|
+
- 2
|
9
|
+
version: 1.4.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Strobe, Inc., Sprout Systems, Inc. Apple Inc. and contributors
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-10-01 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|