hatio-core 0.0.6
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +28 -0
- data/Rakefile +6 -0
- data/lib/generators/hatio/bundle/USAGE +68 -0
- data/lib/generators/hatio/bundle/bundle_generator.rb +100 -0
- data/lib/generators/hatio/bundle/templates/04_seed_entities.rb +9 -0
- data/lib/generators/hatio/bundle/templates/05_seed_common_codes.rb +8 -0
- data/lib/generators/hatio/bundle/templates/06_seed_menus.rb +6 -0
- data/lib/generators/hatio/bundle/templates/Controller.js +24 -0
- data/lib/generators/hatio/bundle/templates/Gemfile +4 -0
- data/lib/generators/hatio/bundle/templates/LICENSE.txt +22 -0
- data/lib/generators/hatio/bundle/templates/README.md +29 -0
- data/lib/generators/hatio/bundle/templates/Rakefile +1 -0
- data/lib/generators/hatio/bundle/templates/engine.rb +7 -0
- data/lib/generators/hatio/bundle/templates/gemspec +19 -0
- data/lib/generators/hatio/bundle/templates/index.js +14 -0
- data/lib/generators/hatio/bundle/templates/init.rb +1 -0
- data/lib/generators/hatio/bundle/templates/lib_bundle.rb +12 -0
- data/lib/generators/hatio/bundle/templates/locale.js +13 -0
- data/lib/generators/hatio/bundle/templates/locales.yml +27 -0
- data/lib/generators/hatio/bundle/templates/pluggable_spot.rb +3 -0
- data/lib/generators/hatio/bundle/templates/routes.rb +3 -0
- data/lib/generators/hatio/bundle/templates/seeds.rb +4 -0
- data/lib/generators/hatio/bundle/templates/task.rake +4 -0
- data/lib/generators/hatio/bundle/templates/test.rb +8 -0
- data/lib/generators/hatio/bundle/templates/test_helper.rb +3 -0
- data/lib/generators/hatio/bundle/templates/version.rb +3 -0
- data/lib/generators/hatio/resource_api/resource_api_generator.rb +92 -0
- data/lib/generators/hatio/resource_api/templates/controller.rb +7 -0
- data/lib/generators/hatio/resource_api/templates/create.json.jbuilder +1 -0
- data/lib/generators/hatio/resource_api/templates/destroy.json.jbuilder +1 -0
- data/lib/generators/hatio/resource_api/templates/index.json.jbuilder +1 -0
- data/lib/generators/hatio/resource_api/templates/migration.rb +1 -0
- data/lib/generators/hatio/resource_api/templates/model.rb +3 -0
- data/lib/generators/hatio/resource_api/templates/show.json.jbuilder +3 -0
- data/lib/generators/hatio/resource_api/templates/update.json.jbuilder +2 -0
- data/lib/generators/hatio/resource_model/resource_model_generator.rb +52 -0
- data/lib/generators/hatio/resource_model/templates/migration.rb +1 -0
- data/lib/generators/hatio/resource_model/templates/model.rb +3 -0
- data/lib/generators/hatio/resource_view/USAGE +16 -0
- data/lib/generators/hatio/resource_view/resource_view_generator.rb +154 -0
- data/lib/generators/hatio/resource_view/templates/Model.js +19 -0
- data/lib/generators/hatio/resource_view/templates/Store.js +34 -0
- data/lib/generators/hatio/resource_view/templates/detail/Controller.js +81 -0
- data/lib/generators/hatio/resource_view/templates/detail/DetailForm.js +17 -0
- data/lib/generators/hatio/resource_view/templates/detail/DetailMain.js +26 -0
- data/lib/generators/hatio/resource_view/templates/detail/DetailPopup.js +25 -0
- data/lib/generators/hatio/resource_view/templates/detail/PopupController.js +90 -0
- data/lib/generators/hatio/resource_view/templates/detail/ViewController.js +78 -0
- data/lib/generators/hatio/resource_view/templates/item/Controller.js +81 -0
- data/lib/generators/hatio/resource_view/templates/item/ItemForm.js +19 -0
- data/lib/generators/hatio/resource_view/templates/item/ItemMain.js +18 -0
- data/lib/generators/hatio/resource_view/templates/item/ItemPopup.js +25 -0
- data/lib/generators/hatio/resource_view/templates/item/PopupController.js +90 -0
- data/lib/generators/hatio/resource_view/templates/item/ViewController.js +47 -0
- data/lib/generators/hatio/resource_view/templates/list/Controller.js +36 -0
- data/lib/generators/hatio/resource_view/templates/list/ListGrid.js +10 -0
- data/lib/generators/hatio/resource_view/templates/list/ListMain.js +20 -0
- data/lib/generators/hatio/resource_view/templates/list/ListSearch.js +9 -0
- data/lib/generators/hatio/resource_view/templates/report/Controller.js +53 -0
- data/lib/generators/hatio/resource_view/templates/report/ReportList.js +27 -0
- data/lib/generators/hatio/resource_view/templates/report/ReportMain.js +18 -0
- data/lib/generators/hatio/resource_view/templates/report/ReportSearch.js +9 -0
- data/lib/generators/hatio/util/api_util.rb +97 -0
- data/lib/generators/hatio/util/migration_util.rb +178 -0
- data/lib/generators/hatio/util/model_util.rb +77 -0
- data/lib/generators/hatio/util/report_view_util.rb +32 -0
- data/lib/generators/hatio/util/resource_view_util.rb +383 -0
- data/lib/generators/hatio/util/view_util.rb +214 -0
- data/lib/hatio-core.rb +33 -0
- data/lib/hatio-core/action_controller/search_helper.rb +332 -0
- data/lib/hatio-core/active_record/extension_logic.rb +36 -0
- data/lib/hatio-core/active_record/rem_tracker.rb +35 -0
- data/lib/hatio-core/active_record/stringified_id.rb +75 -0
- data/lib/hatio-core/active_record/stripper.rb +37 -0
- data/lib/hatio-core/active_record/userstamp.rb +48 -0
- data/lib/hatio-core/birt/birt_report.rb +42 -0
- data/lib/hatio-core/bundle/hatio_bundle.rb +37 -0
- data/lib/hatio-core/engine.rb +5 -0
- data/lib/hatio-core/exception/exceptions.rb +33 -0
- data/lib/hatio-core/patch/actionpack_hatio_patch.rb +28 -0
- data/lib/hatio-core/patch/date.rb +11 -0
- data/lib/hatio-core/patch/string_key.rb +56 -0
- data/lib/hatio-core/pluggable/pluggable_spot.rb +22 -0
- data/lib/hatio-core/util/hatio_util.rb +106 -0
- data/lib/hatio-core/version.rb +3 -0
- data/lib/tasks/hatiocore_tasks.rake +75 -0
- data/lib/utils/detect_invalid_js_format.rb +0 -0
- data/lib/utils/detect_mismatch_tags.rb +57 -0
- data/lib/utils/update_license.rb +5 -0
- data/lib/utils/upload_locale.rb +67 -0
- metadata +148 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1a01c517328e3017c1567d8280e17ab5b952f0fa
|
4
|
+
data.tar.gz: 52946a0f660a9849141b8d749d6a235b392741c7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 211c9ff448dac481cd6f26032a3655cede84b22b7b4d9452e84d5c27cd23bf57c7eab1ad8b51c31dd33c875fe773d9caa17b47065d8cf336e947a8006420500e
|
7
|
+
data.tar.gz: 27a58737ed100596b1ac7f50eb2b64987651542db13967564c86212b1da124be7f069ca353f7a629412df2a5cc486af9eaeeb2c43b7b80c03bde605f831be110
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2015 Hatio, Lab. http://hatiolab.com
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/Rakefile
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
Description:
|
2
|
+
Generate bundle
|
3
|
+
|
4
|
+
Example:
|
5
|
+
bundle exec rails generate hatio:bundle Fleet --bundle_name=fleet --dependency=base
|
6
|
+
Things Framework Loaded!
|
7
|
+
Generate fleet server bundle....
|
8
|
+
|
9
|
+
exist vendor/bundles
|
10
|
+
create vendor/bundles/fleet
|
11
|
+
create vendor/bundles/fleet/app
|
12
|
+
create vendor/bundles/fleet/app/controllers
|
13
|
+
create vendor/bundles/fleet/app/models
|
14
|
+
create vendor/bundles/fleet/app/helpers
|
15
|
+
create vendor/bundles/fleet/app/views
|
16
|
+
create vendor/bundles/fleet/config
|
17
|
+
create vendor/bundles/fleet/config/locales
|
18
|
+
create vendor/bundles/fleet/db
|
19
|
+
create vendor/bundles/fleet/db/migrate
|
20
|
+
create vendor/bundles/fleet/db/seeds.rb
|
21
|
+
create vendor/bundles/fleet/db/seeds
|
22
|
+
create vendor/bundles/fleet/db/seeds/04_fleet_entities.rb
|
23
|
+
create vendor/bundles/fleet/db/seeds/05_fleet_common_codes.rb
|
24
|
+
create vendor/bundles/fleet/db/seeds/06_fleet_menus.rb
|
25
|
+
create vendor/bundles/fleet/lib
|
26
|
+
create vendor/bundles/fleet/lib/fleet
|
27
|
+
create vendor/bundles/fleet/test
|
28
|
+
create vendor/bundles/fleet/lib/init.rb
|
29
|
+
create vendor/bundles/fleet/lib/fleet.rb
|
30
|
+
create vendor/bundles/fleet/lib/fleet/version.rb
|
31
|
+
create vendor/bundles/fleet/lib/fleet/engine.rb
|
32
|
+
create vendor/bundles/fleet/lib/fleet/pluggable_spot.rb
|
33
|
+
create vendor/bundles/fleet/config/routes.rb
|
34
|
+
create vendor/bundles/fleet/config/locales/en-US.yml
|
35
|
+
create vendor/bundles/fleet/config/locales/ko-KR.yml
|
36
|
+
create vendor/bundles/fleet/config/locales/zh-CN.yml
|
37
|
+
create vendor/bundles/fleet/lib/tasks/fleet.rake
|
38
|
+
create vendor/bundles/fleet/Gemfile
|
39
|
+
create vendor/bundles/fleet/Rakefile
|
40
|
+
create vendor/bundles/fleet/fleet.gemspec
|
41
|
+
create vendor/bundles/fleet/LICENSE.txt
|
42
|
+
create vendor/bundles/fleet/README.md
|
43
|
+
create vendor/bundles/fleet/test/test_helper.rb
|
44
|
+
create vendor/bundles/fleet/test/fleet_test.rb
|
45
|
+
|
46
|
+
Server bundle fleet generated!
|
47
|
+
Generate fleet client bundle....
|
48
|
+
|
49
|
+
create vendor/bundles/fleet/app/assets
|
50
|
+
create vendor/bundles/fleet/app/assets/images
|
51
|
+
create vendor/bundles/fleet/app/assets/javascripts
|
52
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle
|
53
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet
|
54
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/controller
|
55
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/model
|
56
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/store
|
57
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/view
|
58
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/mixin
|
59
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/locale
|
60
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/locale/en-US.js
|
61
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/locale/ko-KR.js
|
62
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/locale/zh-CN.js
|
63
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/controller/FleetController.js
|
64
|
+
create vendor/bundles/fleet/app/assets/javascripts/bundle/fleet/index.js
|
65
|
+
|
66
|
+
Client bundle fleet generated!
|
67
|
+
Success
|
68
|
+
create public/bundle/sample/controller/SampleController.js
|
@@ -0,0 +1,100 @@
|
|
1
|
+
module Hatio
|
2
|
+
module Generators
|
3
|
+
class BundleGenerator < Rails::Generators::NamedBase
|
4
|
+
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
class_option :bundle_name, :type => :string, :default => '', :desc => "bundle name you want to generate"
|
7
|
+
# APP_BUNDLE_PATH = File.join(Rails.root, "/vendor/bundles")
|
8
|
+
APP_BUNDLE_PATH = File.join(Rails.root, "..")
|
9
|
+
|
10
|
+
def generate_bundle
|
11
|
+
|
12
|
+
begin
|
13
|
+
raise "Bundle name is empty!" unless(name)
|
14
|
+
@bundle_name = name
|
15
|
+
puts "Generate #{@bundle_name} server bundle...."
|
16
|
+
|
17
|
+
# CREATE SERVER BUNDLE
|
18
|
+
empty_directory "#{APP_BUNDLE_PATH}"
|
19
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}"
|
20
|
+
|
21
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app"
|
22
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/controllers"
|
23
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/models"
|
24
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/helpers"
|
25
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/views"
|
26
|
+
|
27
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/config"
|
28
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/config/locales"
|
29
|
+
|
30
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/db"
|
31
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/db/migrate"
|
32
|
+
template "seeds.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/db/seeds.rb"
|
33
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/db/seeds"
|
34
|
+
template "04_seed_entities.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/db/seeds/04_#{@bundle_name}_entities.rb"
|
35
|
+
template "05_seed_common_codes.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/db/seeds/05_#{@bundle_name}_common_codes.rb"
|
36
|
+
template "06_seed_menus.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/db/seeds/06_#{@bundle_name}_menus.rb"
|
37
|
+
|
38
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/lib"
|
39
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/lib/#{@bundle_name}"
|
40
|
+
|
41
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/test"
|
42
|
+
|
43
|
+
template "init.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/lib/init.rb"
|
44
|
+
template "lib_bundle.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/lib/#{@bundle_name}.rb"
|
45
|
+
template "version.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/lib/#{@bundle_name}/version.rb"
|
46
|
+
template "engine.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/lib/#{@bundle_name}/engine.rb"
|
47
|
+
template "pluggable_spot.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/lib/#{@bundle_name}/pluggable_spot.rb"
|
48
|
+
|
49
|
+
template "routes.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/config/routes.rb"
|
50
|
+
|
51
|
+
['en-US', 'ko-KR', 'zh-CN'].each do |locale|
|
52
|
+
@locale = locale
|
53
|
+
template "locales.yml", "#{APP_BUNDLE_PATH}/#{@bundle_name}/config/locales/#{locale}.yml"
|
54
|
+
end
|
55
|
+
|
56
|
+
template "task.rake", "#{APP_BUNDLE_PATH}/#{@bundle_name}/lib/tasks/#{@bundle_name}.rake"
|
57
|
+
template "Gemfile", "#{APP_BUNDLE_PATH}/#{@bundle_name}/Gemfile"
|
58
|
+
template "Rakefile", "#{APP_BUNDLE_PATH}/#{@bundle_name}/Rakefile"
|
59
|
+
template "gemspec", "#{APP_BUNDLE_PATH}/#{@bundle_name}/#{@bundle_name}.gemspec"
|
60
|
+
template "LICENSE.txt", "#{APP_BUNDLE_PATH}/#{@bundle_name}/LICENSE.txt"
|
61
|
+
template "README.md", "#{APP_BUNDLE_PATH}/#{@bundle_name}/README.md"
|
62
|
+
|
63
|
+
template "test_helper.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/test/test_helper.rb"
|
64
|
+
template "test.rb", "#{APP_BUNDLE_PATH}/#{@bundle_name}/test/#{@bundle_name}_test.rb"
|
65
|
+
|
66
|
+
puts "Server bundle #{@bundle_name} generated!"
|
67
|
+
|
68
|
+
puts "Generate #{@bundle_name} client bundle...."
|
69
|
+
|
70
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets"
|
71
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/images"
|
72
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts"
|
73
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle"
|
74
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}"
|
75
|
+
|
76
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/controller"
|
77
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/model"
|
78
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/store"
|
79
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/view"
|
80
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/mixin"
|
81
|
+
empty_directory "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/locale"
|
82
|
+
|
83
|
+
['en-US', 'ko-KR', 'zh-CN'].each do |locale|
|
84
|
+
template "locale.js", "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/locale/#{locale}.js"
|
85
|
+
end
|
86
|
+
|
87
|
+
template "Controller.js", "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/controller/#{class_name}Controller.js"
|
88
|
+
template "index.js", "#{APP_BUNDLE_PATH}/#{@bundle_name}/app/assets/javascripts/bundle/#{@bundle_name}/index.js"
|
89
|
+
|
90
|
+
puts "Client bundle #{@bundle_name} generated!"
|
91
|
+
|
92
|
+
puts "Success"
|
93
|
+
rescue StandardError => e
|
94
|
+
puts "\nError : #{e}"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
end # end of Generator module
|
100
|
+
end # end of Hatio module
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Ext.define('<%= class_name %>.controller.<%= class_name %>Controller', {
|
2
|
+
extend: 'Ext.app.Controller',
|
3
|
+
|
4
|
+
requires: [],
|
5
|
+
|
6
|
+
stores: [],
|
7
|
+
|
8
|
+
models: [],
|
9
|
+
|
10
|
+
views: [],
|
11
|
+
|
12
|
+
controllers: [],
|
13
|
+
|
14
|
+
init: function() {
|
15
|
+
var self = this;
|
16
|
+
|
17
|
+
Ext.each(this.controllers, function(ctl) {
|
18
|
+
self.getController('<%= class_name %>.controller.' + ctl);
|
19
|
+
});
|
20
|
+
|
21
|
+
this.control({
|
22
|
+
});
|
23
|
+
}
|
24
|
+
});
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Hatio, Lab.
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Base
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem '<%= @bundle_name %>'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install <%= @bundle_name %>
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require '<%= @bundle_name %>/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "<%= @bundle_name %>"
|
8
|
+
gem.version = <%= class_name %>::VERSION
|
9
|
+
gem.authors = ["hatiolab"]
|
10
|
+
gem.email = ["admin@hatiolab.com"]
|
11
|
+
gem.description = %q{Bundle <%= class_name %>}
|
12
|
+
gem.summary = %q{Bundle for <%= @bundle_name %>}
|
13
|
+
gem.homepage = "http://www.hatiolab.com"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require_self
|
14
|
+
//= require ./controller/<%= class_name %>Controller
|
@@ -0,0 +1 @@
|
|
1
|
+
require '<%= @bundle_name %>'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require "<%= @bundle_name %>/version"
|
2
|
+
require "<%= @bundle_name %>/engine"
|
3
|
+
require "<%= @bundle_name %>/pluggable_spot"
|
4
|
+
|
5
|
+
# module <%= class_name %>
|
6
|
+
# Your code goes here...
|
7
|
+
# end
|
8
|
+
|
9
|
+
Hatio::Bundle.new '<%= @bundle_name %>', 1.0 do |bundle|
|
10
|
+
bundle.dependencies = ['base']
|
11
|
+
bundle.bootstrap_controllers = ['<%= class_name %>.controller.<%= class_name %>Controller']
|
12
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%= @locale %>:
|
2
|
+
activerecord:
|
3
|
+
models:
|
4
|
+
aaa: 'aaa'
|
5
|
+
attributes:
|
6
|
+
aaa:
|
7
|
+
|
8
|
+
button:
|
9
|
+
aaa: 'aaa'
|
10
|
+
|
11
|
+
tab:
|
12
|
+
aaa: 'aaa'
|
13
|
+
|
14
|
+
menu_item:
|
15
|
+
aaa: 'aaa'
|
16
|
+
|
17
|
+
transactions:
|
18
|
+
aaa: 'aaa'
|
19
|
+
|
20
|
+
legend:
|
21
|
+
aaa: 'aaaa'
|
22
|
+
|
23
|
+
link:
|
24
|
+
aaa: 'aaaa'
|
25
|
+
|
26
|
+
prompt:
|
27
|
+
aaa: 'aaaaa'
|