lathe 0.0.5 → 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.
- data/lib/lathe/generators/mini_app/app/api/%app_path%/api_v1_%app_name%.rb.tt +13 -0
- data/lib/lathe/generators/mini_app/app/assets/javascripts/%app_path%/app/views/mini_apps/%app_name%/new.js.tt +3 -0
- data/lib/lathe/generators/mini_app/lib/%app_path%/engine.rb.tt +9 -2
- data/lib/lathe/version.rb +1 -1
- metadata +3 -2
@@ -3,8 +3,15 @@ module <%=package%>
|
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
isolate_namespace <%=package%>
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
initializer '<%=app_path%>.before' do |app|
|
7
|
+
#这儿的代码在rails启动是最先执行
|
8
|
+
end
|
9
|
+
initializer '<%=app_path%>.behind', :after=> :disable_dependency_loading do |app|
|
10
|
+
#这儿的代码在rails加载器都加载完成以后再执行
|
11
|
+
#加载API
|
12
|
+
::API.send "include",<%=package%>::ApiV1<%=app_name.camelize%>
|
13
|
+
|
14
|
+
MiniApp.apps << {:title=>I18n.t("ft.mini_app.<%=app_name%>.app_text"),:create_url=>'/mini_apps/<%=app_name%>s/new',:icon=> ActionController::Base.helpers.asset_path('<%=app_path%>/<%=app_name%>_white.png')}
|
8
15
|
end
|
9
16
|
end
|
10
17
|
end
|
data/lib/lathe/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lathe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- lib/lathe/generators/mini_app/Gemfile
|
49
49
|
- lib/lathe/generators/mini_app/README.md.tt
|
50
50
|
- lib/lathe/generators/mini_app/Rakefile.tt
|
51
|
+
- lib/lathe/generators/mini_app/app/api/%app_path%/api_v1_%app_name%.rb.tt
|
51
52
|
- lib/lathe/generators/mini_app/app/assets/images/%app_path%/%app_name%.png
|
52
53
|
- lib/lathe/generators/mini_app/app/assets/images/%app_path%/%app_name%_active.png
|
53
54
|
- lib/lathe/generators/mini_app/app/assets/images/%app_path%/%app_name%_white.png
|