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.
Files changed (55) hide show
  1. data/Gemfile +10 -0
  2. data/Gemfile.lock +35 -0
  3. data/README.md +39 -32
  4. data/app_stack.gemspec +7 -6
  5. data/lib/app_stack/version.rb +1 -1
  6. data/lib/app_stack.rb +161 -88
  7. data/spec/fixtures/.app_stack.yml +24 -0
  8. data/spec/fixtures/incexc/.gitignore +27 -0
  9. data/spec/fixtures/incexc/incexc-config.yml +24 -0
  10. data/spec/fixtures/incexc/lib/anyway.rb +1 -0
  11. data/spec/fixtures/incexc/lib/extra/excludes.rb +1 -0
  12. data/spec/fixtures/incexc/lib/mixin/otherlib.rb +1 -0
  13. data/spec/fixtures/incexc/spec/spec_helper.rb +1 -0
  14. data/spec/fixtures/incexc/spec/support/api_test.rb +1 -0
  15. data/spec/fixtures/incexc-config.yml +25 -0
  16. data/spec/fixtures/my_app/.app_stack.yml +34 -0
  17. data/spec/fixtures/my_app/.gitignore +27 -0
  18. data/spec/fixtures/my_app/config/self_render.conf.erb +1 -0
  19. data/spec/fixtures/my_app/lib/auth_util.rb +5 -0
  20. data/spec/fixtures/sample_config.yml +23 -0
  21. data/spec/fixtures/stack_apps/module-1/.app_stack.yml +18 -0
  22. data/spec/fixtures/stack_apps/module-1/Gemfile +3 -0
  23. data/spec/fixtures/stack_apps/module-1/lib/auth_util.rb +5 -0
  24. data/spec/fixtures/stack_apps/module-1/lib/libonly1.rb +6 -0
  25. data/spec/fixtures/stack_apps/module-2/.app_stack.yml +24 -0
  26. data/spec/fixtures/stack_apps/module-2/Gemfile.erb +11 -0
  27. data/spec/fixtures/stack_apps/module-2/lib/auth_util.rb +6 -0
  28. data/spec/fixtures/stack_apps/module-2/lib/libonly2.rb +6 -0
  29. data/spec/gitignore_list_spec.rb +21 -0
  30. data/spec/load_configuration_spec.rb +16 -0
  31. data/spec/merge_stack_spec.rb +51 -0
  32. data/spec/register_self_spec.rb +13 -0
  33. data/spec/spec_helper.rb +16 -0
  34. data/spec/stackup_spec.rb +55 -0
  35. metadata +95 -38
  36. checksums.yaml +0 -15
  37. data/examples/my_app/.app-stack.yml +0 -23
  38. data/examples/my_app/Gemfile +0 -5
  39. data/examples/my_app/README +0 -2
  40. data/examples/my_app/config/app.config.rb +0 -4
  41. data/examples/my_app/config/configuration.yml +0 -4
  42. data/examples/my_app/fileabc.rb +0 -0
  43. data/examples/stack-apps/auth-app/Gemfile.line_addon +0 -1
  44. data/examples/stack-apps/auth-app/README +0 -1
  45. data/examples/stack-apps/auth-app/app/config.rb.erb +0 -1
  46. data/examples/stack-apps/auth-app/config/app.config.rb +0 -4
  47. data/examples/stack-apps/auth-app/config/configuration.yml +0 -2
  48. data/examples/stack-apps/auth-app/config/configuration.yml.template.erb +0 -4
  49. data/examples/stack-apps/base-app/.app-stack.yml +0 -23
  50. data/examples/stack-apps/base-app/README +0 -1
  51. data/examples/stack-apps/base-app/config/app.config.rb +0 -4
  52. /data/{examples/my_app/app/api_controller.rb → spec/fixtures/incexc/.rspec} +0 -0
  53. /data/{examples/my_app/app/config.rb → spec/fixtures/incexc/Rakefile} +0 -0
  54. /data/{examples/my_app/app/controllers/hello_controller.rb → spec/fixtures/incexc/Rakefile.erb} +0 -0
  55. /data/{examples/stack-apps/auth-app → spec/fixtures/stack_apps/module-2}/Gemfile +0 -0
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source 'http://ruby.taobao.org'
2
+
3
+ gem 'tilt', '~> 1.4.1'
4
+ gem 'term-ansicolor', '~> 1.2.2'
5
+ gem 'activesupport', '~> 3.2.14'
6
+
7
+ group :development, :test do
8
+ gem 'rspec', '~> 2.14.1'
9
+ gem 'simplecov', '~> 0.7.1'
10
+ end
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
- % AppStack: Merge Source Code from A Stack of App Modules
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
- A configuration file `.app-stack.yml` in you app-root, in format like:
5
+ Build your application by copy source files from
6
+ a stack of modules.
8
7
 
9
- stack: [base-module auth-module ...]
10
- app_dir: '../stack-apps'
11
- tpl_ext: '.sample.erb'
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
- file_patterns:
14
- spec/**/*.rb
15
- lib/**/*.rb
16
- **/*.line_addon
17
- **/*.erb
17
+ export:
18
+ - lib/**/*.rb
19
+ - app/**/*.rb
20
+ include:
21
+ - spec/**/*.rb
22
+ exclude:
23
+ - lib/extra/*.rb
18
24
  attrs:
19
- dababase_name: 'nameofdatabase'
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 << __self
22
- app/controllers/home_controller.rb << base-module
34
+ README.md: __self
35
+
36
+ `files` field is auto-generated, you should not edit it manually.
23
37
 
24
- And in `Rakefile` add:
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
- require 'app_stack'
42
+ Variables defined in `attrs` will be assigned into `.erb` files.
27
43
 
28
- namespace :stack do
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
- Run `rack stack:up` will copy files according to the setting from yaml file,
35
- and any new files that in you app stack but not in the current directory.
46
+ ## Templates
36
47
 
37
- ## Template and Addition
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
- If you have a file end with `.sample.erb`, for example `config.sample.erb`
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/app-stack-gem'
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.add_development_dependency 'rspec', '~> 2.5'
17
- s.add_development_dependency 'simplecov', '~> 2.5'
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
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # AppStack module
4
4
  module AppStack
5
- VERSION = '0.0.7'
5
+ VERSION = '0.0.8'
6
6
  end
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
- CONF_FILE = '.app-stack.yml'
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
- # public entry ponit, receive a configuration filename
19
- def run!(file = '.app-stack.yml')
20
- # load configuration
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(file, 'wb') { |fh| fh.puts YAML.dump(@config) }
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 register_own_files!
42
- @config['file_patterns'].each do |pt|
43
- Dir[@app_root + '/' + pt].each do |f|
44
- next if f == @app_root
45
- basename = f.sub(/^#{@app_root}\//, '')
46
- if @files[basename]
47
- carp "From #{'self'.blue.bold} #{basename.bold} ",
48
- 'keep'.white if @files[basename] == '__self'
49
- else
50
- carp "From #{'self'.blue.bold} #{basename.bold}",
51
- 'registed'.green.bold
52
- @files[basename] = '__self'
53
- end
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
- # copy files for each included file
59
- def do_copy_stack!(stack_app)
60
- raise 'invalid app name "__self"' if stack_app == '__self'
61
- stack_app_dir = File.expand_path(@stack_apps_dir + '/' + stack_app)
62
-
63
- # merge attr setting
64
- if File.exists?(stack_app_dir + '/' + CONF_FILE)
65
- stack_conf = YAML.load(File.read(stack_app_dir + '/' + CONF_FILE))
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
- # for each included files
71
- @config['file_patterns'].each do |pt|
72
- Dir[stack_app_dir + '/' + pt].each do |f|
73
- basename = f.sub(/^#{stack_app_dir}\//, '')
74
- # trivial ignore the stack directory itself:
75
- next if f == stack_app_dir
76
- if (@files[basename].nil? or @files[basename] == stack_app)
77
- @files[basename] = stack_app unless @files[basename] # register
78
- done = copy_file!(f, File.expand_path(@app_root + '/' + basename))
79
- carp "From #{stack_app.blue.bold} #{basename.bold}", done
80
- else
81
- carp "From #{stack_app.blue.bold} #{basename.bold}",
82
- 'skip, use '.white + @files[basename]
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
- # for templates and addons
88
- Find.find(stack_app_dir).each do |f|
89
- basename = f.sub(/^#{stack_app_dir}\//, '')
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
- if basename.gsub!(/#{@config['tpl_ext']}$/, '')
92
- target = File.expand_path(@app_root + '/' + basename)
93
- # next unless File.exists?(target)
94
- done = 'keep'.white
95
- if newer?(f, target)
96
- tilt = Tilt::ERBTemplate.new(f)
97
- oh = File.open(target, 'wb')
98
- oh.write tilt.render(OpenStruct.new(@attr.merge(@config['attrs'])))
99
- oh.close
100
- done = 'rendered'.bold.green
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
- def do_addon!(addon_file, target)
121
- add_lines = File.read(addon_file).split("\n")
122
- add_lines -= File.read(target).split("\n")
123
- afh = File.open(target, 'a')
124
- add_lines.each { |line| afh.puts line }
125
- afh.close
126
- lines = add_lines.size
127
- done = "add #{lines} lines".bold.green if lines > 0
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
- def carp(job, state = 'done'.green)
151
- return unless @config['verbose'] && @config['verbose'] > 0
152
- dots = 70 - job.size
153
- dots = 0 if dots < 0
154
- puts job + ' ' + '.' * dots + ' ' + state
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 %>
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+
3
+ def auth_util
4
+ 'auth_util from module 1'
5
+ end