phonegap 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -6,7 +6,7 @@ module Iphone
6
6
 
7
7
  # builds the iphone using xcode, FIXME should use open toolchain
8
8
  def build_iphone(path_to_build)
9
- if iphone_supported?
9
+ if iphone_supported? && has_phonegap_sauce?
10
10
  FileUtils.mkdir_p(path_to_build)
11
11
  www_local = File.join(path_to_build,'www')
12
12
  www_build = File.join(install_path,'iphone')
@@ -16,7 +16,7 @@ module Iphone
16
16
  conf = {'Release'=>'iphoneos3.0','Debug'=>'iphonesimulator3.0'}
17
17
  puts `cd #{www_build}; /usr/bin/xcodebuild -alltargets -configuration Debug -sdk #{conf['Debug']}`
18
18
  else
19
- puts 'skipping iphone build: iphone sdk not installed'
19
+ puts 'skipping iphone build: iphone sdk not installed or phonegap source not in ~/.phonegap'
20
20
  end
21
21
  end
22
22
  end
@@ -14,16 +14,21 @@ class PhoneGap
14
14
  '0.7.0'
15
15
  end
16
16
 
17
- # helper for getting the install path of phonegap
17
+ # grab install path of the phonegap sauce
18
18
  def install_path
19
19
  File.expand_path('~/.phonegap')
20
20
  end
21
21
 
22
+ # check for the phonegap sauce
23
+ def has_phonegap_sauce?
24
+ File.exists?(install_path)
25
+ end
26
+
22
27
  # creates an app skeleton
23
28
  def generate(path)
24
29
  generate_path = File.join(Dir.pwd,path)
25
30
  template_path = File.join(File.dirname(__FILE__),'generate')
26
- `cp -rf #{ template_path} #{ generate_path }`
31
+ FileUtils.cp_r(template_path, generate_path)
27
32
  e=<<-E
28
33
 
29
34
  Generated a fresh PhoneGap application!
@@ -44,7 +49,7 @@ class PhoneGap
44
49
  |
45
50
  '- index.html
46
51
 
47
- For more information, tutorials, documentation and quickstarts go to http://phonegap.com
52
+ For more information, tutorials, documentation and quickstarts visit http://phonegap.com
48
53
 
49
54
  E
50
55
  trim(e)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{phonegap}
5
- s.version = "0.2.1"
5
+ s.version = "0.2.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Brian LeRoux"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phonegap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian LeRoux