capricorn 0.2.16 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/capricorn/actors/base_actor.rb +5 -0
- data/lib/capricorn/satellite.rb +2 -0
- data/lib/capricorn/system.rb +8 -0
- metadata +1 -1
data/lib/capricorn/satellite.rb
CHANGED
@@ -11,6 +11,7 @@ module Capricorn
|
|
11
11
|
include Capricorn::Satellite::Persistence
|
12
12
|
|
13
13
|
attr_reader :domain, :engines
|
14
|
+
attr_accessor :development, :module_name
|
14
15
|
|
15
16
|
def initialize(domain)
|
16
17
|
if Hash === domain
|
@@ -20,6 +21,7 @@ module Capricorn
|
|
20
21
|
else
|
21
22
|
@domain = domain
|
22
23
|
@engines = {}
|
24
|
+
@development = false
|
23
25
|
end
|
24
26
|
@domain.gsub!(/^www\./, '')
|
25
27
|
end
|
data/lib/capricorn/system.rb
CHANGED
@@ -101,6 +101,8 @@ module Capricorn
|
|
101
101
|
|
102
102
|
def make_development_satellite(satellite, name)
|
103
103
|
if satellite
|
104
|
+
satellite.module_name = name.to_s
|
105
|
+
satellite.development = true
|
104
106
|
Capricorn.runtime_gem('rubigen', Capricorn::RUBIGEN_VERSION)
|
105
107
|
resolve_options_with satellite do
|
106
108
|
as_user(web_user, web_group) do
|
@@ -109,6 +111,11 @@ module Capricorn
|
|
109
111
|
FileUtils.rm_r("doc", :verbose => true) rescue nil
|
110
112
|
FileUtils.rm_r("README", :verbose => true) rescue nil
|
111
113
|
FileUtils.rm_r("public/javascripts", :verbose => true) rescue nil
|
114
|
+
FileUtils.mkdir_p("public/vendor", :verbose => true) rescue nil
|
115
|
+
FileUtils.ln_s(
|
116
|
+
File.join(satellite_root, "public"),
|
117
|
+
File.join(satellite_root, "public/vendor", satellite.module_name),
|
118
|
+
:verbose => true) rescue nil
|
112
119
|
|
113
120
|
require 'rubigen/scripts/generate'
|
114
121
|
RubiGen::Base.use_application_sources!
|
@@ -117,6 +124,7 @@ module Capricorn
|
|
117
124
|
end
|
118
125
|
end
|
119
126
|
end
|
127
|
+
save_satellite! satellite
|
120
128
|
else
|
121
129
|
false
|
122
130
|
end
|