teacup 2.1.10 → 2.1.11
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/lib/teacup-osx/dummy.rb +1 -0
- data/lib/teacup/calculations.rb +2 -2
- data/lib/teacup/stylesheet.rb +1 -1
- data/lib/teacup/teacup_view.rb +3 -3
- data/lib/teacup/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/teacup-osx/dummy.rb
CHANGED
data/lib/teacup/calculations.rb
CHANGED
@@ -5,8 +5,8 @@ module Teacup
|
|
5
5
|
view.instance_exec(&amount)
|
6
6
|
elsif amount.is_a?(String) && amount.include?('%')
|
7
7
|
location = amount.index '%'
|
8
|
-
offset = amount
|
9
|
-
percent = amount
|
8
|
+
offset = amount.slice(location+1, amount.size).gsub(' ', '').to_f
|
9
|
+
percent = amount.slice(0, location).to_f / 100.0
|
10
10
|
|
11
11
|
case dimension
|
12
12
|
when :width
|
data/lib/teacup/stylesheet.rb
CHANGED
@@ -133,7 +133,7 @@ module Teacup
|
|
133
133
|
end
|
134
134
|
|
135
135
|
def get_stylesheet_cache(stylename, target, orientation)
|
136
|
-
stylesheet_cache[stylename][target][orientation]
|
136
|
+
self.stylesheet_cache[stylename][target][orientation]
|
137
137
|
end
|
138
138
|
|
139
139
|
def set_stylesheet_cache(stylename, target, orientation, value)
|
data/lib/teacup/teacup_view.rb
CHANGED
@@ -186,14 +186,14 @@ module Teacup
|
|
186
186
|
end
|
187
187
|
|
188
188
|
if original_constraint.relative_to && ! constraint.relative_to
|
189
|
-
puts "Could not find #{original_constraint.relative_to.inspect}"
|
190
189
|
container = self
|
191
|
-
tab = '
|
192
|
-
while container
|
190
|
+
tab = ''
|
191
|
+
while container
|
193
192
|
tab << '->'
|
194
193
|
puts "#{tab} #{container.stylename.inspect}"
|
195
194
|
container = container.superview
|
196
195
|
end
|
196
|
+
raise "Could not find #{original_constraint.relative_to.inspect}"
|
197
197
|
end
|
198
198
|
|
199
199
|
# the return value, for the map
|
data/lib/teacup/version.rb
CHANGED
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: 2.1.
|
4
|
+
version: 2.1.11
|
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: 2013-
|
12
|
+
date: 2013-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'Teacup is a community-driven DSL for making CSS-like styling, and
|
15
15
|
layouts for
|