sugarcube 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d3f8cd69b62fb92dd1c6fb42af4f89eaa842790
4
- data.tar.gz: 6843f02fd47747244cf1b6f9f8fd39419d77cf4d
3
+ metadata.gz: 5cbbe819e97283451447a21765514919206aafca
4
+ data.tar.gz: 441826f0a2a375300361d9271cf18b1080938862
5
5
  SHA512:
6
- metadata.gz: 95ad104f6663bb9bf3b38499127450ccbc0f400c496a7cdad37001655353e227da806100973b8ee163881a58265996f1d0911999af08a0e0f00e8affe785b218
7
- data.tar.gz: 9f568687eea341dd35e7aa9253d46b977b3cd2597c62207e2d9540837cd1037c8e90cdf3cbd528f487649dddf341ec644a466f10b4437c9cafb1af63bb5909b9
6
+ metadata.gz: f2f4e84bb18b4146cb59aa1f33dd498ad231c2e992852e863384a35ae4c18e562a5706dcfef06a41194acc73b26754aa5916ca36667d926c28367266e1cba9f4
7
+ data.tar.gz: 24882269621cdb3f1890bdc4aac91fade6c95bcc1b8baac773e66303e2f861da4e6041c74e25a86ad2aabec1a78f7693956e81add243f0d97b3ac91130da09be
@@ -6,7 +6,7 @@ class UILabel
6
6
  # UILabel.label('test', 'Helvetica')
7
7
  # UILabel.label('test', 'Helvetica', 20)
8
8
  def self.label(text=nil, font=nil, size=nil)
9
- return super() if text.nil?
9
+ return new() if text.nil?
10
10
 
11
11
  font = font.uifont(size) if font.respond_to?(:uifont)
12
12
  label = self.alloc.initWithFrame([[0, 0], [0, 0]])
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '3.3.0'
2
+ Version = '3.3.1'
3
3
  end
@@ -2,8 +2,8 @@ describe 'SugarCube Factories' do
2
2
 
3
3
  describe NSError do
4
4
  [
5
- 'with message', -> { NSError.new('message') },
6
- 'with message and options', -> { NSError.new('message', domain: 'Error', code: 1, userInfo: {}) },
5
+ 'with message', -> { NSError.error('message') },
6
+ 'with message and options', -> { NSError.error('message', domain: 'Error', code: 1, userInfo: {}) },
7
7
  ].each_slice(2) do |description, factory|
8
8
  it "should work #{description}" do
9
9
  error = factory.call
@@ -156,13 +156,17 @@ describe 'SugarCube Factories' do
156
156
  describe UITableViewCell do
157
157
  [
158
158
  'with #default', -> { UITableViewCell.default('identifier') },
159
- 'with #default with options', -> { UITableViewCell.default('identifier', accessory: :disclosure, selection: :none, text: 'text', detailText: 'detail') },
159
+ 'with #default with options', -> { UITableViewCell.default('identifier', accessory: :disclosure, selection_style: :none, text: 'text', detailText: 'detail') },
160
+ 'with #default with old options (:selection)', -> { UITableViewCell.default('identifier', accessory: :disclosure, selection: :none, text: 'text', detailText: 'detail') },
160
161
  'with #value1', -> { UITableViewCell.value1('identifier') },
161
- 'with #value1 with options', -> { UITableViewCell.value1('identifier', accessory: :disclosure, selection: :none, text: 'text', detailText: 'detail') },
162
+ 'with #value1 with options', -> { UITableViewCell.value1('identifier', accessory: :disclosure, selection_style: :none, text: 'text', detailText: 'detail') },
163
+ 'with #value1 with old options (:selection)', -> { UITableViewCell.value1('identifier', accessory: :disclosure, selection: :none, text: 'text', detailText: 'detail') },
162
164
  'with #value2', -> { UITableViewCell.value2('identifier') },
163
- 'with #value2 with options', -> { UITableViewCell.value2('identifier', accessory: :disclosure, selection: :none, text: 'text', detailText: 'detail') },
165
+ 'with #value2 with options', -> { UITableViewCell.value2('identifier', accessory: :disclosure, selection_style: :none, text: 'text', detailText: 'detail') },
166
+ 'with #value2 with old options (:selection)', -> { UITableViewCell.value2('identifier', accessory: :disclosure, selection: :none, text: 'text', detailText: 'detail') },
164
167
  'with #subtitle', -> { UITableViewCell.subtitle('identifier') },
165
- 'with #subtitle with options', -> { UITableViewCell.subtitle('identifier', accessory: :disclosure, selection: :none, text: 'text', detailText: 'detail') },
168
+ 'with #subtitle with options', -> { UITableViewCell.subtitle('identifier', accessory: :disclosure, selection_style: :none, text: 'text', detailText: 'detail') },
169
+ 'with #subtitle with old options (:selection)', -> { UITableViewCell.subtitle('identifier', accessory: :disclosure, selection: :none, text: 'text', detailText: 'detail') },
166
170
  ].each_slice(2) do |description, factory|
167
171
  it "should work #{description}" do
168
172
  error = factory.call
@@ -174,30 +178,30 @@ describe 'SugarCube Factories' do
174
178
  describe UILabel do
175
179
 
176
180
  describe 'new method' do
177
- it 'should support UILabel.new' do
178
- label = UILabel.new
181
+ it 'should support UILabel.label' do
182
+ label = UILabel.label
179
183
  label.should.be.kind_of(UILabel)
180
184
  end
181
- it 'should support UILabel.new(text)' do
182
- label = UILabel.new('text')
185
+ it 'should support UILabel.label(text)' do
186
+ label = UILabel.label('text')
183
187
  label.should.be.kind_of(UILabel)
184
188
  label.text.should == 'text'
185
189
  end
186
- it 'should support UILabel.new(text, font)' do
187
- label = UILabel.new('text', UIFont.fontWithName('Helvetica', size: 10))
190
+ it 'should support UILabel.label(text, font)' do
191
+ label = UILabel.label('text', UIFont.fontWithName('Helvetica', size: 10))
188
192
  label.should.be.kind_of(UILabel)
189
193
  label.text.should == 'text'
190
194
  label.font.familyName.should == 'Helvetica'
191
195
  label.font.pointSize.should == 10
192
196
  end
193
- it 'should support UILabel.new(text, font_name)' do
194
- label = UILabel.new('text', 'Helvetica')
197
+ it 'should support UILabel.label(text, font_name)' do
198
+ label = UILabel.label('text', 'Helvetica')
195
199
  label.should.be.kind_of(UILabel)
196
200
  label.text.should == 'text'
197
201
  label.font.familyName.should == 'Helvetica'
198
202
  end
199
- it 'should support UILabel.new(text, font_name, size)' do
200
- label = UILabel.new('text', 'Helvetica', 10)
203
+ it 'should support UILabel.label(text, font_name, size)' do
204
+ label = UILabel.label('text', 'Helvetica', 10)
201
205
  label.should.be.kind_of(UILabel)
202
206
  label.text.should == 'text'
203
207
  label.font.familyName.should == 'Helvetica'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin T.A. Gray