cssmin 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/HISTORY.md +23 -0
  2. data/lib/cssmin.rb +6 -3
  3. metadata +26 -34
  4. data/HISTORY +0 -13
@@ -0,0 +1,23 @@
1
+ CSSMin History
2
+ ==============
3
+
4
+ ## 1.0.3 (2013-03-14)
5
+
6
+ * Fixed a bug that broke media queries. [Rob]
7
+
8
+ * Fixed a bug that caused the input string to be modified when modifications
9
+ should only have been made to a copy.
10
+
11
+ ## 1.0.2 (2008-08-23)
12
+
13
+ * Fixed a bug that could have resulted in a necessary space being removed if
14
+ it preceded a compressible color value, such as in the property
15
+ "border:1px solid #cccccc".
16
+
17
+ ## 1.0.1 (2008-07-25)
18
+
19
+ * Fixed a rare bug that could result in redundant semicolons.
20
+
21
+ ## 1.0.0 (2008-03-22)
22
+
23
+ * First release.
@@ -33,7 +33,7 @@
33
33
  # script.
34
34
  #
35
35
  # Author:: Ryan Grove (mailto:ryan@wonko.com)
36
- # Version:: 1.0.2 (2008-08-23)
36
+ # Version:: 1.0.3 (2013-03-14)
37
37
  # Copyright:: Copyright (c) 2008 Ryan Grove. All rights reserved.
38
38
  # License:: New BSD License (http://opensource.org/licenses/bsd-license.php)
39
39
  # Website:: http://github.com/rgrove/cssmin/
@@ -50,7 +50,7 @@ module CSSMin
50
50
  # Reads CSS from +input+ (which can be a String or an IO object) and
51
51
  # returns a String containing minified CSS.
52
52
  def self.minify(input)
53
- css = input.is_a?(IO) ? input.read : input.to_s
53
+ css = input.is_a?(IO) ? input.read : input.dup.to_s
54
54
 
55
55
  # Remove comments.
56
56
  css.gsub!(/\/\*[\s\S]*?\*\//, '')
@@ -101,8 +101,11 @@ module CSSMin
101
101
  # Re-insert box model hacks.
102
102
  css.gsub!('___BMH___', '"\"}\""')
103
103
 
104
+ # Put the space back in for media queries
105
+ css.gsub!(/\band\(/, 'and (')
106
+
104
107
  # Prevent redundant semicolons.
105
- css.gsub!(/;;+/, ';')
108
+ css.gsub!(/;+\}/, '}')
106
109
 
107
110
  css.strip
108
111
  end
metadata CHANGED
@@ -1,55 +1,47 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cssmin
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Ryan Grove
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2008-08-23 00:00:00 -07:00
13
- default_executable:
12
+ date: 2013-03-14 00:00:00.000000000 Z
14
13
  dependencies: []
15
-
16
- description:
14
+ description: Ruby library for minifying CSS. Inspired by cssmin.js and YUI Compressor.
17
15
  email: ryan@wonko.com
18
16
  executables: []
19
-
20
17
  extensions: []
21
-
22
18
  extra_rdoc_files: []
23
-
24
- files:
19
+ files:
25
20
  - lib/cssmin.rb
26
- - HISTORY
21
+ - HISTORY.md
27
22
  - LICENSE
28
- has_rdoc: true
29
- homepage: http://github.com/rgrove/cssmin/
23
+ homepage: https://github.com/rgrove/cssmin/
24
+ licenses: []
30
25
  post_install_message:
31
26
  rdoc_options: []
32
-
33
- require_paths:
27
+ require_paths:
34
28
  - lib
35
- required_ruby_version: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
39
34
  version: 1.8.6
40
- version:
41
- required_rubygems_version: !ruby/object:Gem::Requirement
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
46
- version:
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
47
41
  requirements: []
48
-
49
- rubyforge_project: riposte
50
- rubygems_version: 1.2.0
42
+ rubyforge_project:
43
+ rubygems_version: 1.8.24
51
44
  signing_key:
52
- specification_version: 2
45
+ specification_version: 3
53
46
  summary: Ruby library for minifying CSS.
54
47
  test_files: []
55
-
data/HISTORY DELETED
@@ -1,13 +0,0 @@
1
- CSSMin History
2
- ================================================================================
3
-
4
- Version 1.0.2 (2008-08-23)
5
- * Fixed a bug that could have resulted in a necessary space being removed if
6
- it preceded a compressible color value, such as in the property
7
- "border:1px solid #cccccc".
8
-
9
- Version 1.0.1 (2008-07-25)
10
- * Fixed a rare bug that could result in redundant semicolons.
11
-
12
- Version 1.0.0 (2008-03-22)
13
- * First release.