app_stack 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +10 -0
- data/Gemfile.lock +35 -0
- data/README.md +39 -32
- data/app_stack.gemspec +7 -6
- data/lib/app_stack/version.rb +1 -1
- data/lib/app_stack.rb +161 -88
- data/spec/fixtures/.app_stack.yml +24 -0
- data/spec/fixtures/incexc/.gitignore +27 -0
- data/spec/fixtures/incexc/incexc-config.yml +24 -0
- data/spec/fixtures/incexc/lib/anyway.rb +1 -0
- data/spec/fixtures/incexc/lib/extra/excludes.rb +1 -0
- data/spec/fixtures/incexc/lib/mixin/otherlib.rb +1 -0
- data/spec/fixtures/incexc/spec/spec_helper.rb +1 -0
- data/spec/fixtures/incexc/spec/support/api_test.rb +1 -0
- data/spec/fixtures/incexc-config.yml +25 -0
- data/spec/fixtures/my_app/.app_stack.yml +34 -0
- data/spec/fixtures/my_app/.gitignore +27 -0
- data/spec/fixtures/my_app/config/self_render.conf.erb +1 -0
- data/spec/fixtures/my_app/lib/auth_util.rb +5 -0
- data/spec/fixtures/sample_config.yml +23 -0
- data/spec/fixtures/stack_apps/module-1/.app_stack.yml +18 -0
- data/spec/fixtures/stack_apps/module-1/Gemfile +3 -0
- data/spec/fixtures/stack_apps/module-1/lib/auth_util.rb +5 -0
- data/spec/fixtures/stack_apps/module-1/lib/libonly1.rb +6 -0
- data/spec/fixtures/stack_apps/module-2/.app_stack.yml +24 -0
- data/spec/fixtures/stack_apps/module-2/Gemfile.erb +11 -0
- data/spec/fixtures/stack_apps/module-2/lib/auth_util.rb +6 -0
- data/spec/fixtures/stack_apps/module-2/lib/libonly2.rb +6 -0
- data/spec/gitignore_list_spec.rb +21 -0
- data/spec/load_configuration_spec.rb +16 -0
- data/spec/merge_stack_spec.rb +51 -0
- data/spec/register_self_spec.rb +13 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/stackup_spec.rb +55 -0
- metadata +95 -38
- checksums.yaml +0 -15
- data/examples/my_app/.app-stack.yml +0 -23
- data/examples/my_app/Gemfile +0 -5
- data/examples/my_app/README +0 -2
- data/examples/my_app/config/app.config.rb +0 -4
- data/examples/my_app/config/configuration.yml +0 -4
- data/examples/my_app/fileabc.rb +0 -0
- data/examples/stack-apps/auth-app/Gemfile.line_addon +0 -1
- data/examples/stack-apps/auth-app/README +0 -1
- data/examples/stack-apps/auth-app/app/config.rb.erb +0 -1
- data/examples/stack-apps/auth-app/config/app.config.rb +0 -4
- data/examples/stack-apps/auth-app/config/configuration.yml +0 -2
- data/examples/stack-apps/auth-app/config/configuration.yml.template.erb +0 -4
- data/examples/stack-apps/base-app/.app-stack.yml +0 -23
- data/examples/stack-apps/base-app/README +0 -1
- data/examples/stack-apps/base-app/config/app.config.rb +0 -4
- /data/{examples/my_app/app/api_controller.rb → spec/fixtures/incexc/.rspec} +0 -0
- /data/{examples/my_app/app/config.rb → spec/fixtures/incexc/Rakefile} +0 -0
- /data/{examples/my_app/app/controllers/hello_controller.rb → spec/fixtures/incexc/Rakefile.erb} +0 -0
- /data/{examples/stack-apps/auth-app → spec/fixtures/stack_apps/module-2}/Gemfile +0 -0
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://ruby.taobao.org/
|
3
|
+
specs:
|
4
|
+
activesupport (3.2.14)
|
5
|
+
i18n (~> 0.6, >= 0.6.4)
|
6
|
+
multi_json (~> 1.0)
|
7
|
+
diff-lcs (1.2.4)
|
8
|
+
i18n (0.6.5)
|
9
|
+
multi_json (1.8.0)
|
10
|
+
rspec (2.14.1)
|
11
|
+
rspec-core (~> 2.14.0)
|
12
|
+
rspec-expectations (~> 2.14.0)
|
13
|
+
rspec-mocks (~> 2.14.0)
|
14
|
+
rspec-core (2.14.5)
|
15
|
+
rspec-expectations (2.14.2)
|
16
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
17
|
+
rspec-mocks (2.14.3)
|
18
|
+
simplecov (0.7.1)
|
19
|
+
multi_json (~> 1.0)
|
20
|
+
simplecov-html (~> 0.7.1)
|
21
|
+
simplecov-html (0.7.1)
|
22
|
+
term-ansicolor (1.2.2)
|
23
|
+
tins (~> 0.8)
|
24
|
+
tilt (1.4.1)
|
25
|
+
tins (0.9.0)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
activesupport (~> 3.2.14)
|
32
|
+
rspec (~> 2.14.1)
|
33
|
+
simplecov (~> 0.7.1)
|
34
|
+
term-ansicolor (~> 1.2.2)
|
35
|
+
tilt (~> 1.4.1)
|
data/README.md
CHANGED
@@ -1,46 +1,53 @@
|
|
1
|
-
|
2
|
-
% Huang Wei <huangw@7lime.com>
|
3
|
-
% 3013-08-26
|
1
|
+
# Merge Source Code from Directories in Chain
|
4
2
|
|
5
3
|
## Concept
|
6
4
|
|
7
|
-
|
5
|
+
Build your application by copy source files from
|
6
|
+
a stack of modules.
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
## Synposis
|
9
|
+
|
10
|
+
Put a configuration file `.app_stack.yml` in your application
|
11
|
+
directory, in format like:
|
12
|
+
|
13
|
+
stack: [module-1, module-2]
|
14
|
+
stack_dir: '../stack-apps'
|
15
|
+
tpl_ext: '.erb'
|
12
16
|
verbose: 1
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
export:
|
18
|
+
- lib/**/*.rb
|
19
|
+
- app/**/*.rb
|
20
|
+
include:
|
21
|
+
- spec/**/*.rb
|
22
|
+
exclude:
|
23
|
+
- lib/extra/*.rb
|
18
24
|
attrs:
|
19
|
-
|
25
|
+
application_name: App Name
|
26
|
+
application_code: app_code
|
27
|
+
database_password: the very secret
|
28
|
+
gems:
|
29
|
+
default:
|
30
|
+
- rspec: '~> 2.0.0'
|
31
|
+
- ...
|
32
|
+
development:
|
20
33
|
files:
|
21
|
-
README.md
|
22
|
-
|
34
|
+
README.md: __self
|
35
|
+
|
36
|
+
`files` field is auto-generated, you should not edit it manually.
|
23
37
|
|
24
|
-
|
38
|
+
`export` defines files that should be copied when other modules include
|
39
|
+
the current module. Besides `export`, the acquire module can use `include`
|
40
|
+
and `exclude` adjust files that imports from other modules.
|
25
41
|
|
26
|
-
|
42
|
+
Variables defined in `attrs` will be assigned into `.erb` files.
|
27
43
|
|
28
|
-
|
29
|
-
task :update do
|
30
|
-
AppStack.run!('.app-stack.yml')
|
31
|
-
end
|
32
|
-
end
|
44
|
+
`gems` need a support from `Gemfile.erb`.
|
33
45
|
|
34
|
-
|
35
|
-
and any new files that in you app stack but not in the current directory.
|
46
|
+
## Templates
|
36
47
|
|
37
|
-
|
48
|
+
If you have both a `config.yml` and a `config.yml.erb` file, when export,
|
49
|
+
the `config.yml.erb` will be used instead of `config.yml`, and `attrs` will
|
50
|
+
be assigned into this file.
|
38
51
|
|
39
|
-
|
40
|
-
in your stack besides `config`, this file will be used as a erb template, and
|
41
|
-
the output with combines with `attrs` set in your local yaml file. Those value
|
42
|
-
will inherited follow the stacks (from v0.0.2).
|
52
|
+
Variables in `attrs` will be merged in chain follows the app-stack.
|
43
53
|
|
44
|
-
If you have a file name end with `.line_addon`, like `Gemfile.line_addon`,
|
45
|
-
the contents of this file will add to local `Gemefile` line by line unless
|
46
|
-
the line is already exists (from v0.0.3).
|
data/app_stack.gemspec
CHANGED
@@ -6,14 +6,15 @@ Gem::Specification.new 'app_stack', AppStack::VERSION do |s|
|
|
6
6
|
s.summary = 'Use as a rake task, define a stack of modules and app-stack will merge files from those stack-apps to the local application directory.'
|
7
7
|
s.authors = ['Huang Wei']
|
8
8
|
s.email = 'huangw@7lime.com'
|
9
|
-
s.homepage = 'https://github.com/7lime/
|
10
|
-
s.files = `git ls-files`.split("\n") - %w[.gitignore Rakefile]
|
9
|
+
s.homepage = 'https://github.com/7lime/app_stack-gem'
|
10
|
+
s.files = `git ls-files`.split("\n") - %w[.gitignore .rspec Rakefile]
|
11
11
|
s.license = 'MIT'
|
12
12
|
s.test_files = Dir.glob('{spec,test}/**/*.rb')
|
13
13
|
|
14
|
-
s.add_dependency 'tilt'
|
15
|
-
s.add_dependency 'term-ansicolor'
|
16
|
-
s.
|
17
|
-
s.add_development_dependency '
|
14
|
+
s.add_dependency 'tilt', '~> 1.4.1'
|
15
|
+
s.add_dependency 'term-ansicolor', '~> 1.2.2'
|
16
|
+
s.add_dependency 'activesupport', '~> 3.2.14'
|
17
|
+
s.add_development_dependency 'rspec', '~> 2.14.1'
|
18
|
+
s.add_development_dependency 'simplecov', '~> 0.7.1'
|
18
19
|
end
|
19
20
|
|
data/lib/app_stack/version.rb
CHANGED
data/lib/app_stack.rb
CHANGED
@@ -5,6 +5,7 @@ require 'find'
|
|
5
5
|
require 'fileutils'
|
6
6
|
require 'ostruct'
|
7
7
|
require 'tilt/erb'
|
8
|
+
require 'active_support/core_ext/hash/deep_merge'
|
8
9
|
|
9
10
|
require 'term/ansicolor'
|
10
11
|
# mixin String class for term-color methods
|
@@ -12,121 +13,183 @@ class String; include Term::ANSIColor end
|
|
12
13
|
|
13
14
|
## A namespace for app-stack based modules
|
14
15
|
module AppStack
|
16
|
+
CONF_FILE = '.app_stack.yml'
|
15
17
|
|
16
|
-
|
18
|
+
# public entry ponit, receive a configuration filename,
|
19
|
+
# copy source files on to the directory contains the
|
20
|
+
# configuration file.
|
21
|
+
def stackup!(conf_file)
|
22
|
+
load_configuration(conf_file)
|
17
23
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
@config = YAML.load(File.read(file))
|
22
|
-
@attr = {}
|
23
|
-
# assign default values:
|
24
|
-
@app_root = File.expand_path(File.dirname(file)) unless @config['app_root']
|
25
|
-
@stack_apps_dir = @config['stack_apps_dir']
|
26
|
-
# convert relative path:
|
27
|
-
@stack_apps_dir = @app_root + '/' +
|
28
|
-
@stack_apps_dir if @stack_apps_dir.match(/^\.\.?\//)
|
29
|
-
|
30
|
-
@files = @config['files'] || {}
|
31
|
-
register_own_files!
|
32
|
-
# loop over each stack application
|
33
|
-
@config['stack'].each { |stack_app| do_copy_stack!(stack_app) }
|
24
|
+
register_self!(@app_root)
|
25
|
+
merge_stacks!(@config['stack'])
|
26
|
+
render_self!(@self_files)
|
34
27
|
|
35
28
|
# rewrite configuration back to app-stack file
|
36
29
|
@config['files'] = @files
|
37
|
-
File.open(
|
30
|
+
File.open(conf_file, 'wb') { |fh| fh.puts YAML.dump(@config) }
|
31
|
+
end
|
32
|
+
|
33
|
+
# convert directory names, load configuration from yaml file
|
34
|
+
# rubocop:disable MethodLength
|
35
|
+
def load_configuration(conf_file)
|
36
|
+
@conf_file = conf_file || CONF_FILE
|
37
|
+
@config = YAML.load(File.read(@conf_file))
|
38
|
+
|
39
|
+
@app_root = @config['app_root'] || File.dirname(@conf_file)
|
40
|
+
@app_root = File.expand_path(@app_root)
|
41
|
+
@stack_dir = @config['stack_dir'] || '../stack_apps'
|
42
|
+
@stack_dir = File.expand_path(@app_root + '/' +
|
43
|
+
@stack_dir) if @stack_dir.match(/^\.\.?\//)
|
44
|
+
|
45
|
+
@verbose = @config['verbose'] || 1
|
46
|
+
@verbose = @verbose.to_i
|
47
|
+
|
48
|
+
@config['tpl_ext'] ||= '.erb'
|
49
|
+
|
50
|
+
# attrs to assigned into template
|
51
|
+
@attrs = {}
|
52
|
+
# file list under the app_root
|
53
|
+
@self_files = []
|
54
|
+
|
55
|
+
@files = @config['files'] || {}
|
38
56
|
end
|
39
57
|
|
40
58
|
# for files already in the app root, register to no-copy list
|
41
|
-
def
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
59
|
+
def register_self!(dir)
|
60
|
+
Find.find(dir).each do |f|
|
61
|
+
next if f == dir
|
62
|
+
basename = f.sub(/^#{dir}\//, '')
|
63
|
+
next if basename.match(/^.git$/)
|
64
|
+
next if basename.match(/^.git\W/)
|
65
|
+
next if gitignore_list(dir).include?(basename)
|
66
|
+
|
67
|
+
if @files[basename]
|
68
|
+
carp "From #{'self'.blue.bold} #{basename.bold} ",
|
69
|
+
'keep'.white, 2 if @files[basename] == '__self'
|
70
|
+
else
|
71
|
+
carp "From #{'self'.blue.bold} #{basename.bold}",
|
72
|
+
'registed'.green.bold, 1
|
73
|
+
@files[basename] = '__self'
|
54
74
|
end
|
75
|
+
|
76
|
+
@self_files << f unless @self_files.include?(f)
|
55
77
|
end
|
56
78
|
end
|
57
79
|
|
58
|
-
#
|
59
|
-
def
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
@attr.merge! stack_conf['attrs'] if stack_conf['attrs'] &&
|
67
|
-
stack_conf['attrs'].is_a?(Hash)
|
80
|
+
# render file in app-root
|
81
|
+
def render_self!(files)
|
82
|
+
files.each do |f|
|
83
|
+
if File.exists?(f + @config['tpl_ext'])
|
84
|
+
basename = f.sub(/^#{@app_root}\//, '')
|
85
|
+
carp "From #{'self'.blue.bold} render #{basename.bold}",
|
86
|
+
render_file!(f + @config['tpl_ext'], f), 1
|
87
|
+
end
|
68
88
|
end
|
89
|
+
end
|
69
90
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
91
|
+
# copy from a stack of applications
|
92
|
+
def merge_stacks!(stack)
|
93
|
+
stack.each do |app|
|
94
|
+
app_dir = @stack_dir + '/' + app
|
95
|
+
raise "no directory found for #{app}" unless File.directory?(app_dir)
|
96
|
+
raise "no configuration found for #{app}" unless
|
97
|
+
File.exists?(app_dir + '/' + File.basename(@conf_file))
|
98
|
+
carp "Merge #{app.bold.blue}"
|
99
|
+
|
100
|
+
# loop over remote files
|
101
|
+
elist = export_list(app_dir)
|
102
|
+
elist.each do |file|
|
103
|
+
# skip .erb file as template
|
104
|
+
next if file.match(/#{@config['tpl_ext']}$/) &&
|
105
|
+
elist.include?(file.sub(/#{@config['tpl_ext']}$/, ''))
|
106
|
+
# find the absolute path for source and target file for copy
|
107
|
+
src_f = File.expand_path(app_dir + '/' + file)
|
108
|
+
tgt_f = File.expand_path(@app_root + '/' + file)
|
109
|
+
|
110
|
+
if @files[file].nil? || @files[file] == app # yes, copy it
|
111
|
+
@files[file] = app unless @files[file]
|
112
|
+
|
113
|
+
carp "From #{app.blue.bold} copy #{file.bold}",
|
114
|
+
copy_file!(src_f, tgt_f),
|
115
|
+
1 unless File.exists?(src_f + @config['tpl_ext'])
|
116
|
+
|
117
|
+
# register the copied file to app-root file list
|
118
|
+
@self_files << file unless @self_files.include?(file)
|
119
|
+
else # don't handle it
|
120
|
+
carp "From #{app.blue.bold} #{file.bold}",
|
121
|
+
'skip, use '.white + @files[file], 2
|
83
122
|
end
|
123
|
+
|
124
|
+
carp "From #{app.blue.bold} render #{file.bold}",
|
125
|
+
render_file!(src_f + @config['tpl_ext'], tgt_f),
|
126
|
+
1 if File.exists?(src_f + @config['tpl_ext'])
|
84
127
|
end
|
85
128
|
end
|
129
|
+
end
|
86
130
|
|
87
|
-
|
88
|
-
|
89
|
-
|
131
|
+
# print debug / information message to console based on verbose level
|
132
|
+
def carp(job, state = 'done'.green, v = 1)
|
133
|
+
return if @verbose < v
|
134
|
+
dots = 70 - job.size
|
135
|
+
job += ' ' + '.' * dots if dots > 0
|
136
|
+
puts job + ' ' + state
|
137
|
+
end
|
90
138
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
139
|
+
# fetch (and cache) git ignore file lists for a specific directory
|
140
|
+
def gitignore_list(dir)
|
141
|
+
@gitignore_list ||= {}
|
142
|
+
@gitignore_list[dir] ||= []
|
143
|
+
|
144
|
+
ilist = []
|
145
|
+
if File.exists?(dir + '/.gitignore')
|
146
|
+
File.read(dir + '/.gitignore').split("\n").each do |line|
|
147
|
+
Dir[dir + '/' + line].each do |f|
|
148
|
+
f.sub!(/^#{dir}\//, '')
|
149
|
+
ilist << f unless ilist.include?(f)
|
101
150
|
end
|
102
|
-
carp "From #{stack_app.blue.bold} render #{basename.bold}", done
|
103
|
-
elsif basename.gsub!(/#{@config['addon_ext']}$/, '')
|
104
|
-
target = File.expand_path(@app_root + '/' + basename)
|
105
|
-
if File.exists?(target)
|
106
|
-
done = do_addon!(f, target)
|
107
|
-
end
|
108
|
-
done ||= 'keep'.white
|
109
|
-
carp "From #{stack_app.blue.bold} addon #{basename.bold}", done
|
110
151
|
end
|
111
152
|
end
|
153
|
+
@gitignore_list[dir] = ilist
|
112
154
|
end
|
113
155
|
|
156
|
+
# if f1 newer than f2, or f2 not exits but f1 does.
|
114
157
|
def newer?(f1, f2)
|
115
158
|
return false unless File.exists?(f1)
|
116
159
|
return true unless File.exists?(f2)
|
117
160
|
File.mtime(f1) > File.mtime(f2)
|
118
161
|
end
|
119
162
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
163
|
+
# find a list of file to copy based on export setting
|
164
|
+
def export_list(dir)
|
165
|
+
dir_conf = YAML.load(File.read(dir + '/' + File.basename(@conf_file)))
|
166
|
+
dir_conf['export'] ||= []
|
167
|
+
|
168
|
+
# update attr list for assign to template files
|
169
|
+
@attrs.deep_merge! dir_conf['attrs'] if dir_conf['attrs'] &&
|
170
|
+
dir_conf['attrs'].is_a?(Hash)
|
171
|
+
|
172
|
+
flist = []
|
173
|
+
# export list defined in stack app's configuration
|
174
|
+
dir_conf['export'].each do |e|
|
175
|
+
Dir[dir + '/' + e].each { |f| flist << f.sub(/^#{dir}\/?/, '') }
|
176
|
+
end
|
177
|
+
|
178
|
+
# collect include/exclude list from configuration of app-root
|
179
|
+
inc_list, exc_list = [], []
|
180
|
+
@config['include'].each do |inc|
|
181
|
+
Dir[dir + '/' + inc].each { |f| inc_list << f.sub(/^#{dir}\/?/, '') }
|
182
|
+
end
|
183
|
+
|
184
|
+
@config['exclude'].each do |exc|
|
185
|
+
Dir[dir + '/' + exc].each { |f| exc_list << f.sub(/^#{dir}\/?/, '') }
|
186
|
+
end
|
187
|
+
|
188
|
+
# adjust by include/exclude and
|
189
|
+
flist + inc_list - gitignore_list(dir) - exc_list
|
128
190
|
end
|
129
191
|
|
192
|
+
# copy file if newer
|
130
193
|
def copy_file!(f, target)
|
131
194
|
# directory?
|
132
195
|
if File.directory?(f)
|
@@ -138,6 +201,8 @@ module AppStack
|
|
138
201
|
end
|
139
202
|
else
|
140
203
|
if newer?(f, target)
|
204
|
+
target_dir = File.dirname(target)
|
205
|
+
FileUtils.mkdir_p target_dir unless File.directory?(target_dir)
|
141
206
|
FileUtils.copy f, target
|
142
207
|
done = 'copied'.bold.green
|
143
208
|
else
|
@@ -147,12 +212,20 @@ module AppStack
|
|
147
212
|
done
|
148
213
|
end
|
149
214
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
215
|
+
# render from erb if newer
|
216
|
+
def render_file!(f, target)
|
217
|
+
done = 'keep'.white
|
218
|
+
if newer?(f, target)
|
219
|
+
tilt = Tilt::ERBTemplate.new(f)
|
220
|
+
oh = File.open(target, 'wb')
|
221
|
+
oh.write tilt.render(OpenStruct.new(@attrs.deep_merge(@config['attrs'])))
|
222
|
+
oh.close
|
223
|
+
done = 'rendered'.bold.green
|
224
|
+
end
|
225
|
+
done
|
155
226
|
end
|
156
227
|
|
228
|
+
# use module variables, skip `new`
|
229
|
+
# rubocop:disable ModuleFunction
|
157
230
|
extend self
|
158
231
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
stack:
|
3
|
+
- module-1
|
4
|
+
- module-2
|
5
|
+
export:
|
6
|
+
- lib/**/*.rb
|
7
|
+
- config/**/*
|
8
|
+
- app/**/*.rb
|
9
|
+
include:
|
10
|
+
- spec/**/*.rb
|
11
|
+
exclude:
|
12
|
+
- lib/extra/*.rb
|
13
|
+
attrs:
|
14
|
+
application_name: My App Name
|
15
|
+
application_code: my_app_code
|
16
|
+
database_password: the very secret
|
17
|
+
gems:
|
18
|
+
default:
|
19
|
+
rspec: ~> 2.0.0
|
20
|
+
mongoid: ''
|
21
|
+
development:
|
22
|
+
app_stack: ~> 0.0.8
|
23
|
+
files:
|
24
|
+
tpl_ext: .erb
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.DS_Store
|
2
|
+
.bundle
|
3
|
+
logs/*.log
|
4
|
+
logs/**/*.log
|
5
|
+
log/*.log
|
6
|
+
log/**/*.log
|
7
|
+
tmp/**/*
|
8
|
+
vendor/gems/*
|
9
|
+
!vendor/gems/cache/
|
10
|
+
.sass-cache/*
|
11
|
+
public/assets/*
|
12
|
+
*.bak
|
13
|
+
tmp/*
|
14
|
+
*.swp
|
15
|
+
*~
|
16
|
+
~*
|
17
|
+
Thumbs.db
|
18
|
+
*/Thumbs.db
|
19
|
+
.idea/*
|
20
|
+
db/*.db
|
21
|
+
db/*.sqlite*
|
22
|
+
.yardoc/*
|
23
|
+
.yardoc/**/*
|
24
|
+
docs/*
|
25
|
+
docs/**/*
|
26
|
+
.dev_flow
|
27
|
+
*.gem
|
@@ -0,0 +1,24 @@
|
|
1
|
+
stack: [incexc]
|
2
|
+
stack_dir: '.'
|
3
|
+
tpl_ext: '.erb'
|
4
|
+
verbose: 1
|
5
|
+
export:
|
6
|
+
- lib/**/*.rb
|
7
|
+
- app/**/*.rb
|
8
|
+
include:
|
9
|
+
- spec/**/*.rb
|
10
|
+
exclude:
|
11
|
+
- lib/extra/*.rb
|
12
|
+
attrs:
|
13
|
+
application_name: App Name
|
14
|
+
application_code: app_code
|
15
|
+
database_password: the very secret
|
16
|
+
gems:
|
17
|
+
default:
|
18
|
+
- rspec: '~> 2.0.0'
|
19
|
+
- mongoid: ''
|
20
|
+
development:
|
21
|
+
files:
|
22
|
+
README.md: '__self'
|
23
|
+
|
24
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
# encoding: utf-8
|
@@ -0,0 +1 @@
|
|
1
|
+
# encoding: utf-8
|
@@ -0,0 +1 @@
|
|
1
|
+
# encoding: utf-8
|
@@ -0,0 +1 @@
|
|
1
|
+
# encoding: utf-8
|
@@ -0,0 +1 @@
|
|
1
|
+
# encoding: utf-8
|
@@ -0,0 +1,25 @@
|
|
1
|
+
stack: [incexc]
|
2
|
+
stack_dir: '.'
|
3
|
+
tpl_ext: '.erb'
|
4
|
+
verbose: 1
|
5
|
+
export:
|
6
|
+
- lib/**/*.rb
|
7
|
+
- Rakefile
|
8
|
+
- Rakefile.erb
|
9
|
+
include:
|
10
|
+
- spec/**/*.rb
|
11
|
+
exclude:
|
12
|
+
- lib/extra/*.rb
|
13
|
+
attrs:
|
14
|
+
application_name: App Name
|
15
|
+
application_code: app_code
|
16
|
+
database_password: the very secret
|
17
|
+
gems:
|
18
|
+
default:
|
19
|
+
- rspec: '~> 2.0.0'
|
20
|
+
- mongoid: ''
|
21
|
+
development:
|
22
|
+
files:
|
23
|
+
README.md: '__self'
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
stack:
|
3
|
+
- module-1
|
4
|
+
- module-2
|
5
|
+
export:
|
6
|
+
- lib/**/*.rb
|
7
|
+
- config/**/*
|
8
|
+
- app/**/*.rb
|
9
|
+
include:
|
10
|
+
- spec/**/*.rb
|
11
|
+
exclude:
|
12
|
+
- lib/extra/*.rb
|
13
|
+
attrs:
|
14
|
+
application_name: My App Name
|
15
|
+
application_code: my_app_code
|
16
|
+
database_password: the very secret
|
17
|
+
gems:
|
18
|
+
default:
|
19
|
+
rspec: ~> 2.0.0
|
20
|
+
mongoid: ''
|
21
|
+
development:
|
22
|
+
app_stack: ~> 0.0.8
|
23
|
+
files:
|
24
|
+
.app_stack.yml: __self
|
25
|
+
.gitignore: __self
|
26
|
+
Gemfile: __self
|
27
|
+
config: __self
|
28
|
+
config/self_render.conf: __self
|
29
|
+
config/self_render.conf.erb: __self
|
30
|
+
lib: __self
|
31
|
+
lib/auth_util.rb: __self
|
32
|
+
lib/libonly1.rb: module-1
|
33
|
+
lib/libonly2.rb: module-2
|
34
|
+
tpl_ext: .erb
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.DS_Store
|
2
|
+
.bundle
|
3
|
+
logs/*.log
|
4
|
+
logs/**/*.log
|
5
|
+
log/*.log
|
6
|
+
log/**/*.log
|
7
|
+
tmp/**/*
|
8
|
+
vendor/gems/*
|
9
|
+
!vendor/gems/cache/
|
10
|
+
.sass-cache/*
|
11
|
+
public/assets/*
|
12
|
+
*.bak
|
13
|
+
tmp/*
|
14
|
+
*.swp
|
15
|
+
*~
|
16
|
+
~*
|
17
|
+
Thumbs.db
|
18
|
+
*/Thumbs.db
|
19
|
+
.idea/*
|
20
|
+
db/*.db
|
21
|
+
db/*.sqlite*
|
22
|
+
.yardoc/*
|
23
|
+
.yardoc/**/*
|
24
|
+
docs/*
|
25
|
+
docs/**/*
|
26
|
+
.dev_flow
|
27
|
+
*.gem
|
@@ -0,0 +1 @@
|
|
1
|
+
self config for <%= application_code %>
|