beautiful-css 0.1.01 → 0.1.02

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4f2c17dda2a2690317b2ba01c2aae1b931aa324d
4
+ data.tar.gz: a4ab423b17edf9c48701938281053c3c1ad63cc6
5
+ SHA512:
6
+ metadata.gz: d6130432782e1b66fcca8a7b265c58cc88c3dc34063261cf29e5a42f1ed09390b1ea569885df15a566ee4b5d0aaa3d5db11312226354fb713b9b1a472de14861
7
+ data.tar.gz: 7162c57d388823c8fa7fe2f17e3a2e4de3b6bd4395a0e09eaba4056ad98036359a1a2e8714c8134959b1ae44d37678becfda58cabe3dedaf88cc10fe5c14a2dc
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
+ *.gems
2
3
  *.rbc
3
4
  .bundle
4
5
  .config
@@ -9,11 +9,10 @@ module BeautifulCss
9
9
 
10
10
  def cleaner sel
11
11
  sel.to_s.split(' ').map do |part|
12
- if part =~ /^[^\.^#]/
13
- part.downcase
14
- else
15
- part
16
- end
12
+ #only tags are case insensitive
13
+ tag = part.split(/\.|#/)[0]
14
+ to_replace = Regexp.new("^"+ tag)
15
+ part.gsub to_replace, tag.downcase
17
16
  end.join(' ')
18
17
  end
19
18
 
@@ -1,3 +1,3 @@
1
1
  module BeautifulCss
2
- VERSION = "0.1.01"
2
+ VERSION = "0.1.02"
3
3
  end
@@ -223,6 +223,19 @@ CLEAN
223
223
  end
224
224
 
225
225
 
226
+ it 'only tags should be case insinsitive' do
227
+ dirty = <<DIRTY
228
+ A.Test
229
+ { prop: value; }
230
+ DIRTY
231
+ clean = <<CLEAN
232
+ a.Test
233
+ { prop:value }
234
+ CLEAN
235
+ assert_renders dirty, clean
236
+ end
237
+
238
+
226
239
 
227
240
 
228
241
 
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beautiful-css
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.01
5
- prerelease:
4
+ version: 0.1.02
6
5
  platform: ruby
7
6
  authors:
8
7
  - Lex Childs
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-11 00:00:00.000000000 Z
11
+ date: 2013-09-24 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: A tool to help cleanup css
15
14
  email:
@@ -37,27 +36,26 @@ files:
37
36
  - spec/helper.rb
38
37
  homepage: http://beautifulcss.org
39
38
  licenses: []
39
+ metadata: {}
40
40
  post_install_message:
41
41
  rdoc_options: []
42
42
  require_paths:
43
43
  - lib
44
44
  required_ruby_version: !ruby/object:Gem::Requirement
45
- none: false
46
45
  requirements:
47
- - - ! '>='
46
+ - - '>='
48
47
  - !ruby/object:Gem::Version
49
48
  version: '0'
50
49
  required_rubygems_version: !ruby/object:Gem::Requirement
51
- none: false
52
50
  requirements:
53
- - - ! '>='
51
+ - - '>='
54
52
  - !ruby/object:Gem::Version
55
53
  version: '0'
56
54
  requirements: []
57
55
  rubyforge_project:
58
- rubygems_version: 1.8.24
56
+ rubygems_version: 2.0.3
59
57
  signing_key:
60
- specification_version: 3
58
+ specification_version: 4
61
59
  summary: reworks your css to make it simple and mantainable
62
60
  test_files:
63
61
  - spec/beautiful_css_spec.rb