haml-edge 2.3.164 → 2.3.165
Sign up to get free protection for your applications and to get access to all the features.
- data/EDGE_GEM_VERSION +1 -1
- data/Rakefile +40 -38
- data/VERSION +1 -1
- metadata +2 -2
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.165
|
data/Rakefile
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# ----- Utility Functions -----
|
2
|
+
|
3
|
+
def scope(path)
|
4
|
+
File.join(File.dirname(__FILE__), path)
|
5
|
+
end
|
6
|
+
|
1
7
|
# ----- Benchmarking -----
|
2
8
|
|
3
9
|
desc <<END
|
@@ -20,10 +26,10 @@ require 'rake/testtask'
|
|
20
26
|
|
21
27
|
Rake::TestTask.new do |t|
|
22
28
|
t.libs << 'lib'
|
23
|
-
test_files = FileList['test/**/*_test.rb']
|
24
|
-
test_files.exclude('test/rails/*')
|
25
|
-
test_files.exclude('test/plugins/*')
|
26
|
-
test_files.exclude('test/haml/spec/*')
|
29
|
+
test_files = FileList[scope('test/**/*_test.rb')]
|
30
|
+
test_files.exclude(scope('test/rails/*'))
|
31
|
+
test_files.exclude(scope('test/plugins/*'))
|
32
|
+
test_files.exclude(scope('test/haml/spec/*'))
|
27
33
|
t.test_files = test_files
|
28
34
|
t.verbose = true
|
29
35
|
end
|
@@ -34,7 +40,7 @@ END
|
|
34
40
|
# ----- Packaging -----
|
35
41
|
|
36
42
|
require 'rake/gempackagetask'
|
37
|
-
load
|
43
|
+
load scope('haml.gemspec')
|
38
44
|
|
39
45
|
Rake::GemPackageTask.new(HAML_GEMSPEC) do |pkg|
|
40
46
|
if Rake.application.top_level_tasks.include?('release')
|
@@ -47,32 +53,32 @@ end
|
|
47
53
|
task :revision_file do
|
48
54
|
require 'lib/haml'
|
49
55
|
|
50
|
-
release = Rake.application.top_level_tasks.include?('release') || File.exist?('EDGE_GEM_VERSION')
|
56
|
+
release = Rake.application.top_level_tasks.include?('release') || File.exist?(scope('EDGE_GEM_VERSION'))
|
51
57
|
if Haml.version[:rev] && !release
|
52
|
-
File.open('REVISION', 'w') { |f| f.puts Haml.version[:rev] }
|
58
|
+
File.open(scope('REVISION'), 'w') { |f| f.puts Haml.version[:rev] }
|
53
59
|
elsif release
|
54
|
-
File.open('REVISION', 'w') { |f| f.puts "(release)" }
|
60
|
+
File.open(scope('REVISION'), 'w') { |f| f.puts "(release)" }
|
55
61
|
else
|
56
|
-
File.open('REVISION', 'w') { |f| f.puts "(unknown)" }
|
62
|
+
File.open(scope('REVISION'), 'w') { |f| f.puts "(unknown)" }
|
57
63
|
end
|
58
64
|
end
|
59
65
|
Rake::Task[:package].prerequisites.insert(0, :revision_file)
|
60
66
|
Rake::Task[:package].prerequisites.insert(0, :submodules)
|
61
67
|
|
62
68
|
# We also need to get rid of this file after packaging.
|
63
|
-
at_exit { File.delete('REVISION') rescue nil }
|
69
|
+
at_exit { File.delete(scope('REVISION')) rescue nil }
|
64
70
|
|
65
71
|
desc "Install Haml as a gem."
|
66
72
|
task :install => [:package] do
|
67
73
|
sudo = RUBY_PLATFORM =~ /win32/ ? '' : 'sudo'
|
68
74
|
gem = RUBY_PLATFORM =~ /java/ ? 'jgem' : 'gem'
|
69
|
-
sh %{#{sudo} #{gem} install --no-ri pkg/haml-#{File.read('VERSION').strip}}
|
75
|
+
sh %{#{sudo} #{gem} install --no-ri pkg/haml-#{File.read(scope('VERSION')).strip}}
|
70
76
|
end
|
71
77
|
|
72
78
|
desc "Release a new Haml package to Rubyforge."
|
73
79
|
task :release => [:check_release, :release_elpa, :package] do
|
74
|
-
name = File.read("VERSION_NAME").strip
|
75
|
-
version = File.read("VERSION").strip
|
80
|
+
name = File.read(scope("VERSION_NAME")).strip
|
81
|
+
version = File.read(scope("VERSION")).strip
|
76
82
|
sh %{rubyforge add_release haml haml "#{name} (v#{version})" pkg/haml-#{version}.gem}
|
77
83
|
sh %{rubyforge add_file haml haml "#{name} (v#{version})" pkg/haml-#{version}.tar.gz}
|
78
84
|
sh %{rubyforge add_file haml haml "#{name} (v#{version})" pkg/haml-#{version}.tar.bz2}
|
@@ -84,24 +90,20 @@ end
|
|
84
90
|
task :release_elpa do
|
85
91
|
require 'tlsmail'
|
86
92
|
require 'time'
|
93
|
+
require 'haml'
|
87
94
|
|
88
|
-
version =
|
95
|
+
version = Haml.version[:number]
|
89
96
|
|
90
97
|
haml_unchanged = mode_unchanged?(:haml, version)
|
91
98
|
sass_unchanged = mode_unchanged?(:sass, version)
|
92
99
|
next if haml_unchanged && sass_unchanged
|
93
100
|
raise "haml-mode.el and sass-mode.el are out of sync." if haml_unchanged ^ sass_unchanged
|
94
101
|
|
95
|
-
if sass_unchanged && File.read("extra/sass-mode.el").
|
102
|
+
if sass_unchanged && File.read(scope("extra/sass-mode.el")).
|
96
103
|
include?(";; Package-Requires: ((haml-mode #{sass_unchanged.inspect}))")
|
97
104
|
raise "sass-mode.el doesn't require the same version of haml-mode."
|
98
105
|
end
|
99
106
|
|
100
|
-
rev = File.read('.git/HEAD').strip
|
101
|
-
if rev =~ /^ref: (.*)$/
|
102
|
-
rev = File.read(".git/#{$1}").strip
|
103
|
-
end
|
104
|
-
|
105
107
|
from = `git config user.email`.strip
|
106
108
|
raise "Don't know how to send emails except via Gmail" unless from =~ /@gmail.com$/
|
107
109
|
|
@@ -117,17 +119,17 @@ Date: #{Time.now.rfc2822}
|
|
117
119
|
haml-mode and sass-mode #{version} are packaged and ready to be included in ELPA.
|
118
120
|
They can be downloaded from:
|
119
121
|
|
120
|
-
http://github.com/nex3/haml/raw/#{rev}/extra/haml-mode.el
|
121
|
-
http://github.com/nex3/haml/raw/#{rev}/extra/sass-mode.el
|
122
|
+
http://github.com/nex3/haml/raw/#{Haml.version[:rev]}/extra/haml-mode.el
|
123
|
+
http://github.com/nex3/haml/raw/#{Haml.version[:rev]}/extra/sass-mode.el
|
122
124
|
CONTENT
|
123
125
|
end
|
124
126
|
end
|
125
127
|
|
126
128
|
# Ensures that the version have been updated for a new release.
|
127
129
|
task :check_release do
|
128
|
-
version = File.read("VERSION").strip
|
130
|
+
version = File.read(scope("VERSION")).strip
|
129
131
|
raise "There have been changes since current version (#{version})" if changed_since?(version)
|
130
|
-
raise "VERSION_NAME must not be 'Bleeding Edge'" if File.read("VERSION_NAME") == "Bleeding Edge"
|
132
|
+
raise "VERSION_NAME must not be 'Bleeding Edge'" if File.read(scope("VERSION_NAME")) == "Bleeding Edge"
|
131
133
|
end
|
132
134
|
|
133
135
|
# Reads a password from the command line.
|
@@ -160,7 +162,7 @@ end
|
|
160
162
|
# @param version [String] The version number
|
161
163
|
# @return [String, nil] The version number if the version has changed
|
162
164
|
def mode_unchanged?(mode, version)
|
163
|
-
mode_version = File.read("extra/#{mode}-mode.el").scan(/^;; Version: (.*)$/).first.first
|
165
|
+
mode_version = File.read(scope("extra/#{mode}-mode.el")).scan(/^;; Version: (.*)$/).first.first
|
164
166
|
return false if mode_version == version
|
165
167
|
return mode_version unless changed_since?(mode_version, "extra/#{mode}-mode.el")
|
166
168
|
raise "#{mode}-mode.el version is #{version.inspect}, but it has changed as of #{version.inspect}"
|
@@ -188,13 +190,13 @@ task :release_edge do
|
|
188
190
|
sh %{git merge origin/master}
|
189
191
|
|
190
192
|
# Get the current master branch version
|
191
|
-
version = File.read('VERSION').strip.split('.').map {|n| n.to_i}
|
193
|
+
version = File.read(scope('VERSION')).strip.split('.').map {|n| n.to_i}
|
192
194
|
unless version[1] % 2 == 1 && version[2] == 0
|
193
195
|
raise "#{version.join('.')} is not a development version"
|
194
196
|
end
|
195
197
|
|
196
198
|
# Bump the edge gem version
|
197
|
-
edge_version = File.read('EDGE_GEM_VERSION').strip.split('.').map {|n| n.to_i}
|
199
|
+
edge_version = File.read(scope('EDGE_GEM_VERSION')).strip.split('.').map {|n| n.to_i}
|
198
200
|
if edge_version[0..1] != version[0..1]
|
199
201
|
# A new master branch version was released, reset the edge gem version
|
200
202
|
edge_version[0..1] = version[0..1]
|
@@ -204,12 +206,12 @@ task :release_edge do
|
|
204
206
|
edge_version[2] += 1
|
205
207
|
end
|
206
208
|
edge_version = edge_version.join('.')
|
207
|
-
File.open('EDGE_GEM_VERSION', 'w') {|f| f.puts(edge_version)}
|
209
|
+
File.open(scope('EDGE_GEM_VERSION'), 'w') {|f| f.puts(edge_version)}
|
208
210
|
sh %{git commit -m "Bump edge gem version to #{edge_version}." EDGE_GEM_VERSION}
|
209
211
|
sh %{git push origin edge-gem}
|
210
212
|
|
211
213
|
# Package the edge gem with the proper version
|
212
|
-
File.open('VERSION', 'w') {|f| f.puts(edge_version)}
|
214
|
+
File.open(scope('VERSION'), 'w') {|f| f.puts(edge_version)}
|
213
215
|
sh %{rake package}
|
214
216
|
sh %{git checkout VERSION}
|
215
217
|
|
@@ -236,8 +238,8 @@ begin
|
|
236
238
|
|
237
239
|
namespace :yard do
|
238
240
|
task :sass do
|
239
|
-
require
|
240
|
-
Dir[
|
241
|
+
require scope('lib/sass')
|
242
|
+
Dir[scope("yard/default/**/*.sass")].each do |sass|
|
241
243
|
File.open(sass.gsub(/sass$/, 'css'), 'w') do |f|
|
242
244
|
f.write(Sass::Engine.new(File.read(sass)).render)
|
243
245
|
end
|
@@ -246,15 +248,15 @@ begin
|
|
246
248
|
end
|
247
249
|
|
248
250
|
YARD::Rake::YardocTask.new do |t|
|
249
|
-
t.files = FileList.new('lib/**/*.rb') do |list|
|
251
|
+
t.files = FileList.new(scope('lib/**/*.rb')) do |list|
|
250
252
|
list.exclude('lib/haml/template/*.rb')
|
251
253
|
list.exclude('lib/haml/helpers/action_view_mods.rb')
|
252
254
|
end.to_a
|
253
255
|
t.options << '--incremental' if Rake.application.top_level_tasks.include?('redoc')
|
254
|
-
t.options += FileList.new('yard/*.rb').to_a.map {|f| ['-e', f]}.flatten
|
255
|
-
files = FileList.new('doc-src/*').to_a.sort_by {|s| s.size} + %w[MIT-LICENSE VERSION]
|
256
|
+
t.options += FileList.new(scope('yard/*.rb')).to_a.map {|f| ['-e', f]}.flatten
|
257
|
+
files = FileList.new(scope('doc-src/*')).to_a.sort_by {|s| s.size} + %w[MIT-LICENSE VERSION]
|
256
258
|
t.options << '--files' << files.join(',')
|
257
|
-
t.options << '--template-path' <<
|
259
|
+
t.options << '--template-path' << scope('yard')
|
258
260
|
end
|
259
261
|
Rake::Task['yard'].prerequisites.insert(0, 'yard:sass')
|
260
262
|
Rake::Task['yard'].instance_variable_set('@comment', nil)
|
@@ -296,7 +298,7 @@ begin
|
|
296
298
|
require 'rcov/rcovtask'
|
297
299
|
|
298
300
|
Rcov::RcovTask.new do |t|
|
299
|
-
t.test_files = FileList['test/**/*_test.rb']
|
301
|
+
t.test_files = FileList[scope('test/**/*_test.rb')]
|
300
302
|
t.rcov_opts << '-x' << '"^\/"'
|
301
303
|
if ENV['NON_NATIVE']
|
302
304
|
t.rcov_opts << "--no-rcovrt"
|
@@ -327,12 +329,12 @@ END
|
|
327
329
|
if engine == 'sass'
|
328
330
|
require 'lib/sass'
|
329
331
|
|
330
|
-
file = File.read("
|
332
|
+
file = File.read(scope("test/sass/templates/#{file || 'complex'}.sass"))
|
331
333
|
result = RubyProf.profile { times.times { Sass::Engine.new(file).render } }
|
332
334
|
else
|
333
335
|
require 'lib/haml'
|
334
336
|
|
335
|
-
file = File.read("
|
337
|
+
file = File.read(scope("test/haml/templates/#{file || 'standard'}.haml"))
|
336
338
|
obj = Object.new
|
337
339
|
Haml::Engine.new(file).def_method(obj, :render)
|
338
340
|
result = RubyProf.profile { times.times { obj.render } }
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.165
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-edge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.165
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Weizenbaum
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-02-
|
13
|
+
date: 2010-02-28 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|