ti 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -41,3 +41,6 @@ pkg
41
41
  #
42
42
  # For vim:
43
43
  *.swp
44
+
45
+ # For SASS
46
+ .sass-cache
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ti (0.1.0)
4
+ ti (0.1.2)
5
5
  coffee-script (~> 2.2.0)
6
6
  colored (~> 1.2)
7
7
  erubis (~> 2.7.0)
@@ -7,8 +7,50 @@ Just playing with some ideas.
7
7
  == Requirements
8
8
 
9
9
  * ruby 1.9.2
10
+ * Titanium Developer Mobile SDK 1.6.2
11
+ * CoffeeScript
10
12
  * libffi `brew install libffi`
11
13
 
14
+ == Sample App
15
+
16
+ Install the gem
17
+
18
+ gem install ti
19
+
20
+
21
+ Create a new Project
22
+
23
+ ti new HelloTi com.yourdomain.helloti iphone `
24
+
25
+
26
+ Create your views
27
+
28
+ ti s window Sample main
29
+ ti s window Settings main
30
+
31
+
32
+ Update your `app/app.coffee` to define the newly created Views
33
+
34
+ HelloTi =
35
+ Views:
36
+ Sample: {}
37
+ Settings: {}
38
+
39
+
40
+ Update your `app/hello_ti/stylesheets/app.sass` to include the generated sass
41
+
42
+ @import 'sample'
43
+ @import 'settings'
44
+
45
+
46
+ Run it!
47
+
48
+ rake
49
+
50
+
51
+ You can now start adding components. Enjoy!
52
+
53
+
12
54
  == Contributing to Ti
13
55
 
14
56
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
@@ -13,7 +13,7 @@ module Ti
13
13
  def cli_error(message, exit_status=nil)
14
14
  $stderr.puts message
15
15
  exit_status = STATUS_TYPES[exit_status] if exit_status.is_a?(Symbol)
16
- exit exit_status || 1
16
+ exit(exit_status || 1)
17
17
  end
18
18
  }
19
19
 
@@ -60,13 +60,17 @@ module Ti
60
60
  end
61
61
 
62
62
  map %w(c) => 'controller'
63
- desc "controller <window> <name>", "generate a controller for Titanium"
64
- def controller(ti_type, name)
65
- ::Ti::Generate::Controller.create(name, {
66
- :ti_type => ti_type,
63
+ desc "controller <name>", "generate a controller for Titanium"
64
+ def controller(name)
65
+ ::Ti::Generate::Controller.create(name, {
67
66
  :app_name => get_app_name,
68
67
  :name => name })
69
68
  end
69
+
70
+ desc "compile", "compiles all CoffeeScripts"
71
+ def compile
72
+ ::Ti::Compiler::CoffeeScripts.compile_all!
73
+ end
70
74
 
71
75
  end
72
76
  end
@@ -0,0 +1,23 @@
1
+ module Ti
2
+ module Compiler
3
+ class CoffeeScripts
4
+ class << self
5
+ include ::Ti::Utils
6
+
7
+ def compile_all!
8
+ coffeefile = File.read(base_location.join('Coffeefile')).split('\n').compact.delete_if { |l| l.include?("#") }
9
+ files = coffeefile.collect { |a| Dir.glob[a] }.flatten!.uniq
10
+ @contents = ''
11
+ files.each { |f| @contents << File.read(f) }
12
+ compile(@contents, base_location.join("Resources/#{get_app_name}.js")
13
+ end
14
+
15
+ def compile(contents, compile_to_location)
16
+ coffeescript = CoffeeScript.compile(contents, :no_wrap => false)
17
+ File.open(compile_to_location, 'w') { |f| f.write(coffeescript) }
18
+ end
19
+
20
+ end
21
+ end
22
+ end
23
+ end
@@ -2,7 +2,7 @@ module Ti
2
2
  module Generate
3
3
  class Controller
4
4
  class << self
5
- include Utils
5
+ include ::Ti::Utils
6
6
 
7
7
  def create(name, context={})
8
8
  create_controller_file(name, context)
@@ -10,18 +10,16 @@ module Ti
10
10
 
11
11
 
12
12
  def create_controller_file(name, context)
13
- log "Creating #{name} controller using a template."
14
- controller_directory = "app/#{underscore(get_app_name)}/controllers"
15
-
16
- case context[:ti_type]
17
- when 'window'
18
- template = templates("app/controllers/window.erb")
19
- else
20
- template = templates("app/controllers/controller.erb")
21
- end
13
+ log "Creating #{name} controller using a template."
14
+ app_name = get_app_name
15
+ controller_directory = "app/#{underscore(app_name)}/controllers"
16
+ context.merge!(:app_name => app_name, :name => name)
17
+
22
18
 
23
- payload = Pathname.new("#{controller_directory}/#{context[:domain].downcase}")
19
+ template = templates("app/controllers/controller.erb")
20
+ payload = Pathname.new("#{controller_directory}")
24
21
  contents = Erubis::Eruby.new(File.read(template)).result(context) if template
22
+
25
23
  create_directories(payload) unless File.directory?(payload)
26
24
  create_directories("spec/controllers") unless File.directory?("spec/controllers")
27
25
 
@@ -28,51 +28,24 @@ module Ti
28
28
  end
29
29
 
30
30
 
31
- def create_config_from_templates(project_name)
32
- eruby = Erubis::Eruby.new( File.read(templates("defaults/config.erb")) )
33
- File.open(location.join("config/config.rb"), 'w') do |f|
34
- f.write(eruby.result(:project_name => project_name))
35
- end
36
- end
37
-
38
- def create_defaults_with_template(name, contents={})
39
- template = templates("defaults/#{name}.erb")
40
- eruby = Erubis::Eruby.new(File.read(template))
41
-
42
- File.open(location.join(name), 'w') do |f|
43
- f.write(eruby.result(contents))
44
- end
45
-
46
- end
47
-
48
- def create_rakefile_from_template(project_name)
49
- eruby = Erubis::Eruby.new( File.read(templates("defaults/Rakefile.erb")) )
50
- File.open(location.join("Rakefile"), 'w') do |f|
51
- f.write( eruby.result({
52
- :app_name => project_name,
53
- :app_name_underscore => underscore(project_name)
54
- }))
55
- end
56
- end
57
-
58
31
  def generate_files
59
32
  create_project_directory
60
33
  touch('Readme.mkd')
61
- # touch('specs/spec_helper.coffee') # TODO: Necessary? If so, what is in it?
34
+ full_app_hash = {:app_name => @project_name, :app_name_underscore => underscore(@project_name)}
35
+ create_with_template('app/app.coffee', 'app/app.coffee', full_app_hash)
36
+ create_with_template("app/#{underscore(@project_name)}/app.coffee", 'app/app_project.coffee', full_app_hash)
62
37
 
63
- create_new_file("app/app.coffee", templates('app/app.coffee'))
64
38
  create_new_file(".gitignore", templates('gitignore'))
65
39
  create_new_file("spec/app_spec.coffee", templates('specs/app_spec.coffee'))
40
+ create_new_file("app/#{underscore(@project_name)}/stylesheets/app.sass", templates('app/stylesheets/app.sass'))
66
41
 
67
-
68
- # TODO: these can be refactored
69
- create_config_from_templates(@project_name)
70
- create_defaults_with_template("Rakefile", {:app_name => @project_name, :app_name_underscore => underscore(@project_name)})
71
- create_defaults_with_template("Readme.mkd", {:app_name => @project_name})
72
- create_defaults_with_template("Guardfile", {:app_name => underscore(@project_name)})
73
-
74
-
75
-
42
+
43
+ create_with_template('config/config.rb', 'defaults/config', full_app_hash)
44
+
45
+ default_templates = ['Rakefile', 'Readme.mkd', 'Guardfile']
46
+ default_templates.each do |tempfile|
47
+ create_with_template(tempfile, "defaults/#{tempfile}", full_app_hash)
48
+ end
76
49
 
77
50
  # load default images
78
51
  FileUtils.cp("/tmp/KS_nav_ui.png", location.join("Resources/images/"))
@@ -117,4 +90,4 @@ module Ti
117
90
  end
118
91
  end
119
92
  end
120
- end
93
+ end
@@ -11,15 +11,19 @@ module Ti
11
11
 
12
12
  def create_view_template(name, context)
13
13
  log "Creating #{name} view using a template."
14
- view_directory = "app/#{underscore(get_app_name)}/views"
14
+ app_name = get_app_name
15
+ view_directory = "app/#{underscore(app_name)}/views"
16
+ context.merge!(:app_name => app_name, :name => name)
15
17
 
16
18
  case context[:ti_type]
17
19
  when 'window'
18
20
  template = templates("app/views/window.erb")
19
21
  when 'tabgroup'
20
22
  template = templates("app/views/tabgroup.erb")
21
- else
23
+ when 'view'
22
24
  template = templates("app/views/view.erb")
25
+ else
26
+ template = templates("app/views/generic.erb")
23
27
  end
24
28
 
25
29
  payload = Pathname.new("#{view_directory}/#{(context[:domain] || '').downcase}")
@@ -32,6 +36,7 @@ module Ti
32
36
  File.open(location.join(filename), 'w') { |f| f.write(contents) }
33
37
 
34
38
  create_new_file("spec/views/#{name}_spec.coffee", templates("specs/app_spec.coffee"))
39
+ create_new_file("app/#{underscore(app_name)}/stylesheets/_#{(context[:domain] || '').downcase}.sass", templates("app/stylesheets/sample.sass"))
35
40
  end
36
41
 
37
42
  end
@@ -0,0 +1,11 @@
1
+ # This file is the entry point for the application. It sets up the four main
2
+ # tab windows.
3
+ # The `<%= app_name %>` object provides common access to app data, API wrapper and UI utilities
4
+
5
+ # ## ShwinkersMobile ##
6
+ <%= app_name %> =
7
+ Views:
8
+
9
+ Ti.include('<%= app_name_underscore %>.js')
10
+
11
+ <%= app_name %>.App.init()
@@ -0,0 +1,111 @@
1
+ <%= app_name %>.App =
2
+ init: ->
3
+ # This sets the background color of the master UIView
4
+ Ti.UI.iPhone.statusBarStyle = Titanium.UI.iPhone.StatusBar.OPAQUE_BLACK
5
+
6
+ # Return the currently logged in user from App persisted properties
7
+ currentUser: ->
8
+ userData = Ti.App.Properties.getString('user')
9
+ if userData?
10
+ user = JSON.parse(userData)
11
+ return user
12
+ else
13
+ null
14
+
15
+ # Authenticate a user
16
+ authenticate: (login, password) ->
17
+ Ti.API.debug('<%= app_name %>.App.authenticate')
18
+ this.api = new <%= app_name %>.API(login, password)
19
+ this.api.authenticate
20
+ success: (user) ->
21
+ # Stash the user for `.currentUser()`
22
+ Ti.App.Properties.setString('user', JSON.stringify(user))
23
+ # Stash the username/password for the user later
24
+ Ti.App.Properties.setString 'login', login
25
+ Ti.App.Properties.setString 'password', password
26
+ # Call any other callbacks
27
+ Ti.App.fireEvent 'login:success', user.username
28
+ error: (e) ->
29
+ Ti.API.error(e)
30
+
31
+ # Attempt to login with saved credentials
32
+ hasCurrentSession: ->
33
+ login = Ti.App.Properties.getString 'login'
34
+ password = Ti.App.Properties.getString 'password'
35
+ if login? and password?
36
+ Ti.API.debug "Found current session with login: #{login}"
37
+ this.api = new <%= app_name %>.API(login, password)
38
+ else
39
+ Ti.API.debug "No current session found", login, password
40
+ login? and password?
41
+
42
+ # Clears the current session by removing the persisted property for user
43
+ signOut: ->
44
+ Ti.App.Properties.removeProperty 'user'
45
+ Ti.App.Properties.removeProperty 'login'
46
+ Ti.App.Properties.removeProperty 'password'
47
+ Ti.App.fireEvent 'logout'
48
+
49
+ # A function to open the login window
50
+ showLogin = () ->
51
+ login = <%= app_name %>.Views.createLoginWindow
52
+ title: 'Login'
53
+ id: 'loginWindow'
54
+
55
+ # Open the login window modally with no nav bar
56
+ login.open
57
+ modal: true
58
+ navBarHidden: true
59
+
60
+ <%= app_name %>.App.initTabGroup()
61
+
62
+ initTabGroup: ->
63
+ # # Create a new TabGroup to manage tabs
64
+ <%= app_name %>.App.tabGroup = Ti.UI.createTabGroup()
65
+
66
+ # ### Set up the **sampleWindow**
67
+ sampleWindow = <%= app_name %>.Views.Sample.createMainWindow
68
+ title: 'Sample'
69
+ id: 'sampleWindow'
70
+
71
+ # Titanium magic to handle orientation changes
72
+ orientationModes: [
73
+ Ti.UI.PORTRAIT
74
+ Ti.UI.UPSIDE_PORTRAIT
75
+ Ti.UI.LANDSCAPE_LEFT
76
+ Ti.UI.LANDSCAPE_RIGHT
77
+ ]
78
+
79
+ # ### Set up the Sample Window
80
+ <%= app_name %>.App.sampleTab = Ti.UI.createTab
81
+ id: 'sampleTab'
82
+ className: 'tabElement'
83
+ title: 'sample'
84
+ window: sampleWindow
85
+
86
+ <%= app_name %>.App.tabGroup.addTab <%= app_name %>.App.sampleTab
87
+
88
+ # ### Set up the ***Settings Window***
89
+ settingsWindow = <%= app_name %>.Views.Settings.createMainWindow
90
+ title: 'Settings'
91
+ id: 'settingsWindow'
92
+
93
+ # Titanium magic to handle orientation changes
94
+ orientationModes: [
95
+ Ti.UI.PORTRAIT
96
+ Ti.UI.UPSIDE_PORTRAIT
97
+ Ti.UI.LANDSCAPE_LEFT
98
+ Ti.UI.LANDSCAPE_RIGHT
99
+ ]
100
+
101
+ <%= app_name %>.App.settingsTab = Ti.UI.createTab
102
+ id: 'settingsTab'
103
+ className: 'tabElement'
104
+ title: 'settings'
105
+ window: settingsWindow
106
+
107
+ <%= app_name %>.App.tabGroup.addTab <%= app_name %>.App.settingsTab
108
+
109
+ # Open the TabGroup and first window via selecte tab
110
+ <%= app_name %>.App.tabGroup.open()
111
+
@@ -0,0 +1,9 @@
1
+ <%= app_name %>.Controller.<%= name.capitalize %> =
2
+ # helloMethod: (params) ->
3
+ # Ti.API.info params
4
+ #
5
+ # yourvariable = <%= app_name %>.Controller.<%= name %>
6
+ # yourvariable.helloMehod
7
+ # text = 'Hello World'
8
+ #
9
+ # Insert your code here
@@ -0,0 +1,2 @@
1
+ // Import your _view_sass here
2
+ // @import 'view_name'
@@ -0,0 +1,13 @@
1
+ // You need to include id: or :className for your elements
2
+ //
3
+ // sampleLabel = Ti.UI.createLabel
4
+ // id: 'sampleLabel'
5
+ //
6
+
7
+
8
+ #sampleLabel
9
+ height: 10
10
+ font:
11
+ family: 'Monospace'
12
+ size: 12
13
+ color: '#000'
@@ -0,0 +1,3 @@
1
+ <%= app_name %>.Views.create<%= name.capitalize %>Window = (options) ->
2
+ window = Ti.UI.createWindow(options)
3
+ window
@@ -0,0 +1,3 @@
1
+ <%= app_name %>.Views.<%= domain.capitalize %>.create<%= name.capitalize %>TabGroup = (options) ->
2
+ tabGroup = Ti.UI.createTabGroup(options)
3
+ tabGroup
@@ -0,0 +1,3 @@
1
+ <%= app_name %>.Views.<%= domain.capitalize %>.create<%= name.capitalize %>View = (options) ->
2
+ view = Ti.UI.createView (options)
3
+ view
@@ -1,3 +1,3 @@
1
- <%= app_name %>.Views.<%= domain.capitalize %>.create<%= name.capitalize %><%= ti_type.capitalize %> = (options) ->
2
- <%= ti_type %> = Ti.UI.create<%= ti_type.capitalize %>(options)
3
- <%= ti_type %>
1
+ <%= app_name %>.Views.<%= domain.capitalize %>.create<%= name.capitalize %>Window = (options) ->
2
+ window = Ti.UI.createWindow(options)
3
+ window
@@ -0,0 +1,16 @@
1
+ # Coffeefile for Compiling CoffeeScripts
2
+ #
3
+ # Compiled top down. First listed is the first to be added for compiling. You can
4
+ # specify specific files to be loaded first and then use the generic wildcard to
5
+ # add the rest of the files that don't require specific loading.
6
+ #
7
+ # Example
8
+ # app/dailyfocus/models/user.coffee
9
+ # app/dailyfocus/models/task.coffee
10
+ # app/dailyfocus/models/**/*.coffee
11
+ # app/dailyfocus/controllers/**/*.coffee
12
+ # app/dailyfocus/views/**/*.coffee
13
+ #
14
+ app/<%= project_name %>/models/**/*.coffee
15
+ app/<%= project_name %>/controllers/**/*.coffee
16
+ app/<%= project_name %>/views/**/*.coffee
@@ -9,7 +9,7 @@ group 'coffee' do
9
9
  guard 'shell' do
10
10
  watch(%r{app/(.+\.coffee)}) do
11
11
  puts 'compiling coffeescript'
12
- `coffee -p --bare src > Resources/<%= app_name %>.js`
12
+ `coffee -p --bare src > Resources/<%= app_name_underscore %>.js`
13
13
  end
14
14
  end
15
15
  end
@@ -5,7 +5,7 @@ module Config
5
5
  doc = Nokogiri::XML(config)
6
6
  config.close
7
7
 
8
- PROJECT_NAME = "<%= project_name %>"
8
+ PROJECT_NAME = "<%= app_name %>"
9
9
  PROJECT_ROOT = File.dirname(__FILE__)
10
10
  PROJECT_VERSION = "0.0.1"
11
11
 
@@ -44,6 +44,13 @@ module Ti
44
44
  FileUtils.rm_rf(location.join(name))
45
45
  end
46
46
  end
47
+
48
+
49
+ def create_with_template(name, template_location, contents={})
50
+ template = templates("#{template_location}.erb")
51
+ eruby = Erubis::Eruby.new(File.read(template))
52
+ File.open(location.join(name.gsub(/^\//, '')), 'w') { |f| f.write(eruby.result(contents))}
53
+ end
47
54
 
48
55
 
49
56
  def templates(path)
@@ -1,3 +1,3 @@
1
1
  module Ti
2
- VERSION = "0.1.1"
3
- end
2
+ VERSION = "0.1.2"
3
+ end
@@ -0,0 +1,3 @@
1
+ app/dailyfocus/models/*
2
+ app/dailyfocus/controllers/*
3
+ app/dailyfocus/views/*
@@ -0,0 +1,9 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "Compiling CoffeeScripts" do
4
+ describe "Reading the file" do
5
+ before(:each) do
6
+
7
+ end
8
+ end
9
+ end
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.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,7 +16,7 @@ date: 2011-05-04 00:00:00.000000000Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: sass
19
- requirement: &2158629800 !ruby/object:Gem::Requirement
19
+ requirement: &2157508560 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ~>
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 3.1.1
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *2158629800
27
+ version_requirements: *2157508560
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: guard-sass
30
- requirement: &2158629240 !ruby/object:Gem::Requirement
30
+ requirement: &2157503920 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ~>
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 0.0.6
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *2158629240
38
+ version_requirements: *2157503920
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: guard
41
- requirement: &2158628740 !ruby/object:Gem::Requirement
41
+ requirement: &2157503320 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ~>
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: 0.3.4
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *2158628740
49
+ version_requirements: *2157503320
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: guard-coffeescript
52
- requirement: &2158628260 !ruby/object:Gem::Requirement
52
+ requirement: &2157502720 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ~>
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: 0.2.0
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *2158628260
60
+ version_requirements: *2157502720
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: guard-livereload
63
- requirement: &2158627760 !ruby/object:Gem::Requirement
63
+ requirement: &2157502120 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ~>
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: 0.1.10
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *2158627760
71
+ version_requirements: *2157502120
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: jasmine
74
- requirement: &2158627260 !ruby/object:Gem::Requirement
74
+ requirement: &2157501580 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ~>
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: 1.0.2.0
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *2158627260
82
+ version_requirements: *2157501580
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: coffee-script
85
- requirement: &2158626760 !ruby/object:Gem::Requirement
85
+ requirement: &2157501040 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ~>
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: 2.2.0
91
91
  type: :runtime
92
92
  prerelease: false
93
- version_requirements: *2158626760
93
+ version_requirements: *2157501040
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: colored
96
- requirement: &2158626260 !ruby/object:Gem::Requirement
96
+ requirement: &2157500560 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ~>
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '1.2'
102
102
  type: :runtime
103
103
  prerelease: false
104
- version_requirements: *2158626260
104
+ version_requirements: *2157500560
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: rocco
107
- requirement: &2158625680 !ruby/object:Gem::Requirement
107
+ requirement: &2157500080 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ~>
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: '0.6'
113
113
  type: :runtime
114
114
  prerelease: false
115
- version_requirements: *2158625680
115
+ version_requirements: *2157500080
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: rake
118
- requirement: &2158625200 !ruby/object:Gem::Requirement
118
+ requirement: &2157499600 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ~>
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: 0.8.7
124
124
  type: :runtime
125
125
  prerelease: false
126
- version_requirements: *2158625200
126
+ version_requirements: *2157499600
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: nokogiri
129
- requirement: &2158624680 !ruby/object:Gem::Requirement
129
+ requirement: &2157499120 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ~>
@@ -134,10 +134,10 @@ dependencies:
134
134
  version: 1.4.4
135
135
  type: :runtime
136
136
  prerelease: false
137
- version_requirements: *2158624680
137
+ version_requirements: *2157499120
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: erubis
140
- requirement: &2158624180 !ruby/object:Gem::Requirement
140
+ requirement: &2157498640 !ruby/object:Gem::Requirement
141
141
  none: false
142
142
  requirements:
143
143
  - - ~>
@@ -145,10 +145,10 @@ dependencies:
145
145
  version: 2.7.0
146
146
  type: :runtime
147
147
  prerelease: false
148
- version_requirements: *2158624180
148
+ version_requirements: *2157498640
149
149
  - !ruby/object:Gem::Dependency
150
150
  name: bundler
151
- requirement: &2158623680 !ruby/object:Gem::Requirement
151
+ requirement: &2157498160 !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements:
154
154
  - - ~>
@@ -156,10 +156,10 @@ dependencies:
156
156
  version: 1.0.10
157
157
  type: :development
158
158
  prerelease: false
159
- version_requirements: *2158623680
159
+ version_requirements: *2157498160
160
160
  - !ruby/object:Gem::Dependency
161
161
  name: rspec
162
- requirement: &2158623200 !ruby/object:Gem::Requirement
162
+ requirement: &2157497680 !ruby/object:Gem::Requirement
163
163
  none: false
164
164
  requirements:
165
165
  - - ~>
@@ -167,7 +167,7 @@ dependencies:
167
167
  version: 2.5.0
168
168
  type: :development
169
169
  prerelease: false
170
- version_requirements: *2158623200
170
+ version_requirements: *2157497680
171
171
  description: Titanium Project Generator
172
172
  email: robert@codewranglers.org
173
173
  executables:
@@ -188,6 +188,7 @@ files:
188
188
  - bin/ti
189
189
  - lib/ti.rb
190
190
  - lib/ti/cli.rb
191
+ - lib/ti/compiler/coffee_scripts.rb
191
192
  - lib/ti/config.rb
192
193
  - lib/ti/generate/controller.rb
193
194
  - lib/ti/generate/model.rb
@@ -195,11 +196,17 @@ files:
195
196
  - lib/ti/generate/view.rb
196
197
  - lib/ti/logger.rb
197
198
  - lib/ti/templates/app/app.coffee
199
+ - lib/ti/templates/app/app.coffee.erb
200
+ - lib/ti/templates/app/app_project.coffee.erb
198
201
  - lib/ti/templates/app/controllers/controller.erb
199
202
  - lib/ti/templates/app/controllers/window.erb
203
+ - lib/ti/templates/app/stylesheets/app.sass
204
+ - lib/ti/templates/app/stylesheets/sample.sass
205
+ - lib/ti/templates/app/views/generic.erb
200
206
  - lib/ti/templates/app/views/tabgroup.erb
201
207
  - lib/ti/templates/app/views/view.erb
202
208
  - lib/ti/templates/app/views/window.erb
209
+ - lib/ti/templates/defaults/Coffeefile.erb
203
210
  - lib/ti/templates/defaults/Guardfile.erb
204
211
  - lib/ti/templates/defaults/Rakefile.erb
205
212
  - lib/ti/templates/defaults/Readme.mkd.erb
@@ -210,7 +217,9 @@ files:
210
217
  - lib/ti/utils.rb
211
218
  - lib/ti/version.rb
212
219
  - spec/cli/command_spec.rb
220
+ - spec/fixtures/Coffeefile
213
221
  - spec/fixtures/configs/tiapp.xml
222
+ - spec/lib/compiler/coffee_scripts_spec.rb
214
223
  - spec/lib/config_spec.rb
215
224
  - spec/spec_helper.rb
216
225
  - spec/ti/generators/model_spec.rb
@@ -246,7 +255,9 @@ specification_version: 3
246
255
  summary: Ti
247
256
  test_files:
248
257
  - spec/cli/command_spec.rb
258
+ - spec/fixtures/Coffeefile
249
259
  - spec/fixtures/configs/tiapp.xml
260
+ - spec/lib/compiler/coffee_scripts_spec.rb
250
261
  - spec/lib/config_spec.rb
251
262
  - spec/spec_helper.rb
252
263
  - spec/ti/generators/model_spec.rb