ro_commands 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (529) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -0
  3. data/Rakefile +4 -14
  4. data/bin/ro +2 -31
  5. data/bin/ro_client +2 -5
  6. data/bin/ro_server +2 -5
  7. data/bin/rubyscripts +6 -0
  8. data/{lib/ro_commands/core_ext/symbol.rb → config/boot.rb} +0 -0
  9. data/config/rorc.rb +66 -3
  10. data/lib/bash_builder.rb +18 -9
  11. data/lib/bash_builder_helper.rb +3 -3
  12. data/lib/bash_debug.rb +4 -2
  13. data/lib/bash_templates/crawler.sh +1 -0
  14. data/lib/bash_templates/file.sh +1 -1
  15. data/lib/bash_templates/git.sh +3 -0
  16. data/lib/{ro_commands/core_ext/thor.rb → bash_templates/grep.sh} +0 -0
  17. data/lib/bash_templates/misc.sh +25 -8
  18. data/{test/dummy/public/favicon.ico → lib/bash_templates/mysql.sh} +0 -0
  19. data/lib/bash_templates/process.sh +0 -0
  20. data/lib/bash_templates/rails.sh +10 -0
  21. data/lib/bash_templates/ruby.sh +2 -1
  22. data/lib/bash_templates/rubymine_idea.sh +38 -9
  23. data/lib/bash_templates/shortcuts.sh +12 -1
  24. data/lib/bash_templates/video.sh +2 -3
  25. data/lib/builder_templates/set_envs.erb +2 -1
  26. data/lib/builder_templates/working_project_bash.erb +3 -0
  27. data/lib/deps.rb +13 -0
  28. data/lib/deps_methods.rb +114 -0
  29. data/lib/drb/client.rb +7 -28
  30. data/lib/drb/server.rb +13 -27
  31. data/lib/dsl/ro_file.rb +23 -0
  32. data/lib/guard_helpers/base_helper.rb +91 -0
  33. data/lib/guard_helpers/basic_helper.rb +132 -0
  34. data/lib/guard_helpers/erb_helper.rb +52 -0
  35. data/lib/guard_helpers/gem_helper.rb +41 -0
  36. data/lib/guard_helpers/initd_helper.rb +126 -0
  37. data/lib/guard_helpers/md_helper.rb +44 -0
  38. data/lib/guard_helpers/mid_mod_class_methods_helper.rb +45 -0
  39. data/lib/rails_builder_helper.rb +10 -12
  40. data/lib/ro_cells.rb +3 -0
  41. data/lib/ro_cells/base.rb +6 -0
  42. data/lib/ro_cells/gem.rb +29 -0
  43. data/lib/ro_commands.rb +3 -10
  44. data/lib/ro_commands/base.rb +49 -25
  45. data/lib/ro_commands/crawler.rb +53 -0
  46. data/lib/ro_commands/file_actions.rb +45 -1
  47. data/lib/ro_commands/gem.rb +16 -0
  48. data/lib/ro_commands/generate.rb +13 -1
  49. data/lib/ro_commands/generators/base_generator.rb +40 -14
  50. data/lib/ro_commands/generators/ex.rb +18 -16
  51. data/lib/ro_commands/generators/rails_generator.rb +37 -0
  52. data/lib/ro_commands/generators/rails_new_app.rb +23 -0
  53. data/lib/ro_commands/generators/rails_templates/Gemfile.erb +57 -0
  54. data/lib/ro_commands/generators/rails_templates/rodebug.erb +23 -0
  55. data/lib/ro_commands/generators/rails_templates/try.erb +1 -0
  56. data/lib/ro_commands/generators/rodebug.rb +37 -0
  57. data/lib/ro_commands/generators/spec_file.rb +49 -27
  58. data/lib/ro_commands/generators/templates/ex.erb +1 -28
  59. data/lib/ro_commands/generators/templates/spec.erb +0 -3
  60. data/lib/ro_commands/info.rb +5 -3
  61. data/lib/ro_commands/init.rb +40 -0
  62. data/lib/ro_commands/misc.rb +9 -0
  63. data/lib/ro_commands/navigate.rb +52 -28
  64. data/lib/ro_commands/processes.rb +1 -1
  65. data/lib/ro_commands/rails.rb +51 -34
  66. data/lib/ro_commands/refactor.rb +2 -0
  67. data/lib/ro_commands/ro_gist.rb +39 -0
  68. data/lib/ro_commands/shortcuts.rb +63 -14
  69. data/lib/ro_commands/templates/Gemfile.tt +1 -0
  70. data/lib/ro_commands/try.rb +2 -2
  71. data/lib/ro_commands/typography.rb +12 -0
  72. data/lib/ro_commands/version.rb +2 -2
  73. data/lib/ro_commands/video.rb +6 -0
  74. data/lib/ro_commands/zeus_templates/custom_plan.rb +11 -16
  75. data/lib/ro_commands/zeus_templates/zeus.json +10 -6
  76. data/lib/ro_commands_bin.rb +34 -0
  77. data/lib/ro_core_ext.rb +6 -0
  78. data/lib/ro_core_ext/array.rb +22 -0
  79. data/lib/ro_core_ext/hash.rb +21 -0
  80. data/lib/ro_core_ext/misc_helper.rb +16 -0
  81. data/lib/ro_core_ext/module_misc.rb +70 -0
  82. data/lib/ro_core_ext/object.rb +11 -0
  83. data/lib/ro_core_ext/pry.rb +10 -0
  84. data/lib/ro_core_ext/string.rb +37 -0
  85. data/lib/ro_core_ext/symbol.rb +0 -0
  86. data/lib/ro_core_ext/thor.rb +0 -0
  87. data/lib/ro_default.rb +8 -0
  88. data/lib/ro_file.rb +71 -0
  89. data/lib/ro_helpers.rb +5 -0
  90. data/lib/ro_helpers/all_ro_commands.rb +4 -0
  91. data/lib/ro_helpers/all_ro_commands_files.rb +42 -0
  92. data/lib/ro_helpers/bash.rb +100 -0
  93. data/lib/{ro_commands → ro_helpers}/hook.rb +1 -1
  94. data/lib/ro_helpers/out.rb +154 -0
  95. data/lib/ro_helpers/ro_bin_helper.rb +107 -0
  96. data/lib/{ro_commands → ro_helpers}/ro_helper.rb +1 -1
  97. data/lib/ro_misc/exec.rb +16 -0
  98. data/lib/ro_rails_helpers.rb +6 -0
  99. data/lib/ro_rails_helpers/handler.rb +33 -0
  100. data/lib/ro_rspec_helpers.rb +7 -0
  101. data/lib/ro_rspec_helpers/deps.rb +4 -0
  102. data/lib/ro_rspec_helpers/ro_faker.rb +116 -0
  103. data/lib/ro_rspec_helpers/ro_spec_helper.rb +48 -0
  104. data/lib/ro_rspec_helpers/run_in.rb +7 -0
  105. data/lib/ro_rspec_helpers/spec_matchers.rb +30 -0
  106. data/lib/set_envs_helper.rb +17 -8
  107. data/ro_commands.sh +221 -158
  108. data/spec/bin_spec.rb +13 -0
  109. data/spec/fixtures/Gemfile +58 -0
  110. data/spec/fixtures/Gemfile.lock +236 -0
  111. data/spec/fixtures/bash/try1 +0 -0
  112. data/spec/fixtures/bash/try2 +0 -0
  113. data/spec/fixtures/basic_helper/Guardfile +0 -0
  114. data/spec/fixtures/basic_helper/lib/guard_helpers/no1_guard_helper.rb +5 -0
  115. data/spec/fixtures/basic_helper/lib/guard_helpers/no2_guard_helper.rb +5 -0
  116. data/spec/fixtures/basic_helper/lib/guard_helpers/no3_guard_helper.rb +5 -0
  117. data/spec/fixtures/deps/lib/dir/f.rb +0 -0
  118. data/spec/fixtures/deps/lib/dir/f2.rb +0 -0
  119. data/spec/fixtures/deps_methods/lib/path/to/file.rb +7 -0
  120. data/spec/fixtures/deps_methods/lib/ro_commands/cmd.rb +6 -0
  121. data/spec/fixtures/file_actions/loli +0 -0
  122. data/spec/fixtures/file_actions/lolicon.rb +0 -0
  123. data/spec/fixtures/for_git/tmp/rspec_guard_result +1 -0
  124. data/spec/fixtures/for_method_backup/version.rb +3 -0
  125. data/spec/fixtures/for_methods/version.rb +0 -0
  126. data/spec/fixtures/for_process/config.ru +11 -0
  127. data/spec/fixtures/for_process/tmp/rspec_guard_result +1 -0
  128. data/spec/fixtures/for_rails/Gemfile +58 -0
  129. data/spec/fixtures/for_rails/Gemfile.lock +236 -0
  130. data/{test/dummy → spec/fixtures/for_rails}/README.rdoc +0 -0
  131. data/spec/fixtures/for_rails/Rakefile +6 -0
  132. data/{test/dummy → spec/fixtures/for_rails}/app/assets/javascripts/application.js +3 -0
  133. data/spec/fixtures/for_rails/app/assets/javascripts/articles.js.coffee +3 -0
  134. data/spec/fixtures/for_rails/app/assets/javascripts/comments.js.coffee +3 -0
  135. data/spec/fixtures/for_rails/app/assets/javascripts/users.js.coffee +3 -0
  136. data/{test/dummy → spec/fixtures/for_rails}/app/assets/stylesheets/application.css +0 -0
  137. data/spec/fixtures/for_rails/app/assets/stylesheets/articles.css.scss +3 -0
  138. data/spec/fixtures/for_rails/app/assets/stylesheets/comments.css.scss +3 -0
  139. data/spec/fixtures/for_rails/app/assets/stylesheets/scaffolds.css.scss +69 -0
  140. data/spec/fixtures/for_rails/app/assets/stylesheets/users.css.scss +3 -0
  141. data/{test/dummy → spec/fixtures/for_rails}/app/controllers/application_controller.rb +0 -0
  142. data/spec/fixtures/for_rails/app/controllers/articles_controller.rb +74 -0
  143. data/spec/fixtures/for_rails/app/controllers/comments_controller.rb +74 -0
  144. data/spec/fixtures/for_rails/app/controllers/users_controller.rb +74 -0
  145. data/{test/dummy → spec/fixtures/for_rails}/app/helpers/application_helper.rb +0 -0
  146. data/spec/fixtures/for_rails/app/helpers/articles_helper.rb +2 -0
  147. data/spec/fixtures/for_rails/app/helpers/comments_helper.rb +2 -0
  148. data/spec/fixtures/for_rails/app/helpers/users_helper.rb +2 -0
  149. data/spec/fixtures/for_rails/app/models/article.rb +2 -0
  150. data/spec/fixtures/for_rails/app/models/comment.rb +2 -0
  151. data/spec/fixtures/for_rails/app/models/user.rb +2 -0
  152. data/spec/fixtures/for_rails/app/views/articles/_form.html.erb +29 -0
  153. data/spec/fixtures/for_rails/app/views/articles/edit.html.erb +6 -0
  154. data/spec/fixtures/for_rails/app/views/articles/index.html.erb +31 -0
  155. data/spec/fixtures/for_rails/app/views/articles/index.json.jbuilder +4 -0
  156. data/spec/fixtures/for_rails/app/views/articles/new.html.erb +5 -0
  157. data/spec/fixtures/for_rails/app/views/articles/show.html.erb +19 -0
  158. data/spec/fixtures/for_rails/app/views/articles/show.json.jbuilder +1 -0
  159. data/spec/fixtures/for_rails/app/views/comments/_form.html.erb +29 -0
  160. data/spec/fixtures/for_rails/app/views/comments/edit.html.erb +6 -0
  161. data/spec/fixtures/for_rails/app/views/comments/index.html.erb +31 -0
  162. data/spec/fixtures/for_rails/app/views/comments/index.json.jbuilder +4 -0
  163. data/spec/fixtures/for_rails/app/views/comments/new.html.erb +5 -0
  164. data/spec/fixtures/for_rails/app/views/comments/show.html.erb +19 -0
  165. data/spec/fixtures/for_rails/app/views/comments/show.json.jbuilder +1 -0
  166. data/spec/fixtures/for_rails/app/views/layouts/application.html.erb +14 -0
  167. data/spec/fixtures/for_rails/app/views/users/_form.html.erb +25 -0
  168. data/spec/fixtures/for_rails/app/views/users/edit.html.erb +6 -0
  169. data/spec/fixtures/for_rails/app/views/users/index.html.erb +29 -0
  170. data/spec/fixtures/for_rails/app/views/users/index.json.jbuilder +4 -0
  171. data/spec/fixtures/for_rails/app/views/users/new.html.erb +5 -0
  172. data/spec/fixtures/for_rails/app/views/users/show.html.erb +14 -0
  173. data/spec/fixtures/for_rails/app/views/users/show.json.jbuilder +1 -0
  174. data/{test/dummy → spec/fixtures/for_rails}/bin/bundle +0 -0
  175. data/{test/dummy → spec/fixtures/for_rails}/bin/rails +0 -0
  176. data/{test/dummy → spec/fixtures/for_rails}/bin/rake +0 -0
  177. data/{test/dummy → spec/fixtures/for_rails}/config.ru +0 -0
  178. data/spec/fixtures/for_rails/config/application.rb +23 -0
  179. data/spec/fixtures/for_rails/config/boot.rb +4 -0
  180. data/spec/fixtures/for_rails/config/database.yml +39 -0
  181. data/spec/fixtures/for_rails/config/environment.rb +5 -0
  182. data/{test/dummy → spec/fixtures/for_rails}/config/environments/development.rb +1 -1
  183. data/{test/dummy → spec/fixtures/for_rails}/config/environments/production.rb +1 -1
  184. data/{test/dummy → spec/fixtures/for_rails}/config/environments/test.rb +1 -1
  185. data/{test/dummy → spec/fixtures/for_rails}/config/initializers/backtrace_silencers.rb +0 -0
  186. data/{test/dummy → spec/fixtures/for_rails}/config/initializers/filter_parameter_logging.rb +0 -0
  187. data/{test/dummy → spec/fixtures/for_rails}/config/initializers/inflections.rb +0 -0
  188. data/{test/dummy → spec/fixtures/for_rails}/config/initializers/mime_types.rb +0 -0
  189. data/{test/dummy → spec/fixtures/for_rails}/config/initializers/secret_token.rb +2 -2
  190. data/spec/fixtures/for_rails/config/initializers/session_store.rb +3 -0
  191. data/{test/dummy → spec/fixtures/for_rails}/config/initializers/wrap_parameters.rb +0 -0
  192. data/{test/dummy → spec/fixtures/for_rails}/config/locales/en.yml +0 -0
  193. data/spec/fixtures/for_rails/config/routes.rb +62 -0
  194. data/spec/fixtures/for_rails/db/migrate/20131208083747_create_articles.rb +11 -0
  195. data/spec/fixtures/for_rails/db/migrate/20131208083756_create_comments.rb +11 -0
  196. data/spec/fixtures/for_rails/db/migrate/20131208083835_create_users.rb +10 -0
  197. data/spec/fixtures/for_rails/db/seeds.rb +7 -0
  198. data/{test/dummy → spec/fixtures/for_rails}/public/404.html +0 -0
  199. data/{test/dummy → spec/fixtures/for_rails}/public/422.html +0 -0
  200. data/{test/dummy → spec/fixtures/for_rails}/public/500.html +0 -0
  201. data/spec/fixtures/for_rails/public/favicon.ico +0 -0
  202. data/spec/fixtures/for_rails/public/robots.txt +5 -0
  203. data/spec/fixtures/for_rails/test/test_helper.rb +15 -0
  204. data/spec/fixtures/generator/update_spec_tree/backup/Gemfile +45 -0
  205. data/spec/fixtures/generator/update_spec_tree/backup/Gemfile.lock +119 -0
  206. data/spec/fixtures/generator/update_spec_tree/backup/README.rdoc +28 -0
  207. data/{test/dummy → spec/fixtures/generator/update_spec_tree/backup}/Rakefile +1 -1
  208. data/spec/fixtures/generator/update_spec_tree/backup/app/assets/javascripts/application.js +16 -0
  209. data/spec/fixtures/generator/update_spec_tree/backup/app/assets/stylesheets/application.css +13 -0
  210. data/spec/fixtures/generator/update_spec_tree/backup/app/controllers/application_controller.rb +5 -0
  211. data/spec/fixtures/generator/update_spec_tree/backup/app/helpers/application_helper.rb +2 -0
  212. data/{test/dummy → spec/fixtures/generator/update_spec_tree/backup}/app/views/layouts/application.html.erb +1 -1
  213. data/spec/fixtures/generator/update_spec_tree/backup/bin/bundle +3 -0
  214. data/spec/fixtures/generator/update_spec_tree/backup/bin/rails +4 -0
  215. data/spec/fixtures/generator/update_spec_tree/backup/bin/rake +4 -0
  216. data/spec/fixtures/generator/update_spec_tree/backup/config.ru +4 -0
  217. data/{test/dummy → spec/fixtures/generator/update_spec_tree/backup}/config/application.rb +4 -4
  218. data/spec/fixtures/generator/update_spec_tree/backup/config/boot.rb +4 -0
  219. data/{test/dummy → spec/fixtures/generator/update_spec_tree/backup}/config/database.yml +0 -0
  220. data/{test/dummy → spec/fixtures/generator/update_spec_tree/backup}/config/environment.rb +1 -1
  221. data/spec/fixtures/generator/update_spec_tree/backup/config/environments/development.rb +29 -0
  222. data/spec/fixtures/generator/update_spec_tree/backup/config/environments/production.rb +80 -0
  223. data/spec/fixtures/generator/update_spec_tree/backup/config/environments/test.rb +36 -0
  224. data/spec/fixtures/generator/update_spec_tree/backup/config/initializers/backtrace_silencers.rb +7 -0
  225. data/spec/fixtures/generator/update_spec_tree/backup/config/initializers/filter_parameter_logging.rb +4 -0
  226. data/spec/fixtures/generator/update_spec_tree/backup/config/initializers/inflections.rb +16 -0
  227. data/spec/fixtures/generator/update_spec_tree/backup/config/initializers/mime_types.rb +5 -0
  228. data/spec/fixtures/generator/update_spec_tree/backup/config/initializers/secret_token.rb +12 -0
  229. data/spec/fixtures/generator/update_spec_tree/backup/config/initializers/session_store.rb +3 -0
  230. data/spec/fixtures/generator/update_spec_tree/backup/config/initializers/wrap_parameters.rb +14 -0
  231. data/spec/fixtures/generator/update_spec_tree/backup/config/locales/en.yml +23 -0
  232. data/{test/dummy → spec/fixtures/generator/update_spec_tree/backup}/config/routes.rb +1 -1
  233. data/spec/fixtures/generator/update_spec_tree/backup/db/seeds.rb +7 -0
  234. data/spec/fixtures/generator/update_spec_tree/backup/lib/assets/try1.rb +11 -0
  235. data/spec/fixtures/generator/update_spec_tree/backup/lib/tasks/try2.rb +11 -0
  236. data/spec/fixtures/generator/update_spec_tree/backup/lib/try.rb +19 -0
  237. data/spec/fixtures/generator/update_spec_tree/backup/public/404.html +58 -0
  238. data/spec/fixtures/generator/update_spec_tree/backup/public/422.html +58 -0
  239. data/spec/fixtures/generator/update_spec_tree/backup/public/500.html +57 -0
  240. data/spec/fixtures/generator/update_spec_tree/backup/public/favicon.ico +0 -0
  241. data/spec/fixtures/generator/update_spec_tree/backup/public/robots.txt +5 -0
  242. data/spec/fixtures/generator/update_spec_tree/backup/spec/spec_helper.rb +17 -0
  243. data/spec/fixtures/generator/update_spec_tree/backup/test/test_helper.rb +15 -0
  244. data/spec/fixtures/generator/update_spec_tree/try/Gemfile +45 -0
  245. data/spec/fixtures/generator/update_spec_tree/try/Gemfile.lock +119 -0
  246. data/spec/fixtures/generator/update_spec_tree/try/README.rdoc +28 -0
  247. data/spec/fixtures/generator/update_spec_tree/try/Rakefile +6 -0
  248. data/spec/fixtures/generator/update_spec_tree/try/app/assets/javascripts/application.js +16 -0
  249. data/spec/fixtures/generator/update_spec_tree/try/app/assets/stylesheets/application.css +13 -0
  250. data/spec/fixtures/generator/update_spec_tree/try/app/controllers/application_controller.rb +5 -0
  251. data/spec/fixtures/generator/update_spec_tree/try/app/helpers/application_helper.rb +2 -0
  252. data/spec/fixtures/generator/update_spec_tree/try/app/views/layouts/application.html.erb +14 -0
  253. data/spec/fixtures/generator/update_spec_tree/try/bin/bundle +3 -0
  254. data/spec/fixtures/generator/update_spec_tree/try/bin/rails +4 -0
  255. data/spec/fixtures/generator/update_spec_tree/try/bin/rake +4 -0
  256. data/spec/fixtures/generator/update_spec_tree/try/config.ru +4 -0
  257. data/spec/fixtures/generator/update_spec_tree/try/config/application.rb +23 -0
  258. data/spec/fixtures/generator/update_spec_tree/try/config/boot.rb +4 -0
  259. data/spec/fixtures/generator/update_spec_tree/try/config/database.yml +25 -0
  260. data/spec/fixtures/generator/update_spec_tree/try/config/environment.rb +5 -0
  261. data/spec/fixtures/generator/update_spec_tree/try/config/environments/development.rb +29 -0
  262. data/spec/fixtures/generator/update_spec_tree/try/config/environments/production.rb +80 -0
  263. data/spec/fixtures/generator/update_spec_tree/try/config/environments/test.rb +36 -0
  264. data/spec/fixtures/generator/update_spec_tree/try/config/initializers/backtrace_silencers.rb +7 -0
  265. data/spec/fixtures/generator/update_spec_tree/try/config/initializers/filter_parameter_logging.rb +4 -0
  266. data/spec/fixtures/generator/update_spec_tree/try/config/initializers/inflections.rb +16 -0
  267. data/spec/fixtures/generator/update_spec_tree/try/config/initializers/mime_types.rb +5 -0
  268. data/spec/fixtures/generator/update_spec_tree/try/config/initializers/secret_token.rb +12 -0
  269. data/spec/fixtures/generator/update_spec_tree/try/config/initializers/session_store.rb +3 -0
  270. data/spec/fixtures/generator/update_spec_tree/try/config/initializers/wrap_parameters.rb +14 -0
  271. data/spec/fixtures/generator/update_spec_tree/try/config/locales/en.yml +23 -0
  272. data/spec/fixtures/generator/update_spec_tree/try/config/routes.rb +56 -0
  273. data/spec/fixtures/generator/update_spec_tree/try/db/seeds.rb +7 -0
  274. data/spec/fixtures/generator/update_spec_tree/try/lib/assets/try1.rb +11 -0
  275. data/spec/fixtures/generator/update_spec_tree/try/lib/tasks/try2.rb +11 -0
  276. data/spec/fixtures/generator/update_spec_tree/try/lib/try.rb +19 -0
  277. data/spec/fixtures/generator/update_spec_tree/try/log/development.log +0 -0
  278. data/spec/fixtures/generator/update_spec_tree/try/public/404.html +58 -0
  279. data/spec/fixtures/generator/update_spec_tree/try/public/422.html +58 -0
  280. data/spec/fixtures/generator/update_spec_tree/try/public/500.html +57 -0
  281. data/spec/fixtures/generator/update_spec_tree/try/public/favicon.ico +0 -0
  282. data/spec/fixtures/generator/update_spec_tree/try/public/robots.txt +5 -0
  283. data/spec/fixtures/generator/update_spec_tree/try/spec/spec_helper.rb +17 -0
  284. data/spec/fixtures/generator/update_spec_tree/try/test/test_helper.rb +15 -0
  285. data/spec/fixtures/generators/lib/guard_helpers/ro_helper.rb +0 -0
  286. data/spec/fixtures/generators/spec/lib/guard_helpers/ro_helper_spec.rb +2 -0
  287. data/spec/fixtures/handler/error_page.html +1 -0
  288. data/spec/fixtures/handler/result.html +1 -0
  289. data/spec/fixtures/lib/element/backup.rb +0 -0
  290. data/spec/fixtures/navigate/faker_ro_commands/lib/ro_generators/a_generator.rb +0 -0
  291. data/spec/fixtures/navigate/faker_ro_commands/lib/typography/a_file.rb +0 -0
  292. data/spec/fixtures/rails_navigate/app/controllers/one_controller.rb +0 -0
  293. data/spec/fixtures/rails_navigate/app/controllers/two_controller.rb +0 -0
  294. data/spec/fixtures/rails_navigate/app/decorators/two_decorator.rb +0 -0
  295. data/spec/fixtures/rails_navigate/app/models/two_model.rb +0 -0
  296. data/spec/fixtures/rails_navigate/lib/path/to/file.rb +0 -0
  297. data/spec/fixtures/rails_navigate/lib/path/to/file2.rb +0 -0
  298. data/spec/fixtures/rails_new_app/try_create_rails/Gemfile +57 -0
  299. data/spec/fixtures/rails_new_app/try_create_rails/README.rdoc +28 -0
  300. data/spec/fixtures/rails_new_app/try_create_rails/Rakefile +6 -0
  301. data/spec/fixtures/rails_new_app/try_create_rails/app/assets/javascripts/application.js +16 -0
  302. data/spec/fixtures/rails_new_app/try_create_rails/app/assets/stylesheets/application.css +13 -0
  303. data/spec/fixtures/rails_new_app/try_create_rails/app/controllers/application_controller.rb +5 -0
  304. data/spec/fixtures/rails_new_app/try_create_rails/app/helpers/application_helper.rb +2 -0
  305. data/spec/fixtures/rails_new_app/try_create_rails/app/views/layouts/application.html.erb +14 -0
  306. data/spec/fixtures/rails_new_app/try_create_rails/bin/bundle +3 -0
  307. data/spec/fixtures/rails_new_app/try_create_rails/bin/rails +4 -0
  308. data/spec/fixtures/rails_new_app/try_create_rails/bin/rake +4 -0
  309. data/spec/fixtures/rails_new_app/try_create_rails/config.ru +4 -0
  310. data/spec/fixtures/rails_new_app/try_create_rails/config/application.rb +23 -0
  311. data/spec/fixtures/rails_new_app/try_create_rails/config/boot.rb +4 -0
  312. data/spec/fixtures/rails_new_app/try_create_rails/config/database.yml +39 -0
  313. data/spec/fixtures/rails_new_app/try_create_rails/config/environment.rb +5 -0
  314. data/spec/fixtures/rails_new_app/try_create_rails/config/environments/development.rb +29 -0
  315. data/spec/fixtures/rails_new_app/try_create_rails/config/environments/production.rb +80 -0
  316. data/spec/fixtures/rails_new_app/try_create_rails/config/environments/test.rb +36 -0
  317. data/spec/fixtures/rails_new_app/try_create_rails/config/initializers/backtrace_silencers.rb +7 -0
  318. data/spec/fixtures/rails_new_app/try_create_rails/config/initializers/filter_parameter_logging.rb +4 -0
  319. data/spec/fixtures/rails_new_app/try_create_rails/config/initializers/inflections.rb +16 -0
  320. data/spec/fixtures/rails_new_app/try_create_rails/config/initializers/mime_types.rb +5 -0
  321. data/spec/fixtures/rails_new_app/try_create_rails/config/initializers/secret_token.rb +12 -0
  322. data/spec/fixtures/rails_new_app/try_create_rails/config/initializers/session_store.rb +3 -0
  323. data/spec/fixtures/rails_new_app/try_create_rails/config/initializers/wrap_parameters.rb +14 -0
  324. data/spec/fixtures/rails_new_app/try_create_rails/config/locales/en.yml +23 -0
  325. data/spec/fixtures/rails_new_app/try_create_rails/config/routes.rb +56 -0
  326. data/spec/fixtures/rails_new_app/try_create_rails/db/seeds.rb +7 -0
  327. data/spec/fixtures/rails_new_app/try_create_rails/public/404.html +58 -0
  328. data/spec/fixtures/rails_new_app/try_create_rails/public/422.html +58 -0
  329. data/spec/fixtures/rails_new_app/try_create_rails/public/500.html +57 -0
  330. data/spec/fixtures/rails_new_app/try_create_rails/public/favicon.ico +0 -0
  331. data/spec/fixtures/rails_new_app/try_create_rails/public/robots.txt +5 -0
  332. data/spec/fixtures/rails_new_app/try_create_rails/test/test_helper.rb +15 -0
  333. data/spec/fixtures/ro_bin_helper/gem1/lib/ro_commands/cmd1.rb +0 -0
  334. data/spec/fixtures/ro_bin_helper/gem1/lib/ro_commands/cmd2.rb +0 -0
  335. data/spec/fixtures/ro_bin_helper/gem2/lib/ro_commands/cmd1.rb +0 -0
  336. data/spec/fixtures/ro_bin_helper/gem2/lib/ro_commands/cmd2.rb +0 -0
  337. data/spec/fixtures/ro_commands_bin/lib/ro_commands/outside_ro_command.rb +5 -0
  338. data/spec/fixtures/ro_gist/ex/ex3.rb +0 -0
  339. data/spec/fixtures/ro_gist/ex/ex3_spec.rb +0 -0
  340. data/spec/fixtures/rodebug/config/routes.rb +6 -0
  341. data/spec/fixtures/spec/spec_helper.rb +20 -0
  342. data/spec/fixtures/tmp/rspec_guard_result +5 -0
  343. data/spec/fixtures/try_create_rails/Gemfile +58 -0
  344. data/spec/fixtures/try_create_rails/README.rdoc +28 -0
  345. data/spec/fixtures/try_create_rails/Rakefile +6 -0
  346. data/spec/fixtures/try_create_rails/app/assets/javascripts/application.js +16 -0
  347. data/spec/fixtures/try_create_rails/app/assets/stylesheets/application.css +13 -0
  348. data/spec/fixtures/try_create_rails/app/controllers/application_controller.rb +5 -0
  349. data/spec/fixtures/try_create_rails/app/helpers/application_helper.rb +2 -0
  350. data/spec/fixtures/try_create_rails/app/views/layouts/application.html.erb +14 -0
  351. data/spec/fixtures/try_create_rails/bin/bundle +3 -0
  352. data/spec/fixtures/try_create_rails/bin/rails +4 -0
  353. data/spec/fixtures/try_create_rails/bin/rake +4 -0
  354. data/spec/fixtures/try_create_rails/config.ru +4 -0
  355. data/spec/fixtures/try_create_rails/config/application.rb +23 -0
  356. data/spec/fixtures/try_create_rails/config/boot.rb +4 -0
  357. data/spec/fixtures/try_create_rails/config/database.yml +39 -0
  358. data/spec/fixtures/try_create_rails/config/environment.rb +5 -0
  359. data/spec/fixtures/try_create_rails/config/environments/development.rb +29 -0
  360. data/spec/fixtures/try_create_rails/config/environments/production.rb +80 -0
  361. data/spec/fixtures/try_create_rails/config/environments/test.rb +36 -0
  362. data/spec/fixtures/try_create_rails/config/initializers/backtrace_silencers.rb +7 -0
  363. data/spec/fixtures/try_create_rails/config/initializers/filter_parameter_logging.rb +4 -0
  364. data/spec/fixtures/try_create_rails/config/initializers/inflections.rb +16 -0
  365. data/spec/fixtures/try_create_rails/config/initializers/mime_types.rb +5 -0
  366. data/spec/fixtures/try_create_rails/config/initializers/secret_token.rb +12 -0
  367. data/spec/fixtures/try_create_rails/config/initializers/session_store.rb +3 -0
  368. data/spec/fixtures/try_create_rails/config/initializers/wrap_parameters.rb +14 -0
  369. data/spec/fixtures/try_create_rails/config/locales/en.yml +23 -0
  370. data/spec/fixtures/try_create_rails/config/routes.rb +56 -0
  371. data/spec/fixtures/try_create_rails/db/seeds.rb +7 -0
  372. data/spec/fixtures/try_create_rails/public/404.html +58 -0
  373. data/spec/fixtures/try_create_rails/public/422.html +58 -0
  374. data/spec/fixtures/try_create_rails/public/500.html +57 -0
  375. data/spec/fixtures/try_create_rails/public/favicon.ico +0 -0
  376. data/spec/fixtures/try_create_rails/public/robots.txt +5 -0
  377. data/spec/fixtures/try_create_rails/test/test_helper.rb +15 -0
  378. data/spec/lib/all_spec.rb +36 -0
  379. data/spec/lib/bash_builder_spec.rb +75 -0
  380. data/spec/lib/bash_debug_spec.rb +24 -0
  381. data/spec/lib/core_ext/misc_helper_spec.rb +20 -0
  382. data/spec/lib/core_ext/module_misc_spec.rb +38 -0
  383. data/spec/lib/deps_methods_spec.rb +52 -0
  384. data/spec/lib/deps_spec.rb +27 -0
  385. data/spec/lib/guard_helpers/base_helper_spec.rb +56 -0
  386. data/spec/lib/guard_helpers/basic_helper_spec.rb +44 -0
  387. data/spec/lib/guard_helpers/gem_helper_spec.rb +14 -0
  388. data/spec/lib/guard_helpers/mid_mod_class_method_helper_spec.rb +35 -0
  389. data/spec/lib/ro_cells/gem_spec.rb +25 -0
  390. data/spec/lib/ro_commands/base_config_spec.rb +0 -0
  391. data/spec/lib/ro_commands/base_spec.rb +45 -0
  392. data/spec/lib/ro_commands/dsl/file_spec.rb +0 -0
  393. data/spec/lib/ro_commands/env/base_config_spec.rb +0 -0
  394. data/spec/lib/ro_commands/env/ro_proc_spec.rb +0 -0
  395. data/spec/lib/ro_commands/env/ro_process_spec.rb +0 -0
  396. data/spec/lib/ro_commands/file_actions_spec.rb +31 -0
  397. data/spec/lib/ro_commands/generate_spec.rb +7 -0
  398. data/spec/lib/ro_commands/generators/base_generator_spec.rb +2 -0
  399. data/spec/lib/ro_commands/generators/ex_spec.rb +33 -0
  400. data/spec/lib/ro_commands/generators/lib_spec.rb +2 -0
  401. data/spec/lib/ro_commands/generators/rails_generator_spec.rb +22 -0
  402. data/spec/lib/ro_commands/generators/rails_new_app_spec.rb +20 -0
  403. data/spec/lib/ro_commands/generators/rodebug_spec.rb +17 -0
  404. data/spec/lib/ro_commands/generators/spec_file_spec.rb +69 -0
  405. data/spec/lib/ro_commands/git_flow_spec.rb +19 -0
  406. data/spec/lib/ro_commands/git_spec.rb +0 -0
  407. data/spec/lib/ro_commands/misc_spec.rb +35 -0
  408. data/spec/lib/ro_commands/navigate_spec.rb +46 -0
  409. data/spec/lib/ro_commands/out_spec.rb +23 -0
  410. data/spec/lib/ro_commands/process_spec.rb +0 -0
  411. data/spec/lib/ro_commands/processes_spec.rb +0 -0
  412. data/spec/lib/ro_commands/rails_spec.rb +83 -0
  413. data/spec/lib/ro_commands/refactor_spec.rb +52 -0
  414. data/spec/lib/ro_commands/ro_gist_spec.rb +23 -0
  415. data/spec/lib/ro_commands/ro_helper_spec.rb +32 -0
  416. data/spec/lib/ro_commands/rubymine_spec.rb +0 -0
  417. data/spec/lib/ro_commands/version_spec.rb +0 -0
  418. data/spec/lib/ro_commands/zeus_spec.rb +12 -0
  419. data/spec/lib/ro_commands_bin_spec.rb +21 -0
  420. data/spec/lib/ro_commands_spec.rb +1 -0
  421. data/spec/lib/ro_core_ext/array_spec.rb +11 -0
  422. data/spec/lib/ro_core_ext/hash_spec.rb +12 -0
  423. data/spec/lib/ro_core_ext/object_spec.rb +12 -0
  424. data/spec/lib/ro_core_ext/string_spec.rb +10 -0
  425. data/spec/lib/ro_file_spec.rb +27 -0
  426. data/spec/lib/ro_helpers/all_ro_commands_spec.rb +9 -0
  427. data/spec/lib/ro_helpers/bash_spec.rb +40 -0
  428. data/spec/lib/ro_helpers/ro_bin_helper_spec.rb +23 -0
  429. data/spec/lib/ro_rails_helpers/handler_spec.rb +23 -0
  430. data/spec/lib/ro_rspec_helpers/ro_faker_spec.rb +14 -0
  431. data/spec/lib/ro_rspec_helpers/spec_helpers_spec.rb +5 -0
  432. data/spec/lib/ro_rspec_helpers_spec.rb +8 -0
  433. data/spec/lib/shortcuts_spec.rb +8 -0
  434. data/spec/lib/tasks/roro_commands_tasks_spec.rb +2 -0
  435. data/spec/lib/try_spec.rb +0 -0
  436. data/spec/lib/typography/test/typography_test_spec.rb +2 -0
  437. data/spec/ro_faker_templates/error_page.erb +1 -0
  438. data/spec/ro_faker_templates/outside_ro_commands.tt +5 -0
  439. data/spec/ro_faker_templates/rails4/Gemfile +58 -0
  440. data/spec/ro_faker_templates/rails4/Gemfile.lock +236 -0
  441. data/spec/ro_faker_templates/rails4/README.rdoc +28 -0
  442. data/spec/ro_faker_templates/rails4/Rakefile +6 -0
  443. data/spec/ro_faker_templates/rails4/app/assets/javascripts/application.js +16 -0
  444. data/spec/ro_faker_templates/rails4/app/assets/javascripts/articles.js.coffee +3 -0
  445. data/spec/ro_faker_templates/rails4/app/assets/javascripts/comments.js.coffee +3 -0
  446. data/spec/ro_faker_templates/rails4/app/assets/javascripts/users.js.coffee +3 -0
  447. data/spec/ro_faker_templates/rails4/app/assets/stylesheets/application.css +13 -0
  448. data/spec/ro_faker_templates/rails4/app/assets/stylesheets/articles.css.scss +3 -0
  449. data/spec/ro_faker_templates/rails4/app/assets/stylesheets/comments.css.scss +3 -0
  450. data/spec/ro_faker_templates/rails4/app/assets/stylesheets/scaffolds.css.scss +69 -0
  451. data/spec/ro_faker_templates/rails4/app/assets/stylesheets/users.css.scss +3 -0
  452. data/spec/ro_faker_templates/rails4/app/controllers/application_controller.rb +5 -0
  453. data/spec/ro_faker_templates/rails4/app/controllers/articles_controller.rb +74 -0
  454. data/spec/ro_faker_templates/rails4/app/controllers/comments_controller.rb +74 -0
  455. data/spec/ro_faker_templates/rails4/app/controllers/users_controller.rb +74 -0
  456. data/spec/ro_faker_templates/rails4/app/helpers/application_helper.rb +2 -0
  457. data/spec/ro_faker_templates/rails4/app/helpers/articles_helper.rb +2 -0
  458. data/spec/ro_faker_templates/rails4/app/helpers/comments_helper.rb +2 -0
  459. data/spec/ro_faker_templates/rails4/app/helpers/users_helper.rb +2 -0
  460. data/spec/ro_faker_templates/rails4/app/models/article.rb +2 -0
  461. data/spec/ro_faker_templates/rails4/app/models/comment.rb +2 -0
  462. data/spec/ro_faker_templates/rails4/app/models/user.rb +2 -0
  463. data/spec/ro_faker_templates/rails4/app/views/articles/_form.html.erb +29 -0
  464. data/spec/ro_faker_templates/rails4/app/views/articles/edit.html.erb +6 -0
  465. data/spec/ro_faker_templates/rails4/app/views/articles/index.html.erb +31 -0
  466. data/spec/ro_faker_templates/rails4/app/views/articles/index.json.jbuilder +4 -0
  467. data/spec/ro_faker_templates/rails4/app/views/articles/new.html.erb +5 -0
  468. data/spec/ro_faker_templates/rails4/app/views/articles/show.html.erb +19 -0
  469. data/spec/ro_faker_templates/rails4/app/views/articles/show.json.jbuilder +1 -0
  470. data/spec/ro_faker_templates/rails4/app/views/comments/_form.html.erb +29 -0
  471. data/spec/ro_faker_templates/rails4/app/views/comments/edit.html.erb +6 -0
  472. data/spec/ro_faker_templates/rails4/app/views/comments/index.html.erb +31 -0
  473. data/spec/ro_faker_templates/rails4/app/views/comments/index.json.jbuilder +4 -0
  474. data/spec/ro_faker_templates/rails4/app/views/comments/new.html.erb +5 -0
  475. data/spec/ro_faker_templates/rails4/app/views/comments/show.html.erb +19 -0
  476. data/spec/ro_faker_templates/rails4/app/views/comments/show.json.jbuilder +1 -0
  477. data/spec/ro_faker_templates/rails4/app/views/layouts/application.html.erb +14 -0
  478. data/spec/ro_faker_templates/rails4/app/views/users/_form.html.erb +25 -0
  479. data/spec/ro_faker_templates/rails4/app/views/users/edit.html.erb +6 -0
  480. data/spec/ro_faker_templates/rails4/app/views/users/index.html.erb +29 -0
  481. data/spec/ro_faker_templates/rails4/app/views/users/index.json.jbuilder +4 -0
  482. data/spec/ro_faker_templates/rails4/app/views/users/new.html.erb +5 -0
  483. data/spec/ro_faker_templates/rails4/app/views/users/show.html.erb +14 -0
  484. data/spec/ro_faker_templates/rails4/app/views/users/show.json.jbuilder +1 -0
  485. data/spec/ro_faker_templates/rails4/bin/bundle +3 -0
  486. data/spec/ro_faker_templates/rails4/bin/rails +4 -0
  487. data/spec/ro_faker_templates/rails4/bin/rake +4 -0
  488. data/spec/ro_faker_templates/rails4/config.ru +4 -0
  489. data/spec/ro_faker_templates/rails4/config/application.rb +23 -0
  490. data/spec/ro_faker_templates/rails4/config/boot.rb +4 -0
  491. data/spec/ro_faker_templates/rails4/config/database.yml +39 -0
  492. data/spec/ro_faker_templates/rails4/config/environment.rb +5 -0
  493. data/spec/ro_faker_templates/rails4/config/environments/development.rb +29 -0
  494. data/spec/ro_faker_templates/rails4/config/environments/production.rb +80 -0
  495. data/spec/ro_faker_templates/rails4/config/environments/test.rb +36 -0
  496. data/spec/ro_faker_templates/rails4/config/initializers/backtrace_silencers.rb +7 -0
  497. data/spec/ro_faker_templates/rails4/config/initializers/filter_parameter_logging.rb +4 -0
  498. data/spec/ro_faker_templates/rails4/config/initializers/inflections.rb +16 -0
  499. data/spec/ro_faker_templates/rails4/config/initializers/mime_types.rb +5 -0
  500. data/spec/ro_faker_templates/rails4/config/initializers/secret_token.rb +12 -0
  501. data/spec/ro_faker_templates/rails4/config/initializers/session_store.rb +3 -0
  502. data/spec/ro_faker_templates/rails4/config/initializers/wrap_parameters.rb +14 -0
  503. data/spec/ro_faker_templates/rails4/config/locales/en.yml +23 -0
  504. data/spec/ro_faker_templates/rails4/config/routes.rb +62 -0
  505. data/spec/ro_faker_templates/rails4/db/migrate/20131208083747_create_articles.rb +11 -0
  506. data/spec/ro_faker_templates/rails4/db/migrate/20131208083756_create_comments.rb +11 -0
  507. data/spec/ro_faker_templates/rails4/db/migrate/20131208083835_create_users.rb +10 -0
  508. data/spec/ro_faker_templates/rails4/db/seeds.rb +7 -0
  509. data/spec/ro_faker_templates/rails4/public/404.html +58 -0
  510. data/spec/ro_faker_templates/rails4/public/422.html +58 -0
  511. data/spec/ro_faker_templates/rails4/public/500.html +57 -0
  512. data/spec/ro_faker_templates/rails4/public/favicon.ico +0 -0
  513. data/spec/ro_faker_templates/rails4/public/robots.txt +5 -0
  514. data/spec/ro_faker_templates/rails4/test/test_helper.rb +15 -0
  515. data/spec/ro_faker_templates/routes.erb +3 -0
  516. data/spec/spec_helper.rb +40 -0
  517. metadata +1001 -84
  518. data/README.rdoc +0 -3
  519. data/lib/ro_commands/core_ext/hash.rb +0 -5
  520. data/lib/ro_commands/core_ext/string.rb +0 -18
  521. data/lib/ro_commands/dsl/ro_file.rb +0 -24
  522. data/lib/ro_commands/helpers/all.rb +0 -8
  523. data/lib/ro_commands/helpers/all_files.rb +0 -21
  524. data/lib/ro_commands/helpers/bash.rb +0 -59
  525. data/lib/ro_commands/helpers/out.rb +0 -88
  526. data/test/dummy/config/boot.rb +0 -5
  527. data/test/dummy/config/initializers/session_store.rb +0 -3
  528. data/test/roro_commands_test.rb +0 -7
  529. data/test/test_helper.rb +0 -15
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ TryCreateRails::Application.load_tasks
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require turbolinks
16
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>TryCreateRails</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(:default, Rails.env)
8
+
9
+ module TryCreateRails
10
+ class Application < Rails::Application
11
+ # Settings in config/environments/* take precedence over those specified here.
12
+ # Application configuration should go into files in config/initializers
13
+ # -- all .rb files in that directory are automatically loaded.
14
+
15
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
+ # config.time_zone = 'Central Time (US & Canada)'
18
+
19
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21
+ # config.i18n.default_locale = :de
22
+ end
23
+ end
@@ -0,0 +1,4 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,39 @@
1
+ # MySQL. Versions 4.1 and 5.0 are recommended.
2
+ #
3
+ # Install the MYSQL driver
4
+ # gem install mysql2
5
+ #
6
+ # Ensure the MySQL gem is defined in your Gemfile
7
+ # gem 'mysql2'
8
+ #
9
+ # And be sure to use new-style password hashing:
10
+ # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
11
+ development:
12
+ adapter: mysql2
13
+ encoding: utf8
14
+ database: try_create_rails_development
15
+ pool: 5
16
+ username: root
17
+ password:
18
+ socket: /var/run/mysqld/mysqld.sock
19
+
20
+ # Warning: The database defined as "test" will be erased and
21
+ # re-generated from your development database when you run "rake".
22
+ # Do not set this db to the same as development or production.
23
+ test:
24
+ adapter: mysql2
25
+ encoding: utf8
26
+ database: try_create_rails_test
27
+ pool: 5
28
+ username: root
29
+ password:
30
+ socket: /var/run/mysqld/mysqld.sock
31
+
32
+ production:
33
+ adapter: mysql2
34
+ encoding: utf8
35
+ database: try_create_rails_production
36
+ pool: 5
37
+ username: root
38
+ password:
39
+ socket: /var/run/mysqld/mysqld.sock
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ TryCreateRails::Application.initialize!
@@ -0,0 +1,29 @@
1
+ TryCreateRails::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+ end
@@ -0,0 +1,80 @@
1
+ TryCreateRails::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both thread web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # Version of your assets, change this if you want to expire all your assets.
36
+ config.assets.version = '1.0'
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
41
+
42
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
+ # config.force_ssl = true
44
+
45
+ # Set to :debug to see everything in the log.
46
+ config.log_level = :info
47
+
48
+ # Prepend all log lines with the following tags.
49
+ # config.log_tags = [ :subdomain, :uuid ]
50
+
51
+ # Use a different logger for distributed setups.
52
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
53
+
54
+ # Use a different cache store in production.
55
+ # config.cache_store = :mem_cache_store
56
+
57
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58
+ # config.action_controller.asset_host = "http://assets.example.com"
59
+
60
+ # Precompile additional assets.
61
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
+ # config.assets.precompile += %w( search.js )
63
+
64
+ # Ignore bad email addresses and do not raise email delivery errors.
65
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66
+ # config.action_mailer.raise_delivery_errors = false
67
+
68
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69
+ # the I18n.default_locale when a translation can not be found).
70
+ config.i18n.fallbacks = true
71
+
72
+ # Send deprecation notices to registered listeners.
73
+ config.active_support.deprecation = :notify
74
+
75
+ # Disable automatic flushing of the log to improve performance.
76
+ # config.autoflush_log = false
77
+
78
+ # Use default logging formatter so that PID and timestamp are not suppressed.
79
+ config.log_formatter = ::Logger::Formatter.new
80
+ end
@@ -0,0 +1,36 @@
1
+ TryCreateRails::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ TryCreateRails::Application.config.secret_key_base = '9ca02e6a5e4552a7eaf374c9f55bea1c4ddfead5934e2b15a9ad84ba44fafa399959b2082a2d459c03a6f38e77e4291e3feb53e2a1e632158ec8f7bd149d554f'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ TryCreateRails::Application.config.session_store :cookie_store, key: '_try_create_rails_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,56 @@
1
+ TryCreateRails::Application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
4
+
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
7
+
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
56
+ end