confetti 0.9.7 → 0.9.8

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.9.7)
4
+ confetti (0.9.8)
5
5
  mustache (~> 0.11.2)
6
6
 
7
7
  GEM
@@ -6,7 +6,13 @@ module Confetti
6
6
 
7
7
  def app_id
8
8
  pkg = convert_to_java_package_id(@config.package).downcase
9
- pkg.gsub(/[^0-9a-z.]/,'')
9
+ pkg.gsub!(/[^0-9a-z.]/,'')
10
+
11
+ if is_java_package_id(pkg)
12
+ pkg
13
+ else
14
+ 'com.phonegap.app'
15
+ end
10
16
  end
11
17
 
12
18
  def app_name
@@ -1,3 +1,3 @@
1
1
  module Confetti
2
- VERSION = "0.9.7"
2
+ VERSION = "0.9.8"
3
3
  end
@@ -71,6 +71,11 @@ describe Confetti::Template::WebosAppinfo do
71
71
  @template.app_id.should == "com.whatever"
72
72
  end
73
73
 
74
+ it "should convert total nonsense to a default value" do
75
+ @config.package = "1"
76
+ @template.app_id.should == "com.phonegap.app"
77
+ end
78
+
74
79
  it "should downcase the package name" do
75
80
  @config.package = "com.WhatEver"
76
81
  @template.app_id.should == "com.whatever"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 7
9
- version: 0.9.7
8
+ - 8
9
+ version: 0.9.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrew Lunny