under-os 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +25 -2
  4. data/README.md +1 -1
  5. data/Rakefile +2 -4
  6. data/lib/under-os.rb +3 -8
  7. data/under-os.gemspec +6 -2
  8. metadata +47 -191
  9. data/lib/assets/fontawesome-webfont.ttf +0 -0
  10. data/lib/assets/under-os.css +0 -115
  11. data/lib/under_os.rb +0 -41
  12. data/lib/under_os/app.rb +0 -33
  13. data/lib/under_os/color.rb +0 -184
  14. data/lib/under_os/config.rb +0 -33
  15. data/lib/under_os/core/array.rb +0 -5
  16. data/lib/under_os/core/hash.rb +0 -10
  17. data/lib/under_os/core/json.rb +0 -19
  18. data/lib/under_os/core/kernel.rb +0 -16
  19. data/lib/under_os/core/numeric.rb +0 -23
  20. data/lib/under_os/core/object.rb +0 -9
  21. data/lib/under_os/core/string.rb +0 -80
  22. data/lib/under_os/delegate.rb +0 -10
  23. data/lib/under_os/events.rb +0 -85
  24. data/lib/under_os/file.rb +0 -110
  25. data/lib/under_os/history.rb +0 -53
  26. data/lib/under_os/http.rb +0 -31
  27. data/lib/under_os/http/cookies.rb +0 -30
  28. data/lib/under_os/http/receiver.rb +0 -44
  29. data/lib/under_os/http/request.rb +0 -106
  30. data/lib/under_os/http/response.rb +0 -28
  31. data/lib/under_os/http/session.rb +0 -49
  32. data/lib/under_os/page.rb +0 -169
  33. data/lib/under_os/page/builder.rb +0 -96
  34. data/lib/under_os/page/layout.rb +0 -43
  35. data/lib/under_os/page/matcher.rb +0 -128
  36. data/lib/under_os/page/stylesheet.rb +0 -67
  37. data/lib/under_os/parser.rb +0 -24
  38. data/lib/under_os/parser/css.rb +0 -37
  39. data/lib/under_os/parser/html.rb +0 -97
  40. data/lib/under_os/point.rb +0 -47
  41. data/lib/under_os/screen.rb +0 -9
  42. data/lib/under_os/timer.rb +0 -65
  43. data/lib/under_os/ui.rb +0 -3
  44. data/lib/under_os/ui/alert.rb +0 -52
  45. data/lib/under_os/ui/button.rb +0 -42
  46. data/lib/under_os/ui/collection.rb +0 -65
  47. data/lib/under_os/ui/collection/cell.rb +0 -21
  48. data/lib/under_os/ui/collection/delegate.rb +0 -70
  49. data/lib/under_os/ui/collection/item.rb +0 -32
  50. data/lib/under_os/ui/collection/layout.rb +0 -43
  51. data/lib/under_os/ui/collection/styles.rb +0 -15
  52. data/lib/under_os/ui/div.rb +0 -3
  53. data/lib/under_os/ui/form.rb +0 -60
  54. data/lib/under_os/ui/icon.rb +0 -61
  55. data/lib/under_os/ui/icon/awesome.rb +0 -376
  56. data/lib/under_os/ui/icon/engine.rb +0 -10
  57. data/lib/under_os/ui/image.rb +0 -31
  58. data/lib/under_os/ui/input.rb +0 -140
  59. data/lib/under_os/ui/label.rb +0 -21
  60. data/lib/under_os/ui/locker.rb +0 -42
  61. data/lib/under_os/ui/navbar.rb +0 -123
  62. data/lib/under_os/ui/progress.rb +0 -17
  63. data/lib/under_os/ui/scroll.rb +0 -41
  64. data/lib/under_os/ui/select.rb +0 -95
  65. data/lib/under_os/ui/sidebar.rb +0 -45
  66. data/lib/under_os/ui/slider.rb +0 -37
  67. data/lib/under_os/ui/spinner.rb +0 -23
  68. data/lib/under_os/ui/style.rb +0 -21
  69. data/lib/under_os/ui/style/fonts.rb +0 -54
  70. data/lib/under_os/ui/style/margins.rb +0 -164
  71. data/lib/under_os/ui/style/outlining.rb +0 -170
  72. data/lib/under_os/ui/style/positioning.rb +0 -169
  73. data/lib/under_os/ui/switch.rb +0 -26
  74. data/lib/under_os/ui/textarea.rb +0 -19
  75. data/lib/under_os/ui/utils/animation.rb +0 -99
  76. data/lib/under_os/ui/utils/commons.rb +0 -70
  77. data/lib/under_os/ui/utils/dimensions.rb +0 -37
  78. data/lib/under_os/ui/utils/events.rb +0 -170
  79. data/lib/under_os/ui/utils/manipulation.rb +0 -44
  80. data/lib/under_os/ui/utils/position.rb +0 -21
  81. data/lib/under_os/ui/utils/size.rb +0 -21
  82. data/lib/under_os/ui/utils/styles.rb +0 -89
  83. data/lib/under_os/ui/utils/traversing.rb +0 -44
  84. data/lib/under_os/ui/utils/wrap.rb +0 -77
  85. data/lib/under_os/ui/view.rb +0 -31
  86. data/resources/test.png +0 -0
  87. data/spec/assets/app.css +0 -13
  88. data/spec/assets/test.css +0 -7
  89. data/spec/assets/test.html +0 -3
  90. data/spec/assets/test_page.rb +0 -2
  91. data/spec/lib/core/hash_spec.rb +0 -19
  92. data/spec/lib/core/json_spec.rb +0 -32
  93. data/spec/lib/core/numeric_spec.rb +0 -37
  94. data/spec/lib/core/string_spec.rb +0 -121
  95. data/spec/lib/under_os/color_spec.rb +0 -133
  96. data/spec/lib/under_os/events_spec.rb +0 -71
  97. data/spec/lib/under_os/file_spec.rb +0 -98
  98. data/spec/lib/under_os/http/cookies_spec.rb +0 -13
  99. data/spec/lib/under_os/http/request_spec.rb +0 -44
  100. data/spec/lib/under_os/http_spec.rb +0 -20
  101. data/spec/lib/under_os/page/builder_spec.rb +0 -128
  102. data/spec/lib/under_os/page/layout_spec.rb +0 -18
  103. data/spec/lib/under_os/page/matcher_spec.rb +0 -260
  104. data/spec/lib/under_os/page/stylesheet_spec.rb +0 -83
  105. data/spec/lib/under_os/page_spec.rb +0 -5
  106. data/spec/lib/under_os/parser/css_spec.rb +0 -77
  107. data/spec/lib/under_os/parser/html_spec.rb +0 -152
  108. data/spec/lib/under_os/parser_spec.rb +0 -16
  109. data/spec/lib/under_os/point_spec.rb +0 -54
  110. data/spec/lib/under_os/screen_spec.rb +0 -11
  111. data/spec/lib/under_os/timer_spec.rb +0 -93
  112. data/spec/lib/under_os/ui/button_spec.rb +0 -50
  113. data/spec/lib/under_os/ui/collection_spec.rb +0 -19
  114. data/spec/lib/under_os/ui/div_spec.rb +0 -24
  115. data/spec/lib/under_os/ui/form_spec.rb +0 -156
  116. data/spec/lib/under_os/ui/icon_spec.rb +0 -57
  117. data/spec/lib/under_os/ui/image_spec.rb +0 -39
  118. data/spec/lib/under_os/ui/input_spec.rb +0 -109
  119. data/spec/lib/under_os/ui/label_spec.rb +0 -22
  120. data/spec/lib/under_os/ui/locker_spec.rb +0 -31
  121. data/spec/lib/under_os/ui/progress_spec.rb +0 -31
  122. data/spec/lib/under_os/ui/scroll_spec.rb +0 -40
  123. data/spec/lib/under_os/ui/select_spec.rb +0 -135
  124. data/spec/lib/under_os/ui/sidebar_spec.rb +0 -35
  125. data/spec/lib/under_os/ui/slider_spec.rb +0 -69
  126. data/spec/lib/under_os/ui/spinner_spec.rb +0 -57
  127. data/spec/lib/under_os/ui/style/fonts_spec.rb +0 -73
  128. data/spec/lib/under_os/ui/style/margins_spec.rb +0 -106
  129. data/spec/lib/under_os/ui/style/outlining_spec.rb +0 -101
  130. data/spec/lib/under_os/ui/style/positioning_spec.rb +0 -69
  131. data/spec/lib/under_os/ui/style_spec.rb +0 -19
  132. data/spec/lib/under_os/ui/switch_spec.rb +0 -60
  133. data/spec/lib/under_os/ui/textarea_spec.rb +0 -34
  134. data/spec/lib/under_os/ui/utils/commons_spec.rb +0 -81
  135. data/spec/lib/under_os/ui/utils/events_spec.rb +0 -87
  136. data/spec/lib/under_os/ui/utils/manipulation_spec.rb +0 -130
  137. data/spec/lib/under_os/ui/utils/styles_spec.rb +0 -140
  138. data/spec/lib/under_os/ui/utils/traversing_spec.rb +0 -124
  139. data/spec/lib/under_os/ui/utils/wrap_spec.rb +0 -69
  140. data/spec/lib/under_os/ui/view_spec.rb +0 -39
@@ -1,65 +0,0 @@
1
- class UnderOs::UI::Collection < UnderOs::UI::View
2
- wraps UICollectionView, tag: :collection
3
-
4
- def initialize(options={})
5
- super
6
-
7
- self.layout = Layout.new if ! options[:layout]
8
- self.layout = options.delete(:layout) if options[:layout].is_a?(Class)
9
- self.layout = options.delete(:layout).constantize if options[:layout].is_a?(String)
10
-
11
- @_.delegate = @_.dataSource = Delegate.new(self)
12
- @_.registerClass(Cell, forCellWithReuseIdentifier:'UOSCollectionCell')
13
- end
14
-
15
- def on(*args, &block)
16
- super *args do |event|
17
- params = [event.item, event.index, event.section]
18
- params = params.slice(0, block.arity) if block.arity > -1
19
-
20
- block.call *params
21
- end
22
- end
23
-
24
- def layout
25
- @layout
26
- end
27
-
28
- def layout=(layout)
29
- layout = Layout.new(layout) if layout.is_a?(UICollectionViewLayout)
30
- @_.collectionViewLayout = (@layout = layout)._
31
- end
32
-
33
- def item_class
34
- Cell.classes[self]
35
- end
36
-
37
- def item_class=(klass)
38
- Cell.classes[self] = klass
39
- end
40
-
41
- def reload
42
- @_.reloadData
43
- self
44
- end
45
-
46
- def number_of_items(section=0)
47
- (@number_of_items || [0])[section]
48
- end
49
-
50
- def number_of_items=(value)
51
- @number_of_items = value.is_a?(Numeric) ? [value] : value
52
- reload
53
- end
54
-
55
- def number_of_sections
56
- (@number_of_items || [0]).size
57
- end
58
-
59
- def repaint(stylesheet=nil)
60
- stylesheet ||= page && page.stylesheet
61
-
62
- self.style = stylesheet.styles_for(self) if stylesheet
63
- Styles.build(self, stylesheet) if stylesheet
64
- end
65
- end
@@ -1,21 +0,0 @@
1
- #
2
- # This is a bridge to the iOS native functionality
3
- # please do not use it in your code
4
- #
5
- class UnderOs::UI::Collection::Cell < UICollectionViewCell
6
-
7
- def self.classes
8
- @classes ||= {}
9
- end
10
-
11
- def uos_view_for(collection)
12
- @uos_view ||= self.class.classes[collection].for(collection).tap do |view|
13
- contentView.addSubview(view._)
14
- end
15
- end
16
-
17
- def prepareForReuse
18
- super
19
- @uos_view.cleanup if @uos_view
20
- end
21
- end
@@ -1,70 +0,0 @@
1
- #
2
- # The iOS level events receiver, not for a public use
3
- #
4
- class UnderOs::UI::Collection::Delegate < UIViewController
5
-
6
- def self.new(collection)
7
- alloc.tap do |instance|
8
- instance.instance_eval do
9
- @collection = collection
10
- end
11
- end
12
- end
13
-
14
- ################################################################
15
- # DataSource API
16
- ################################################################
17
-
18
- def numberOfSectionsInCollectionView(collection)
19
- @collection.number_of_sections
20
- end
21
-
22
- def collectionView(collection, numberOfItemsInSection: section)
23
- @collection.number_of_items(section)
24
- end
25
-
26
- def collectionView(collection, cellForItemAtIndexPath: indexPath)
27
- collection.dequeueReusableCellWithReuseIdentifier('UOSCollectionCell', forIndexPath:indexPath).tap do |item|
28
- @collection.emit(:item, item: item.uos_view_for(@collection), index: indexPath.row, section: indexPath.section)
29
- end
30
- end
31
-
32
- # def collectionView(collection, viewForSupplementaryElementOfKind: kind, atIndexPath: indexPath)
33
- # # kind is a string
34
- # UICollectionReusableView.alloc.init
35
- # UICollectionReusableView * reusableview = nil ;
36
-
37
- # if ( kind == UICollectionElementKindSectionHeader ) {
38
- # RecipeCollectionHeaderView * headerView = [ collectionView dequeueReusableSupplementaryViewOfKind : UICollectionElementKindSectionHeader withReuseIdentifier : @ "HeaderView" forIndexPath : indexPath ] ;
39
- # NSString * title = [ [ NSString alloc ] initWithFormat : @ "Recipe Group #%i" , indexPath.section + 1 ] ;
40
- # headerView.title.text = title;
41
- # UIImage * headerImage = [ UIImage imageNamed : @ "header_banner.png" ] ;
42
- # headerView.backgroundImage.image = headerImage;
43
-
44
- # reusableview = headerView;
45
- # }
46
-
47
- # if ( kind == UICollectionElementKindSectionFooter ) {
48
- # UICollectionReusableView * footerview = [ collectionView dequeueReusableSupplementaryViewOfKind : UICollectionElementKindSectionFooter withReuseIdentifier : @ "FooterView" forIndexPath : indexPath ] ;
49
-
50
- # reusableview = footerview;
51
- # }
52
-
53
- # return reusableview;
54
- # end
55
-
56
-
57
- ################################################################
58
- # DataSource API
59
- ################################################################
60
-
61
- def collectionView(collection, didSelectItemAtIndexPath: indexPath)
62
- item = collection.cellForItemAtIndexPath(indexPath).uos_view_for(@collection)
63
- @collection.emit(:select, item: item, index: indexPath.row, section: indexPath.section)
64
- end
65
-
66
- def collectionView(collection, didDeselectItemAtIndexPath: indexPath)
67
- item = collection.cellForItemAtIndexPath(indexPath).uos_view_for(@collection)
68
- @collection.emit(:unselect, item: item, index: indexPath.row, section: indexPath.section)
69
- end
70
- end
@@ -1,32 +0,0 @@
1
- #
2
- # This is the collection item class that you supposed
3
- # to inherit (well, if you need to)
4
- #
5
- class UnderOs::UI::Collection::Item < UnderOs::UI::View
6
-
7
- tag :item
8
-
9
- def self.build(collection, &builder)
10
- @builders ||= {}
11
- @builders[collection] = builder
12
- collection.item_class = self
13
- end
14
-
15
- def self.for(collection, stylesheet=nil)
16
- new.tap do |view|
17
- def view.parent; @_parent; end
18
- view.instance_variable_set('@_parent', collection)
19
-
20
- @builders[collection] && @builders[collection].call.each do |child|
21
- view.insert child
22
- end
23
-
24
- view.repaint(stylesheet || UnderOs::App.history.current_page.stylesheet)
25
- end
26
- end
27
-
28
- def cleanup
29
- # implement me if you need to clean cells between reuse
30
- end
31
-
32
- end
@@ -1,43 +0,0 @@
1
- #
2
- # The basic, grid (flow) layout. inheritable.
3
- #
4
- class Layout
5
- attr_reader :_
6
-
7
- def initialize(layout=nil)
8
- @_ = layout || UICollectionViewFlowLayout.alloc.init
9
-
10
- self.items_spacing = 0
11
- self.rows_spacing = 1
12
- end
13
-
14
- def item_size
15
- end
16
-
17
- def item_size=(*size)
18
- size = UnderOs::Point.new(*size)
19
- @_.itemSize = CGSizeMake(size.x, size.y)
20
- end
21
-
22
- def items_spacing
23
- @_.minimumInteritemSpacing
24
- end
25
-
26
- def items_spacing=(value)
27
- @_.minimumInteritemSpacing = value
28
- end
29
-
30
- def rows_spacing
31
- @_.minimumLineSpacing
32
- end
33
-
34
- def rows_spacing=(value)
35
- @_.minimumLineSpacing = value
36
- end
37
-
38
- def section_inset
39
- end
40
-
41
- def section_inset=(value)
42
- end
43
- end
@@ -1,15 +0,0 @@
1
- #
2
- # This thing catches styles from the collection element
3
- # and adjusts the layout settings for them
4
- #
5
- class UnderOs::UI::Collection::Styles
6
- def self.build(collection, stylesheet)
7
- item = UnderOs::UI::Collection::Item.for(collection, stylesheet)
8
-
9
- collection.layout.item_size = item.size
10
- collection.layout.items_spacing = item.style.marginLeft + item.style.marginRight
11
- collection.layout.rows_spacing = item.style.marginTop + item.style.marginBottom
12
-
13
- # TODO header/footer
14
- end
15
- end
@@ -1,3 +0,0 @@
1
- class UnderOs::UI::Div < UnderOs::UI::View
2
- tag :div
3
- end
@@ -1,60 +0,0 @@
1
- class UnderOs::UI::Form < UnderOs::UI::View
2
- tag :form
3
-
4
- def elements
5
- find('*').select do |view|
6
- view.is_a?(UnderOs::UI::Input) || view._.is_a?(UIButton)
7
- end
8
- end
9
-
10
- def inputs
11
- find('*').select do |view|
12
- view.is_a?(UnderOs::UI::Input)
13
- end
14
- end
15
-
16
- def values
17
- {}.tap do |values|
18
- inputs.each do |input|
19
- next if input.disabled || ! input.name || (input.is_a?(UnderOs::UI::Switch) && !input.checked)
20
-
21
- hash = values; key = nil
22
- keys = input.name.scan(/[^\[]+/)
23
-
24
- # getting throught the smth[smth][smth][] in the name
25
- while keys.size > 1
26
- key = keys.shift
27
- key = key.slice(0, key.size-1) if key.ends_with?(']')
28
-
29
- hash[key] = keys[0] == ']' ? [] : {} if ! hash[key]
30
- hash = hash[key]
31
- end
32
-
33
- key = keys.shift
34
- key = key.slice(0, key.size-1) if key.ends_with?(']')
35
-
36
- if hash.is_a?(Array)
37
- hash << input.value
38
- else
39
- hash[key] = input.value
40
- end
41
- end
42
- end
43
- end
44
-
45
- def disable
46
- elements.each(&:disable)
47
- self
48
- end
49
-
50
- def enable
51
- elements.each(&:enable)
52
- self
53
- end
54
-
55
- def focus
56
- if input = inputs.first
57
- input.focus
58
- end
59
- end
60
- end
@@ -1,61 +0,0 @@
1
- class UnderOs::UI::Icon < UnderOs::UI::View
2
- include UnderOs::UI::IconEngine
3
-
4
- wraps UIButton, tag: 'icon'
5
- engine :Awesome
6
-
7
- def initialize(options)
8
- options = {type: options} if ! options.is_a?(Hash)
9
-
10
- super(options)
11
-
12
- self.type = options.delete(:type) || :bug
13
- self.size = options.delete(:size) || 20
14
- self.disable if options[:disabled]
15
-
16
- @_.sizeToFit
17
- @_.showsTouchWhenHighlighted = true
18
- end
19
-
20
- def type
21
- @type
22
- end
23
-
24
- def type=(type)
25
- @type = type
26
- @_.setTitle self.class.engine.text(type), forState:UIControlStateNormal
27
- end
28
-
29
- def size(size=nil)
30
- if size
31
- self.size = size
32
- self
33
- else
34
- @size
35
- end
36
- end
37
-
38
- def size=(size)
39
- @size = size
40
- @_.setFont self.class.engine.font(size)
41
- @_.sizeToFit
42
- end
43
-
44
- def disabled
45
- ! @_.isEnabled
46
- end
47
-
48
- alias :disabled? :disabled
49
-
50
- def disabled=(value)
51
- @_.enabled = ! value
52
- end
53
-
54
- def disable
55
- self.disabled = true
56
- end
57
-
58
- def enable
59
- self.disabled = false
60
- end
61
- end
@@ -1,376 +0,0 @@
1
- class UnderOs::UI::IconEngineAwesome
2
- NAMES_MAP = {
3
- 'glass' => 0xF000,
4
- 'music' => 0xF001,
5
- 'search' => 0xF002,
6
- 'envelope-alt' => 0xF003,
7
- 'heart' => 0xF004,
8
- 'star' => 0xF005,
9
- 'star-empty' => 0xF006,
10
- 'user' => 0xF007,
11
- 'film' => 0xF008,
12
- 'th-large' => 0xF009,
13
- 'th' => 0xF00A,
14
- 'th-list' => 0xF00B,
15
- 'ok' => 0xF00C,
16
- 'cancel' => 0xF00D,
17
- 'remove' => 0xF00D,
18
- 'zoom-in' => 0xF00E,
19
- 'zoom-out' => 0xF010,
20
- 'off' => 0xF011,
21
- 'signal' => 0xF012,
22
- 'cog' => 0xF013,
23
- 'trash' => 0xF014,
24
- 'home' => 0xF015,
25
- 'file-alt' => 0xF016,
26
- 'time' => 0xF017,
27
- 'road' => 0xF018,
28
- 'download-alt' => 0xF019,
29
- 'download' => 0xF01A,
30
- 'upload' => 0xF01B,
31
- 'inbox' => 0xF01C,
32
- 'play-circle' => 0xF01D,
33
- 'repeat' => 0xF01E,
34
- 'refresh' => 0xF021,
35
- 'list-alt' => 0xF022,
36
- 'lock' => 0xF023,
37
- 'flag' => 0xF024,
38
- 'headphones' => 0xF025,
39
- 'volume-off' => 0xF026,
40
- 'volume-down' => 0xF027,
41
- 'volume-up' => 0xF028,
42
- 'qrcode' => 0xF029,
43
- 'barcode' => 0xF02A,
44
- 'tag' => 0xF02B,
45
- 'tags' => 0xF02C,
46
- 'book' => 0xF02D,
47
- 'bookmark' => 0xF02E,
48
- 'print' => 0xF02F,
49
- 'camera' => 0xF030,
50
- 'font' => 0xF031,
51
- 'bold' => 0xF032,
52
- 'italic' => 0xF033,
53
- 'text-height' => 0xF034,
54
- 'text-width' => 0xF035,
55
- 'align-left' => 0xF036,
56
- 'align-center' => 0xF037,
57
- 'align-right' => 0xF038,
58
- 'align-justify' => 0xF039,
59
- 'list' => 0xF03A,
60
- 'indent-left' => 0xF03B,
61
- 'indent-right' => 0xF03C,
62
- 'facetime-video' => 0xF03D,
63
- 'picture' => 0xF03E,
64
- 'pencil' => 0xF040,
65
- 'map-marker' => 0xF041,
66
- 'adjust' => 0xF042,
67
- 'tint' => 0xF043,
68
- 'edit' => 0xF044,
69
- 'share' => 0xF045,
70
- 'check' => 0xF046,
71
- 'move' => 0xF047,
72
- 'step-backward' => 0xF048,
73
- 'fast-backward' => 0xF049,
74
- 'backward' => 0xF04A,
75
- 'play' => 0xF04B,
76
- 'pause' => 0xF04C,
77
- 'stop' => 0xF04D,
78
- 'forward' => 0xF04E,
79
- 'fast-forward' => 0xF050,
80
- 'step-forward' => 0xF051,
81
- 'eject' => 0xF052,
82
- 'chevron-left' => 0xF053,
83
- 'chevron-right' => 0xF054,
84
- 'plus-sign' => 0xF055,
85
- 'minus-sign' => 0xF056,
86
- 'remove-sign' => 0xF057,
87
- 'ok-sign' => 0xF058,
88
- 'question-sign' => 0xF059,
89
- 'info-sign' => 0xF05A,
90
- 'screenshot' => 0xF05B,
91
- 'remove-circle' => 0xF05C,
92
- 'ok-circle' => 0xF05D,
93
- 'ban-circle' => 0xF05E,
94
- 'arrow-left' => 0xF060,
95
- 'arrow-right' => 0xF061,
96
- 'arrow-up' => 0xF062,
97
- 'arrow-down' => 0xF063,
98
- 'share-alt' => 0xF064,
99
- 'resize-full' => 0xF065,
100
- 'resize-small' => 0xF066,
101
- 'plus' => 0xF067,
102
- 'minus' => 0xF068,
103
- 'asterisk' => 0xF069,
104
- 'exclamation-sign' => 0xF06A,
105
- 'gift' => 0xF06B,
106
- 'leaf' => 0xF06C,
107
- 'fire' => 0xF06D,
108
- 'eye-open' => 0xF06E,
109
- 'eye-close' => 0xF070,
110
- 'warning-sign' => 0xF071,
111
- 'plane' => 0xF072,
112
- 'calendar' => 0xF073,
113
- 'random' => 0xF074,
114
- 'comment' => 0xF075,
115
- 'magnet' => 0xF076,
116
- 'chevron-up' => 0xF077,
117
- 'chevron-down' => 0xF078,
118
- 'retweet' => 0xF079,
119
- 'shopping-cart' => 0xF07A,
120
- 'folder-close' => 0xF07B,
121
- 'folder-open' => 0xF07C,
122
- 'resize-vertical' => 0xF07D,
123
- 'resize-horizontal' => 0xF07E,
124
- 'bar-chart' => 0xF080,
125
- 'twitter-sign' => 0xF081,
126
- 'facebook-sign' => 0xF082,
127
- 'camera-retro' => 0xF083,
128
- 'key' => 0xF084,
129
- 'cogs' => 0xF085,
130
- 'comments' => 0xF086,
131
- 'thumbs-up-alt' => 0xF087,
132
- 'thumbs-down-alt' => 0xF088,
133
- 'star-half' => 0xF089,
134
- 'heart-empty' => 0xF08A,
135
- 'signout' => 0xF08B,
136
- 'linkedin-sign' => 0xF08C,
137
- 'pushpin' => 0xF08D,
138
- 'external-link' => 0xF08E,
139
- 'signin' => 0xF090,
140
- 'trophy' => 0xF091,
141
- 'github-sign' => 0xF092,
142
- 'upload-alt' => 0xF093,
143
- 'lemon' => 0xF094,
144
- 'phone' => 0xF095,
145
- 'check-empty' => 0xF096,
146
- 'bookmark-empty' => 0xF097,
147
- 'phone-sign' => 0xF098,
148
- 'twitter' => 0xF099,
149
- 'facebook' => 0xF09A,
150
- 'github' => 0xF09B,
151
- 'unlock' => 0xF09C,
152
- 'credit-card' => 0xF09D,
153
- 'rss' => 0xF09E,
154
- 'hdd' => 0xF0A0,
155
- 'bullhorn' => 0xF0A1,
156
- 'bell' => 0xF0A2,
157
- 'certificate' => 0xF0A3,
158
- 'hand-right' => 0xF0A4,
159
- 'hand-left' => 0xF0A5,
160
- 'hand-up' => 0xF0A6,
161
- 'hand-down' => 0xF0A7,
162
- 'circle-arrow-left' => 0xF0A8,
163
- 'circle-arrow-right' => 0xF0A9,
164
- 'circle-arrow-up' => 0xF0AA,
165
- 'circle-arrow-down' => 0xF0AB,
166
- 'globe' => 0xF0AC,
167
- 'wrench' => 0xF0AD,
168
- 'tasks' => 0xF0AE,
169
- 'filter' => 0xF0B0,
170
- 'briefcase' => 0xF0B1,
171
- 'fullscreen' => 0xF0B2,
172
- 'group' => 0xF0C0,
173
- 'link' => 0xF0C1,
174
- 'cloud' => 0xF0C2,
175
- 'beaker' => 0xF0C3,
176
- 'cut' => 0xF0C4,
177
- 'copy' => 0xF0C5,
178
- 'paper-clip' => 0xF0C6,
179
- 'save' => 0xF0C7,
180
- 'sign-blank' => 0xF0C8,
181
- 'reorder' => 0xF0C9,
182
- 'list-ul' => 0xF0CA,
183
- 'list-ol' => 0xF0CB,
184
- 'strikethrough' => 0xF0CC,
185
- 'underline' => 0xF0CD,
186
- 'table' => 0xF0CE,
187
- 'magic' => 0xF0D0,
188
- 'truck' => 0xF0D1,
189
- 'pinterest' => 0xF0D2,
190
- 'pinterest-sign' => 0xF0D3,
191
- 'google-plus-sign' => 0xF0D4,
192
- 'google-plus' => 0xF0D5,
193
- 'money' => 0xF0D6,
194
- 'caret-down' => 0xF0D7,
195
- 'caret-up' => 0xF0D8,
196
- 'caret-left' => 0xF0D9,
197
- 'caret-right' => 0xF0DA,
198
- 'columns' => 0xF0DB,
199
- 'sort' => 0xF0DC,
200
- 'sort-down' => 0xF0DD,
201
- 'sort-up' => 0xF0DE,
202
- 'envelope' => 0xF0E0,
203
- 'linkedin' => 0xF0E1,
204
- 'undo' => 0xF0E2,
205
- 'legal' => 0xF0E3,
206
- 'dashboard' => 0xF0E4,
207
- 'comment-alt' => 0xF0E5,
208
- 'comments-alt' => 0xF0E6,
209
- 'bolt' => 0xF0E7,
210
- 'sitemap' => 0xF0E8,
211
- 'umbrella' => 0xF0E9,
212
- 'paste' => 0xF0EA,
213
- 'lightbulb' => 0xF0EB,
214
- 'exchange' => 0xF0EC,
215
- 'cloud-download' => 0xF0ED,
216
- 'cloud-upload' => 0xF0EE,
217
- 'user-md' => 0xF0F0,
218
- 'stethoscope' => 0xF0F1,
219
- 'suitcase' => 0xF0F2,
220
- 'bell-alt' => 0xF0F3,
221
- 'coffee' => 0xF0F4,
222
- 'food' => 0xF0F5,
223
- 'file-text-alt' => 0xF0F6,
224
- 'building' => 0xF0F7,
225
- 'hospital' => 0xF0F8,
226
- 'ambulance' => 0xF0F9,
227
- 'medkit' => 0xF0FA,
228
- 'fighter-jet' => 0xF0FB,
229
- 'beer' => 0xF0FC,
230
- 'h-sign' => 0xF0FD,
231
- 'plus-sign-alt' => 0xF0FE,
232
- 'double-angle-left' => 0xF100,
233
- 'double-angle-right' => 0xF101,
234
- 'double-angle-up' => 0xF102,
235
- 'double-angle-down' => 0xF103,
236
- 'angle-left' => 0xF104,
237
- 'angle-right' => 0xF105,
238
- 'angle-up' => 0xF106,
239
- 'angle-down' => 0xF107,
240
- 'desktop' => 0xF108,
241
- 'laptop' => 0xF109,
242
- 'tablet' => 0xF10A,
243
- 'mobile-phone' => 0xF10B,
244
- 'circle-blank' => 0xF10C,
245
- 'quote-left' => 0xF10D,
246
- 'quote-right' => 0xF10E,
247
- 'spinner' => 0xF110,
248
- 'circle' => 0xF111,
249
- 'reply' => 0xF112,
250
- 'github-alt' => 0xF113,
251
- 'folder-close-alt' => 0xF114,
252
- 'folder-open-alt' => 0xF115,
253
- 'expand-alt' => 0xF116,
254
- 'collapse-alt' => 0xF117,
255
- 'smile' => 0xF118,
256
- 'frown' => 0xF119,
257
- 'meh' => 0xF11A,
258
- 'gamepad' => 0xF11B,
259
- 'keyboard' => 0xF11C,
260
- 'flag-alt' => 0xF11D,
261
- 'flag-checkered' => 0xF11E,
262
- 'terminal' => 0xF120,
263
- 'code' => 0xF121,
264
- 'reply-all' => 0xF122,
265
- 'mail-reply-all' => 0xF122,
266
- 'star-half-empty' => 0xF123,
267
- 'location-arrow' => 0xF124,
268
- 'crop' => 0xF125,
269
- 'code-fork' => 0xF126,
270
- 'unlink' => 0xF127,
271
- 'question' => 0xF128,
272
- 'info' => 0xF129,
273
- 'exclamation' => 0xF12A,
274
- 'superscript' => 0xF12B,
275
- 'subscript' => 0xF12C,
276
- 'eraser' => 0xF12D,
277
- 'puzzle-piece' => 0xF12E,
278
- 'microphone' => 0xF130,
279
- 'microphone-off' => 0xF131,
280
- 'shield' => 0xF132,
281
- 'calendar-empty' => 0xF133,
282
- 'fire-extinguisher' => 0xF134,
283
- 'rocket' => 0xF135,
284
- 'maxcdn' => 0xF136,
285
- 'chevron-sign-left' => 0xF137,
286
- 'chevron-sign-right' => 0xF138,
287
- 'chevron-sign-up' => 0xF139,
288
- 'chevron-sign-down' => 0xF13A,
289
- 'html5' => 0xF13B,
290
- 'css3' => 0xF13C,
291
- 'anchor' => 0xF13D,
292
- 'unlock-alt' => 0xF13E,
293
- 'bullseye' => 0xF140,
294
- 'ellipsis-horizontal' => 0xF141,
295
- 'ellipsis-vertical' => 0xF142,
296
- 'rss-sign' => 0xF143,
297
- 'play-sign' => 0xF144,
298
- 'ticket' => 0xF145,
299
- 'minus-sign-alt' => 0xF146,
300
- 'check-minus' => 0xF147,
301
- 'level-up' => 0xF148,
302
- 'level-down' => 0xF149,
303
- 'check-sign' => 0xF14A,
304
- 'edit-sign' => 0xF14B,
305
- 'external-link-sign' => 0xF14C,
306
- 'share-sign' => 0xF14D,
307
- 'compass' => 0xF14E,
308
- 'collapse' => 0xF150,
309
- 'collapse-top' => 0xF151,
310
- 'expand' => 0xF152,
311
- 'eur' => 0xF153,
312
- 'gbp' => 0xF154,
313
- 'usd' => 0xF155,
314
- 'inr' => 0xF156,
315
- 'jpy' => 0xF157,
316
- 'cny' => 0xF158,
317
- 'krw' => 0xF159,
318
- 'btc' => 0xF15A,
319
- 'file' => 0xF15B,
320
- 'file-text' => 0xF15C,
321
- 'sort-by-alphabet' => 0xF15D,
322
- 'sort-by-alphabet-alt' => 0xF15E,
323
- 'sort-by-attributes' => 0xF160,
324
- 'sort-by-attributes-alt' => 0xF161,
325
- 'sort-by-order' => 0xF162,
326
- 'sort-by-order-alt' => 0xF163,
327
- 'thumbs-up' => 0xF164,
328
- 'thumbs-down' => 0xF165,
329
- 'youtube-sign' => 0xF166,
330
- 'youtube' => 0xF167,
331
- 'xing' => 0xF168,
332
- 'xing-sign' => 0xF169,
333
- 'youtube-play' => 0xF16A,
334
- 'dropbox' => 0xF16B,
335
- 'stackexchange' => 0xF16C,
336
- 'instagram' => 0xF16D,
337
- 'flickr' => 0xF16E,
338
- 'adn' => 0xF170,
339
- 'bitbucket' => 0xF171,
340
- 'bitbucket-sign' => 0xF172,
341
- 'tumblr' => 0xF173,
342
- 'tumblr-sign' => 0xF174,
343
- 'long-arrow-down' => 0xF175,
344
- 'long-arrow-up' => 0xF176,
345
- 'long-arrow-left' => 0xF177,
346
- 'long-arrow-right' => 0xF178,
347
- 'apple' => 0xF179,
348
- 'windows' => 0xF17A,
349
- 'android' => 0xF17B,
350
- 'linux' => 0xF17C,
351
- 'dribble' => 0xF17D,
352
- 'skype' => 0xF17E,
353
- 'foursquare' => 0xF180,
354
- 'trello' => 0xF181,
355
- 'female' => 0xF182,
356
- 'male' => 0xF183,
357
- 'gittip' => 0xF184,
358
- 'sun' => 0xF185,
359
- 'moon' => 0xF186,
360
- 'archive' => 0xF187,
361
- 'bug' => 0xF188,
362
- 'vk' => 0xF189,
363
- 'weibo' => 0xF18A,
364
- 'renren' => 0xF18B
365
- }
366
-
367
- def self.font(size)
368
- UIFont.fontWithName("FontAwesome", size:size)
369
- end
370
-
371
- def self.text(name)
372
- name = NAMES_MAP[name.to_s.gsub('_', '-')] || NAMES_MAP['bug']
373
- name.chr(Encoding::UTF_8)
374
- end
375
-
376
- end