confetti 0.8.0 → 0.8.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- confetti (0.8.0)
4
+ confetti (0.8.1)
5
5
  mustache (~> 0.11.2)
6
6
 
7
7
  GEM
@@ -39,8 +39,10 @@ module Confetti
39
39
  end
40
40
 
41
41
  def version
42
- version = normalize_version @config.version_string
43
- version << ".0"
42
+ v = normalize_version(@config.version_string).split('.')
43
+
44
+ # after the first one, each segment can only have one character
45
+ "#{ v[0] }.#{ v[1][0..0] }.#{ v[2][0..0] }.0"
44
46
  end
45
47
 
46
48
  def capabilities
@@ -1,3 +1,3 @@
1
1
  module Confetti
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
@@ -141,4 +141,22 @@ describe Confetti::Template::WindowsPhone7Manifest do
141
141
  @template.description.length.should be < 250
142
142
  end
143
143
  end
144
+
145
+ describe "version" do
146
+ before do
147
+ @config = Confetti::Config.new
148
+ @template = @template_class.new(@config)
149
+ end
150
+
151
+ it "should normalize the version to four parts" do
152
+ @config.version_string = "1.0.0"
153
+ @template.version.should == "1.0.0.0"
154
+ end
155
+
156
+ it "should ensure the non-initial numbers are one digit" do
157
+ # THIS IS STUPID
158
+ @config.version_string = "2012.05.20"
159
+ @template.version.should == "2012.0.2.0"
160
+ end
161
+ end
144
162
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 0
9
- version: 0.8.0
8
+ - 1
9
+ version: 0.8.1
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-06-08 00:00:00 -07:00
19
+ date: 2012-06-16 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency