cauta-desert 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -3,11 +3,11 @@ ActiveRecord::ConnectionAdapters::SchemaStatements.module_eval do
|
|
3
3
|
initialize_schema_migrations_table_without_plugins
|
4
4
|
|
5
5
|
begin
|
6
|
-
|
7
|
-
unless ActiveRecord::Base.connection.
|
8
|
-
execute "CREATE TABLE #{
|
6
|
+
smt = Desert::PluginMigrations::Migrator.schema_migrations_table_name
|
7
|
+
unless ActiveRecord::Base.connection.tables.include?(smt)
|
8
|
+
execute "CREATE TABLE #{smt} (plugin_name #{type_to_sql(:string)}, version #{type_to_sql(:string)})"
|
9
9
|
end
|
10
|
-
plugins_and_versions = select_all("SELECT plugin_name, version from #{
|
10
|
+
plugins_and_versions = select_all("SELECT plugin_name, version from #{smt}")
|
11
11
|
plugins_and_versions.each do |plugin_data|
|
12
12
|
plugin_name, version = plugin_data["plugin_name"], plugin_data["version"]
|
13
13
|
plugin = Desert::Manager.find_plugin(plugin_name)
|
@@ -33,4 +33,4 @@ ActiveRecord::ConnectionAdapters::SchemaStatements.module_eval do
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
alias_method_chain :initialize_schema_migrations_table, :plugins
|
36
|
-
end
|
36
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
ActionView::Base.class_eval do
|
2
|
+
def initialize_with_desert_plugins(*args)
|
3
|
+
initialize_without_desert_plugins *args
|
4
|
+
|
5
|
+
Desert::Manager.plugins.reverse.each do |plugin|
|
6
|
+
view_paths << plugin.templates_path
|
7
|
+
end
|
8
|
+
end
|
9
|
+
alias_method_chain :initialize, :desert_plugins
|
10
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cauta-desert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal Labs
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-
|
15
|
+
date: 2009-08-21 00:00:00 -07:00
|
16
16
|
default_executable:
|
17
17
|
dependencies: []
|
18
18
|
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/desert/plugin_templates/2.0.0/action_mailer.rb
|
56
56
|
- lib/desert/plugin_templates/2.0.2/action_view.rb
|
57
57
|
- lib/desert/plugin_templates/2.1.0/action_view.rb
|
58
|
+
- lib/desert/plugin_templates/2.2.0/action_view.rb
|
58
59
|
- lib/desert/plugin_templates/action_controller.rb
|
59
60
|
- lib/desert/plugin_templates/action_view.rb
|
60
61
|
- lib/desert/rails.rb
|