app_stack 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/my_app/.app-stack.yml +6 -8
- data/lib/app_stack/version.rb +1 -1
- data/lib/app_stack.rb +6 -7
- metadata +1 -1
@@ -10,16 +10,14 @@ ignores:
|
|
10
10
|
- .+\.swap
|
11
11
|
- ~.+
|
12
12
|
- .+~
|
13
|
+
- docs/?.*
|
14
|
+
- .git/?.*
|
13
15
|
attrs:
|
14
16
|
application_name: My App
|
15
17
|
from_self: myapp
|
16
18
|
files:
|
17
|
-
README: __self
|
18
|
-
config: base-app
|
19
|
-
config/app.config.rb: base-app
|
20
|
-
config/configuration.yml: auth-app
|
21
|
-
config/configuration.yml.template.erb: auth-app
|
22
|
-
.app-stack.yml: __self
|
23
19
|
Gemfile: __self
|
24
|
-
|
25
|
-
|
20
|
+
README: __self
|
21
|
+
config: __self
|
22
|
+
config/app.config.rb: __self
|
23
|
+
config/configuration.yml: __self
|
data/lib/app_stack/version.rb
CHANGED
data/lib/app_stack.rb
CHANGED
@@ -55,8 +55,6 @@ module AppStack
|
|
55
55
|
|
56
56
|
# rubocop:disable MethodLength
|
57
57
|
def copy_file!(f, basename)
|
58
|
-
return 'ignored'.white if ignores(basename)
|
59
|
-
|
60
58
|
done = 'keeped'.green
|
61
59
|
target = File.expand_path(@app_root + '/' + basename)
|
62
60
|
# directory?
|
@@ -109,6 +107,7 @@ module AppStack
|
|
109
107
|
Find.find(stack_app_dir).each do |f|
|
110
108
|
basename = f.sub(/^#{stack_app_dir}\//, '')
|
111
109
|
next if f == stack_app_dir
|
110
|
+
next if ignores(basename)
|
112
111
|
do_copy_it = @files[basename] ? false : true
|
113
112
|
do_copy_it = true if @files[basename] == stack_app
|
114
113
|
if do_copy_it
|
@@ -130,13 +129,13 @@ module AppStack
|
|
130
129
|
next if f == @app_root
|
131
130
|
basename = f.sub(/^#{@app_root}\//, '')
|
132
131
|
next if ignores(basename)
|
133
|
-
|
134
|
-
carp "From #{'self'.blue.bold} #{basename.bold}",
|
132
|
+
if @files[basename]
|
133
|
+
carp "From #{'self'.blue.bold} #{basename.bold} ",
|
134
|
+
'keep'.green if @files[basename] == '__self'
|
135
|
+
else
|
135
136
|
@files[basename] = '__self'
|
137
|
+
carp "From #{'self'.blue.bold} #{basename.bold}", 'registed'.green.bold
|
136
138
|
end
|
137
|
-
|
138
|
-
carp "From #{'self'.blue.bold} #{basename.bold} ",
|
139
|
-
'keep'.green if @files[basename] == '__self'
|
140
139
|
end
|
141
140
|
end
|
142
141
|
|