jt-mobile-kit 1.0.3 → 1.1.1
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.
- checksums.yaml +8 -8
- data/bin/jtc +4 -0
- data/lib/jt-mobile-kit/gen_controller/gen_controller.rb +18 -0
- data/lib/jt-mobile-kit/gen_controller/templates/controller.js.erb +6 -0
- data/lib/jt-mobile-kit/gen_routing/gen_routing.rb +20 -0
- data/lib/jt-mobile-kit/gen_routing/templates/routing.js.erb +5 -0
- data/lib/jt-mobile-kit/gen_view/gen_view.rb +19 -0
- data/lib/jt-mobile-kit/{www_rb/templates/component/.gitkeep → gen_view/templates/view.haml.erb} +0 -0
- data/lib/jt-mobile-kit/jt_generator.rb +30 -0
- data/lib/jt-mobile-kit/version.rb +1 -1
- data/lib/jt-mobile-kit/www_rb/templates/Gemfile +3 -3
- data/lib/jt-mobile-kit/www_rb/templates/component/container/.gitkeep +0 -0
- data/lib/jt-mobile-kit/www_rb/templates/component/custom.rb +0 -0
- data/lib/jt-mobile-kit/www_rb/templates/js/routes.js +3 -0
- metadata +15 -33
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjBmMGJlNDJmZTA4NGRkMDE3N2U4YzAwYWY3ZDhjYzM1M2ZlNTMwOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mzk1MWYwYzMwNmFkYWYyMWNkNjk1MmVjNzQwYjRjMGFiYTRjN2FkYg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTRhYmJiYzVmZmFmOWNmMmUzNTI1NGQzNWFhMmIxOGRjZGU0ZTJmMzM4NjMy
|
10
|
+
ODU5ZWMwMTJmMWU1NTg2Y2FhMWVkZjc4OTFlNDM4Zjg2YmI1NGM4OWE4MzZh
|
11
|
+
YTgzZTI4NjU1YTk3ODk3ZjcyMzRhNjM2NDk0NmNiM2UxOTk1YWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGE0OGI0YzdmNDBmMmYyM2E4Mzg5NjlkODcyYWQ0ZmZmMTc4N2QxN2I2YWVk
|
14
|
+
MmM5MmQ5MWVjNGMxZGY1OWU3NjliMDk4ZmVhNDk2N2RkN2MxZjQwMzI5Zjcw
|
15
|
+
ZDljYjNiMDBhYzRmYmU2ODkwNTZhODZiNDVjNWU1MDZjNzM3MjU=
|
data/bin/jtc
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'erb'
|
2
|
+
|
3
|
+
class GenController < Thor::Group
|
4
|
+
include Thor::Actions
|
5
|
+
source_root File.expand_path("../templates", __FILE__)
|
6
|
+
def initialize(args=[], options={}, config={})
|
7
|
+
super
|
8
|
+
self.destination_root= ""
|
9
|
+
end
|
10
|
+
|
11
|
+
argument :name
|
12
|
+
|
13
|
+
def gen
|
14
|
+
controller_name = name
|
15
|
+
content = ERB.new File.read("#{GenController.source_root}/controller.js.erb")
|
16
|
+
create_file "js/controller/#{controller_name}_controller.js", content.result(binding)
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'erb'
|
2
|
+
|
3
|
+
class GenRouting < Thor::Group
|
4
|
+
include Thor::Actions
|
5
|
+
source_root File.expand_path("../templates", __FILE__)
|
6
|
+
def initialize(args=[], options={}, config={})
|
7
|
+
super
|
8
|
+
self.destination_root= ""
|
9
|
+
end
|
10
|
+
|
11
|
+
argument :name
|
12
|
+
|
13
|
+
def gen
|
14
|
+
page_name = name
|
15
|
+
controller_name = name
|
16
|
+
content = ERB.new File.read("#{GenRouting.source_root}/routing.js.erb")
|
17
|
+
inject_into_file "js/routes.js",content.result(binding), :after => "//routing generate"
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'erb'
|
2
|
+
|
3
|
+
class GenView < Thor::Group
|
4
|
+
include Thor::Actions
|
5
|
+
source_root File.expand_path("../templates", __FILE__)
|
6
|
+
def initialize(args=[], options={}, config={})
|
7
|
+
super
|
8
|
+
self.destination_root= ""
|
9
|
+
end
|
10
|
+
|
11
|
+
argument :name
|
12
|
+
|
13
|
+
def gen
|
14
|
+
page_name = name
|
15
|
+
content = ERB.new File.read("#{GenView.source_root}/view.haml.erb")
|
16
|
+
create_file "hamls/pages/#{page_name}_page.haml", content.result(binding)
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
data/lib/jt-mobile-kit/{www_rb/templates/component/.gitkeep → gen_view/templates/view.haml.erb}
RENAMED
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'jt-mobile-kit/gen_controller/gen_controller'
|
3
|
+
require 'jt-mobile-kit/gen_view/gen_view'
|
4
|
+
require 'jt-mobile-kit/gen_routing/gen_routing'
|
5
|
+
|
6
|
+
|
7
|
+
class JtGenerator < Thor
|
8
|
+
include Thor::Actions
|
9
|
+
source_root File.expand_path("../", __FILE__)
|
10
|
+
|
11
|
+
register GenController, :controller, "controller", "Generate Controller"
|
12
|
+
register GenView, :view, "view", "Generate view"
|
13
|
+
register GenRouting, :routing, "routing", "Generate routing"
|
14
|
+
|
15
|
+
desc :scaffold, "generate scaffold"
|
16
|
+
def scaffold name
|
17
|
+
GenController.start [name]
|
18
|
+
GenView.start [name]
|
19
|
+
GenRouting.start [name]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
class JtMain < Thor
|
26
|
+
register JtGenerator, :g, "g", "Generate something"
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
|
@@ -3,9 +3,9 @@ source 'https://rubygems.org'
|
|
3
3
|
gem 'haml'
|
4
4
|
gem 'thor'
|
5
5
|
gem 'jt-partial', "1.0.1"
|
6
|
-
gem 'moode-haml-toolkit', "1.
|
6
|
+
gem 'moode-haml-toolkit', "1.1.2"
|
7
7
|
gem 'Rwebserver'
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
gem 'moode-haml-component-angular', "0.0.1"
|
10
|
+
|
11
11
|
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jt-mobile-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jtong
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: thor
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ! '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ! '>='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rails
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ! '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ! '>='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
11
|
+
date: 2013-08-04 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
41
13
|
description: ! ' description'
|
42
14
|
email:
|
43
15
|
- jtong.kata@gmail.com
|
@@ -47,6 +19,7 @@ executables:
|
|
47
19
|
- jt_js
|
48
20
|
- jt_www_js
|
49
21
|
- jt_www_rb
|
22
|
+
- jtc
|
50
23
|
extensions: []
|
51
24
|
extra_rdoc_files: []
|
52
25
|
files:
|
@@ -57,6 +30,7 @@ files:
|
|
57
30
|
- bin/jt_new_js
|
58
31
|
- bin/jt_www_js
|
59
32
|
- bin/jt_www_rb
|
33
|
+
- bin/jtc
|
60
34
|
- lib/jt-mobile-kit/android/android.rb
|
61
35
|
- lib/jt-mobile-kit/android/templates/AndroidManifest.xml
|
62
36
|
- lib/jt-mobile-kit/android/templates/ant.properties
|
@@ -132,6 +106,13 @@ files:
|
|
132
106
|
- lib/jt-mobile-kit/android/templates/src/com/moode/sms/utils/Constants.java
|
133
107
|
- lib/jt-mobile-kit/android/templates/src/com/moode/sms/utils/JsonUtils.java
|
134
108
|
- lib/jt-mobile-kit/android/templates/src/com/moode/sms/utils/StringUtils.java
|
109
|
+
- lib/jt-mobile-kit/gen_controller/gen_controller.rb
|
110
|
+
- lib/jt-mobile-kit/gen_controller/templates/controller.js.erb
|
111
|
+
- lib/jt-mobile-kit/gen_routing/gen_routing.rb
|
112
|
+
- lib/jt-mobile-kit/gen_routing/templates/routing.js.erb
|
113
|
+
- lib/jt-mobile-kit/gen_view/gen_view.rb
|
114
|
+
- lib/jt-mobile-kit/gen_view/templates/view.haml.erb
|
115
|
+
- lib/jt-mobile-kit/jt_generator.rb
|
135
116
|
- lib/jt-mobile-kit/scaffold/scaffold.thor
|
136
117
|
- lib/jt-mobile-kit/scaffold/templates/_list_page.haml
|
137
118
|
- lib/jt-mobile-kit/scaffold/templates/_page.haml
|
@@ -168,6 +149,7 @@ files:
|
|
168
149
|
- lib/jt-mobile-kit/www_js/templates/spec/lib/jasmine-1.2.0/jasmine.js
|
169
150
|
- lib/jt-mobile-kit/www_js/templates/spec/lib/jasmine-1.2.0/MIT.LICENSE
|
170
151
|
- lib/jt-mobile-kit/www_js/www_js.rb
|
152
|
+
- lib/jt-mobile-kit/www_rb/templates/component/custom.rb
|
171
153
|
- lib/jt-mobile-kit/www_rb/templates/css/index.css
|
172
154
|
- lib/jt-mobile-kit/www_rb/templates/Gemfile
|
173
155
|
- lib/jt-mobile-kit/www_rb/templates/Gemfile.lock
|
@@ -209,7 +191,7 @@ files:
|
|
209
191
|
- lib/jt-mobile-kit/www_js/templates/component/.gitkeep
|
210
192
|
- lib/jt-mobile-kit/www_rb/templates/.gitignore
|
211
193
|
- lib/jt-mobile-kit/www_rb/templates/.rvmrc
|
212
|
-
- lib/jt-mobile-kit/www_rb/templates/component/.gitkeep
|
194
|
+
- lib/jt-mobile-kit/www_rb/templates/component/container/.gitkeep
|
213
195
|
- lib/jt-mobile-kit/www_rb/templates/hamls/pages/.gitkeep
|
214
196
|
- lib/jt-mobile-kit/www_rb/templates/js/controller/.gitkeep
|
215
197
|
- lib/jt-mobile-kit/www_rb/templates/pages/.gitkeep
|
@@ -232,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
214
|
version: '0'
|
233
215
|
requirements: []
|
234
216
|
rubyforge_project:
|
235
|
-
rubygems_version: 2.0.
|
217
|
+
rubygems_version: 2.0.3
|
236
218
|
signing_key:
|
237
219
|
specification_version: 4
|
238
220
|
summary: summary
|