confetti 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- confetti (0.9.6)
4
+ confetti (0.9.7)
5
5
  mustache (~> 0.11.2)
6
6
 
7
7
  GEM
@@ -45,7 +45,12 @@ module Confetti
45
45
  end
46
46
 
47
47
  def version_code
48
- @config.version_code || '1'
48
+ if @config.version_code.nil?
49
+ '1'
50
+ else
51
+ int = @config.version_code.to_i
52
+ int == 0 ? '1' : int.to_s
53
+ end
49
54
  end
50
55
 
51
56
  def app_orientation
@@ -1,3 +1,3 @@
1
1
  module Confetti
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.7"
3
3
  end
@@ -250,4 +250,25 @@ describe Confetti::Template::AndroidManifest do
250
250
  end
251
251
  end
252
252
  end
253
+
254
+ describe "version_code" do
255
+ before do
256
+ @config = Confetti::Config.new
257
+ @template = @template_class.new(@config)
258
+ end
259
+
260
+ it "should be '1' by default" do
261
+ @template.version_code.should == "1"
262
+ end
263
+
264
+ it "should reflect an integer version code if present" do
265
+ @config.version_code = "12"
266
+ @template.version_code.should == "12"
267
+ end
268
+
269
+ it "should turn floats into integers" do
270
+ @config.version_code = "2.0.0"
271
+ @template.version_code.should == "2"
272
+ end
273
+ end
253
274
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 6
9
- version: 0.9.6
8
+ - 7
9
+ version: 0.9.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrew Lunny
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-09-18 00:00:00 -07:00
19
+ date: 2012-09-24 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency