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,69 +0,0 @@
1
- describe UnderOs::UI::Wrap do
2
-
3
- describe 'with raw iOS ui instances' do
4
- def wrap_class_for(raw_class)
5
- raw = raw_class.alloc.initWithFrame([[0,0],[0,0]])
6
- UnderOs::UI::View.new(raw).class
7
- end
8
-
9
- it "should wrap correctly simple views" do
10
- wrap_class_for(UIView).should == UnderOs::UI::View
11
- end
12
-
13
- it "should wrap buttons correctly" do
14
- wrap_class_for(UIButton).should == UnderOs::UI::Button
15
- end
16
-
17
- it "should wrap labels correctly" do
18
- wrap_class_for(UILabel).should == UnderOs::UI::Label
19
- end
20
-
21
- it "should wrap images correctly" do
22
- wrap_class_for(UIImageView).should == UnderOs::UI::Image
23
- end
24
-
25
- it "should return the same wrapper for the same uiview all the time" do
26
- raw = UIView.alloc.initWithFrame([[0,0],[0,0]])
27
- inst = UnderOs::UI::View.new(raw)
28
-
29
- UnderOs::UI::View.new(raw).should.be.same_as inst
30
- UnderOs::UI::View.new(raw).should.be.same_as inst
31
- UnderOs::UI::View.new(raw).should.be.same_as inst
32
- end
33
- end
34
-
35
- describe 'initialization' do
36
- before do
37
- @view = UnderOs::UI::View.new
38
- end
39
-
40
- it "should build a raw uiview object" do
41
- @view._.class.should == UIView
42
- end
43
-
44
- it "should register the raw view in the cache" do
45
- UnderOs::UI::View.new(@view._).should.be.same_as @view
46
- end
47
- end
48
-
49
- describe 'weird subclasses' do
50
-
51
- class WeirdView < UnderOs::UI::View
52
- attr_reader :a, :b, :c
53
- def initialize(a,b,c)
54
- super({})
55
- @a = a
56
- @b = b
57
- @c = c
58
- end
59
- end
60
-
61
- it "should anny arguments for the constructor" do
62
- view = WeirdView.new(1, 2, 3)
63
- view.a.should == 1
64
- view.b.should == 2
65
- view.c.should == 3
66
- end
67
- end
68
-
69
- end
@@ -1,39 +0,0 @@
1
- describe UnderOs::UI::View do
2
- before do
3
- @view = UnderOs::UI::View.new
4
- end
5
-
6
- describe '#initialize' do
7
- it "should make UnderOs::UI::View instances" do
8
- @view.class.should == UnderOs::UI::View
9
- end
10
-
11
- it "should wrap an UIView instance" do
12
- @view._.class.should == UIView
13
- end
14
-
15
- it "should say its tag name is 'VIEW'" do
16
- @view.tagName.should == 'VIEW'
17
- end
18
-
19
- it "should allow build views with IDs" do
20
- view = UnderOs::UI::View.new(id: 'my-view')
21
- view.id.should == 'my-view'
22
- end
23
-
24
- it "should allow build views with class names" do
25
- view = UnderOs::UI::View.new(class: 'my-class another-class')
26
- view.className.should == 'my-class another-class'
27
- end
28
-
29
- it "should accept the 'data' option" do
30
- view = UnderOs::UI::View.new(data: {some: 'value'})
31
- view.data.should == {some: 'value'}
32
- end
33
-
34
- it "should accept the 'style' option" do
35
- view = UnderOs::UI::View.new(style: {width: 200})
36
- view.style.width.should == 200
37
- end
38
- end
39
- end