app_stack 1.1.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/Gemfile.lock +43 -0
  2. data/README.md +49 -38
  3. data/doc/coverage/.last_run.json +1 -0
  4. data/doc/coverage/.resultset.json +1 -0
  5. data/doc/coverage/assets/0.7.1/application.css +1110 -0
  6. data/doc/coverage/assets/0.7.1/application.js +626 -0
  7. data/doc/coverage/assets/0.7.1/fancybox/blank.gif +0 -0
  8. data/doc/coverage/assets/0.7.1/fancybox/fancy_close.png +0 -0
  9. data/doc/coverage/assets/0.7.1/fancybox/fancy_loading.png +0 -0
  10. data/doc/coverage/assets/0.7.1/fancybox/fancy_nav_left.png +0 -0
  11. data/doc/coverage/assets/0.7.1/fancybox/fancy_nav_right.png +0 -0
  12. data/doc/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png +0 -0
  13. data/doc/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png +0 -0
  14. data/doc/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png +0 -0
  15. data/doc/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png +0 -0
  16. data/doc/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png +0 -0
  17. data/doc/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png +0 -0
  18. data/doc/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png +0 -0
  19. data/doc/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png +0 -0
  20. data/doc/coverage/assets/0.7.1/fancybox/fancy_title_left.png +0 -0
  21. data/doc/coverage/assets/0.7.1/fancybox/fancy_title_main.png +0 -0
  22. data/doc/coverage/assets/0.7.1/fancybox/fancy_title_over.png +0 -0
  23. data/doc/coverage/assets/0.7.1/fancybox/fancy_title_right.png +0 -0
  24. data/doc/coverage/assets/0.7.1/fancybox/fancybox-x.png +0 -0
  25. data/doc/coverage/assets/0.7.1/fancybox/fancybox-y.png +0 -0
  26. data/doc/coverage/assets/0.7.1/fancybox/fancybox.png +0 -0
  27. data/doc/coverage/assets/0.7.1/favicon_green.png +0 -0
  28. data/doc/coverage/assets/0.7.1/favicon_red.png +0 -0
  29. data/doc/coverage/assets/0.7.1/favicon_yellow.png +0 -0
  30. data/doc/coverage/assets/0.7.1/loading.gif +0 -0
  31. data/doc/coverage/assets/0.7.1/magnify.png +0 -0
  32. data/doc/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  33. data/doc/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  34. data/doc/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  35. data/doc/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  36. data/doc/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  37. data/doc/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  38. data/doc/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  39. data/doc/coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  40. data/doc/coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png +0 -0
  41. data/doc/coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  42. data/doc/coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png +0 -0
  43. data/doc/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png +0 -0
  44. data/doc/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  45. data/doc/coverage/index.html +2420 -0
  46. data/lib/app_stack/config.rb +132 -0
  47. data/lib/app_stack/merger.rb +127 -0
  48. data/lib/app_stack/version.rb +1 -1
  49. data/lib/app_stack.rb +15 -246
  50. data/spec/config_spec.rb +82 -0
  51. data/spec/fixtures/config_sample/sample.yml +19 -0
  52. data/spec/fixtures/config_sample/wrong_key.yml +2 -0
  53. data/spec/fixtures/config_sample/wrong_type.yml +1 -0
  54. data/spec/fixtures/sample_files/module_1/Gemfile.erb +1 -0
  55. data/spec/fixtures/sample_files/module_1/app_stack.yml +10 -0
  56. data/spec/fixtures/sample_files/module_1/doc/excluding.txt +1 -0
  57. data/spec/fixtures/sample_files/module_1/lib/mixins/b_lib.rb +0 -0
  58. data/spec/fixtures/sample_files/module_1/lib/mixins/s_lib.rb +0 -0
  59. data/spec/fixtures/sample_files/module_1/lib/samples/a_lib.rb +0 -0
  60. data/spec/fixtures/sample_files/module_1/spec/config_spec.rb +0 -0
  61. data/spec/fixtures/sample_files/module_2/Gemfile +0 -0
  62. data/spec/fixtures/sample_files/module_2/Gemfile.liquid +1 -0
  63. data/spec/fixtures/sample_files/module_2/app/lib/sequence.rb +0 -0
  64. data/spec/fixtures/sample_files/module_2/app_stack.yml +3 -0
  65. data/spec/fixtures/sample_files/module_3/app_stack.yml +3 -0
  66. data/spec/fixtures/sample_files/module_3/bin/del +0 -0
  67. data/spec/fixtures/sample_files/module_3/bin/rm +0 -0
  68. data/spec/fixtures/sample_files/module_3/config/application.yml +0 -0
  69. data/spec/fixtures/sample_files/module_3/config/database_development.yml +0 -0
  70. data/spec/fixtures/sample_files/module_3/config/database_production.yml +0 -0
  71. data/spec/fixtures/sample_files/module_3/lib/libfile_1.rb +0 -0
  72. data/spec/fixtures/sample_files/module_3/lib/libfile_2.rb +0 -0
  73. data/spec/fixtures/sample_files/my_app/app_stack.yml +15 -0
  74. data/spec/fixtures/sample_files/my_app/doc/excluding.txt +1 -0
  75. data/spec/fixtures/sample_files/my_app/spec/config_spec.rb +0 -0
  76. data/spec/fixtures/sample_files/my_app_back/app_stack.yml +15 -0
  77. data/spec/fixtures/sample_files/my_app_back/doc/excluding.txt +1 -0
  78. data/spec/fixtures/sample_files/my_app_back/spec/config_spec.rb +0 -0
  79. data/spec/merger_spec.rb +43 -0
  80. data/spec/spec_helper.rb +6 -8
  81. data/spec/stackup_spec.rb +11 -50
  82. metadata +94 -47
  83. data/spec/app_as_hash_spec.rb +0 -15
  84. data/spec/export_list_spec.rb +0 -66
  85. data/spec/fixtures/.app_stack.yml +0 -21
  86. data/spec/fixtures/app-sample.yml +0 -25
  87. data/spec/fixtures/incexc/.gitignore +0 -27
  88. data/spec/fixtures/incexc/incexc-config.yml +0 -24
  89. data/spec/fixtures/incexc/lib/anyway.rb +0 -1
  90. data/spec/fixtures/incexc/lib/extra/excludes.rb +0 -1
  91. data/spec/fixtures/incexc/lib/mixin/otherlib.rb +0 -1
  92. data/spec/fixtures/incexc/spec/spec_helper.rb +0 -1
  93. data/spec/fixtures/incexc/spec/support/api_test.rb +0 -1
  94. data/spec/fixtures/incexc-config.yml +0 -23
  95. data/spec/fixtures/my_app/.app_stack.yml +0 -31
  96. data/spec/fixtures/my_app/.gitignore +0 -27
  97. data/spec/fixtures/my_app/config/self_render.conf.erb +0 -1
  98. data/spec/fixtures/sample_config.yml +0 -21
  99. data/spec/fixtures/stack_apps/module-1/.app_stack.yml +0 -17
  100. data/spec/fixtures/stack_apps/module-1/Gemfile +0 -3
  101. data/spec/fixtures/stack_apps/module-1/lib/auth_util.rb +0 -5
  102. data/spec/fixtures/stack_apps/module-1/lib/libonly1.rb +0 -6
  103. data/spec/fixtures/stack_apps/module-2/.app_stack.yml +0 -22
  104. data/spec/fixtures/stack_apps/module-2/Gemfile.erb +0 -11
  105. data/spec/fixtures/stack_apps/module-2/lib/auth_util.rb +0 -6
  106. data/spec/fixtures/stack_apps/module-2/lib/libonly2.rb +0 -6
  107. data/spec/gitignore_list_spec.rb +0 -21
  108. data/spec/load_configuration_spec.rb +0 -16
  109. data/spec/register_self_spec.rb +0 -13
  110. /data/spec/fixtures/{stack_apps/module-2 → sample_files/module_1}/Gemfile +0 -0
  111. /data/spec/fixtures/{incexc → sample_files/module_1}/Rakefile +0 -0
  112. /data/spec/fixtures/{incexc/.rspec → sample_files/module_1/config/boot_sample.rb} +0 -0
  113. /data/spec/fixtures/{incexc/Rakefile.erb → sample_files/module_1/doc/including.txt} +0 -0
@@ -1,27 +0,0 @@
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
@@ -1 +0,0 @@
1
- self config for <%= application_code %>
@@ -1,21 +0,0 @@
1
- stack: [module-1, module-2]
2
- stack_dir: '../apps'
3
- tpl_ext: '.erb'
4
- verbose: 1
5
- export:
6
- - lib/**/*.rb
7
- - app/**/*.rb
8
- exclude:
9
- - lib/extra/*.rb
10
- attrs:
11
- application_name: App Name
12
- application_code: app_code
13
- database_password: the very secret
14
- gems:
15
- default:
16
- - rspec: '~> 2.0.0'
17
- - mongoid: ''
18
- development:
19
- files:
20
- README.md: '__self'
21
-
@@ -1,17 +0,0 @@
1
- stack: [module-1, module-2]
2
- export:
3
- - lib/**/*.rb
4
- - config/**/*
5
- - app/**/*.rb
6
- attrs:
7
- application_name: App Name for Module 1
8
- application_code: module_1_code
9
- gems:
10
- default:
11
- rspec: '~> 1.0.0'
12
- mongoid: ''
13
- development:
14
- rack-test: '~> 0.1.0'
15
- files:
16
- README.md: '__self'
17
-
@@ -1,3 +0,0 @@
1
- source 'http://ruby.taobao.com/'
2
-
3
- gem 'module1'
@@ -1,5 +0,0 @@
1
- # encoding: utf-8
2
-
3
- def auth_util
4
- 'auth_util from module 1'
5
- end
@@ -1,6 +0,0 @@
1
- # encoding: utf-8
2
-
3
- def only1
4
- 'libonlyl from module 1'
5
- end
6
-
@@ -1,22 +0,0 @@
1
- stack: [module-1, module-2]
2
- export:
3
- - lib/**/*.rb
4
- - config/**/*
5
- - app/**/*.rb
6
- - Gemfile
7
- exclude:
8
- - lib/extra/*.rb
9
- attrs:
10
- application_name: App Name for Module 2
11
- application_code: module_2_code
12
- gems:
13
- default:
14
- rspec: '~> 2.0.0'
15
- grape: ''
16
- development:
17
- simplecov: ''
18
- factory_girls: ''
19
- rack_test: ''
20
- files:
21
- README.md: '__self'
22
-
@@ -1,11 +0,0 @@
1
- source 'http://ruby.taobao.com/'
2
-
3
- <% gems['default'].each do |g, v| %>
4
- gem: '<%= g %>'<% if v.size > 0 %>, '<%= v %>'<% end %>
5
- <% end %>
6
-
7
- group :development do
8
- <% gems['development'].each do |g, v| %>
9
- gem: '<%= g %>'<% if v.size > 0 %>, '<%= v %>'<% end %>
10
- <% end %>
11
- end
@@ -1,6 +0,0 @@
1
- # encoding: utf-8
2
-
3
- def auth_util
4
- 'auth_util from module 2'
5
- end
6
-
@@ -1,6 +0,0 @@
1
- # encoding: utf-8
2
-
3
- def only2
4
- 'libonly2 from module 2'
5
- end
6
-
@@ -1,21 +0,0 @@
1
- # encoding: utf-8
2
- require 'spec_helper'
3
- require 'fileutils'
4
-
5
- describe AppStack do
6
- describe '#gitignore_list' do
7
- context 'without .gitignore file' do
8
- it 'ignores nothing' do
9
- AppStack.gitignore_list('/spec/fixtures').size.should eq(0)
10
- end
11
- end
12
-
13
- context 'current directory' do
14
- it 'ignores .bak file' do
15
- FileUtils.touch('file.bak')
16
- AppStack.gitignore_list('.').include?('file.bak').should be_true
17
- FileUtils.rm('file.bak')
18
- end
19
- end
20
- end
21
- end
@@ -1,16 +0,0 @@
1
- # encoding: utf-8
2
- require 'spec_helper'
3
-
4
- describe AppStack do
5
- describe '#load_configuration' do
6
- it 'load yaml configurations' do
7
- AppStack.load_configuration('spec/fixtures/sample_config.yml')
8
- AppStack.config['tpl_ext'].should eq('.erb')
9
- end
10
-
11
- it 'set initial directories' do
12
- AppStack.app_root.should eq(File.expand_path('spec/fixtures'))
13
- AppStack.stack_dir.should eq(File.expand_path('spec/apps'))
14
- end
15
- end
16
- end
@@ -1,13 +0,0 @@
1
- # encoding: utf-8
2
- require 'spec_helper'
3
-
4
- describe AppStack do
5
- describe '#register_self!' do
6
- it 'regist file in app root' do
7
- AppStack.load_configuration('spec/fixtures/sample_config.yml')
8
- AppStack.verbose = 0
9
- AppStack.register_self!('.')
10
- AppStack.files['.rspec'].should eq('__self')
11
- end
12
- end
13
- end