motion-awesome 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzQ3YmU1MzZlZTMxNzhkODJlNDUzYmQzNTQ4N2RiY2M0MzQ1MDhmYw==
4
+ Zjk3MzNkODNkMWIyMTY4ODkwMDk4YWE5NzViM2JkZTViODYxZWEyNw==
5
5
  data.tar.gz: !binary |-
6
- YzM0MzBkNjdmODA0NjA3NzU1MjA1ZGMwMzlmYTQ3YWQzYjQ0MGI1OA==
6
+ OWQxMGM0Mjk1NWViOWRmZTE5ODZlZWU2ZjBlZWY3YmE2MmI4YzVhOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YmU1MDY0NjI4ZGIzOTIwYzEwNTViMGJmNzIwODgyODMzMjljZGYyMDhjOTk2
10
- ZjJmMDY3NTFjZjc2MTMzODlmMmRhMGEzMzM1MWJiYjJjOTkyYjJlNGZlNzdi
11
- YzNmODk2NWY1YjNjMDcxMzg1ZmZkOGUyYTdlM2RhOGUxNzFmYTE=
9
+ ZDYyZjA3ZWRhYTMyZDA4MWFjZGU5NDk1Zjc0MmM5MDY5YTJhOTJjYzg2NmVk
10
+ MWY2NzI2ZDc0OGE5MDhjODRjNjhlODVhNmE5YmI2YzBlMGExNTI4ZDZmZjNm
11
+ MTc1NDg2N2UyNWRlOTQwYTNjZjI1NjA1M2E4YjJkMDFlMzZkYTI=
12
12
  data.tar.gz: !binary |-
13
- MDg1NWY4ZWQ5OGY4ZWQzNTNmYjM0ODRlOTQ5ZjhiOGFjNTE0MzBjNzRhZmQz
14
- MmZhOTE4NGY4ZmJlZTNkNTFiYzBhODhlZWIwYjNkZmQ2ODVhOGU5N2U1YmU2
15
- ODkzNGIwMTY5YjYyYjdkYWY2NDI4OTM3YmVmMmM4M2RmYzg2MjQ=
13
+ ZDk0YTQ2NTFlYmU2ZTE2MjA3ODQzNDNlZjNjZDMwMGVhMjhlMDk0OGE3ZDVh
14
+ MTg2ODFmMjAyMWVlZTdjNmM2N2Q2ZDEzYzliMWRjNWU0ODIwODUxNzZkMGUy
15
+ N2IyZmE2Y2U3Nzc4OWQ5ODE4ZDM0YzBlNjI5ZTdhMTRmZDkyNGI=
data/README.md CHANGED
@@ -123,4 +123,6 @@ MotionAwesome is released under the [MIT](http://opensource.org/licenses/MIT) li
123
123
  + 0.0.2:
124
124
  + Bug fixes and cleanup
125
125
  + 0.0.3:
126
- + Mo' spring cleaning
126
+ + Mo' spring cleaning
127
+ + 0.0.4:
128
+ + Additional clean up
@@ -1,21 +1,21 @@
1
1
  class UILabel
2
2
  attr_accessor :awesome_color
3
3
 
4
- def awesome?
5
- (self.text =~ /\A\W/) != nil
6
- end
4
+ def awesome?; self.text =~ /\A\W/ end
7
5
 
8
6
  def font=( font )
9
7
  super
10
8
  return unless awesome?
11
9
 
12
- attr_text = self.attributedText
13
- if attr_text.length > 1
14
- attr_text.addAttribute( NSFontAttributeName, value: font, range:(2..attr_text.length-1) )
15
- end
10
+ attr_text = self.attributedText
11
+ attr_text.addAttribute( NSFontAttributeName,
12
+ value:font,
13
+ range:(2..attr_text.length-1) ) if attr_text.length > 1
16
14
  attr_text.addAttribute( NSFontAttributeName,
17
15
  value:MotionAwesome.font(font.pointSize),
18
16
  range:(0...1) )
19
- attr_text.addAttribute( NSForegroundColorAttributeName, value:awesome_color, range:(0...1) ) if awesome_color
17
+ attr_text.addAttribute( NSForegroundColorAttributeName,
18
+ value:awesome_color,
19
+ range:(0...1) ) if awesome_color
20
20
  end
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module MotionAwesome
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -10,21 +10,17 @@ module MotionAwesome
10
10
  parser = CssParser::Parser.new
11
11
  parser.load_file!( css )
12
12
  fonts = {}
13
- parser.each_selector do |selector, declarations, specificity|
13
+ parser.each_selector do |selector, declarations, _|
14
14
  next if selector !~ /\A.icon/
15
15
  name = selector[/\.(.*)\:before/,1]
16
16
  next unless name and name != 'icon-large'
17
- hex_val = "0x#{declarations[/(f.*)"/, 1]}"
18
- puts "#{name} : #{hex_val.inspect}"
19
- fonts[name] = hex_val
17
+ fonts[name] = "0x#{declarations[/(f.*)"/, 1]}"
20
18
  end
21
19
  write( fonts )
22
20
  end
23
21
 
24
22
  def self.write( fonts )
25
- File.open( plist, 'w' ) do |f|
26
- f << fonts.to_plist
27
- end
23
+ File.open( plist, 'w' ) { |f| f << fonts.to_plist }
28
24
  end
29
25
  end
30
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-awesome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernand Galiana