cova 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +246 -0
- data/lib/cova.rb +322 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 86eaa302768e0ddb87109bd834d22d48314f5297
|
4
|
+
data.tar.gz: a36d7aa6813a6374bb9c90f82725786815109560
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e567618dd2dbc42f954cec69a80ba802b90b1ab0626ea78afe469ae710bb4516af581dfe2cb8d01b8a9c23a120e0434eb12634a4bfc77a71edc6c7711ba0f342
|
7
|
+
data.tar.gz: 40e6d3df977db17e2d10324e1295da5604b135cf4ac2cab19a0f1334ad6d4df1b603f671960a69410ba0e99cec3e36aaf8c621adde617943f902516ef9870d14
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Dan Calinescu (http://cova.io)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,246 @@
|
|
1
|
+
Cova - A fresh look at mobile.
|
2
|
+
===
|
3
|
+
|
4
|
+
|
5
|
+
#### Hi!
|
6
|
+
|
7
|
+
Welcome and thank you for taking the time to check out Cova. I know you're busy and with all the massing amount of stuff out there on the net I do appreciate you taking the time to be here. If mobile is important to you then this might be of particular interest to you. Read on to find out more.
|
8
|
+
|
9
|
+
#### Why Cova?
|
10
|
+
|
11
|
+
I'm sure you're probably wondering what Cova is and why would anyone need yet another tool to build stuff. Quite frankly because we all love mobile apps but
|
12
|
+
they're pretty complicated to build.
|
13
|
+
######Cova is a tool designed to simplify the mobile app creation process.
|
14
|
+
The whole process is pretty complex. You first have to come up with an idea, then brainstorm a lot, designing a great user experience, then comes the actual coding of the whole thing, you of course have to test it, and eventually you'll end up publishing and keeping your app up to date and relevant.
|
15
|
+
|
16
|
+
|
17
|
+
Requirements
|
18
|
+
===
|
19
|
+
|
20
|
+
To try Cova you have to have the following minimum requirements:
|
21
|
+
|
22
|
+
1. Mac OS X Lion or Later
|
23
|
+
2. Ruby 1.8.7 (comes with OS X Lion)
|
24
|
+
3. Xcode's Command Line Tools (Install via Xcode → Preferences → Downloads)
|
25
|
+
|
26
|
+
Quick Start
|
27
|
+
===
|
28
|
+
###Hello World in under 30 seconds
|
29
|
+
|
30
|
+
If you're anything like me, you probably want to see **Cova in action** right about now. Alright, you got it. Here goes:
|
31
|
+
|
32
|
+
````
|
33
|
+
> [sudo] gem install cova
|
34
|
+
> cova install
|
35
|
+
> cova create -b helloworld
|
36
|
+
````
|
37
|
+
That's it. You're now the proud owner of a brand new shiny app. Feel free to keep reading for more detailed user guide but if you stop now and start hacking your new app, who am I to stop you. Go on, have fun!
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
User Guide
|
42
|
+
===
|
43
|
+
|
44
|
+
#### Installation Instructions
|
45
|
+
|
46
|
+
If your machine meets the requirements then all you need is to grab the **Cova gem**, like so:
|
47
|
+
|
48
|
+
````
|
49
|
+
> [sudo] gem install cova
|
50
|
+
````
|
51
|
+
|
52
|
+
And then you can install **Cova** with the following simple command:
|
53
|
+
|
54
|
+
````
|
55
|
+
> cova install
|
56
|
+
````
|
57
|
+
|
58
|
+
**Cova** will setup its own environment and you should see something like this:
|
59
|
+
|
60
|
+
````
|
61
|
+
|
62
|
+
=== Initializing Cova ===
|
63
|
+
|
64
|
+
Preparing to install Cova in /Users/dcalinescu/.cova ... [ OK ]
|
65
|
+
git clone git://github.com/facebook/xctool.git
|
66
|
+
Cloning into 'xctool'...
|
67
|
+
remote: Counting objects: 2220, done.
|
68
|
+
remote: Compressing objects: 100% (991/991), done.
|
69
|
+
remote: Total 2220 (delta 1263), reused 2106 (delta 1165)
|
70
|
+
Receiving objects: 100% (2220/2220), 1003.65 KiB | 392 KiB/s, done.
|
71
|
+
Resolving deltas: 100% (1263/1263), done.
|
72
|
+
git clone git://github.com/dancali/cova.git
|
73
|
+
Cloning into 'cova'...
|
74
|
+
remote: Counting objects: 103, done.
|
75
|
+
remote: Compressing objects: 100% (71/71), done.
|
76
|
+
remote: Total 103 (delta 20), reused 99 (delta 16)
|
77
|
+
Receiving objects: 100% (103/103), 55.71 KiB, done.
|
78
|
+
Resolving deltas: 100% (20/20), done.
|
79
|
+
pod repo add cova git://github.com/dancali/cova-mods.git
|
80
|
+
Cloning spec repo `cova` from `git://github.com/dancali/cova-mods.git`
|
81
|
+
Found Cova in /Users/dcalinescu/.cova ... [ OK ]
|
82
|
+
Found Cova Mods in /Users/dcalinescu/.cocoapods/cova ... [ OK ]
|
83
|
+
|
84
|
+
========= SUCCESS =========
|
85
|
+
|
86
|
+
|
87
|
+
Congrats! Cove is now installed. Enjoy Cova and build the next great app sensation!
|
88
|
+
|
89
|
+
For more info visit the homepage: http://cova.io
|
90
|
+
|
91
|
+
````
|
92
|
+
|
93
|
+
That's it! Congrats! You've just installed Cova and you're ready to build apps.
|
94
|
+
|
95
|
+
#### Sanity Check
|
96
|
+
|
97
|
+
To check the status of your installation (sanity check) type this:
|
98
|
+
|
99
|
+
````
|
100
|
+
> cova status
|
101
|
+
````
|
102
|
+
|
103
|
+
And you should see this:
|
104
|
+
|
105
|
+
````
|
106
|
+
|
107
|
+
=== Checking if Cova is installed ===
|
108
|
+
|
109
|
+
Found Cova in /Users/dcalinescu/.cova ... [ OK ]
|
110
|
+
Found Cova Mods in /Users/dcalinescu/.cocoapods/cova ... [ OK ]
|
111
|
+
|
112
|
+
========= SUCCESS =========
|
113
|
+
|
114
|
+
````
|
115
|
+
|
116
|
+
#### Creating an app
|
117
|
+
|
118
|
+
If you followed the Quick Guide above you already know how this works but here it is again:
|
119
|
+
|
120
|
+
````
|
121
|
+
> cova create -b helloworld
|
122
|
+
````
|
123
|
+
|
124
|
+
*Notice the -b flag to force a build right after creation. If you skip the -b flag your app will be created but a build will not kick in until you invoke the build command yourself. Read on to find out how to do that.*
|
125
|
+
|
126
|
+
So that's all it takes to create a new app. Here's what you should see:
|
127
|
+
|
128
|
+
````
|
129
|
+
=== Creating app helloworld ===
|
130
|
+
|
131
|
+
Found Cova in /Users/dcalinescu/.cova ... [ OK ]
|
132
|
+
Found Cova Mods in /Users/dcalinescu/.cocoapods/cova ... [ OK ]
|
133
|
+
Creating app home in /Users/dcalinescu/cova/helloworld ... [ OK ]
|
134
|
+
Adding Xcode project ... [ OK ]
|
135
|
+
|
136
|
+
=== Building with dependencies ===
|
137
|
+
|
138
|
+
Looking for Podfile ... [ OK ]
|
139
|
+
pod install
|
140
|
+
Analyzing dependencies
|
141
|
+
|
142
|
+
[!] [!] The Podfile does not contain any dependency.
|
143
|
+
|
144
|
+
CocoaPods 0.20.1 is available.
|
145
|
+
|
146
|
+
Downloading dependencies
|
147
|
+
Generating Pods project
|
148
|
+
Integrating client project
|
149
|
+
|
150
|
+
[!] From now on use `cova.xcworkspace`.
|
151
|
+
|
152
|
+
=== Building ===
|
153
|
+
|
154
|
+
/Users/dcalinescu/.cova/xctool/xctool.sh -workspace cova.xcworkspace -scheme cova -configuration Debug -sdk iphonesimulator
|
155
|
+
=== BUILDING XCTOOL ===
|
156
|
+
|
157
|
+
/Users/dcalinescu/.cova/xctool/build.sh
|
158
|
+
✓ Built xctool (24000 ms)
|
159
|
+
|
160
|
+
=== BUILD ===
|
161
|
+
|
162
|
+
xcodebuild build build
|
163
|
+
cova / cova (Debug)
|
164
|
+
~ Check dependencies (140 ms)
|
165
|
+
~ Process cova-Info.plist (4 ms)
|
166
|
+
~ Precompile cova-Prefix.pch (432 ms)
|
167
|
+
~ DataModelVersionCompile cova.momd cova.xcdatamodeld (775 ms)
|
168
|
+
~ Compile main.m (36 ms)
|
169
|
+
~ Compile AppDelegate.m (81 ms)
|
170
|
+
~ Link cova (96 ms)
|
171
|
+
~ Generating cova.app.dSYM (21 ms)
|
172
|
+
~ Copy InfoPlist.strings (2 ms)
|
173
|
+
~ Copy Default.png (3 ms)
|
174
|
+
~ Copy Default@2x.png (4 ms)
|
175
|
+
~ Copy Default-568h@2x.png (5 ms)
|
176
|
+
~ Copy Icon.png (6 ms)
|
177
|
+
~ Copy Icon@2x.png (7 ms)
|
178
|
+
~ Touch cova.app (3 ms)
|
179
|
+
|
180
|
+
|
181
|
+
** BUILD SUCCEEDED ** (1521 ms)
|
182
|
+
|
183
|
+
|
184
|
+
========= SUCCESS =========
|
185
|
+
````
|
186
|
+
|
187
|
+
#### Help
|
188
|
+
|
189
|
+
To get a list of available commands simply type
|
190
|
+
|
191
|
+
````
|
192
|
+
> cova
|
193
|
+
````
|
194
|
+
|
195
|
+
And you should see a list of all the built in commands with associated descriptions
|
196
|
+
|
197
|
+
````
|
198
|
+
Commands:
|
199
|
+
cova build # Builds an existing Cova app
|
200
|
+
cova create NAME # Creates a new Cova app
|
201
|
+
cova help [COMMAND] # Describe available commands or one specific command
|
202
|
+
cova install # Installs Cova from scratch
|
203
|
+
cova status # Checks the status of a Cova installation
|
204
|
+
cova uninstall # Completely uninstalls Cova
|
205
|
+
````
|
206
|
+
|
207
|
+
|
208
|
+
Contributions
|
209
|
+
===
|
210
|
+
|
211
|
+
All feedback is welcome, good or bad. Let me know what you think and please do feel free to jump in and submit [Pull Requests](https://help.github.com/articles/using-pull-requests) if you think you can add improvements, fixes or enhancements.
|
212
|
+
|
213
|
+
Acknowledgements
|
214
|
+
===
|
215
|
+
|
216
|
+
**Cova** makes use of the following great open source projects:
|
217
|
+
|
218
|
+
1. **[xctool](https://github.com/facebook/xctool)** - a cool tool from [Facebook](https://github.com/facebook/) offered as replacement of Apple's **xcodebuild**
|
219
|
+
2. **[CocoaPods](https://github.com/CocoaPods/CocoaPods)** - the much needed Objective-C library manager from the [CocoaPods Community](https://github.com/CocoaPods/CocoaPods)
|
220
|
+
3. **[Thor](https://github.com/wycats/thor)** - a powerful command line building tool from [Yehuda Katz](http://www.yehudakatz.com)
|
221
|
+
|
222
|
+
|
223
|
+
License
|
224
|
+
===
|
225
|
+
|
226
|
+
The MIT License (MIT)
|
227
|
+
|
228
|
+
Copyright (c) 2013 Dan Calinescu (http://cova.io)
|
229
|
+
|
230
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
231
|
+
of this software and associated documentation files (the "Software"), to deal
|
232
|
+
in the Software without restriction, including without limitation the rights
|
233
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
234
|
+
copies of the Software, and to permit persons to whom the Software is
|
235
|
+
furnished to do so, subject to the following conditions:
|
236
|
+
|
237
|
+
The above copyright notice and this permission notice shall be included in
|
238
|
+
all copies or substantial portions of the Software.
|
239
|
+
|
240
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
241
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
242
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
243
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
244
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
245
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
246
|
+
THE SOFTWARE.
|
data/lib/cova.rb
ADDED
@@ -0,0 +1,322 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "fileutils"
|
5
|
+
require "thor"
|
6
|
+
require "xcodeproj"
|
7
|
+
require "colorize"
|
8
|
+
|
9
|
+
COVA_REPO="git://github.com/dancali/cova.git"
|
10
|
+
XCTOOL_REPO="git://github.com/facebook/xctool.git"
|
11
|
+
COVA_MODS_REPO="git://github.com/dancali/cova-mods.git"
|
12
|
+
|
13
|
+
class Cova < Thor
|
14
|
+
|
15
|
+
no_commands do
|
16
|
+
|
17
|
+
def _msg(msg)
|
18
|
+
print msg.black + " ... "
|
19
|
+
end
|
20
|
+
|
21
|
+
def _info(msg)
|
22
|
+
puts
|
23
|
+
puts msg.blue
|
24
|
+
puts
|
25
|
+
end
|
26
|
+
|
27
|
+
def _ok
|
28
|
+
print "[ ".black
|
29
|
+
print "OK".green
|
30
|
+
print " ]".black
|
31
|
+
puts
|
32
|
+
end
|
33
|
+
|
34
|
+
def _error
|
35
|
+
print "[".black
|
36
|
+
print "FAIL".red
|
37
|
+
print "]".black
|
38
|
+
puts
|
39
|
+
end
|
40
|
+
|
41
|
+
def _success
|
42
|
+
puts
|
43
|
+
print "=".black * 9
|
44
|
+
print " SUCCESS ".green
|
45
|
+
puts "=".black * 9
|
46
|
+
puts
|
47
|
+
end
|
48
|
+
|
49
|
+
def _fail
|
50
|
+
puts
|
51
|
+
print "=".black * 8
|
52
|
+
print " FAILED ".red
|
53
|
+
puts "=".black * 8
|
54
|
+
puts
|
55
|
+
end
|
56
|
+
|
57
|
+
def _start(msg)
|
58
|
+
puts
|
59
|
+
print "=".black * 3
|
60
|
+
print " " + msg.black + " "
|
61
|
+
puts "=".black * 3
|
62
|
+
puts
|
63
|
+
end
|
64
|
+
|
65
|
+
def _cmd(cmd)
|
66
|
+
pipe = IO.popen(cmd)
|
67
|
+
puts cmd.blue
|
68
|
+
while (line = pipe.gets)
|
69
|
+
print line.black
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def _covadir
|
74
|
+
File.expand_path("~/.cova")
|
75
|
+
end
|
76
|
+
|
77
|
+
def _covamodsdir
|
78
|
+
user_home_dir = File.expand_path("~/.cocoapods/cova")
|
79
|
+
end
|
80
|
+
|
81
|
+
def _builddir
|
82
|
+
File.expand_path("~/Library/Developer/Xcode/DerivedData")
|
83
|
+
end
|
84
|
+
|
85
|
+
def _init
|
86
|
+
user_home_dir = File.expand_path("~")
|
87
|
+
cova_dir = user_home_dir + "/.cova"
|
88
|
+
cocoapods_cova_dir = user_home_dir + "/.cocoapods/cova"
|
89
|
+
|
90
|
+
_start "Initializing Cova"
|
91
|
+
|
92
|
+
if File.directory?(cova_dir)
|
93
|
+
_msg "Cleaning up previous installation"
|
94
|
+
FileUtils.rm_r cova_dir, :force => true
|
95
|
+
if File.directory?(cova_dir)
|
96
|
+
_error
|
97
|
+
_fail
|
98
|
+
exit
|
99
|
+
else
|
100
|
+
_ok
|
101
|
+
if File.directory?(cocoapods_cova_dir)
|
102
|
+
_msg "Cleaning Cova Mods"
|
103
|
+
FileUtils.rm_r cocoapods_cova_dir
|
104
|
+
if File.directory?(cocoapods_cova_dir)
|
105
|
+
_error
|
106
|
+
_fail
|
107
|
+
exit
|
108
|
+
else
|
109
|
+
_ok
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
_msg "Preparing to install Cova in #{cova_dir}"
|
116
|
+
FileUtils.mkdir cova_dir
|
117
|
+
if File.directory?(cova_dir)
|
118
|
+
_ok
|
119
|
+
FileUtils.cd cova_dir
|
120
|
+
_cmd ("git clone #{XCTOOL_REPO}")
|
121
|
+
if File.directory?(cova_dir + "/xctool")
|
122
|
+
_cmd ("git clone #{COVA_REPO}")
|
123
|
+
if File.directory?(cova_dir + "/cova")
|
124
|
+
_cmd "pod repo add cova #{COVA_MODS_REPO}"
|
125
|
+
if File.directory?(cocoapods_cova_dir)
|
126
|
+
status
|
127
|
+
_success
|
128
|
+
puts
|
129
|
+
puts "Congrats! Cove is now installed. Enjoy Cova and build the next great app sensation!".green
|
130
|
+
puts
|
131
|
+
puts "For more info visit the homepage: http://cova.io".black
|
132
|
+
puts
|
133
|
+
else
|
134
|
+
_msg "Could not create Cova Mods home"
|
135
|
+
_error
|
136
|
+
_error
|
137
|
+
exit
|
138
|
+
end
|
139
|
+
else
|
140
|
+
_msg "cova did not clone correctly"
|
141
|
+
_error
|
142
|
+
_fail
|
143
|
+
exit
|
144
|
+
end
|
145
|
+
else
|
146
|
+
_msg "xctool did not clone correctly"
|
147
|
+
_error
|
148
|
+
_fail
|
149
|
+
exit
|
150
|
+
end
|
151
|
+
else
|
152
|
+
_error
|
153
|
+
_fail
|
154
|
+
exit
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
def _build
|
159
|
+
_start "Building"
|
160
|
+
if File.exist?('cova.xcworkspace')
|
161
|
+
_cmd (_covadir + "/xctool/xctool.sh -workspace cova.xcworkspace -scheme cova -configuration Debug -sdk iphonesimulator")
|
162
|
+
_success
|
163
|
+
else
|
164
|
+
_msg "Expecting cova.xcworkspace"
|
165
|
+
_error
|
166
|
+
_fail
|
167
|
+
exit
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
def _buildall
|
172
|
+
_start "Building with dependencies"
|
173
|
+
_msg "Looking for Podfile"
|
174
|
+
if File.exist?('Podfile')
|
175
|
+
_ok
|
176
|
+
_cmd "pod install"
|
177
|
+
_build
|
178
|
+
else
|
179
|
+
_error
|
180
|
+
_msg "Expecting Podfile"
|
181
|
+
_error
|
182
|
+
_fail
|
183
|
+
exit
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
end
|
188
|
+
|
189
|
+
desc 'status', 'Checks the status of a Cova installation'
|
190
|
+
def status
|
191
|
+
_start "Checking if Cova is installed"
|
192
|
+
cova_dir = _covadir
|
193
|
+
if File.directory?(cova_dir)
|
194
|
+
_msg "Found Cova in #{cova_dir}"
|
195
|
+
_ok
|
196
|
+
else
|
197
|
+
puts "Expecting Cova in #{cova_dir} not found".red
|
198
|
+
_failed
|
199
|
+
return false
|
200
|
+
end
|
201
|
+
|
202
|
+
cova_mods_dir = _covamodsdir
|
203
|
+
if File.directory?(cova_mods_dir)
|
204
|
+
_msg "Found Cova Mods in #{cova_mods_dir}"
|
205
|
+
_ok
|
206
|
+
_success
|
207
|
+
else
|
208
|
+
puts "Expected Cova Mods in #{cova_mods_dir} not found".red
|
209
|
+
return false
|
210
|
+
end
|
211
|
+
|
212
|
+
return true
|
213
|
+
end
|
214
|
+
|
215
|
+
desc 'uninstall', 'Completely uninstalls Cova'
|
216
|
+
def uninstall
|
217
|
+
|
218
|
+
_start "Uninstalling Cova"
|
219
|
+
|
220
|
+
cova_dir = _covadir
|
221
|
+
_msg "Removing Cova from #{cova_dir}"
|
222
|
+
FileUtils.rm_r cova_dir, :force => true
|
223
|
+
if File.directory?(cova_dir)
|
224
|
+
_error
|
225
|
+
_fail
|
226
|
+
exit
|
227
|
+
else
|
228
|
+
_ok
|
229
|
+
end
|
230
|
+
|
231
|
+
cova_mods_dir = _covamodsdir
|
232
|
+
_msg "Removing Cova Mods from #{cova_mods_dir}"
|
233
|
+
FileUtils.rm_r cova_mods_dir, :force => true
|
234
|
+
if File.directory?(cova_mods_dir)
|
235
|
+
_error
|
236
|
+
_fail
|
237
|
+
exit
|
238
|
+
else
|
239
|
+
_ok
|
240
|
+
_success
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
desc 'install', 'Installs Cova from scratch'
|
245
|
+
option :force, :type => :boolean, :aliases => :f
|
246
|
+
def install
|
247
|
+
user_home_dir = File.expand_path("~")
|
248
|
+
cova_dir = user_home_dir + "/.cova"
|
249
|
+
|
250
|
+
if File.directory?(cova_dir)
|
251
|
+
if options[:force]
|
252
|
+
_init
|
253
|
+
else
|
254
|
+
_info "Cova is already installed. Run install -f to force a re-install"
|
255
|
+
end
|
256
|
+
else
|
257
|
+
_init
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
desc 'create NAME', 'Creates a new Cova app'
|
262
|
+
option :build, :type => :boolean, :aliases => :b
|
263
|
+
def create (name)
|
264
|
+
|
265
|
+
_start "Creating app #{name}"
|
266
|
+
|
267
|
+
if status
|
268
|
+
app_home = File.expand_path("./#{name}")
|
269
|
+
if File.directory?(app_home)
|
270
|
+
_msg "Cannot create directory #{app_home} as it already exists"
|
271
|
+
_error
|
272
|
+
_fail
|
273
|
+
exit
|
274
|
+
end
|
275
|
+
|
276
|
+
_msg "Creating app home in #{app_home}"
|
277
|
+
FileUtils.mkdir app_home
|
278
|
+
if File.directory?(app_home)
|
279
|
+
_ok
|
280
|
+
_msg "Adding Xcode project"
|
281
|
+
cova_dir = _covadir
|
282
|
+
|
283
|
+
FileUtils.cp_r cova_dir + "/cova/ios/xcode-template", app_home + "/ios"
|
284
|
+
if File.directory?(app_home + "/ios/cova")
|
285
|
+
_ok
|
286
|
+
if options[:build]
|
287
|
+
FileUtils.cd app_home + "/ios"
|
288
|
+
_buildall
|
289
|
+
else
|
290
|
+
_success
|
291
|
+
end
|
292
|
+
else
|
293
|
+
_error
|
294
|
+
_fail
|
295
|
+
_exit
|
296
|
+
end
|
297
|
+
else
|
298
|
+
_error
|
299
|
+
_fail
|
300
|
+
exit
|
301
|
+
end
|
302
|
+
else
|
303
|
+
_msg "Cova not installed. Run install -f to install it"
|
304
|
+
_error
|
305
|
+
_fail
|
306
|
+
exit
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
desc 'build', 'Builds an existing Cova app'
|
311
|
+
option :dependencies, :type => :boolean, :aliases => :d
|
312
|
+
def build
|
313
|
+
if options[:dependencies]
|
314
|
+
_buildall
|
315
|
+
else
|
316
|
+
_build
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
end
|
321
|
+
|
322
|
+
Cova.start
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cova
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dan Calinescu
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-05-24 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Cova removes a lot of the complexity that comes with designing, coding,
|
14
|
+
testing, prototyping and publishing mobile applications.
|
15
|
+
email: dan@cova.io
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/cova.rb
|
21
|
+
- README.md
|
22
|
+
- LICENSE
|
23
|
+
homepage: http://cova.io
|
24
|
+
licenses:
|
25
|
+
- LICENSE
|
26
|
+
metadata: {}
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 2.0.3
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: Cova is a tool designed to simplify the mobile app creation process.
|
47
|
+
test_files: []
|