ti 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,91 +1,62 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ti (0.1.5)
4
+ ti (0.2.0)
5
5
  coffee-script (~> 2.2.0)
6
6
  colored (~> 1.2)
7
+ compass (~> 0.7)
7
8
  erubis (~> 2.7.0)
8
- guard (~> 0.3.4)
9
- guard-coffeescript (~> 0.2.0)
10
- guard-livereload (~> 0.1.10)
11
- guard-sass (~> 0.0.6)
12
- jasmine (~> 1.0.2.0)
13
9
  nokogiri (~> 1.4.4)
14
- rake (~> 0.8.7)
15
- sass (~> 3.1.1)
10
+ rake (~> 0.9.2)
11
+ rocco (~> 0.7)
12
+ rocco (~> 0.7)
13
+ session (~> 3.1)
14
+ thor (~> 0.14.6)
16
15
 
17
16
  GEM
18
17
  remote: http://rubygems.org/
19
18
  specs:
20
- addressable (2.2.5)
21
- childprocess (0.1.8)
22
- ffi (~> 1.0.6)
19
+ chunky_png (1.2.5)
23
20
  coffee-script (2.2.0)
24
21
  coffee-script-source
25
22
  execjs
26
- coffee-script-source (1.1.0)
23
+ coffee-script-source (1.2.0)
27
24
  colored (1.2)
28
- diff-lcs (1.1.2)
29
- em-websocket (0.2.1)
30
- addressable (>= 2.1.1)
31
- eventmachine (>= 0.12.9)
25
+ compass (0.11.7)
26
+ chunky_png (~> 1.2)
27
+ fssm (>= 0.2.7)
28
+ sass (~> 3.1)
29
+ diff-lcs (1.1.3)
32
30
  erubis (2.7.0)
33
- eventmachine (0.12.10)
34
- execjs (0.3.3)
31
+ execjs (1.3.0)
35
32
  multi_json (~> 1.0)
36
- ffi (1.0.7)
37
- rake (>= 0.8.7)
38
- guard (0.3.4)
39
- thor (~> 0.14.6)
40
- guard-coffeescript (0.2.0)
41
- coffee-script (~> 2.2.0)
42
- guard (~> 0.3.0)
43
- guard-livereload (0.1.11)
44
- em-websocket (~> 0.2.0)
45
- guard (>= 0.2.2)
46
- json (~> 1.5.1)
47
- guard-sass (0.0.6)
48
- guard (>= 0.2.1)
49
- haml (~> 3.0.0)
50
- haml (3.0.25)
51
- jasmine (1.0.2.0)
52
- json_pure (>= 1.4.3)
53
- rack (>= 1.1)
54
- rspec (>= 1.3.1)
55
- selenium-webdriver (>= 0.1.3)
56
- json (1.5.1)
57
- json_pure (1.5.1)
58
- multi_json (1.0.1)
59
- mustache (0.99.3)
60
- nokogiri (1.4.4)
61
- rack (1.2.2)
62
- rake (0.8.7)
63
- rdiscount (1.6.8)
64
- rocco (0.6)
33
+ fattr (2.2.0)
34
+ fssm (0.2.8.1)
35
+ multi_json (1.0.4)
36
+ mustache (0.99.4)
37
+ nokogiri (1.4.7)
38
+ rake (0.9.2)
39
+ redcarpet (2.1.0)
40
+ rocco (0.8.2)
65
41
  mustache
66
- rdiscount
67
- rspec (2.5.0)
68
- rspec-core (~> 2.5.0)
69
- rspec-expectations (~> 2.5.0)
70
- rspec-mocks (~> 2.5.0)
71
- rspec-core (2.5.2)
72
- rspec-expectations (2.5.0)
42
+ redcarpet
43
+ rspec (2.6.0)
44
+ rspec-core (~> 2.6.0)
45
+ rspec-expectations (~> 2.6.0)
46
+ rspec-mocks (~> 2.6.0)
47
+ rspec-core (2.6.4)
48
+ rspec-expectations (2.6.0)
73
49
  diff-lcs (~> 1.1.2)
74
- rspec-mocks (2.5.0)
75
- rubyzip (0.9.4)
76
- sass (3.1.1)
77
- selenium-webdriver (0.2.0)
78
- childprocess (>= 0.1.7)
79
- ffi (>= 1.0.7)
80
- json_pure
81
- rubyzip
50
+ rspec-mocks (2.6.0)
51
+ sass (3.1.12)
52
+ session (3.1.0)
53
+ fattr
82
54
  thor (0.14.6)
83
55
 
84
56
  PLATFORMS
85
57
  ruby
86
58
 
87
59
  DEPENDENCIES
88
- bundler (~> 1.0.10)
89
- rocco (~> 0.6)
90
- rspec (~> 2.5.0)
60
+ bundler (~> 1.1.pre.10)
61
+ rspec (~> 2.6.0)
91
62
  ti!
@@ -1,58 +1,69 @@
1
1
  = Ti
2
2
 
3
- Titanium Application Generator. Uses CoffeeScript for writing your JavaScript, Jasmine and Guard for testing.
4
-
5
- Just playing with some ideas.
3
+ A rapid development framework for titanium.
6
4
 
7
5
  == Requirements
8
-
6
+
9
7
  * ruby 1.9.2
10
- * Titanium Developer Mobile SDK 1.6.2
8
+ * Titanium Developer Mobile SDK
11
9
  * CoffeeScript
12
10
  * libffi `brew install libffi`
13
11
 
14
12
  == Sample App
15
13
 
14
+ Set an alias for titanium's command line interface to your /.bash_profile
15
+
16
+ === OS X
17
+
18
+ alias titanium="$HOME/Library/Application\ Support/Titanium/mobilesdk/osx/<VERSION>/titanium.py"
19
+
20
+ === Linux
21
+
22
+ alias titanium=$HOME/.titanium/mobilesdk/linux/<VERSION>/titanium.py
23
+
16
24
  Install the gem
17
25
 
18
26
  gem install ti
19
27
 
20
-
21
28
  Create a new Project
22
29
 
23
- ti new HelloTi com.yourdomain.helloti iphone `
30
+ ti new HelloTi com.yourdomain.helloti iphone
24
31
 
25
32
 
26
33
  Create your views
27
34
 
28
- ti s window Sample main
29
- ti s window Settings main
35
+ ti s window Sample main
36
+ ti s window Settings main
30
37
 
31
38
 
32
39
  Update your `app/app.coffee` to define the newly created Views
33
40
 
34
- HelloTi =
35
- Views:
36
- Sample: {}
37
- Settings: {}
41
+ HelloTi =
42
+ Views:
43
+ Sample: {}
44
+ Settings: {}
38
45
 
39
46
 
40
47
  Update your `app/hello_ti/stylesheets/app.sass` to include the generated sass
41
48
 
42
- @import 'sample'
43
- @import 'settings'
49
+ @import 'sample'
50
+ @import 'settings'
51
+
44
52
 
53
+ Run it using `rake`
45
54
 
46
- Run it!
55
+ rake
47
56
 
48
- rake
57
+ Or run it using `ti`
58
+
59
+ ti compile all && ti build iphone
49
60
 
50
61
 
51
62
  You can now start adding components. Enjoy!
52
63
 
53
64
 
54
65
  == Contributing to Ti
55
-
66
+
56
67
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
57
68
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
58
69
  * Fork the project
@@ -61,8 +72,14 @@ You can now start adding components. Enjoy!
61
72
  * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
62
73
  * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
63
74
 
75
+
76
+ == Contributions
77
+
78
+ * Julius Francisco (tons of code, ideas, patterns, tests, time, and all around good guy)
79
+ * Wynn Netherland (sass, initial patterns & and help with preliminary architectural design)
80
+ * Rupak Ganguly (initial cli, removal of jeweler, tests)
81
+
64
82
  == Copyright
65
83
 
66
- Copyright (c) 2011 Code Wranglers Inc, Robert R Evans. See LICENSE.txt for
67
- further details.
84
+ Copyright (c) 2011 Code Wranglers Inc, Robert R Evans. See LICENSE.txt for further details.
68
85
 
data/lib/ti.rb CHANGED
@@ -12,18 +12,12 @@ require 'nokogiri'
12
12
 
13
13
  module Ti
14
14
  ROOT_PATH = Pathname(__FILE__).dirname.expand_path
15
- TITANIUM_VERSION = '1.6.2'
16
-
17
- # TODO: Need to support those how have install Titanium in their $HOME dir.
18
- OSX_TITANIUM_HOME = "$HOME/Library/Application\\ Support/Titanium/mobilesdk/osx/#{::Ti::TITANIUM_VERSION}/titanium.py"
19
- OSX_TITANIUM = "/Library/Application\\ Support/Titanium/mobilesdk/osx/#{::Ti::TITANIUM_VERSION}/titanium.py"
20
- LINUX_TITANIUM = "$HOME/.titanium/mobilesdk/linux/#{::Ti::TITANIUM_VERSION}/titanium.py"
21
-
15
+
22
16
  autoload :VERSION, 'ti/version.rb'
23
17
  autoload :CLI, 'ti/cli.rb'
24
18
  autoload :Logger, "ti/logger.rb"
25
19
  autoload :Utils, "ti/utils.rb"
26
-
20
+
27
21
  module Compiler
28
22
  autoload :CoffeeScripts, 'ti/compiler/coffee_scripts.rb'
29
23
  autoload :SASSScripts, 'ti/compiler/sass_scripts.rb'
@@ -32,16 +26,16 @@ module Ti
32
26
  module Builder
33
27
  autoload :Titanium, "ti/builder/titanium.rb"
34
28
  end
35
-
29
+
36
30
  module Generate
37
31
  autoload :Project, "ti/generate/project.rb"
38
32
  autoload :Model, "ti/generate/model.rb"
39
33
  autoload :View, "ti/generate/view.rb"
40
34
  autoload :Controller, "ti/generate/controller.rb"
41
35
  end
42
-
36
+
43
37
  def self.root
44
38
  @root ||= Pathname(__FILE__).dirname.expand_path
45
39
  end
46
-
40
+
47
41
  end
@@ -11,7 +11,17 @@ module Ti
11
11
 
12
12
  def build(platform)
13
13
  log "Building with Titanium... DEVICE_TYPE: #{platform}"
14
- sh %Q{bash -c "#{TI_BUILD} run #{PROJECT_ROOT}/ #{IPHONE_SDK_VERSION} #{APP_ID} #{APP_NAME} #{APP_DEVICE}" | perl -pe 's/^\\[DEBUG\\].*$/\\e[35m$&\\e[0m/g;s/^\\[INFO\\].*$/\\e[36m$&\\e[0m/g;s/^\\[WARN\\].*$/\\e[33m$&\\e[0m/g;s/^\\[ERROR\\].*$/\\e[31m$&\\e[0m/g;'}
14
+
15
+ if platform == "android"
16
+ sdk = ANDROID_SDK_VERSION
17
+ builder = "#{TI_ANDROID_DIR}/builder.py"
18
+ elsif platform == "iphone" || platform == "ipad"
19
+ sdk = IPHONE_SDK_VERSION
20
+ builder = "#{TI_IPHONE_DIR}/builder.py"
21
+ end
22
+
23
+ builder = "#{TI_ASSETS_DIR}/#{platform}/builder.py"
24
+ sh %Q{bash -c "#{builder} run #{PROJECT_ROOT}/ #{sdk} #{APP_ID} #{APP_NAME} #{APP_DEVICE}" | perl -pe 's/^\\[DEBUG\\].*$/\\e[35m$&\\e[0m/g;s/^\\[INFO\\].*$/\\e[36m$&\\e[0m/g;s/^\\[WARN\\].*$/\\e[33m$&\\e[0m/g;s/^\\[ERROR\\].*$/\\e[31m$&\\e[0m/g;'}
15
25
  end
16
26
  end
17
27
  end
@@ -23,7 +23,7 @@ module Ti
23
23
  def info
24
24
  say "Version #{::Ti::VERSION}"
25
25
  end
26
-
26
+
27
27
  map %(n) => 'new'
28
28
  desc "new <name> <id> <platform>", "generates a new Titanium project."
29
29
  long_desc "Generates a new Titanium project. See 'ti help new' for more information.
@@ -34,7 +34,7 @@ module Ti
34
34
  def new(name, device_id='org.mycompany.demo', platform='iphone')
35
35
  ::Ti::Generate::Project.create(name, device_id, platform)
36
36
  end
37
-
37
+
38
38
  map %w(g) => 'generate'
39
39
  desc "generate <model/controller/view> <name>", "generate a new model or view with jasmine specs."
40
40
  def generate(type, name)
@@ -48,8 +48,6 @@ module Ti
48
48
  end
49
49
  end
50
50
 
51
-
52
-
53
51
  map %w(s) => 'scaffold'
54
52
  desc "scaffold <window/tabgroup/view> <domain> <name>", "generate a scaffold for Titanium elements."
55
53
  def scaffold(ti_type, domain, name)
@@ -67,7 +65,7 @@ module Ti
67
65
  :app_name => get_app_name,
68
66
  :name => name })
69
67
  end
70
-
68
+
71
69
  desc "compile <all/coffee/sass>", "compiles all CoffeeScripts"
72
70
  def compile(type)
73
71
  case
@@ -1,3 +1,4 @@
1
+ require 'session'
1
2
  module Ti
2
3
  module Generate
3
4
  class Project
@@ -10,7 +11,8 @@ module Ti
10
11
  @project_name = name
11
12
  @device_platform = platform
12
13
  @app_id = id
13
- if system(generate_titanium_project)
14
+
15
+ if generate_titanium_project
14
16
  create_directories('tmp')
15
17
  copy_defaults
16
18
  remove_old_files
@@ -26,20 +28,20 @@ module Ti
26
28
  FileUtils.cp(location.join("Resources/KS_nav_ui.png"), "/tmp/")
27
29
  FileUtils.cp(location.join("Resources/KS_nav_views.png"), "/tmp/")
28
30
  end
29
-
31
+
30
32
 
31
33
  def generate_files
32
34
  create_project_directory
33
- full_app_hash = {:app_name => @project_name.capitalize, :app_name_underscore => underscore(@project_name), :platform => @device_platform}
35
+ full_app_hash = {:app_name => @project_name, :app_name_underscore => underscore(@project_name), :platform => @device_platform}
34
36
  create_with_template('app/app.coffee', 'app/app.coffee', full_app_hash)
35
37
  create_with_template("app/#{underscore(@project_name)}/app.coffee", 'app/app_project.coffee', full_app_hash)
36
38
  create_with_template("app/#{underscore(@project_name)}/api.coffee", 'app/api.coffee', full_app_hash)
37
39
 
38
40
  create_with_template('.gitignore', 'defaults/gitignore', full_app_hash)
39
-
41
+
40
42
  create_new_file("spec/app_spec.coffee", templates('specs/app_spec.coffee'))
41
43
  create_new_file("app/#{underscore(@project_name)}/stylesheets/app.sass", templates('app/stylesheets/app.sass'))
42
-
44
+
43
45
  create_with_template('config/config.rb', 'defaults/config', full_app_hash)
44
46
  create_with_template("app/#{underscore(@project_name)}/helpers/application.coffee", 'app/helpers/application.coffee', full_app_hash)
45
47
 
@@ -47,25 +49,25 @@ module Ti
47
49
  default_templates.each do |tempfile|
48
50
  create_with_template(tempfile, "defaults/#{tempfile}", full_app_hash)
49
51
  end
50
-
52
+
51
53
  # load default images
52
54
  FileUtils.cp("/tmp/KS_nav_ui.png", location.join("Resources/images/"))
53
55
  FileUtils.cp("/tmp/KS_nav_views.png", location.join("Resources/images/"))
54
56
  end
55
-
56
-
57
+
58
+
57
59
  def create_project_directory
58
60
  create_directories('Resources', 'Resources/images', 'Resources/vendor',
59
- 'config',
60
- 'docs',
61
- "app/#{underscore(@project_name)}/models",
62
- "app/#{underscore(@project_name)}/helpers",
63
- "app/#{underscore(@project_name)}/views",
64
- "app/#{underscore(@project_name)}/stylesheets",
65
- "app/#{underscore(@project_name)}/stylesheets/partials",
66
- 'spec/models', 'spec/views', 'spec/helpers')
61
+ 'config',
62
+ 'docs',
63
+ "app/#{underscore(@project_name)}/models",
64
+ "app/#{underscore(@project_name)}/helpers",
65
+ "app/#{underscore(@project_name)}/views",
66
+ "app/#{underscore(@project_name)}/stylesheets",
67
+ "app/#{underscore(@project_name)}/stylesheets/partials",
68
+ 'spec/models', 'spec/views', 'spec/helpers')
67
69
  end
68
-
70
+
69
71
  def remove_old_files
70
72
  remove_files('README')
71
73
  remove_directories('Resources')
@@ -75,22 +77,20 @@ module Ti
75
77
  base_location.join(@project_name)
76
78
  end
77
79
 
78
-
79
80
  def generate_titanium_project
80
- titanium_platform = case ::Config::CONFIG['host_os']
81
- when /linux/i
82
- ::Ti::LINUX_TITANIUM
83
- when /darwin/i
84
- File.exists?(::Ti::OSX_TITANIUM.gsub('\\', '')) ? ::Ti::OSX_TITANIUM : ::Ti::OSX_TITANIUM_HOME
81
+ platform = ::Config::CONFIG['host_os']
82
+ if platform =~ /linux/i || platform =~ /darwin/i
83
+ cmd = "titanium create --name=#{@project_name} --platform=#{@device_platform} --id=#{@app_id}"
84
+ # We need to use the session gem so that we can access the user's aliases
85
+ bash = Session::Bash::new 'program' => 'bash --login -i'
86
+ bash.execute(cmd) { |out, err| puts out }
85
87
  else
86
- error("Currently, your OS (#{::Config::CONFIG['host_os']}) is not supported.")
87
- exit(0)
88
+ error("Currently, your OS (#{::Config::CONFIG['host_os']}) is not supported.")
89
+ exit(0)
88
90
  end
89
-
90
- "#{titanium_platform} create --name=#{@project_name} --platform=#{@device_platform} --id=#{@app_id}"
91
91
  end
92
92
 
93
93
  end
94
94
  end
95
95
  end
96
- end
96
+ end
@@ -1,6 +1,6 @@
1
1
  module Ti
2
2
  class Logger
3
-
3
+
4
4
  def self.report(msg)
5
5
  $stdout.puts(msg.green.bold)
6
6
  end
@@ -8,6 +8,6 @@ module Ti
8
8
  def self.error(msg)
9
9
  $stderr.puts(msg.red.bold)
10
10
  end
11
-
11
+
12
12
  end
13
- end
13
+ end
@@ -4,13 +4,12 @@ class <%= app_name %>.API
4
4
 
5
5
  requestURI: (path, query={}) ->
6
6
  # NOTE: Setup your own API endpoint, as below
7
- <%= app_name %>.API_ENDPOINT = "http://<%= app_name_underscore %>.com/api/v1"
7
+ <%= app_name %>.API_ENDPOINT = "http://<%= app_name_underscore %>.com/api"
8
8
 
9
9
  uri = "#{<%= app_name %>.API_ENDPOINT}#{path}.json?"
10
10
  for own key, value of query
11
11
  uri += "#{ key }=#{ escape(value) }&"
12
12
 
13
- uri = uri.replace(/^(&)/g, '')
14
13
  uri
15
14
 
16
15
  request: (path, options, authenticated=true) ->
@@ -32,7 +31,7 @@ class <%= app_name %>.API
32
31
  options.error(exception)
33
32
  uri = @requestURI(path, options.query)
34
33
  xhr.open(options.method, uri)
35
- xhr.setRequestHeader 'Authorization', 'Basic ' + Ti.Utils.base64encode(@login+':'+@password) if authenticated
34
+ xhr.setRequestHeader 'Authorization', 'Basic ' + Ti.Utils.base64encode(@login+':'+@password) if authenticated
36
35
 
37
36
  message = "Executing "
38
37
  message += if authenticated then "Authenticated " else "Unauthenticated "
@@ -58,4 +57,12 @@ class <%= app_name %>.API
58
57
  options.method = 'POST'
59
58
  @request path, options, authenticated
60
59
 
61
- # Add your API endpoints below
60
+ put: (path, options, authenticated=true) ->
61
+ options.method = 'PUT'
62
+ @request path, options, authenticated
63
+
64
+ delete: (path, options, authenticated=true) ->
65
+ options.method = 'DELETE'
66
+ @request path, options, authenticated
67
+
68
+ # Add your API endpoints below
@@ -6,7 +6,7 @@
6
6
  <%= app_name %> =
7
7
  Models: {}
8
8
  Helpers: {}
9
- Views: {}
9
+ Views: {}
10
10
 
11
11
  # Include your libraries like:
12
12
  # Ti.include('vendor/date.js')
@@ -20,4 +20,4 @@ Ti.include('<%= app_name_underscore %>.js')
20
20
  # and use $.API for the class name. Uncomment to use.
21
21
  # $ = <%= app_name %>
22
22
 
23
- <%= app_name %>.App.init()
23
+ <%= app_name %>.App.initTabGroup()
@@ -1,90 +1,5 @@
1
1
  <%= app_name %>.App =
2
2
 
3
- currentUser: ->
4
- userData = Ti.App.Properties.getString('user')
5
- if userData?
6
- user = JSON.parse(userData)
7
- return user
8
- else
9
- null
10
-
11
- # Attempt to log in with saved credentials
12
- hasCurrentSession: ->
13
- login = Ti.App.Properties.getString 'login'
14
- password = Ti.App.Properties.getString 'password'
15
- if login? and password?
16
- Ti.API.debug "Found current session with login: #{login} and password: #{password}"
17
- this.api = new <%= app_name %>.API(login, password)
18
- else
19
- Ti.API.debug "No current session found", login, password
20
- login? and password?
21
-
22
- getCurrentLocation: (options) ->
23
- options.success ?= ->
24
- options.error ?= ->
25
- Ti.Geolocation.purpose = "Find something near you"
26
- Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_KILOMETER
27
- Ti.Geolocation.getCurrentPosition (e) ->
28
- if !e.success || e.error
29
- Ti.API.error e.error
30
- options.error e.error
31
- options.success e.coords if e.success
32
-
33
-
34
- # Authenticate a user
35
- authenticate: (login, password) ->
36
- Ti.API.debug('<%= app_name %>.App.authenticate')
37
- @api = new <%= app_name %>.API(login, password)
38
- @api.authenticate
39
- success: (user) ->
40
- Ti.App.Properties.setString('user', JSON.stringify(user))
41
- Ti.App.Properties.setString('login', login)
42
- Ti.App.Properties.setString('password', password)
43
- Ti.App.fireEvent 'login:success', user.username
44
- error: (e) ->
45
- Ti.API.error(e)
46
-
47
- # Registers a new user
48
- register: (options) ->
49
- api = new <%= app_name %>.API
50
- api.register options
51
-
52
- signOut: ->
53
- Ti.App.Properties.removeProperty 'user'
54
- Ti.App.Properties.removeProperty 'login'
55
- Ti.App.Properties.removeProperty 'password'
56
- Ti.App.fireEvent 'logout'
57
-
58
- init: ->
59
- Ti.UI.setBackgroundColor '#000'
60
- Ti.UI.iPhone.statusBarStyle = Ti.UI.iPhone.StatusBar.OPAQUE_BLACK
61
-
62
- showLogin = () ->
63
- rootWindow = Ti.UI.createWindow()
64
- login = <%= app_name %>.Views.Account.createLoginWindow
65
- title: 'Login'
66
- id: 'loginWindow'
67
- <%= app_name %>.App.sessionNavGroup = Ti.UI.iPhone.createNavigationGroup
68
- window: login
69
- rootWindow.add <%= app_name %>.App.sessionNavGroup
70
- Ti.App.addEventListener 'login:success', (e) ->
71
- rootWindow.close()
72
- rootWindow.open()
73
-
74
- loggedIn = <%= app_name %>.App.hasCurrentSession()
75
-
76
- if loggedIn
77
- <%= app_name %>.App.initTabGroup()
78
- else
79
- showLogin() unless loggedIn
80
-
81
- # Listen to an app-wide `logout` event and show the login again
82
- Ti.App.addEventListener 'logout', (e) ->
83
- showLogin()
84
-
85
- Ti.App.addEventListener 'login:success', (e) ->
86
- <%= app_name %>.App.initTabGroup()
87
-
88
3
  initTabGroup: ->
89
4
  <%= app_name %>.App.tabGroup = Ti.UI.createTabGroup()
90
5
 
@@ -93,19 +8,33 @@
93
8
  title: 'Sample'
94
9
  id: 'sampleWindow'
95
10
  orientationModes: <%= app_name %>.Helpers.Application.createOrientiationModes
96
- <%= app_name %>.App.sampleWindow = Ti.UI.createTab
11
+ <%= app_name %>.App.sampleTab = Ti.UI.createTab
97
12
  id: 'sampleTab'
98
13
  className: 'tabElement'
99
14
  title: 'Sample'
100
15
  window: sampleWindow
101
-
102
-
16
+
103
17
  # Bottom Tab Loader
104
- <%= app_name %>.App.tabGroup.addTab <%= app_name %>.App.sampleWindow
105
-
18
+ <%= app_name %>.App.tabGroup.addTab <%= app_name %>.App.sampleTab
19
+
20
+ # Settings Tab
21
+ settingsWindow = <%= app_name %>.Views.Settings.createMainWindow
22
+ title: 'Settings'
23
+ id: 'settingsWindow'
24
+ orientationModes: <%= app_name %>.Helpers.Application.createOrientiationModes
25
+
26
+ <%= app_name %>.App.settingsTab = Ti.UI.createTab
27
+ id: 'settingsTab'
28
+ className: 'tabElement'
29
+ title: 'Settings'
30
+ window: settingsWindow
31
+
32
+ # Bottom Tab Loader
33
+ <%= app_name %>.App.tabGroup.addTab <%= app_name %>.App.settingsTab
34
+
106
35
  <%= app_name %>.App.tabGroup.addEventListener 'focus', (e) ->
107
36
  <%= app_name %>.App.currentTab = e.tab
108
37
  Ti.API.info(<%= app_name %>.App.currentTab)
109
-
38
+
110
39
  # Open Tabs
111
- <%= app_name %>.App.tabGroup.open()
40
+ <%= app_name %>.App.tabGroup.open()
@@ -63,6 +63,18 @@ namespace :build do
63
63
  task :iphone do
64
64
  build
65
65
  end
66
+
67
+ desc "Build the app for Android"
68
+ task :android do
69
+ build({ :device => 'android' })
70
+ end
71
+
72
+ desc "Recreate build folder"
73
+ task :new do
74
+ system "rm -rf build"
75
+ system "mkdir -p build/iphone"
76
+ Rake::Task["setup:all"].invoke
77
+ end
66
78
  end
67
79
 
68
80
  def compile
@@ -111,7 +123,7 @@ def compile_coffee
111
123
  puts "Compiling CoffeeScript".blue
112
124
  paths = `find app/<%= app_name_underscore %> -name '*.coffee'`.split("\n")
113
125
  compilation = (
114
- system "coffee -p --join --bare #{paths.join(' ')} > Resources/<%= app_name_underscore%>.js" and
126
+ system "coffee -c -b --join Resources/<%= app_name_underscore %>.js -c -b #{paths.join(' ')}" and
115
127
  system "coffee -p --bare app/app.coffee > Resources/app.js"
116
128
  )
117
129
 
@@ -125,9 +137,16 @@ def compile_coffee
125
137
  end
126
138
 
127
139
  def build(options={})
128
- return unless compile
140
+ return "Broken" unless compile
129
141
  options[:device] ||= 'iphone'
142
+ if options[:device] == 'android'
143
+ sdk = ANDROID_SDK_VERSION
144
+ builder = "#{TI_ANDROID_DIR}/builder.py"
145
+ elsif options[:device].match /^i/
146
+ sdk = IPHONE_SDK_VERSION
147
+ builder = "#{TI_IPHONE_DIR}/builder.py"
148
+ end
130
149
  puts "Building with Titanium... (DEVICE_TYPE: #{options[:device]})".blue
131
- sh %Q{bash -c "#{TI_BUILD} run #{PROJECT_ROOT}/ #{IPHONE_SDK_VERSION} #{APP_ID} #{APP_NAME} #{APP_DEVICE} " \
150
+ sh %Q{bash -c "#{builder} run #{PROJECT_ROOT}/ #{sdk} #{APP_ID} #{APP_NAME} #{APP_DEVICE} " \
132
151
  | perl -pe 's/^\\[DEBUG\\].*$/\\e[35m$&\\e[0m/g;s/^\\[INFO\\].*$/\\e[36m$&\\e[0m/g;s/^\\[WARN\\].*$/\\e[33m$&\\e[0m/g;s/^\\[ERROR\\].*$/\\e[31m$&\\e[0m/g;'}
133
152
  end
@@ -13,13 +13,13 @@ module Config
13
13
  PROJECT_ROOT = FileUtils.pwd()
14
14
  PROJECT_VERSION = "0.0.1"
15
15
 
16
- IPHONE_SDK_VERSION = "4.3"
16
+ IPHONE_SDK_VERSION = "5.0"
17
17
  ANDROID_SDK_VERSION = ""
18
18
 
19
19
  # TODO: In Ti itself, we have the sdk version and the ti directory locations. We should use this configuration instead of
20
20
  # the one within Ti itself. This will allow the user to decide if they're building on a different version or have
21
21
  # Titanium in a different location.
22
- TI_SDK_VERSION = "1.6.2"
22
+ TI_SDK_VERSION = "1.8.0.1"
23
23
  TI_DIR = "/Library/Application\\ Support/Titanium"
24
24
 
25
25
  TI_ASSETS_DIR = "#{TI_DIR}/mobilesdk/osx/#{TI_SDK_VERSION}"
@@ -40,6 +40,18 @@ namespace :build do
40
40
  task :iphone do
41
41
  build
42
42
  end
43
+
44
+ desc "Build the app for Android"
45
+ task :android do
46
+ build({ :device => 'android' })
47
+ end
48
+
49
+ desc "Recreate build folder"
50
+ task :new do
51
+ system "rm -rf build"
52
+ system "mkdir -p build/iphone"
53
+ Rake::Task["setup:all"].invoke
54
+ end
43
55
  end
44
56
 
45
57
  def compile
@@ -57,20 +69,34 @@ def compile_coffee
57
69
  paths = [
58
70
  "app/#{APP_NAME}.coffee",
59
71
  "app/models/*.coffee",
60
- "app/views/*.coffee"
72
+ "app/views/*.coffee"
61
73
  ]
62
74
 
63
75
  puts "PATHS: #{paths.join(' ')} ".yellow
64
76
 
65
- `coffee -p --join --bare #{paths.join(' ')} > Resources/#{APP_NAME}.js`
66
- `coffee -p --bare src/app.coffee > Resources/app.js`
77
+ compilation = (
78
+ system "coffee -c -b --join Resources/#{APP_NAME}.js -c -b #{paths.join(' ')}" and
79
+ system "coffee -p --bare src/app.coffee > Resources/app.js"
80
+ )
81
+
82
+ if compilation
83
+ puts "Successfully compiled CoffeeScript".green
84
+ else
85
+ puts "Error compiling CoffeeScript".red
86
+ end
67
87
  end
68
88
 
69
89
  def build(options={})
70
- compile
90
+ return "Broken" unless compile
71
91
  options[:device] ||= 'iphone'
72
- puts "Building with Titanium with Ti... (DEVICE_TYPE:#{options[:device]})"
73
- FileUtils.mkdir_p "#{PROJECT_ROOT}/#{PROJECT_NAME}/build/iphone/"
74
- sh %Q{bash -c "#{TI_BUILD} run #{PROJECT_ROOT}/ #{IPHONE_SDK_VERSION} #{APP_ID} #{APP_NAME} #{APP_DEVICE}" \
92
+ if options[:device] == 'android'
93
+ sdk = ANDROID_SDK_VERSION
94
+ builder = "#{TI_ANDROID_DIR}/builder.py"
95
+ elsif options[:device].match /^i/
96
+ sdk = IPHONE_SDK_VERSION
97
+ builder = "#{TI_IPHONE_DIR}/builder.py"
98
+ end
99
+ puts "Building with Titanium... (DEVICE_TYPE: #{options[:device]})".blue
100
+ sh %Q{bash -c "#{builder} run #{PROJECT_ROOT}/ #{sdk} #{APP_ID} #{APP_NAME} #{APP_DEVICE} " \
75
101
  | perl -pe 's/^\\[DEBUG\\].*$/\\e[35m$&\\e[0m/g;s/^\\[INFO\\].*$/\\e[36m$&\\e[0m/g;s/^\\[WARN\\].*$/\\e[33m$&\\e[0m/g;s/^\\[ERROR\\].*$/\\e[31m$&\\e[0m/g;'}
76
102
  end
@@ -1,6 +1,6 @@
1
1
  module Ti
2
2
  module Utils
3
-
3
+
4
4
  def create_new_file(name, file=nil)
5
5
  log "Creating #{name}"
6
6
  contents = file.nil? ? '' : File.read(file)
@@ -8,38 +8,38 @@ module Ti
8
8
  File.open(location.join(name), 'w') { |f| f.write(contents) }
9
9
  end
10
10
  end
11
-
11
+
12
12
  def get_app_name
13
13
  config = File.open("tiapp.xml")
14
14
  doc = ::Nokogiri::XML(config)
15
15
  config.close
16
16
  doc.xpath('ti:app/name').text
17
17
  end
18
-
18
+
19
19
  def remove_files(*files)
20
20
  files.each do |file|
21
21
  log "Removing #{file} file."
22
22
  FileUtils.rm(location.join(file))
23
23
  end
24
24
  end
25
-
26
-
25
+
26
+
27
27
  def touch(*filenames)
28
28
  filenames.each do |filename|
29
29
  log "Creating #{filename} file."
30
30
  FileUtils.touch(location.join(filename))
31
31
  end
32
32
  end
33
-
34
-
33
+
34
+
35
35
  def create_directories(*dirs)
36
36
  dirs.each do |dir|
37
37
  log "Creating the #{dir} directory."
38
38
  FileUtils.mkdir_p(location.join(dir))
39
39
  end
40
40
  end
41
-
42
-
41
+
42
+
43
43
  def remove_directories(*names)
44
44
  names.each do |name|
45
45
  log "Removing #{name} directory."
@@ -47,16 +47,16 @@ module Ti
47
47
  end
48
48
  end
49
49
 
50
-
50
+
51
51
  def create_with_template(name, template_location, contents={})
52
52
  template = templates("#{template_location}.erb")
53
53
  eruby = Erubis::Eruby.new(File.read(template))
54
54
  File.open(location.join(name.gsub(/^\//, '')), 'w') { |f| f.write(eruby.result(contents))}
55
55
  end
56
-
56
+
57
57
  def append_to_router(name, type)
58
58
  router_contents = File.read(location.join("app/app.coffee"))
59
-
59
+
60
60
  if router_contents.include?(type.capitalize)
61
61
  contents = router_contents.sub( "#{type.capitalize}:", "#{type.capitalize}:\n #{name.capitalize}: {}" )
62
62
  else
@@ -64,27 +64,27 @@ module Ti
64
64
  end
65
65
  File.open(location.join("app/app.coffee"), 'w') { |f| f.write(contents) }
66
66
  end
67
-
68
-
67
+
68
+
69
69
  def templates(path)
70
70
  ::Ti.root.join('ti/templates').join(path)
71
71
  end
72
-
73
-
72
+
73
+
74
74
  def log(msg)
75
75
  ::Ti::Logger.report(msg)
76
76
  end
77
-
77
+
78
78
  def error(msg)
79
79
  ::Ti::Logger.error(msg)
80
80
  end
81
-
81
+
82
82
  def base_location
83
83
  @location ||= Pathname.new(Dir.pwd)
84
84
  end
85
85
  alias_method :location, :base_location
86
-
87
-
86
+
87
+
88
88
  def underscore(string)
89
89
  string.gsub(/::/, '/').
90
90
  gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
@@ -92,6 +92,6 @@ module Ti
92
92
  tr("-", "_").
93
93
  downcase
94
94
  end
95
-
95
+
96
96
  end
97
97
  end
@@ -1,3 +1,3 @@
1
1
  module Ti
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -56,7 +56,7 @@ describe "Ti Generator Commands" do
56
56
  context "with custom name (ti new Demo)" do
57
57
  it "should generate new project \"Demo\"" do
58
58
  response, status = capture_with_status(:stdout){ Ti::CLI.start(['new', 'Demo']) }
59
- response.should eql("\e[1m\e[32mCreating the tmp directory.\e[0m\e[0m\n\e[1m\e[32mRemoving README file.\e[0m\e[0m\n\e[1m\e[32mRemoving Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/images directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/vendor directory.\e[0m\e[0m\n\e[1m\e[32mCreating the config directory.\e[0m\e[0m\n\e[1m\e[32mCreating the docs directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating Readme.mkd file.\e[0m\e[0m\n\e[1m\e[32mCreating app/app.coffee\e[0m\e[0m\n\e[1m\e[32mCreating .gitignore\e[0m\e[0m\n\e[1m\e[32mCreating spec/app_spec.coffee\e[0m\e[0m\n\e[1m\e[32mYour Titanium project is ready for you to get rockin!\e[0m\e[0m\n")
59
+ response.should eql("\n\n\e]0;~/Workspace/ruby/Ti\aCreated iphone application project\n\n\n\e]0;~/Workspace/ruby/Ti\a\e]0;~/Workspace/ruby/Ti\a\e]0;~/Workspace/ruby/Ti\a\n\e[1m\e[32mCreating the tmp directory.\e[0m\e[0m\n\e[1m\e[32mRemoving README file.\e[0m\e[0m\n\e[1m\e[32mRemoving Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/images directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/vendor directory.\e[0m\e[0m\n\e[1m\e[32mCreating the config directory.\e[0m\e[0m\n\e[1m\e[32mCreating the docs directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/helpers directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets/partials directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/helpers directory.\e[0m\e[0m\n\e[1m\e[32mCreating spec/app_spec.coffee\e[0m\e[0m\n\e[1m\e[32mCreating app/demo/stylesheets/app.sass\e[0m\e[0m\n\e[1m\e[32mYour Titanium project is ready for you to get coding!\e[0m\e[0m\n")
60
60
  status.should eql(Ti::CLI::STATUS_TYPES[:success])
61
61
  end
62
62
  after (:all) do
@@ -66,8 +66,8 @@ describe "Ti Generator Commands" do
66
66
  context "with custom name and id (ti new Demo com.mycompany.demo)" do
67
67
  it "should generate new project \"Demo\" with id \"com.mycompany.demo\"" do
68
68
  response, status = capture_with_status(:stdout){ Ti::CLI.start(['new', 'Demo', 'com.mycompany.demo']) }
69
- response.should eql("\e[1m\e[32mCreating the tmp directory.\e[0m\e[0m\n\e[1m\e[32mRemoving README file.\e[0m\e[0m\n\e[1m\e[32mRemoving Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/images directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/vendor directory.\e[0m\e[0m\n\e[1m\e[32mCreating the config directory.\e[0m\e[0m\n\e[1m\e[32mCreating the docs directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating Readme.mkd file.\e[0m\e[0m\n\e[1m\e[32mCreating app/app.coffee\e[0m\e[0m\n\e[1m\e[32mCreating .gitignore\e[0m\e[0m\n\e[1m\e[32mCreating spec/app_spec.coffee\e[0m\e[0m\n\e[1m\e[32mYour Titanium project is ready for you to get rockin!\e[0m\e[0m\n")
70
- status.should eql(Ti::CLI::STATUS_TYPES[:success])
69
+ response.should eql("\n\n\e]0;~/Workspace/ruby/Ti\aCreated iphone application project\n\n\n\e]0;~/Workspace/ruby/Ti\a\e]0;~/Workspace/ruby/Ti\a\e]0;~/Workspace/ruby/Ti\a\n\e[1m\e[32mCreating the tmp directory.\e[0m\e[0m\n\e[1m\e[32mRemoving README file.\e[0m\e[0m\n\e[1m\e[32mRemoving Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/images directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/vendor directory.\e[0m\e[0m\n\e[1m\e[32mCreating the config directory.\e[0m\e[0m\n\e[1m\e[32mCreating the docs directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/helpers directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets/partials directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/helpers directory.\e[0m\e[0m\n\e[1m\e[32mCreating spec/app_spec.coffee\e[0m\e[0m\n\e[1m\e[32mCreating app/demo/stylesheets/app.sass\e[0m\e[0m\n\e[1m\e[32mYour Titanium project is ready for you to get coding!\e[0m\e[0m\n")
70
+ status.should eql(Ti::CLI::STATUS_TYPES[:success])
71
71
  end
72
72
  after (:all) do
73
73
  remove_directories("Demo")
@@ -76,8 +76,8 @@ describe "Ti Generator Commands" do
76
76
  context "with custom name, id and platform (ti new Demo com.mycompany.demo ipad)" do
77
77
  it "should generate new project \"Demo\" with id \"com.mycompany.demo\" and for platform \"ipad\"" do
78
78
  response, status = capture_with_status(:stdout){ Ti::CLI.start(['new', 'Demo', 'com.mycompany.demo']) }
79
- response.should eql("\e[1m\e[32mCreating the tmp directory.\e[0m\e[0m\n\e[1m\e[32mRemoving README file.\e[0m\e[0m\n\e[1m\e[32mRemoving Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/images directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/vendor directory.\e[0m\e[0m\n\e[1m\e[32mCreating the config directory.\e[0m\e[0m\n\e[1m\e[32mCreating the docs directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating Readme.mkd file.\e[0m\e[0m\n\e[1m\e[32mCreating app/app.coffee\e[0m\e[0m\n\e[1m\e[32mCreating .gitignore\e[0m\e[0m\n\e[1m\e[32mCreating spec/app_spec.coffee\e[0m\e[0m\n\e[1m\e[32mYour Titanium project is ready for you to get rockin!\e[0m\e[0m\n")
80
- status.should eql(Ti::CLI::STATUS_TYPES[:success])
79
+ response.should eql("\n\n\e]0;~/Workspace/ruby/Ti\aCreated iphone application project\n\n\n\e]0;~/Workspace/ruby/Ti\a\e]0;~/Workspace/ruby/Ti\a\e]0;~/Workspace/ruby/Ti\a\n\e[1m\e[32mCreating the tmp directory.\e[0m\e[0m\n\e[1m\e[32mRemoving README file.\e[0m\e[0m\n\e[1m\e[32mRemoving Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/images directory.\e[0m\e[0m\n\e[1m\e[32mCreating the Resources/vendor directory.\e[0m\e[0m\n\e[1m\e[32mCreating the config directory.\e[0m\e[0m\n\e[1m\e[32mCreating the docs directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/helpers directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets directory.\e[0m\e[0m\n\e[1m\e[32mCreating the app/demo/stylesheets/partials directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/models directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/views directory.\e[0m\e[0m\n\e[1m\e[32mCreating the spec/helpers directory.\e[0m\e[0m\n\e[1m\e[32mCreating spec/app_spec.coffee\e[0m\e[0m\n\e[1m\e[32mCreating app/demo/stylesheets/app.sass\e[0m\e[0m\n\e[1m\e[32mYour Titanium project is ready for you to get coding!\e[0m\e[0m\n")
80
+ status.should eql(Ti::CLI::STATUS_TYPES[:success])
81
81
  end
82
82
  after (:all) do
83
83
  remove_directories("Demo")
@@ -85,4 +85,4 @@ describe "Ti Generator Commands" do
85
85
  end
86
86
  end
87
87
  end
88
- end
88
+ end
data/ti.gemspec CHANGED
@@ -4,36 +4,37 @@ require "ti/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{ti}
7
- s.version = Ti::VERSION
7
+ s.version = '0.2.0'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Robert R Evans", "Julius Francisco", "Wynn Netherland", "Rupak Ganguly"]
10
10
  s.date = %q{2011-05-23}
11
11
  s.email = %q{robert@codewranglers.org}
12
- s.homepage = %q{http://github.com/codewranglers/ti}
13
- s.summary = %q{Ti - Titanium Project Generator}
12
+ s.homepage = %q{http://github.com/revans/Ti}
13
+ s.summary = %q{Ti - A Titanium Rapid Development Framework}
14
14
  s.description = %q{Titanium Rapid Development Framework}
15
15
  s.license = "MIT"
16
16
  s.files = `git ls-files`.split("\n")
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
-
21
20
 
22
- s.add_runtime_dependency(%q<sass>, ["~> 3.1.1"])
23
- s.add_runtime_dependency(%q<guard-sass>, ["~> 0.0.6"])
24
- s.add_runtime_dependency(%q<guard>, ["~> 0.3.4"])
25
- s.add_runtime_dependency(%q<guard-coffeescript>, ["~> 0.2.0"])
26
- s.add_runtime_dependency(%q<guard-livereload>, ["~> 0.1.10"])
27
- s.add_runtime_dependency(%q<jasmine>, ["~> 1.0.2.0"])
21
+ # Currently we're not using these. However, I'd prefer to use these instead of
22
+ # using the system command
23
+ # s.add_runtime_dependency(%q<sass>, ["~> 3.1.2"])
28
24
  s.add_runtime_dependency(%q<coffee-script>, ["~> 2.2.0"])
25
+
29
26
  s.add_runtime_dependency(%q<colored>, ["~> 1.2"])
30
- s.add_runtime_dependency(%q<rake>, ["~> 0.8.7"])
27
+ s.add_runtime_dependency(%q<rake>, ["~> 0.9.2"])
31
28
  s.add_runtime_dependency(%q<nokogiri>, ["~> 1.4.4"])
32
29
  s.add_runtime_dependency(%q<erubis>, ["~> 2.7.0"])
33
- # s.add_runtime_dependency(%q<betabuilder>, ["~> 0.4.1"])
34
-
35
- s.add_development_dependency(%q<bundler>, ["~> 1.0.10"])
36
- s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
37
- s.add_development_dependency(%q<rocco>, ["~> 0.6"])
30
+ s.add_runtime_dependency(%q<rocco>, ["~> 0.7"])
31
+ s.add_runtime_dependency(%q<thor>, ["~> 0.14.6"])
32
+ s.add_runtime_dependency(%q<rocco>, ["~> 0.7"])
33
+ s.add_runtime_dependency(%q<compass>, ["~> 0.7"])
34
+ s.add_runtime_dependency(%q<session>, ["~> 3.1"])
35
+
36
+ # s.add_development_dependency(%q<bundler>, ["~> 1.0.14"])
37
+ s.add_development_dependency(%q<bundler>, ["~> 1.1.pre.10"])
38
+ s.add_development_dependency(%q<rspec>, ["~> 2.6.0"])
38
39
  end
39
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -15,159 +15,137 @@ cert_chain: []
15
15
  date: 2011-05-23 00:00:00.000000000Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
- name: sass
19
- requirement: &2157524040 !ruby/object:Gem::Requirement
18
+ name: coffee-script
19
+ requirement: &70300038671460 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ~>
23
23
  - !ruby/object:Gem::Version
24
- version: 3.1.1
24
+ version: 2.2.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *2157524040
27
+ version_requirements: *70300038671460
28
28
  - !ruby/object:Gem::Dependency
29
- name: guard-sass
30
- requirement: &2157523380 !ruby/object:Gem::Requirement
29
+ name: colored
30
+ requirement: &70300038669280 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ~>
34
34
  - !ruby/object:Gem::Version
35
- version: 0.0.6
35
+ version: '1.2'
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *2157523380
38
+ version_requirements: *70300038669280
39
39
  - !ruby/object:Gem::Dependency
40
- name: guard
41
- requirement: &2157522680 !ruby/object:Gem::Requirement
40
+ name: rake
41
+ requirement: &70300038667360 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- version: 0.3.4
46
+ version: 0.9.2
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *2157522680
49
+ version_requirements: *70300038667360
50
50
  - !ruby/object:Gem::Dependency
51
- name: guard-coffeescript
52
- requirement: &2157521940 !ruby/object:Gem::Requirement
51
+ name: nokogiri
52
+ requirement: &70300038665700 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ~>
56
56
  - !ruby/object:Gem::Version
57
- version: 0.2.0
57
+ version: 1.4.4
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *2157521940
60
+ version_requirements: *70300038665700
61
61
  - !ruby/object:Gem::Dependency
62
- name: guard-livereload
63
- requirement: &2157521460 !ruby/object:Gem::Requirement
62
+ name: erubis
63
+ requirement: &70300038664120 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.10
68
+ version: 2.7.0
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *2157521460
71
+ version_requirements: *70300038664120
72
72
  - !ruby/object:Gem::Dependency
73
- name: jasmine
74
- requirement: &2157520980 !ruby/object:Gem::Requirement
73
+ name: rocco
74
+ requirement: &70300038662940 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ~>
78
78
  - !ruby/object:Gem::Version
79
- version: 1.0.2.0
79
+ version: '0.7'
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *2157520980
82
+ version_requirements: *70300038662940
83
83
  - !ruby/object:Gem::Dependency
84
- name: coffee-script
85
- requirement: &2157520480 !ruby/object:Gem::Requirement
84
+ name: thor
85
+ requirement: &70300038662260 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ~>
89
89
  - !ruby/object:Gem::Version
90
- version: 2.2.0
90
+ version: 0.14.6
91
91
  type: :runtime
92
92
  prerelease: false
93
- version_requirements: *2157520480
93
+ version_requirements: *70300038662260
94
94
  - !ruby/object:Gem::Dependency
95
- name: colored
96
- requirement: &2157520000 !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ~>
100
- - !ruby/object:Gem::Version
101
- version: '1.2'
102
- type: :runtime
103
- prerelease: false
104
- version_requirements: *2157520000
105
- - !ruby/object:Gem::Dependency
106
- name: rake
107
- requirement: &2157519520 !ruby/object:Gem::Requirement
95
+ name: rocco
96
+ requirement: &70300038660760 !ruby/object:Gem::Requirement
108
97
  none: false
109
98
  requirements:
110
99
  - - ~>
111
100
  - !ruby/object:Gem::Version
112
- version: 0.8.7
101
+ version: '0.7'
113
102
  type: :runtime
114
103
  prerelease: false
115
- version_requirements: *2157519520
104
+ version_requirements: *70300038660760
116
105
  - !ruby/object:Gem::Dependency
117
- name: nokogiri
118
- requirement: &2157519020 !ruby/object:Gem::Requirement
106
+ name: compass
107
+ requirement: &70300038658860 !ruby/object:Gem::Requirement
119
108
  none: false
120
109
  requirements:
121
110
  - - ~>
122
111
  - !ruby/object:Gem::Version
123
- version: 1.4.4
112
+ version: '0.7'
124
113
  type: :runtime
125
114
  prerelease: false
126
- version_requirements: *2157519020
115
+ version_requirements: *70300038658860
127
116
  - !ruby/object:Gem::Dependency
128
- name: erubis
129
- requirement: &2157518540 !ruby/object:Gem::Requirement
117
+ name: session
118
+ requirement: &70300038656760 !ruby/object:Gem::Requirement
130
119
  none: false
131
120
  requirements:
132
121
  - - ~>
133
122
  - !ruby/object:Gem::Version
134
- version: 2.7.0
123
+ version: '3.1'
135
124
  type: :runtime
136
125
  prerelease: false
137
- version_requirements: *2157518540
126
+ version_requirements: *70300038656760
138
127
  - !ruby/object:Gem::Dependency
139
128
  name: bundler
140
- requirement: &2157518060 !ruby/object:Gem::Requirement
129
+ requirement: &70300038655160 !ruby/object:Gem::Requirement
141
130
  none: false
142
131
  requirements:
143
132
  - - ~>
144
133
  - !ruby/object:Gem::Version
145
- version: 1.0.10
134
+ version: 1.1.pre.10
146
135
  type: :development
147
136
  prerelease: false
148
- version_requirements: *2157518060
137
+ version_requirements: *70300038655160
149
138
  - !ruby/object:Gem::Dependency
150
139
  name: rspec
151
- requirement: &2157517580 !ruby/object:Gem::Requirement
152
- none: false
153
- requirements:
154
- - - ~>
155
- - !ruby/object:Gem::Version
156
- version: 2.5.0
157
- type: :development
158
- prerelease: false
159
- version_requirements: *2157517580
160
- - !ruby/object:Gem::Dependency
161
- name: rocco
162
- requirement: &2157512960 !ruby/object:Gem::Requirement
140
+ requirement: &70300038652380 !ruby/object:Gem::Requirement
163
141
  none: false
164
142
  requirements:
165
143
  - - ~>
166
144
  - !ruby/object:Gem::Version
167
- version: '0.6'
145
+ version: 2.6.0
168
146
  type: :development
169
147
  prerelease: false
170
- version_requirements: *2157512960
148
+ version_requirements: *70300038652380
171
149
  description: Titanium Rapid Development Framework
172
150
  email: robert@codewranglers.org
173
151
  executables:
@@ -233,7 +211,7 @@ files:
233
211
  - spec/ti/logger_spec.rb
234
212
  - spec/ti/utils_spec.rb
235
213
  - ti.gemspec
236
- homepage: http://github.com/codewranglers/ti
214
+ homepage: http://github.com/revans/Ti
237
215
  licenses:
238
216
  - MIT
239
217
  post_install_message:
@@ -254,10 +232,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
254
232
  version: '0'
255
233
  requirements: []
256
234
  rubyforge_project:
257
- rubygems_version: 1.7.2
235
+ rubygems_version: 1.8.10
258
236
  signing_key:
259
237
  specification_version: 3
260
- summary: Ti - Titanium Project Generator
238
+ summary: Ti - A Titanium Rapid Development Framework
261
239
  test_files:
262
240
  - spec/cli/command_spec.rb
263
241
  - spec/fixtures/Coffeefile