sproutcore 1.4.2-java → 1.4.3-java
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 +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
|