haml-edge 2.3.181 → 2.3.182

Sign up to get free protection for your applications and to get access to all the features.
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.181
1
+ 2.3.182
data/Rakefile CHANGED
@@ -92,6 +92,7 @@ task :release_elpa do
92
92
  require 'time'
93
93
  require scope('lib/haml')
94
94
 
95
+ next if Haml.version[:prerelease]
95
96
  version = Haml.version[:number]
96
97
 
97
98
  haml_unchanged = mode_unchanged?(:haml, version)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.181
1
+ 2.3.182
data/lib/haml/version.rb CHANGED
@@ -23,11 +23,27 @@ module Haml
23
23
  # :major => 2, :minor => 1, :teeny => 0
24
24
  # }
25
25
  #
26
+ # If a prerelease version of Haml is being used,
27
+ # the `:string` and `:number` fields will reflect the full version
28
+ # (e.g. `"2.2.beta.1"`), and the `:tiny` field will be `-1`.
29
+ # A `:prerelease` key will contain the name of the prerelease (e.g. `"beta"`),
30
+ # and a `:prerelease_number` key will contain the rerelease number.
31
+ # For example:
32
+ #
33
+ # {
34
+ # :string => "3.0.beta.1",
35
+ # :number => "3.0.beta.1",
36
+ # :major => 3, :minor => 0, :tiny => -1,
37
+ # :prerelease => "beta",
38
+ # :prerelease_number => 1
39
+ # }
40
+ #
26
41
  # @return [{Symbol => String/Fixnum}] The version hash
27
42
  def version
28
43
  return @@version if defined?(@@version)
29
44
 
30
- numbers = File.read(scope('VERSION')).strip.split('.').map { |n| n.to_i }
45
+ numbers = File.read(scope('VERSION')).strip.split('.').
46
+ map {|n| n =~ /^[0-9]+$/ ? n.to_i : n}
31
47
  name = File.read(scope('VERSION_NAME')).strip
32
48
  @@version = {
33
49
  :major => numbers[0],
@@ -35,7 +51,14 @@ module Haml
35
51
  :teeny => numbers[2],
36
52
  :name => name
37
53
  }
38
- @@version[:number] = [:major, :minor, :teeny].map { |comp| @@version[comp] }.compact.join('.')
54
+
55
+ if numbers[3].is_a?(String)
56
+ @@version[:teeny] = -1
57
+ @@version[:prerelease] = numbers[3]
58
+ @@version[:prerelease_number] = numbers[4]
59
+ end
60
+
61
+ @@version[:number] = numbers.join('.')
39
62
  @@version[:string] = @@version[:number].dup
40
63
 
41
64
  if rev = revision_number
@@ -248,6 +248,7 @@ RUBY
248
248
 
249
249
  if tok.type == :single_eq
250
250
  val.context = :equals
251
+ val.options = @options
251
252
  Script.equals_warning("mixin argument defaults", "$#{c.value}",
252
253
  val.to_sass, false, line, offset, @options[:filename])
253
254
  end
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.181
4
+ version: 2.3.182
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum