ti 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -2
- data/lib/ti.rb +5 -1
- data/lib/ti/compiler/coffee_scripts.rb +12 -5
- data/lib/ti/generate/project.rb +1 -1
- data/lib/ti/templates/defaults/Coffeefile.erb +3 -3
- data/lib/ti/version.rb +1 -1
- data/ti.gemspec +4 -4
- metadata +41 -41
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ti (0.1.
|
4
|
+
ti (0.1.3)
|
5
5
|
coffee-script (~> 2.2.0)
|
6
6
|
colored (~> 1.2)
|
7
7
|
erubis (~> 2.7.0)
|
@@ -12,7 +12,6 @@ PATH
|
|
12
12
|
jasmine (~> 1.0.2.0)
|
13
13
|
nokogiri (~> 1.4.4)
|
14
14
|
rake (~> 0.8.7)
|
15
|
-
rocco (~> 0.6)
|
16
15
|
sass (~> 3.1.1)
|
17
16
|
|
18
17
|
GEM
|
@@ -87,5 +86,6 @@ PLATFORMS
|
|
87
86
|
|
88
87
|
DEPENDENCIES
|
89
88
|
bundler (~> 1.0.10)
|
89
|
+
rocco (~> 0.6)
|
90
90
|
rspec (~> 2.5.0)
|
91
91
|
ti!
|
data/lib/ti.rb
CHANGED
@@ -23,7 +23,11 @@ module Ti
|
|
23
23
|
autoload :CLI, 'ti/cli.rb'
|
24
24
|
autoload :Logger, "ti/logger.rb"
|
25
25
|
autoload :Utils, "ti/utils.rb"
|
26
|
-
|
26
|
+
|
27
|
+
module Compiler
|
28
|
+
autoload :CoffeeScripts, 'ti/compiler/coffee_scripts.rb'
|
29
|
+
end
|
30
|
+
|
27
31
|
module Generate
|
28
32
|
autoload :Project, "ti/generate/project.rb"
|
29
33
|
autoload :Model, "ti/generate/model.rb"
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'coffee_script'
|
1
2
|
module Ti
|
2
3
|
module Compiler
|
3
4
|
class CoffeeScripts
|
@@ -5,15 +6,21 @@ module Ti
|
|
5
6
|
include ::Ti::Utils
|
6
7
|
|
7
8
|
def compile_all!
|
8
|
-
coffeefile = File.read(base_location.join('Coffeefile')).split(
|
9
|
-
files = coffeefile.collect { |a| Dir.glob
|
9
|
+
coffeefile = File.read(base_location.join('Coffeefile')).split("\n").compact.delete_if { |l| l.include?("#") }
|
10
|
+
files = coffeefile.collect { |a| Dir.glob(coffeefile) }.flatten!
|
11
|
+
if files.nil?
|
12
|
+
log "There are no files to compile."
|
13
|
+
exit(0)
|
14
|
+
end
|
10
15
|
@contents = ''
|
11
|
-
files.each { |f| @contents << File.read(f) }
|
12
|
-
|
16
|
+
files.uniq!.each { |f| @contents << File.read(f) }
|
17
|
+
compile_location = "Resources/#{underscore(get_app_name).downcase}.js"
|
18
|
+
compile(@contents, base_location.join(compile_location))
|
19
|
+
log "Your CoffeeScripts have been compiled to: #{compile_location}"
|
13
20
|
end
|
14
21
|
|
15
22
|
def compile(contents, compile_to_location)
|
16
|
-
coffeescript = CoffeeScript.compile(contents, :no_wrap => false)
|
23
|
+
coffeescript = ::CoffeeScript.compile(contents, :no_wrap => false)
|
17
24
|
File.open(compile_to_location, 'w') { |f| f.write(coffeescript) }
|
18
25
|
end
|
19
26
|
|
data/lib/ti/generate/project.rb
CHANGED
@@ -42,7 +42,7 @@ module Ti
|
|
42
42
|
|
43
43
|
create_with_template('config/config.rb', 'defaults/config', full_app_hash)
|
44
44
|
|
45
|
-
default_templates = ['Rakefile', 'Readme.mkd', 'Guardfile']
|
45
|
+
default_templates = ['Rakefile', 'Readme.mkd', 'Guardfile', 'Coffeefile']
|
46
46
|
default_templates.each do |tempfile|
|
47
47
|
create_with_template(tempfile, "defaults/#{tempfile}", full_app_hash)
|
48
48
|
end
|
@@ -11,6 +11,6 @@
|
|
11
11
|
# app/dailyfocus/controllers/**/*.coffee
|
12
12
|
# app/dailyfocus/views/**/*.coffee
|
13
13
|
#
|
14
|
-
app/<%=
|
15
|
-
app/<%=
|
16
|
-
app/<%=
|
14
|
+
app/<%= app_name %>/models/**/*.coffee
|
15
|
+
app/<%= app_name %>/controllers/**/*.coffee
|
16
|
+
app/<%= app_name %>/views/**/*.coffee
|
data/lib/ti/version.rb
CHANGED
data/ti.gemspec
CHANGED
@@ -9,9 +9,9 @@ Gem::Specification.new do |s|
|
|
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/
|
13
|
-
s.summary = %q{Ti}
|
14
|
-
s.description = %q{Titanium
|
12
|
+
s.homepage = %q{http://github.com/codewranglers/ti}
|
13
|
+
s.summary = %q{Ti - Titanium Project Generator}
|
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")
|
@@ -27,7 +27,6 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_runtime_dependency(%q<jasmine>, ["~> 1.0.2.0"])
|
28
28
|
s.add_runtime_dependency(%q<coffee-script>, ["~> 2.2.0"])
|
29
29
|
s.add_runtime_dependency(%q<colored>, ["~> 1.2"])
|
30
|
-
s.add_runtime_dependency(%q<rocco>, ["~> 0.6"])
|
31
30
|
s.add_runtime_dependency(%q<rake>, ["~> 0.8.7"])
|
32
31
|
s.add_runtime_dependency(%q<nokogiri>, ["~> 1.4.4"])
|
33
32
|
s.add_runtime_dependency(%q<erubis>, ["~> 2.7.0"])
|
@@ -35,5 +34,6 @@ Gem::Specification.new do |s|
|
|
35
34
|
|
36
35
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.10"])
|
37
36
|
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
37
|
+
s.add_development_dependency(%q<rocco>, ["~> 0.6"])
|
38
38
|
end
|
39
39
|
|
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.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -16,7 +16,7 @@ date: 2011-05-23 00:00:00.000000000Z
|
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: sass
|
19
|
-
requirement: &
|
19
|
+
requirement: &2158422720 !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: *
|
27
|
+
version_requirements: *2158422720
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: guard-sass
|
30
|
-
requirement: &
|
30
|
+
requirement: &2158422200 !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: *
|
38
|
+
version_requirements: *2158422200
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: guard
|
41
|
-
requirement: &
|
41
|
+
requirement: &2158421720 !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: *
|
49
|
+
version_requirements: *2158421720
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: guard-coffeescript
|
52
|
-
requirement: &
|
52
|
+
requirement: &2158421240 !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: *
|
60
|
+
version_requirements: *2158421240
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: guard-livereload
|
63
|
-
requirement: &
|
63
|
+
requirement: &2158420760 !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: *
|
71
|
+
version_requirements: *2158420760
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: jasmine
|
74
|
-
requirement: &
|
74
|
+
requirement: &2158420280 !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: *
|
82
|
+
version_requirements: *2158420280
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: coffee-script
|
85
|
-
requirement: &
|
85
|
+
requirement: &2158419800 !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: *
|
93
|
+
version_requirements: *2158419800
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: colored
|
96
|
-
requirement: &
|
96
|
+
requirement: &2158419320 !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
99
|
- - ~>
|
@@ -101,21 +101,10 @@ dependencies:
|
|
101
101
|
version: '1.2'
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
|
-
version_requirements: *
|
105
|
-
- !ruby/object:Gem::Dependency
|
106
|
-
name: rocco
|
107
|
-
requirement: &2155597820 !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
|
-
requirements:
|
110
|
-
- - ~>
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: '0.6'
|
113
|
-
type: :runtime
|
114
|
-
prerelease: false
|
115
|
-
version_requirements: *2155597820
|
104
|
+
version_requirements: *2158419320
|
116
105
|
- !ruby/object:Gem::Dependency
|
117
106
|
name: rake
|
118
|
-
requirement: &
|
107
|
+
requirement: &2158418840 !ruby/object:Gem::Requirement
|
119
108
|
none: false
|
120
109
|
requirements:
|
121
110
|
- - ~>
|
@@ -123,10 +112,10 @@ dependencies:
|
|
123
112
|
version: 0.8.7
|
124
113
|
type: :runtime
|
125
114
|
prerelease: false
|
126
|
-
version_requirements: *
|
115
|
+
version_requirements: *2158418840
|
127
116
|
- !ruby/object:Gem::Dependency
|
128
117
|
name: nokogiri
|
129
|
-
requirement: &
|
118
|
+
requirement: &2158412200 !ruby/object:Gem::Requirement
|
130
119
|
none: false
|
131
120
|
requirements:
|
132
121
|
- - ~>
|
@@ -134,10 +123,10 @@ dependencies:
|
|
134
123
|
version: 1.4.4
|
135
124
|
type: :runtime
|
136
125
|
prerelease: false
|
137
|
-
version_requirements: *
|
126
|
+
version_requirements: *2158412200
|
138
127
|
- !ruby/object:Gem::Dependency
|
139
128
|
name: erubis
|
140
|
-
requirement: &
|
129
|
+
requirement: &2158411700 !ruby/object:Gem::Requirement
|
141
130
|
none: false
|
142
131
|
requirements:
|
143
132
|
- - ~>
|
@@ -145,10 +134,10 @@ dependencies:
|
|
145
134
|
version: 2.7.0
|
146
135
|
type: :runtime
|
147
136
|
prerelease: false
|
148
|
-
version_requirements: *
|
137
|
+
version_requirements: *2158411700
|
149
138
|
- !ruby/object:Gem::Dependency
|
150
139
|
name: bundler
|
151
|
-
requirement: &
|
140
|
+
requirement: &2158411180 !ruby/object:Gem::Requirement
|
152
141
|
none: false
|
153
142
|
requirements:
|
154
143
|
- - ~>
|
@@ -156,10 +145,10 @@ dependencies:
|
|
156
145
|
version: 1.0.10
|
157
146
|
type: :development
|
158
147
|
prerelease: false
|
159
|
-
version_requirements: *
|
148
|
+
version_requirements: *2158411180
|
160
149
|
- !ruby/object:Gem::Dependency
|
161
150
|
name: rspec
|
162
|
-
requirement: &
|
151
|
+
requirement: &2158410660 !ruby/object:Gem::Requirement
|
163
152
|
none: false
|
164
153
|
requirements:
|
165
154
|
- - ~>
|
@@ -167,8 +156,19 @@ dependencies:
|
|
167
156
|
version: 2.5.0
|
168
157
|
type: :development
|
169
158
|
prerelease: false
|
170
|
-
version_requirements: *
|
171
|
-
|
159
|
+
version_requirements: *2158410660
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
name: rocco
|
162
|
+
requirement: &2158410160 !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
164
|
+
requirements:
|
165
|
+
- - ~>
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0.6'
|
168
|
+
type: :development
|
169
|
+
prerelease: false
|
170
|
+
version_requirements: *2158410160
|
171
|
+
description: Titanium Rapid Development Framework
|
172
172
|
email: robert@codewranglers.org
|
173
173
|
executables:
|
174
174
|
- ti
|
@@ -228,7 +228,7 @@ files:
|
|
228
228
|
- spec/ti/logger_spec.rb
|
229
229
|
- spec/ti/utils_spec.rb
|
230
230
|
- ti.gemspec
|
231
|
-
homepage: http://github.com/
|
231
|
+
homepage: http://github.com/codewranglers/ti
|
232
232
|
licenses:
|
233
233
|
- MIT
|
234
234
|
post_install_message:
|
@@ -252,7 +252,7 @@ rubyforge_project:
|
|
252
252
|
rubygems_version: 1.7.2
|
253
253
|
signing_key:
|
254
254
|
specification_version: 3
|
255
|
-
summary: Ti
|
255
|
+
summary: Ti - Titanium Project Generator
|
256
256
|
test_files:
|
257
257
|
- spec/cli/command_spec.rb
|
258
258
|
- spec/fixtures/Coffeefile
|