cova 0.1.6 → 0.1.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.
Files changed (5) hide show
  1. data/bin/cova +1 -0
  2. data/lib/cova.rb +2 -1
  3. data/lib/covaio.rb +3 -3
  4. data/lib/covamain.rb +25 -8
  5. metadata +19 -5
data/bin/cova CHANGED
@@ -6,6 +6,7 @@ require 'colorize'
6
6
  require 'thor'
7
7
  require 'xcodeproj'
8
8
  require 'cocoapods'
9
+ require 'chunky_png'
9
10
 
10
11
  require 'covalog'
11
12
  require 'covaio'
@@ -4,7 +4,8 @@ require 'colorize'
4
4
  require 'thor'
5
5
  require 'xcodeproj'
6
6
  require 'cocoapods'
7
-
7
+ require 'chunky_png'
8
+
8
9
  require 'covalog'
9
10
  require 'covaio'
10
11
  require 'covamain'
@@ -3,14 +3,14 @@ module CovaIO
3
3
  def _io_init
4
4
  @dir_user_home = File.expand_path("~")
5
5
  @dir_cova_home = File.expand_path("~/.cova")
6
- @dir_cova_mods_home = File.expand_path("~/.cocoapods/cova")
6
+ @dir_cova_ios_mods_home = File.expand_path("~/.cocoapods/cova")
7
7
  @dir_cocoapods_home = File.expand_path("~/.cocoapods")
8
8
  @dir_xctool_home = File.expand_path("~/.cova/xctool")
9
9
  @dir_xcode_build_home = File.expand_path("~/Library/Developer/Xcode/DerivedData")
10
10
  @dir_cova_apps_home = File.expand_path("~/.cova/apps")
11
11
 
12
- @repo_cova_ios = "git://github.com/dancali/cova-ios.git"
13
- @repo_cova_mods = "git://github.com/dancali/cova-mods.git"
12
+ @repo_cova = "git://github.com/dancali/cova.git"
13
+ @repo_cova_ios_mods = "git://github.com/dancali/cova-ios-mods.git"
14
14
  @repo_xctool = "git://github.com/facebook/xctool.git"
15
15
  end
16
16
 
@@ -11,7 +11,7 @@ class Cova < Thor
11
11
  desc 'status', 'Checks the status of a Cova installation'
12
12
  def status
13
13
  _log_block_start "Checking if Cova is installed"
14
- if _io_isdir(@dir_cova_home) and _io_isdir(@dir_cova_mods_home)
14
+ if _io_isdir(@dir_cova_home) and _io_isdir(@dir_cova_ios_mods_home)
15
15
  _log_block_success
16
16
  return true
17
17
  end
@@ -24,8 +24,8 @@ class Cova < Thor
24
24
  def uninstall
25
25
  _log_block_start "Uninstalling Cova"
26
26
  _io_rmdir(@dir_cova_home)
27
- _io_rmdir(@dir_cova_mods_home)
28
- if _io_isdir(@dir_cova_home, false) or _io_isdir(@dir_cova_mods_home, false)
27
+ _io_rmdir(@dir_cova_ios_mods_home)
28
+ if _io_isdir(@dir_cova_home, false) or _io_isdir(@dir_cova_ios_mods_home, false)
29
29
  _log_block_error
30
30
  return false
31
31
  end
@@ -37,15 +37,15 @@ class Cova < Thor
37
37
  def install
38
38
  _log_block_start "Installing Cova"
39
39
 
40
- if _io_isdir(@dir_cova_home, false) or _io_isdir(@dir_cova_mods_home, false)
40
+ if _io_isdir(@dir_cova_home, false) or _io_isdir(@dir_cova_ios_mods_home, false)
41
41
  _log_info "It looks like Cova is already installed. Please uninstall it first before installing again."
42
42
  _log_block_error
43
43
  return false
44
44
  end
45
45
 
46
46
  if _io_mkdir @dir_cova_home and _io_mkdir @dir_cova_apps_home and _io_mkdir @dir_cocoapods_home
47
- if _io_clone_repo @repo_xctool, @dir_cova_home and _io_clone_repo @repo_cova_ios, @dir_cova_home
48
- if _io_pod_add_repo "cova", @repo_cova_mods
47
+ if _io_clone_repo @repo_xctool, @dir_cova_home and _io_clone_repo @repo_cova, @dir_cova_home
48
+ if _io_pod_add_repo "cova", @repo_cova_ios_mods
49
49
  _log_block_success
50
50
  puts
51
51
  puts "Congrats! Cove is now installed. Enjoy and build the next great app sensation!".green
@@ -170,6 +170,20 @@ class Cova < Thor
170
170
  #_io_exec "open #{name}.xcodeproj"
171
171
  end
172
172
 
173
+ desc 'setup', 'Setup'
174
+ def setup ()
175
+ _io_exec "curl -fsSL https://raw.github.com/mxcl/homebrew/go"
176
+ _io_exec "brew update"
177
+ end
178
+
179
+ desc 'image', 'Creates a new image'
180
+ def image ()
181
+ png = ChunkyPNG::Image.new(320, 480, ChunkyPNG::Color::TRANSPARENT)
182
+ png[1,1] = ChunkyPNG::Color.rgba(10, 20, 30, 128)
183
+ png[2,1] = ChunkyPNG::Color('black @ 0.5')
184
+ png.save('Default.png', :interlace => true)
185
+ end
186
+
173
187
  desc 'create [-b] NAME', 'Creates a new Cova app (-b to build it including tests)'
174
188
  option :build, :type => :boolean, :aliases => :b
175
189
  def create (name)
@@ -188,7 +202,10 @@ class Cova < Thor
188
202
  return false
189
203
  end
190
204
 
191
- if _io_cpdir @dir_cova_home + "/cova-ios/Cova", dir + "/ios"
205
+ if _io_cpdir @dir_cova_home + "/cova/web", dir + "/web"
206
+ end
207
+
208
+ if _io_cpdir @dir_cova_home + "/cova/ios", dir + "/ios"
192
209
 
193
210
  Dir.chdir(@dir_cova_apps_home + "/" + name + "/ios")
194
211
 
@@ -261,7 +278,7 @@ class Cova < Thor
261
278
  end
262
279
 
263
280
  def _cova_installed
264
- return (File.directory?(@dir_cova_home) and File.directory?(@dir_cova_mods_home))
281
+ return (File.directory?(@dir_cova_home) and File.directory?(@dir_cova_ios_mods_home))
265
282
  end
266
283
 
267
284
  def _cova_build_dependencies
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cova
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Calinescu
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-05-30 00:00:00 Z
18
+ date: 2013-06-05 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: logger
@@ -87,6 +87,20 @@ dependencies:
87
87
  version: "0"
88
88
  type: :runtime
89
89
  version_requirements: *id005
90
+ - !ruby/object:Gem::Dependency
91
+ name: chunky_png
92
+ prerelease: false
93
+ requirement: &id006 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ hash: 3
99
+ segments:
100
+ - 0
101
+ version: "0"
102
+ type: :runtime
103
+ version_requirements: *id006
90
104
  description: Cova removes a lot of the complexity that comes with designing, coding, testing, prototyping and publishing mobile applications.
91
105
  email: dan@cova.io
92
106
  executables:
@@ -103,7 +117,7 @@ files:
103
117
  - bin/cova
104
118
  homepage: http://cova.io
105
119
  licenses:
106
- - LICENSE
120
+ - ../LICENSE
107
121
  post_install_message:
108
122
  rdoc_options: []
109
123