brianleroux-phonegap 0.1.0

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/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2009 Brian LeRoux. Licensed under the MIT License:
2
+ http://www.opensource.org/licenses/mit-license.php
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ PhoneGap Developer
2
+ ===
3
+ Command line utilities for PhoneGap:
4
+
5
+ - app generation
6
+ - app packaging
7
+ - system reporting
8
+
9
+ Usage
10
+ ---
11
+ phonegap --generate path/to/MyFreshApp
12
+ phonegap --build path/to/MyFreshApp
13
+ phonegap --report path/to/MyFreshApp
14
+
15
+ Options
16
+ ---
17
+ -h, --help ......... Displays help message.
18
+ -v, --version ..... Display the version and then exit.
19
+ -g, --generate ..... Generates a PhoneGap application skeleton.
20
+ -b, --build ........ Compiles your PhoneGapp application for supported platforms.
21
+ -r, --report ....... Generates a report for supported SDK's.
22
+
23
+ TODO
24
+ ---
25
+ - make executable chmod +x phonegap.rb
26
+ - install phonegap source into ~/.phonegap using git if available
27
+ - make bootstrap.js useful
28
+ - add debug and release options
29
+ - launch iphone simulator
30
+ - builds for each platform
31
+ - fix report for android and blackberry
32
+ - check for specific versions of iphone, android and bb in the report and build
33
+ - gemify
34
+ - add shoulda tests
35
+
36
+ Copyright (c) 2009 Brian LeRoux. Licensed under the MIT License:
37
+ http://www.opensource.org/licenses/mit-license.php
data/Rakefile ADDED
@@ -0,0 +1,58 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "phonegap"
8
+ gem.summary = %Q{TODO}
9
+ gem.email = "brian@westcoastlogic.com"
10
+ gem.homepage = "http://github.com/brianleroux/phonegap-dev"
11
+ gem.authors = ["Brian LeRoux"]
12
+ gem.rubyforge_project = "phonegap"
13
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
14
+ end
15
+
16
+ Jeweler::RubyforgeTasks.new
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
19
+ end
20
+
21
+ require 'rake/testtask'
22
+ Rake::TestTask.new(:test) do |test|
23
+ test.libs << 'lib' << 'test'
24
+ test.pattern = 'test/**/*_test.rb'
25
+ test.verbose = true
26
+ end
27
+
28
+ begin
29
+ require 'rcov/rcovtask'
30
+ Rcov::RcovTask.new do |test|
31
+ test.libs << 'test'
32
+ test.pattern = 'test/**/*_test.rb'
33
+ test.verbose = true
34
+ end
35
+ rescue LoadError
36
+ task :rcov do
37
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
38
+ end
39
+ end
40
+
41
+
42
+ task :default => :test
43
+
44
+ require 'rake/rdoctask'
45
+ Rake::RDocTask.new do |rdoc|
46
+ if File.exist?('VERSION.yml')
47
+ config = YAML.load(File.read('VERSION.yml'))
48
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
49
+ else
50
+ version = ""
51
+ end
52
+
53
+ rdoc.rdoc_dir = 'rdoc'
54
+ rdoc.title = "phonegap #{version}"
55
+ rdoc.rdoc_files.include('README*')
56
+ rdoc.rdoc_files.include('lib/**/*.rb')
57
+ end
58
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,11 @@
1
+ module Android
2
+ # FIXME
3
+ def android_supported?
4
+ false
5
+ end
6
+
7
+ # FIXME
8
+ def build_android(path)
9
+ FileUtils.mkdir_p(File.join(bin,'android')) if android_supported?
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Blackberry
2
+ # FIXME
3
+ def blackberry_supported?
4
+ false
5
+ end
6
+
7
+ # FIXME
8
+ def build_blackberry(path)
9
+ FileUtils.mkdir_p(File.join(bin,'blackberry')) if blackberry_supported?
10
+ end
11
+ end
@@ -0,0 +1,22 @@
1
+ module Iphone
2
+ # TODO need to verify version is 3.0
3
+ def iphone_supported?
4
+ return File.exists?("/usr/bin/xcodebuild")
5
+ end
6
+
7
+ # builds the iphone using xcode, FIXME should use open toolchain
8
+ def build_iphone(path_to_build)
9
+ if iphone_supported?
10
+ FileUtils.mkdir_p(path_to_build)
11
+ www_local = File.join(path_to_build,'www')
12
+ www_build = File.join(install_path,'iphone')
13
+ puts '\building for iphone...\n'
14
+ puts "copying #{www_local} to #{www_build}...#{`cp -r #{www_local} #{www_build}`}\n"
15
+ # Debug, Release
16
+ conf = {'Release'=>'iphoneos3.0','Debug'=>'iphonesimulator3.0'}
17
+ puts `cd #{www_build}; /usr/bin/xcodebuild -alltargets -configuration Debug -sdk #{conf['Debug']}`
18
+ else
19
+ puts 'skipping iphone build: iphone sdk not installed'
20
+ end
21
+ end
22
+ end
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ {
2
+ title:'Untitled Application',
3
+ author:'unknown',
4
+ license:'',
5
+ description:'',
6
+ icon:'foo.png',
7
+ startup:'Default.png'
8
+ }
File without changes
@@ -0,0 +1,97 @@
1
+
2
+ body {
3
+ background:#222 none repeat scroll 0 0;
4
+ color:#666;
5
+ font-family:Helvetica;
6
+ font-size:72%;
7
+ line-height:1.5em;
8
+ margin:0;
9
+ border-top:1px solid #393939;
10
+ }
11
+
12
+ #info{
13
+ background:#ffa;
14
+ border: 1px solid #ffd324;
15
+ -webkit-border-radius: 5px;
16
+ border-radius: 5px;
17
+ clear:both;
18
+ margin:15px 6px 0;
19
+ width:295px;
20
+ padding:4px 0px 2px 10px;
21
+ }
22
+
23
+ #info h4{
24
+ font-size:.95em;
25
+ margin:0;
26
+ padding:0;
27
+ }
28
+
29
+ #stage.theme{
30
+ padding-top:3px;
31
+ }
32
+
33
+ /* Definition List */
34
+ #Page1 > dl{
35
+ padding-top:10px;
36
+ clear:both;
37
+ margin:0;
38
+ list-style-type:none;
39
+ padding-left:10px;
40
+ overflow:auto;
41
+ }
42
+
43
+ #Page1 > dl > dt{
44
+ font-weight:bold;
45
+ float:left;
46
+ margin-left:5px;
47
+ }
48
+
49
+ #Page1 > dl > dd{
50
+ width:45px;
51
+ float:left;
52
+ color:#a87;
53
+ font-weight:bold;
54
+ }
55
+
56
+ /* Content Styling */
57
+ h1, h2, p{
58
+ margin:1em 0 .5em 13px;
59
+ }
60
+
61
+ h1{
62
+ color:#eee;
63
+ font-size:1.6em;
64
+ text-align:center;
65
+ margin:0;
66
+ margin-top:15px;
67
+ padding:0;
68
+ }
69
+
70
+ h2{
71
+ clear:both;
72
+ margin:0;
73
+ padding:3px;
74
+ font-size:1em;
75
+ text-align:center;
76
+ }
77
+
78
+ /* Stage Buttons */
79
+ #stage.theme a.btn{
80
+ border: 1px solid #555;
81
+ -webkit-border-radius: 5px;
82
+ border-radius: 5px;
83
+ text-align:center;
84
+ display:block;
85
+ float:left;
86
+ background:#444;
87
+ width:150px;
88
+ color:#9ab;
89
+ font-size:1.1em;
90
+ text-decoration:none;
91
+ padding:1.2em 0;
92
+ margin:3px 0px 3px 5px;
93
+ }
94
+ #stage.theme a.btn.large{
95
+ width:308px;
96
+ padding:1.2em 0;
97
+ }