teacup 0.3.1 → 0.3.2
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.
- data/Gemfile.lock +1 -1
- data/README.md +9 -15
- data/lib/teacup/style.rb +2 -1
- data/lib/teacup/version.rb +1 -1
- data/samples/Hai/Gemfile +3 -0
- data/samples/Hai/Gemfile.lock +16 -0
- data/samples/Hai/Rakefile +4 -8
- data/samples/Hai/app/hai_controller.rb +2 -2
- metadata +4 -3
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -13,27 +13,21 @@ to create interfaces programmatically.
|
|
13
13
|
|
14
14
|
#### Installation
|
15
15
|
|
16
|
-
|
16
|
+
**Quick Install**
|
17
17
|
|
18
18
|
```bash
|
19
|
-
|
19
|
+
> gem install teacup
|
20
20
|
```
|
21
21
|
|
22
|
-
|
22
|
+
**Better Install**
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
app.files.unshift(*Dir['vendor/teacup/lib/**/*.rb'])
|
28
|
-
end
|
29
|
-
```
|
24
|
+
However, it is recommended that you use [Bundler][] and [rvm][] to manage your
|
25
|
+
gems on a per-project basis, using a gemset. See the
|
26
|
+
[Installation wiki page][Installation] for more help on doing that.
|
30
27
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
$ cd vendor/teacup
|
35
|
-
$ rake spec # or just rake, to run the app.
|
36
|
-
```
|
28
|
+
[Bundler]: http://gembundler.com/
|
29
|
+
[rvm]: https://rvm.io/
|
30
|
+
[Installation]: https://github.com/rubymotion/teacup/wiki/Installation
|
37
31
|
|
38
32
|
#### Showdown
|
39
33
|
|
data/lib/teacup/style.rb
CHANGED
@@ -23,8 +23,9 @@ module Teacup
|
|
23
23
|
@supports ||= {}
|
24
24
|
end
|
25
25
|
|
26
|
+
# returns the value - `nil` has special meaning when querying :portrait or :upside_up
|
26
27
|
def supports? orientation_key
|
27
|
-
supports
|
28
|
+
supports[orientation_key]
|
28
29
|
end
|
29
30
|
|
30
31
|
def build(target=nil, orientation=nil, seen={})
|
data/lib/teacup/version.rb
CHANGED
data/samples/Hai/Gemfile
ADDED
data/samples/Hai/Rakefile
CHANGED
@@ -1,17 +1,13 @@
|
|
1
1
|
$:.unshift("/Library/RubyMotion/lib")
|
2
2
|
require 'motion/project'
|
3
|
+
require 'bundler'
|
4
|
+
Bundler.require
|
5
|
+
|
3
6
|
|
4
7
|
Motion::Project::App.setup do |app|
|
5
8
|
app.name = 'Hai'
|
9
|
+
app.identifier = 'com.rubymotion.Hai'
|
6
10
|
|
7
11
|
app.device_family = :iphone
|
8
|
-
|
9
|
-
app.files += Dir.glob(File.join(app.project_dir, '../../lib/**/*.rb'))
|
10
12
|
app.files += Dir.glob(File.join(app.project_dir, 'styles/**/*.rb'))
|
11
|
-
app.files += Dir.glob(File.join(app.project_dir, 'app/**/*.rb'))
|
12
|
-
app.files_dependencies './../../lib/teacup/layout.rb' => './../../lib/teacup/stylesheet.rb'
|
13
|
-
app.files_dependencies './../../lib/teacup/z_core_extensions/ui_view_controller.rb' => './../../lib/teacup/layout.rb'
|
14
|
-
app.files_dependencies './../../lib/teacup/z_core_extensions/ui_view.rb' => './../../lib/teacup/z_core_extensions/ui_view_controller.rb'
|
15
|
-
app.files_dependencies 'app/app_delegate.rb' => './../../lib/teacup/z_core_extensions/ui_view.rb'
|
16
|
-
app.files_dependencies 'app/hai_controller.rb' => './../../lib/teacup/z_core_extensions/ui_view.rb'
|
17
13
|
end
|
@@ -2,8 +2,8 @@ class HaiViewController < UIViewController
|
|
2
2
|
stylesheet :iphone
|
3
3
|
|
4
4
|
layout :hai do
|
5
|
-
subview(UILabel, :label)
|
6
|
-
subview(UILabel, :footer)
|
5
|
+
@a = subview(UILabel, :label)
|
6
|
+
@b = subview(UILabel, :footer)
|
7
7
|
end
|
8
8
|
|
9
9
|
def shouldAutorotateToInterfaceOrientation(orientation)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teacup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -88,6 +88,8 @@ files:
|
|
88
88
|
- lib/teacup/z_core_extensions/ui_view_getters.rb
|
89
89
|
- lib/teacup/z_core_extensions/z_handlers.rb
|
90
90
|
- samples/Hai/.gitignore
|
91
|
+
- samples/Hai/Gemfile
|
92
|
+
- samples/Hai/Gemfile.lock
|
91
93
|
- samples/Hai/Rakefile
|
92
94
|
- samples/Hai/app/app_delegate.rb
|
93
95
|
- samples/Hai/app/hai_controller.rb
|
@@ -128,4 +130,3 @@ test_files:
|
|
128
130
|
- spec/style_spec.rb
|
129
131
|
- spec/stylesheet_spec.rb
|
130
132
|
- spec/view_spec.rb
|
131
|
-
has_rdoc:
|