sproutcore 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +11 -0
- data/Rakefile +27 -436
- data/VERSION.yml +1 -1
- data/lib/frameworks/sproutcore/CHANGELOG +32 -2
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +42 -2
- data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +7 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/radio/ui.js +22 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +38 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +12 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +14 -9
- data/lib/frameworks/sproutcore/frameworks/foundation/system/datetime.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/root_responder.js +25 -17
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +46 -36
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/validatable/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/datetime.js +5 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/not_empty.js +56 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/date_time.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/not_empty.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/media/views/media_slider.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/media/views/mini_controls.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/media/views/video.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +18 -23
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +13 -0
- data/lib/sproutcore/builders/base.rb +4 -4
- data/lib/sproutcore/builders/javascript.rb +0 -7
- data/lib/sproutcore/builders/stylesheet.rb +0 -7
- data/lib/sproutcore/rack/proxy.rb +28 -13
- metadata +4 -4
- data/DISTRIBUTION.yml +0 -20
data/CHANGELOG
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
*SproutCore 1.4.3 (October 19, 2010)*
|
2
|
+
|
3
|
+
* Better handling of Proxy Redirect
|
4
|
+
* Handle cases of missing net/https - Fixes #7
|
5
|
+
* Proxy: Use port 443 if secure and no port specified
|
6
|
+
* Fixes to Proxy Redirect support
|
7
|
+
* Fixes to SSL
|
8
|
+
* Cleanup to Builders - Fixes #2
|
9
|
+
* Wiped the old Rakefile since it wasn't applicable anymore
|
10
|
+
|
11
|
+
|
1
12
|
*SproutCore 1.4.2 (October 1, 2010)*
|
2
13
|
|
3
14
|
* Ignore swp files
|
data/Rakefile
CHANGED
@@ -1,446 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
# Copyright: ©2009 Apple Inc.
|
4
|
-
# portions copyright @2006-2009 Sprout Systems, Inc.
|
5
|
-
# and contributors
|
6
|
-
# ===========================================================================
|
1
|
+
desc "Information for setup"
|
2
|
+
task :default do
|
7
3
|
|
8
|
-
|
4
|
+
puts <<END
|
9
5
|
|
10
|
-
|
6
|
+
===================================================
|
7
|
+
**********************WARNING**********************
|
8
|
+
===================================================
|
11
9
|
|
12
|
-
|
13
|
-
|
10
|
+
It is not recommended that you install Abbot
|
11
|
+
directly from git. Unless you are hacking on Abbot
|
12
|
+
you should use the gem:
|
13
|
+
|
14
|
+
gem install sproutcore
|
14
15
|
|
15
|
-
|
16
|
-
require 'yaml'
|
16
|
+
===================================================
|
17
17
|
|
18
|
-
|
19
|
-
DIST = YAML.load File.read(DIST_PATH)
|
18
|
+
To get the SproutCore framework, run
|
20
19
|
|
21
|
-
|
22
|
-
|
20
|
+
git submodule init
|
21
|
+
git submodule update
|
23
22
|
|
24
|
-
|
25
|
-
# overrides
|
26
|
-
(YAML.load(File.read(LOCAL_DIST_PATH)) || {}).each do |key, opts|
|
27
|
-
if DIST[key]
|
28
|
-
DIST[key].merge! opts
|
29
|
-
else
|
30
|
-
DIST[KEY] = opts
|
31
|
-
end
|
32
|
-
end
|
23
|
+
To update the gem:
|
33
24
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
# Core dependencies. Just warn if these are not available
|
47
|
-
begin
|
48
|
-
require 'rubygems'
|
49
|
-
require 'extlib'
|
50
|
-
require 'fileutils'
|
51
|
-
require 'spec/rake/spectask'
|
52
|
-
|
53
|
-
$:.unshift(ROOT_PATH / 'lib')
|
54
|
-
|
55
|
-
require 'sproutcore'
|
56
|
-
|
57
|
-
rescue LoadError => e
|
58
|
-
$stderr.puts "WARN: some required gems are not installed (try rake init to setup)"
|
59
|
-
$stderr.puts e
|
60
|
-
end
|
61
|
-
|
62
|
-
|
63
|
-
################################################
|
64
|
-
## JEWELER PROJECT DESCRIPTION
|
65
|
-
##
|
66
|
-
|
67
|
-
namespace :gem do
|
68
|
-
task :clean do
|
69
|
-
system "rm *.gem"
|
70
|
-
end
|
71
|
-
|
72
|
-
desc "build the sproutcore gem"
|
73
|
-
task :build => :clean do
|
74
|
-
system "gem build sproutcore.gemspec"
|
75
|
-
end
|
76
|
-
|
77
|
-
desc "install the sproutcore gem to the system"
|
78
|
-
task :install => :build do
|
79
|
-
gem = Dir["*.gem"][0]
|
80
|
-
system "gem install #{gem}"
|
81
|
-
end
|
82
|
-
|
83
|
-
desc "push the sproutcore gem to rubygems.org"
|
84
|
-
task :push => :build do
|
85
|
-
gem = Dir["*.gem"][0]
|
86
|
-
system "gem push #{gem}"
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
################################################
|
91
|
-
## CORE TASKS
|
92
|
-
##
|
93
|
-
|
94
|
-
# git helper used to run git from within rake.
|
95
|
-
def git(path, cmd, log=true)
|
96
|
-
$stdout.puts("#{path.sub(ROOT_PATH, '')}: git #{cmd}") if log
|
97
|
-
git_path = path / '.git'
|
98
|
-
git_index = git_path / 'index'
|
99
|
-
|
100
|
-
# The env can become polluted; breaking git. This will avoid that.
|
101
|
-
%x[GIT_DIR=#{git_path}; GIT_WORK_TREE=#{path}; GIT_INDEX_FILE=#{git_index}; git #{cmd}]
|
102
|
-
end
|
103
|
-
|
104
|
-
|
105
|
-
desc "performs an initial setup on the tools. Installs gems, checkout"
|
106
|
-
task :init => [:install_gems, 'dist:init']
|
107
|
-
|
108
|
-
desc "verifies that all required gems are installed"
|
109
|
-
task :install_gems do
|
110
|
-
$stdout.puts "Installing gems (may ask for password)"
|
111
|
-
|
112
|
-
gem_names = %w(rack json json_pure extlib erubis thor jeweler gemcutter rspec)
|
113
|
-
gem_install = []
|
114
|
-
gem_update = []
|
115
|
-
|
116
|
-
# detect which ones are installed and update those
|
117
|
-
gem_names.each do |name|
|
118
|
-
if %x[gem list #{name}] =~ /#{Regexp.escape(name)} \(/
|
119
|
-
gem_update << name
|
120
|
-
else
|
121
|
-
gem_install << name
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
$stdout.puts "installing gems #{gem_install * ' '}" if gem_install.size>0
|
126
|
-
$stdout.puts "updating gems #{gem_update * ' '}" if gem_update.size>0
|
127
|
-
|
128
|
-
# install missing gems - updating known gems
|
129
|
-
# this is faster than just installing all gems
|
130
|
-
system %[#{SUDO} gem install #{gem_install * ' '}]
|
131
|
-
system %[#{SUDO} gem update #{gem_update * ' '}]
|
132
|
-
end
|
133
|
-
|
134
|
-
namespace :dist do
|
135
|
-
|
136
|
-
desc "checkout any frameworks in the distribution"
|
137
|
-
task :init do
|
138
|
-
$stdout.puts "Setup distribution"
|
139
|
-
|
140
|
-
DIST.each do |rel_path, opts|
|
141
|
-
path = ROOT_PATH / rel_path
|
142
|
-
repo_url = opts['repo']
|
143
|
-
dist_branch = opts['branch'] || 'master'
|
144
|
-
|
145
|
-
# if the .git repository does not exist yet, create it
|
146
|
-
if !File.exists?(path / ".git")
|
147
|
-
$stdout.puts " Creating repo for #{rel_path}"
|
148
|
-
FileUtils.mkdir_p path
|
149
|
-
|
150
|
-
$stdout.puts "\n> git clone #{repo_url} #{path}"
|
151
|
-
system "GIT_DIR=#{path / '.git'}; GIT_WORK_TREE=#{path}; git init"
|
152
|
-
end
|
153
|
-
|
154
|
-
# if git exists, make sure a "dist" remote exists and matches the named
|
155
|
-
# remote
|
156
|
-
remote = git(path, 'remote -v').split("\n").find do |l|
|
157
|
-
l =~ /^#{REMOTE_NAME}.+\(fetch\)/
|
158
|
-
end
|
159
|
-
|
160
|
-
if remote
|
161
|
-
cur_repo_url = remote.match(/^#{REMOTE_NAME}(.+)\(fetch\)/)[1].strip
|
162
|
-
if (cur_repo_url != repo_url)
|
163
|
-
$stdout.puts "ERROR: #{rel_path} has a 'dist' remote pointing to a different repo. Please remove the 'dist' remote and try again"
|
164
|
-
exit(1)
|
165
|
-
else
|
166
|
-
$stdout.puts "Found #{rel_path}:dist => #{repo_url}"
|
167
|
-
end
|
168
|
-
|
169
|
-
# remote does not yet exist, add it...
|
170
|
-
else
|
171
|
-
$stdout.puts git(path,"remote add dist #{repo_url}")
|
172
|
-
end
|
173
|
-
|
174
|
-
$stdout.puts git(path, "fetch dist")
|
175
|
-
|
176
|
-
# Make sure a "dist" branch exists.. if not checkout against the
|
177
|
-
# dist branch
|
178
|
-
if git(path, 'branch') =~ /dist\n/
|
179
|
-
$stdout.puts "WARN: #{rel_path}:dist branch already exists. delete branch and try again if you aren't sure it is setup properly"
|
180
|
-
else
|
181
|
-
git(path,"branch dist remotes/dist/#{dist_branch}")
|
182
|
-
end
|
183
|
-
|
184
|
-
git(path, "checkout dist")
|
185
|
-
|
186
|
-
end
|
187
|
-
end
|
188
|
-
|
189
|
-
desc "Make sure each repository in the distribute is set to the target remote branch and up-to-date"
|
190
|
-
task :update => 'dist:init' do
|
191
|
-
$stdout.puts "Setup distribution"
|
192
|
-
|
193
|
-
DIST.each do |rel_path, opts|
|
194
|
-
path = ROOT_PATH / rel_path
|
195
|
-
branch = opts['branch'] || 'master'
|
196
|
-
|
197
|
-
if File.exists?(path / ".git")
|
198
|
-
|
199
|
-
$stdout.puts "\n> git checkout dist"
|
200
|
-
$stdout.puts git(path, "checkout dist")
|
201
|
-
|
202
|
-
$stdout.puts "\n> git fetch dist"
|
203
|
-
$stdout.puts git(path, 'fetch dist')
|
204
|
-
|
205
|
-
$stdout.puts "\n> git rebase remotes/dist/#{branch}"
|
206
|
-
$stdout.puts git(path, "rebase remotes/dist/#{branch}")
|
207
|
-
|
208
|
-
else
|
209
|
-
$stdout.puts "WARN: cannot fix version for #{rel_path}"
|
210
|
-
end
|
211
|
-
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
desc "make the version of each distribution item match the one in VERSION"
|
216
|
-
task :freeze => 'dist:init' do
|
217
|
-
$stdout.puts "Setup distribution"
|
218
|
-
|
219
|
-
# Use this to get the commit hash
|
220
|
-
version_file = ROOT_PATH / 'VERSION.yml'
|
221
|
-
if File.exist?(version_file)
|
222
|
-
versions = YAML.load File.read(version_file)
|
223
|
-
versions = (versions['dist'] || versions[:dist]) if versions
|
224
|
-
versions ||= {}
|
225
|
-
end
|
226
|
-
|
227
|
-
DIST.each do |rel_path, opts|
|
228
|
-
path = ROOT_PATH / rel_path
|
25
|
+
- Update VERSION.yml
|
26
|
+
- Update CHANGELOG
|
27
|
+
- Make sure the framework is up to date
|
28
|
+
- Add a new tag
|
29
|
+
- Build and push the gem:
|
30
|
+
gem build sproutcore.gemspec
|
31
|
+
gem push sproutcore-VERSION.gem
|
32
|
+
- Switch to JRuby and repeat:
|
33
|
+
gem build sproutcore.gemspec
|
34
|
+
gem push sproutcore-VERSION-java.gem
|
35
|
+
END
|
229
36
|
|
230
|
-
if File.exists?(path / ".git") && versions[rel_path]
|
231
|
-
sha = versions[rel_path]
|
232
|
-
|
233
|
-
$stdout.puts "\n> git fetch"
|
234
|
-
$stdout.puts git(path, 'fetch')
|
235
|
-
|
236
|
-
if sha
|
237
|
-
$stdout.puts "\n> git checkout #{sha}"
|
238
|
-
$stdout.puts git(path, "checkout #{sha}")
|
239
|
-
end
|
240
|
-
|
241
|
-
else
|
242
|
-
$stdout.puts "WARN: cannot fix version for #{rel_path}"
|
243
|
-
end
|
244
|
-
|
245
|
-
end
|
246
|
-
end
|
247
|
-
|
248
|
-
end
|
249
|
-
|
250
|
-
namespace :release do
|
251
|
-
|
252
|
-
desc "tags the current repository and any distribution repositories. if you can push to distribution, then push tag as well"
|
253
|
-
task :tag => :update_version do
|
254
|
-
tag_name = "REL-#{RELEASE_VERSION}"
|
255
|
-
DIST.keys.push('abbot').each do |rel_path|
|
256
|
-
full_path = rel_path=='abbot' ? ROOT_PATH : (ROOT_PATH / rel_path)
|
257
|
-
git(full_path, "tag -f #{tag_name}")
|
258
|
-
end
|
259
|
-
end
|
260
|
-
|
261
|
-
task :push_tags => :tag do
|
262
|
-
tag_name = "REL-#{RELEASE_VERSION}"
|
263
|
-
DIST.keys.push('abbot').each do |rel_path|
|
264
|
-
full_path = rel_path=='abbot' ? ROOT_PATH : (ROOT_PATH / rel_path)
|
265
|
-
git(full_path, "push origin #{tag_name}")
|
266
|
-
end
|
267
|
-
end
|
268
|
-
|
269
|
-
|
270
|
-
desc "prepare release. verify clean, update version, tag"
|
271
|
-
task :prepare => ['git:verify_clean', :update_version, :tag, :push_tags]
|
272
|
-
|
273
|
-
desc "release to rubyforge for old skool folks"
|
274
|
-
task :rubyforge => [:prepare, 'rubyforge:release']
|
275
|
-
|
276
|
-
desc "release to gemcutter for new skool kids"
|
277
|
-
task :gemcutter => [:prepare, 'gemcutter:release']
|
278
|
-
|
279
|
-
desc "one release to rule them all"
|
280
|
-
task :all => [:prepare, 'release:gemcutter']
|
281
|
-
|
282
|
-
end
|
283
|
-
|
284
|
-
desc "computes the current hash of the code. used to autodetect build changes"
|
285
|
-
task :hash_content do
|
286
|
-
|
287
|
-
require 'yaml'
|
288
|
-
require 'digest/md5'
|
289
|
-
|
290
|
-
ignore = IGNORE_CHANGES.map do |x|
|
291
|
-
if x =~ /^\^/
|
292
|
-
/^#{Regexp.escape(ROOT_PATH / x[1..-1])}/
|
293
|
-
else
|
294
|
-
/#{Regexp.escape(x)}/
|
295
|
-
end
|
296
|
-
end
|
297
|
-
|
298
|
-
# First, get the hashinfo if it exists. use this to decide if we need to
|
299
|
-
# rehash
|
300
|
-
hashinfo_path = ROOT_PATH / '.hashinfo.yml'
|
301
|
-
hash_date = 0
|
302
|
-
hash_digest = nil
|
303
|
-
|
304
|
-
if File.exist?(hashinfo_path)
|
305
|
-
yaml = YAML.load_file(hashinfo_path)
|
306
|
-
hash_date = yaml['date'] || yaml[:date] || hash_date
|
307
|
-
hash_digest = yaml['digest'] || yaml[:digest] || hash_digest
|
308
|
-
end
|
309
|
-
|
310
|
-
# paths to search
|
311
|
-
paths = Dir.glob(File.join(ROOT_PATH, '**', '*')).reject do |path|
|
312
|
-
File.directory?(path) || (ignore.find { |i| path =~ i })
|
313
|
-
end
|
314
|
-
|
315
|
-
cur_date = 0
|
316
|
-
paths.each do |path|
|
317
|
-
mtime = File.mtime(path)
|
318
|
-
mtime = mtime.nil? ? 0 : mtime.to_i
|
319
|
-
$stdout.puts "detected file change: #{path.gsub(ROOT_PATH,'')}" if mtime > hash_date
|
320
|
-
cur_date = mtime if mtime > cur_date
|
321
|
-
end
|
322
|
-
|
323
|
-
if hash_digest.nil? || (cur_date != hash_date)
|
324
|
-
digests = paths.map do |path|
|
325
|
-
Digest::SHA1.hexdigest(File.read(path))
|
326
|
-
end
|
327
|
-
digests.compact!
|
328
|
-
hash_digest = Digest::SHA1.hexdigest(digests.join)
|
329
|
-
end
|
330
|
-
hash_date = cur_date
|
331
|
-
|
332
|
-
# write cache
|
333
|
-
File.open(hashinfo_path, 'w+') do |f|
|
334
|
-
YAML.dump({ :date => hash_date, :digest => hash_digest }, f)
|
335
|
-
end
|
336
|
-
|
337
|
-
# finally set the hash
|
338
|
-
CONTENT_HASH = hash_digest
|
339
|
-
$stdout.puts "CONTENT_HASH = #{CONTENT_HASH}"
|
340
37
|
end
|
341
|
-
|
342
|
-
desc "updates the VERSION file, bumbing the build rev if the current commit has changed"
|
343
|
-
task :update_version => 'hash_content' do
|
344
|
-
|
345
|
-
path = ROOT_PATH / 'VERSION.yml'
|
346
|
-
|
347
|
-
require 'yaml'
|
348
|
-
|
349
|
-
# first, load the current yaml if possible
|
350
|
-
major = 1
|
351
|
-
minor = 0
|
352
|
-
build = 99
|
353
|
-
rev = '-0-'
|
354
|
-
dist = {}
|
355
|
-
|
356
|
-
if File.exist?(path)
|
357
|
-
yaml = YAML.load_file(path)
|
358
|
-
major = yaml['major'] || yaml[:major] || major
|
359
|
-
minor = yaml['minor'] || yaml[:minor] || minor
|
360
|
-
build = yaml['patch'] || yaml[:patch] || build
|
361
|
-
rev = yaml['digest'] || yaml[:digest] || rev
|
362
|
-
end
|
363
|
-
|
364
|
-
build += 1 if rev != CONTENT_HASH #increment if needed
|
365
|
-
rev = CONTENT_HASH
|
366
|
-
|
367
|
-
# Update distribution versions
|
368
|
-
DIST.each do |rel_path, ignored|
|
369
|
-
dist_path = ROOT_PATH / rel_path
|
370
|
-
if File.exists?(dist_path)
|
371
|
-
dist_rev = git(dist_path, "log HEAD^..HEAD")
|
372
|
-
dist_rev = dist_rev.split("\n").first.scan(/commit ([^\s]+)/)
|
373
|
-
dist_rev = ((dist_rev || []).first || []).first
|
374
|
-
|
375
|
-
if dist_rev.nil?
|
376
|
-
$stdout.puts " WARN: cannot find revision for #{rel_path}"
|
377
|
-
else
|
378
|
-
dist[rel_path] = dist_rev
|
379
|
-
end
|
380
|
-
end
|
381
|
-
end
|
382
|
-
|
383
|
-
$stdout.puts "write version #{[major, minor, build].join('.')} => #{path}"
|
384
|
-
File.open(path, 'w+') do |f|
|
385
|
-
YAML.dump({
|
386
|
-
:major => major,
|
387
|
-
:minor => minor,
|
388
|
-
:patch => build,
|
389
|
-
:digest => rev,
|
390
|
-
:dist => dist
|
391
|
-
}, f)
|
392
|
-
end
|
393
|
-
|
394
|
-
RELEASE_VERSION = "#{major}.#{minor}.#{build}"
|
395
|
-
|
396
|
-
end
|
397
|
-
|
398
|
-
desc "cleanup the pkg dir"
|
399
|
-
task :clean do
|
400
|
-
path = ROOT_PATH / 'pkg'
|
401
|
-
FileUtils.rm_r(path) if File.directory?(path)
|
402
|
-
`rm #{ROOT_PATH / '*.gem'}`
|
403
|
-
end
|
404
|
-
|
405
|
-
namespace :git do
|
406
|
-
|
407
|
-
desc "verifies there are no pending changes to commit to git"
|
408
|
-
task :verify_clean do
|
409
|
-
DIST.keys.push('abbot').each do |repo_name|
|
410
|
-
full_path = repo_name=='abbot' ? ROOT_PATH : (ROOT_PATH / repo_name)
|
411
|
-
|
412
|
-
result = git(full_path, 'status')
|
413
|
-
|
414
|
-
if !(result =~ /nothing to commit \(working directory clean\)/)
|
415
|
-
if (repo_name != 'abbot') ||
|
416
|
-
(!(result =~ /#\n#\tmodified: VERSION.yml\n#\n/))
|
417
|
-
$stderr.puts "\nFATAL: Cannot complete task: changes are still pending in the '#{repo_name}' repository."
|
418
|
-
$stderr.puts " Commit your changes to git to continue.\n\n"
|
419
|
-
exit(1)
|
420
|
-
end
|
421
|
-
end
|
422
|
-
end
|
423
|
-
end
|
424
|
-
|
425
|
-
desc "Collects the current SHA1 commit hash into COMMIT_ID"
|
426
|
-
task :collect_commit do
|
427
|
-
log = `git log HEAD^..HEAD`
|
428
|
-
COMMIT_ID = log.split("\n").first.match(/commit ([\w]+)/).to_a[1]
|
429
|
-
if COMMIT_ID.empty?
|
430
|
-
$stderr.puts "\nFATAL: Cannot discover current commit id"
|
431
|
-
exit(1)
|
432
|
-
else
|
433
|
-
$stdout.puts "COMMIT_ID = #{COMMIT_ID}"
|
434
|
-
end
|
435
|
-
end
|
436
|
-
|
437
|
-
end
|
438
|
-
|
439
|
-
# Write a new version everytime we generate
|
440
|
-
task 'gemspec:generate' => :update_version
|
441
|
-
task 'rubyforge:setup' => :update_version
|
442
|
-
|
443
|
-
Spec::Rake::SpecTask.new
|
444
|
-
|
445
|
-
|
446
|
-
# EOF
|
data/VERSION.yml
CHANGED
@@ -1,10 +1,40 @@
|
|
1
|
-
*SproutCore 1.4.
|
1
|
+
*SproutCore 1.4.3 (October 19, 2010)*
|
2
|
+
|
3
|
+
* Send a warning to the console when using SC.RecordArray#indexOf or SC.RecordArray#lastIndexOf and providing an object that is
|
4
|
+
* Applied fix to the findClassNames function so that class names can be detected when using SproutCore in IE 7 and 8.
|
5
|
+
* SC.ObserverSet.add was being overloaded in debug mode by a version that mucked up passing along a context with addObserver. T
|
6
|
+
* rendering of select field will now honor isEnabled, ensuring that the control is disabled in the markup if not enabled in cod
|
7
|
+
* adding an observer that monitors the objects content (and not just the reference) so that any changes to the content will upd
|
8
|
+
* NotEmpty validator would not validate 0 as a non-empty number
|
9
|
+
* Spelling fixes in api doc
|
10
|
+
* Fix spelling in license header
|
11
|
+
* LabelView: allow inline editing of numbers like 0
|
12
|
+
* Refactor duplicated code into a function
|
13
|
+
* Made errors with not correctly initialized caches obvious to find.
|
14
|
+
* Add same guard clause as in insertTab
|
15
|
+
* Fix tabbing in the previous direction as well
|
16
|
+
* Make tabbing between inline text fields work
|
17
|
+
* Make SC.Animatable not crash when it lacks a parent view.
|
18
|
+
* Changed SC.Button mixin to support content objects that do not have get
|
19
|
+
* Fixed issue with SC.ScrollerView not properly updating its element's class names, e.g., if controlsHidden changed to false, t
|
20
|
+
* SC.ScrollerView's thumbs now default to their position -- solves an issue where going back to a view that had already been sc
|
21
|
+
* Explicitly check falsity of isReady in SC._object_className so searching for class names in tests work
|
22
|
+
* SC.ListItemView checks rightIcon property when determining if click occurred within it
|
23
|
+
* For radio buttons with horizontal layoutDirection, added itemWidthKey for custom widths -- fixes Github Issue #27
|
24
|
+
* These tests fail because the store status for the child record is only updated when you 'get' the status of the child record.
|
25
|
+
* return null instead of undefined from select field view getFieldValue when empty item selected.
|
26
|
+
* Sanity check in CollectionView item removal
|
27
|
+
* Fixed SC root responder's mousemove function so that last hovered views are exited first before other views are entered
|
28
|
+
* Fixes passing contexts with addObserver.
|
29
|
+
* Make sure a bad DateTime.parse() doesn't mess up future parses
|
30
|
+
|
31
|
+
*SproutCore 1.4.2 (October 1, 2010)*
|
2
32
|
|
3
33
|
* Fixes a DateTime .get('lastMonday') bug
|
4
34
|
* default to using ISO 8601 format for time parsing if none is specified
|
5
35
|
* Allow SelectFieldView to obtain focus if the user presses TAB key from previous field.
|
6
36
|
* Fixed typo
|
7
37
|
|
8
|
-
*SproutCore 1.4.1 (September
|
38
|
+
*SproutCore 1.4.1 (September 21, 2010)*
|
9
39
|
|
10
40
|
* Update the X-SproutCore-Version header to 1.4 [MO]
|
@@ -279,7 +279,7 @@ SC.Animatable = {
|
|
279
279
|
this.layout = start;
|
280
280
|
|
281
281
|
// get our frame and parent's frame
|
282
|
-
var p = this.computeParentDimensions();
|
282
|
+
var p = this.computeParentDimensions(this.get("frame"));
|
283
283
|
var f = this.computeFrameWithParentFrame(p);
|
284
284
|
|
285
285
|
// set back to target
|
@@ -223,7 +223,10 @@ SC.RecordArray = SC.Object.extend(SC.Enumerable, SC.Array,
|
|
223
223
|
@returns {Number} index
|
224
224
|
*/
|
225
225
|
indexOf: function(record, startAt) {
|
226
|
-
if (!SC.kindOf(record, SC.Record))
|
226
|
+
if (!SC.kindOf(record, SC.Record)) {
|
227
|
+
SC.Logger.warn("Using indexOf on %@ with an object that is not an SC.Record".fmt(record));
|
228
|
+
return -1; // only takes records
|
229
|
+
}
|
227
230
|
|
228
231
|
this.flush();
|
229
232
|
|
@@ -241,7 +244,10 @@ SC.RecordArray = SC.Object.extend(SC.Enumerable, SC.Array,
|
|
241
244
|
@returns {Number} index
|
242
245
|
*/
|
243
246
|
lastIndexOf: function(record, startAt) {
|
244
|
-
if (!SC.kindOf(record, SC.Record))
|
247
|
+
if (!SC.kindOf(record, SC.Record)) {
|
248
|
+
SC.Logger.warn("Using lastIndexOf on %@ with an object that is not an SC.Record".fmt(record));
|
249
|
+
return -1; // only takes records
|
250
|
+
}
|
245
251
|
|
246
252
|
this.flush();
|
247
253
|
|
data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js
CHANGED
@@ -222,9 +222,9 @@ test("Child Status Changed", function() {
|
|
222
222
|
equals(cr.get('status'), testParent.get('status'), 'after initializing the parent to READY_NEW, check that the child record matches');
|
223
223
|
|
224
224
|
SC.RunLoop.begin();
|
225
|
-
store.writeStatus(testParent.storeKey, SC.Record.
|
225
|
+
store.writeStatus(testParent.storeKey, SC.Record.READY_DIRTY);
|
226
226
|
store.dataHashDidChange(testParent.storeKey);
|
227
|
-
equals(cr.get('status'), testParent.get('status'), 'after setting the parent to
|
227
|
+
equals(cr.get('status'), testParent.get('status'), 'after setting the parent to READY_DIRTY, check that the child record matches');
|
228
228
|
SC.RunLoop.end();
|
229
229
|
|
230
230
|
SC.RunLoop.begin();
|
@@ -233,3 +233,43 @@ test("Child Status Changed", function() {
|
|
233
233
|
equals(cr.get('status'), testParent.get('status'), 'after setting the parent to BUSY_REFRESH, check that the child record matches');
|
234
234
|
SC.RunLoop.end();
|
235
235
|
});
|
236
|
+
|
237
|
+
test("Child Status Matches Store Status", function() {
|
238
|
+
var cr;
|
239
|
+
var storeStatus;
|
240
|
+
cr = testParent.get('info');
|
241
|
+
|
242
|
+
storeStatus = store.readStatus(cr.storeKey);
|
243
|
+
equals(storeStatus, cr.get('status'), 'after initializing the parent to READY_NEW, check that the store status matches for the child');
|
244
|
+
equals(cr.get('status'), testParent.get('status'), 'after initializing the parent to READY_NEW, check that the child record matches');
|
245
|
+
|
246
|
+
SC.RunLoop.begin();
|
247
|
+
store.writeStatus(testParent.storeKey, SC.Record.READY_CLEAN);
|
248
|
+
store.dataHashDidChange(testParent.storeKey);
|
249
|
+
SC.RunLoop.end();
|
250
|
+
|
251
|
+
storeStatus = store.readStatus(cr.storeKey);
|
252
|
+
equals(testParent.get('status'), SC.Record.READY_CLEAN, 'parent status should be READY_CLEAN');
|
253
|
+
equals(storeStatus, cr.get('status'), 'after setting the parent to READY_CLEAN, the child\'s status and store status should be READY_CLEAN before calling get(\'status\') on the child');
|
254
|
+
equals(cr.get('status'), testParent.get('status'), 'after setting the parent to READY_CLEAN, check that the child record matches');
|
255
|
+
|
256
|
+
SC.RunLoop.begin();
|
257
|
+
store.writeStatus(testParent.storeKey, SC.Record.READY_DIRTY);
|
258
|
+
store.dataHashDidChange(testParent.storeKey);
|
259
|
+
SC.RunLoop.end();
|
260
|
+
|
261
|
+
storeStatus = store.readStatus(cr.storeKey);
|
262
|
+
equals(testParent.get('status'), SC.Record.READY_DIRTY, 'parent status should be READY_DIRTY');
|
263
|
+
equals(storeStatus, cr.get('status'), 'after setting the parent to READY_DIRTY, the child\'s status and store status should be READY_DIRTY before calling get(\'status\') on the child');
|
264
|
+
equals(cr.get('status'), testParent.get('status'), 'after setting the parent to READY_DIRTY, check that the child record matches');
|
265
|
+
|
266
|
+
SC.RunLoop.begin();
|
267
|
+
store.writeStatus(testParent.storeKey, SC.Record.BUSY_REFRESH);
|
268
|
+
store.dataHashDidChange(testParent.storeKey);
|
269
|
+
storeStatus = store.readStatus(cr.storeKey);
|
270
|
+
SC.RunLoop.end();
|
271
|
+
|
272
|
+
equals(testParent.get('status'), SC.Record.BUSY_REFRESH, 'parent status should be BUSY_REFRESH');
|
273
|
+
equals(storeStatus, cr.get('status'), 'after setting the parent to BUSY_REFRESH, the child\'s status and store status should be BUSY_REFRESH before calling get(\'status\') on the child');
|
274
|
+
equals(cr.get('status'), testParent.get('status'), 'after setting the parent to BUSY_REFRESH, check that the child record matches');
|
275
|
+
});
|
@@ -21,7 +21,7 @@ SC.addInvokeOnceLastDebuggingInfo = function() {
|
|
21
21
|
|
22
22
|
SC.ObserverSet.add = function(target, method, context, originatingTarget, originatingMethod, originatingStack) {
|
23
23
|
var targetGuid = (target) ? SC.guidFor(target) : "__this__";
|
24
|
-
|
24
|
+
|
25
25
|
// get the set of methods
|
26
26
|
var methods = this[targetGuid] ;
|
27
27
|
if (!methods) {
|
@@ -31,16 +31,16 @@ SC.addInvokeOnceLastDebuggingInfo = function() {
|
|
31
31
|
this.targets++ ;
|
32
32
|
}
|
33
33
|
methods.add(method) ;
|
34
|
-
|
34
|
+
|
35
35
|
// context is really useful sometimes but not used that often so this
|
36
36
|
// implementation is intentionally lazy.
|
37
37
|
if (context !== undefined) {
|
38
|
-
|
39
|
-
|
40
|
-
contexts[SC.guidFor(method)] = context ;
|
38
|
+
if (!methods.contexts) methods.contexts = {} ;
|
39
|
+
methods.contexts[SC.guidFor(method)] = context ;
|
41
40
|
}
|
42
|
-
|
43
|
-
|
41
|
+
|
42
|
+
this._membersCacheIsValid = NO ;
|
43
|
+
|
44
44
|
// THIS IS THE PORTION THAT DIFFERS FROM THE STANDARD IMPLEMENTATION
|
45
45
|
|
46
46
|
// Recording the calling object/function can be a useful debugging tool.
|
@@ -76,11 +76,6 @@ SC.addInvokeOnceLastDebuggingInfo = function() {
|
|
76
76
|
originatingStacks[key] = originatingStack;
|
77
77
|
}
|
78
78
|
}
|
79
|
-
|
80
|
-
// THIS IS THE PORTION THAT DIFFERS FROM THE STANDARD IMPLEMENTATION
|
81
|
-
|
82
|
-
|
83
|
-
this._membersCacheIsValid = NO ;
|
84
79
|
};
|
85
80
|
|
86
81
|
|