sprockets-media_query_combiner 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ ## 0.0.7
2
+
3
+ * Depend on [sass-media_query_combiner](https://github.com/aaronjensen/sass-media_query_combiner)
4
+ so I don't need to make changes in both projects at once.
data/README.md CHANGED
@@ -96,3 +96,7 @@ register_bundle_processor 'text/css', Sprockets::MediaQueryCombiner::Processor
96
96
  3. Commit your changes (`git commit -am 'Added some feature'`)
97
97
  4. Push to the branch (`git push origin my-new-feature`)
98
98
  5. Create new Pull Request
99
+
100
+
101
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/aaronjensen/sprockets-media_query_combiner/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
102
+
@@ -1,4 +1,5 @@
1
1
  require 'tilt'
2
+ require 'sass/media_query_combiner/combiner'
2
3
 
3
4
  module Sprockets
4
5
  module MediaQueryCombiner
@@ -7,18 +8,7 @@ module Sprockets
7
8
  end
8
9
 
9
10
  def evaluate(context, locals, &block)
10
- queries = Hash.new { |hash, key| hash[key] = '' }
11
- pretty = true
12
-
13
- filtered_data = data.gsub(/\n?(?<query>@media[^{]+){(?<body>(?<braces>(?:[^{}]+)|({\g<braces>}))*)}\n?/m) do |match|
14
- queries[$1] << $2
15
- pretty &&= /\n$/m === match
16
- ''
17
- end
18
-
19
- combined = queries.map { |query, body| "#{query}{#{body}}" }.
20
- join(("\n\n" if pretty))
21
- "#{filtered_data}#{"\n" if pretty}#{combined}\n"
11
+ Sass::MediaQueryCombiner::Combiner.combine(data)
22
12
  end
23
13
  end
24
14
  end
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module MediaQueryCombiner
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.required_ruby_version = '>= 1.9.2'
19
19
 
20
20
  gem.add_runtime_dependency "sprockets", "~>2.1"
21
+ gem.add_runtime_dependency "sass-media_query_combiner", "~>0.0.4"
21
22
 
22
23
  gem.add_development_dependency "rspec"
23
24
  gem.add_development_dependency "rake"
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: sprockets-media_query_combiner
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Aaron Jensen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-17 00:00:00.000000000 Z
12
+ date: 2013-10-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets
@@ -27,6 +27,22 @@ dependencies:
27
27
  version: '2.1'
28
28
  none: false
29
29
  prerelease: false
30
+ - !ruby/object:Gem::Dependency
31
+ name: sass-media_query_combiner
32
+ type: :runtime
33
+ requirement: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 0.0.4
38
+ none: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.0.4
44
+ none: false
45
+ prerelease: false
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: rspec
32
48
  type: :development
@@ -67,6 +83,7 @@ extensions: []
67
83
  extra_rdoc_files: []
68
84
  files:
69
85
  - .gitignore
86
+ - CHANGELOG.md
70
87
  - Gemfile
71
88
  - LICENSE
72
89
  - README.md
@@ -97,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
114
  - !ruby/object:Gem::Version
98
115
  segments:
99
116
  - 0
100
- hash: 1280964489433274080
117
+ hash: -17572055084260540
101
118
  version: '0'
102
119
  none: false
103
120
  requirements: []