sass-media_query_combiner 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OWJiYjI2MmE2ZjYzODYwNDZiNjBiZTA1YmUxNTdkZGVmMTAyOWZiNg==
5
+ data.tar.gz: !binary |-
6
+ Y2E3ZTI1YzgyY2IwM2FmZGU0MjRlZGU5MmRmOWEzNjc0YmRkYzU4Mg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MDFmZmNlYWU3M2RiZDY5NWY0YjI3N2MxYzZiNmJjNzVkMGZiYWZhOTMwZmIx
10
+ ZGMwZTBlYTgwYzA2ZGJmMTNiZGRlNTMyODhmNzYyYzZiODA3OTg2MWE4NDNj
11
+ NWQ2N2E4ZjQwM2EwNGRlMzgwOWFlMjUzNDg0ZjBmNzVkNTFmNjY=
12
+ data.tar.gz: !binary |-
13
+ Y2ZlMzNjOGQ0NDQyYjhjY2EzNjgyOTBiNzY4MWY3MmVjNGMzYmE1YzQwZjMw
14
+ YzYwNjI0ZTg3ZjczZjk5MTM5Yzk3ZTAzNjNhMmQzNTA2MmRiZDFkNTNjNDc5
15
+ MWRmNGI0MWZhMTg0ZDFjMTY5ODMxYzg3NjAwYzk5MWYxNDNkMmE=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.5 (2013-11-02)
2
+
3
+ * [Fix hang when using `debug_info: true`](https://github.com/aaronjensen/sass-media_query_combiner/issues/8#issuecomment-27630196)
4
+
1
5
  ## 0.0.4 (2013-10-09)
2
6
 
3
7
  * Internal refactor to allow
@@ -9,6 +9,7 @@ module Sass
9
9
  \n? # Optional newline
10
10
  (?<query> # The media query parameters, this will be $1
11
11
  @media # Start with @media
12
+ (?!\ -sass-debug-info) # Ignore sass-debug-info
12
13
  [^{]+ # One to many characters that are not {, we are guaranteed to have a space
13
14
  )
14
15
  {
@@ -16,12 +17,10 @@ module Sass
16
17
  (?<braces> # Recursive capture group
17
18
  (?:
18
19
  [^{}]* # Anything that is not a brace
19
- )
20
- | # OR
21
- (
20
+ | # OR
22
21
  {\g<braces>} # Recursively capture things within braces, this allows for balanced braces
23
- )
24
- )* # As many of these as we have
22
+ )* # As many of these as we have
23
+ )
25
24
  )
26
25
  }
27
26
  \n? # Optional newline
@@ -1,5 +1,5 @@
1
1
  module Sass
2
2
  module MediaQueryCombiner
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -8,6 +8,17 @@ describe Sass::MediaQueryCombiner::Combiner do
8
8
  @media (min-width: 40em) {
9
9
  @-webkit-keyframes whatever {}
10
10
  }
11
+ CSS
12
+ end
13
+ end
14
+
15
+ it "should handle debug info" do
16
+ Timeout::timeout(0.5) do
17
+ Sass::MediaQueryCombiner::Combiner.combine <<CSS
18
+ @media (max-width: 480px) {
19
+ @media -sass-debug-info {filename{}line{}}
20
+ h1 {
21
+ color: red; } }
11
22
  CSS
12
23
  end
13
24
  end
@@ -2,8 +2,7 @@ require 'spec_helper'
2
2
  require 'sass-media_query_combiner'
3
3
 
4
4
  describe "Combiner" do
5
- it "should work with sass" do
6
- sass = <<SASS
5
+ let(:sass) { <<SASS }
7
6
  h3
8
7
  color: orange
9
8
 
@@ -23,6 +22,7 @@ b
23
22
  color: yellow
24
23
  SASS
25
24
 
25
+ it "should work with sass" do
26
26
  # NOTE: the weird interpolated space in there is required to match.
27
27
  # My editor strips out trailing whitespace, so that's how I get it to stay.
28
28
  Sass::Engine.new(sass).render.should == <<CSS
@@ -42,4 +42,30 @@ b {
42
42
  color: black; } }
43
43
  CSS
44
44
  end
45
+
46
+ it "should work with debug_info: true" do
47
+ Timeout::timeout(1) do
48
+ Sass::Engine.new(sass, debug_info: true).render.should == <<CSS
49
+ @media -sass-debug-info{filename{}line{font-family:\\000031}}
50
+ h3 {
51
+ color: orange; }
52
+ @media -sass-debug-info{filename{}line{font-family:\\0000316}}
53
+ b {
54
+ color: yellow; }
55
+
56
+ @media (max-width: 480px) {
57
+ @media -sass-debug-info{filename{}line{font-family:\\000035}}
58
+ h1 {
59
+ color: red; }#{" "}
60
+ @media -sass-debug-info{filename{}line{font-family:\\0000313}}
61
+ h2 {
62
+ color: blue; } }
63
+
64
+ @media (max-width: 980px) {
65
+ @media -sass-debug-info{filename{}line{font-family:\\000039}}
66
+ h4 {
67
+ color: black; } }
68
+ CSS
69
+ end
70
+ end
45
71
  end
metadata CHANGED
@@ -1,64 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-media_query_combiner
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.4
4
+ version: 0.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Aaron Jensen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-10 00:00:00.000000000 Z
11
+ date: 2013-11-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: sass
16
- type: :runtime
17
14
  requirement: !ruby/object:Gem::Requirement
18
15
  requirements:
19
16
  - - ! '>='
20
17
  - !ruby/object:Gem::Version
21
18
  version: 3.2.0
22
- none: false
23
19
  version_requirements: !ruby/object:Gem::Requirement
24
20
  requirements:
25
21
  - - ! '>='
26
22
  - !ruby/object:Gem::Version
27
23
  version: 3.2.0
28
- none: false
24
+ type: :runtime
29
25
  prerelease: false
26
+ name: sass
30
27
  - !ruby/object:Gem::Dependency
31
- name: rspec
32
- type: :development
33
28
  requirement: !ruby/object:Gem::Requirement
34
29
  requirements:
35
30
  - - ! '>='
36
31
  - !ruby/object:Gem::Version
37
32
  version: '0'
38
- none: false
39
33
  version_requirements: !ruby/object:Gem::Requirement
40
34
  requirements:
41
35
  - - ! '>='
42
36
  - !ruby/object:Gem::Version
43
37
  version: '0'
44
- none: false
38
+ type: :development
45
39
  prerelease: false
40
+ name: rspec
46
41
  - !ruby/object:Gem::Dependency
47
- name: rake
48
- type: :development
49
42
  requirement: !ruby/object:Gem::Requirement
50
43
  requirements:
51
44
  - - ! '>='
52
45
  - !ruby/object:Gem::Version
53
46
  version: '0'
54
- none: false
55
47
  version_requirements: !ruby/object:Gem::Requirement
56
48
  requirements:
57
49
  - - ! '>='
58
50
  - !ruby/object:Gem::Version
59
51
  version: '0'
60
- none: false
52
+ type: :development
61
53
  prerelease: false
54
+ name: rake
62
55
  description: Automatically combine media queries
63
56
  email:
64
57
  - aaronjensen@gmail.com
@@ -81,6 +74,7 @@ files:
81
74
  - spec/spec_helper.rb
82
75
  homepage: ''
83
76
  licenses: []
77
+ metadata: {}
84
78
  post_install_message:
85
79
  rdoc_options: []
86
80
  require_paths:
@@ -90,21 +84,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
84
  - - ! '>='
91
85
  - !ruby/object:Gem::Version
92
86
  version: 1.9.2
93
- none: false
94
87
  required_rubygems_version: !ruby/object:Gem::Requirement
95
88
  requirements:
96
89
  - - ! '>='
97
90
  - !ruby/object:Gem::Version
98
- segments:
99
- - 0
100
- hash: -4377433259710746294
101
91
  version: '0'
102
- none: false
103
92
  requirements: []
104
93
  rubyforge_project:
105
- rubygems_version: 1.8.25
94
+ rubygems_version: 2.0.7
106
95
  signing_key:
107
- specification_version: 3
96
+ specification_version: 4
108
97
  summary: Sass plugin to combine all like media queries
109
98
  test_files:
110
99
  - spec/lib/sass-media_query_combiner/combiner_spec.rb