moto_web_engine 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/javascripts/moto_web_engine/api_runs.js +2 -0
  6. data/app/assets/javascripts/moto_web_engine/api_tests.js +2 -0
  7. data/app/assets/javascripts/moto_web_engine/application.js +13 -0
  8. data/app/assets/javascripts/moto_web_engine/runs.js +2 -0
  9. data/app/assets/javascripts/moto_web_engine/tests.js +2 -0
  10. data/app/assets/stylesheets/moto_web_engine/api_runs.css +4 -0
  11. data/app/assets/stylesheets/moto_web_engine/api_tests.css +4 -0
  12. data/app/assets/stylesheets/moto_web_engine/application.css +15 -0
  13. data/app/assets/stylesheets/moto_web_engine/runs.css +4 -0
  14. data/app/assets/stylesheets/moto_web_engine/tests.css +4 -0
  15. data/app/controllers/moto_web_engine/api_runs_controller.rb +38 -0
  16. data/app/controllers/moto_web_engine/api_tests_controller.rb +38 -0
  17. data/app/controllers/moto_web_engine/application_controller.rb +4 -0
  18. data/app/controllers/moto_web_engine/runs_controller.rb +11 -0
  19. data/app/controllers/moto_web_engine/tests_controller.rb +11 -0
  20. data/app/helpers/moto_web_engine/api_runs_helper.rb +4 -0
  21. data/app/helpers/moto_web_engine/api_tests_helper.rb +4 -0
  22. data/app/helpers/moto_web_engine/application_helper.rb +4 -0
  23. data/app/helpers/moto_web_engine/runs_helper.rb +4 -0
  24. data/app/helpers/moto_web_engine/tests_helper.rb +4 -0
  25. data/app/models/moto_web_engine/run.rb +16 -0
  26. data/app/models/moto_web_engine/test.rb +16 -0
  27. data/app/views/layouts/moto_web_engine/application.html.erb +14 -0
  28. data/app/views/moto_web_engine/runs/index.html.erb +2 -0
  29. data/config/routes.rb +11 -0
  30. data/db/migrate/20151111135844_create_moto_web_engine_runs.rb +18 -0
  31. data/db/migrate/20151111135905_create_moto_web_engine_tests.rb +17 -0
  32. data/lib/moto_web_engine/engine.rb +5 -0
  33. data/lib/moto_web_engine/version.rb +3 -0
  34. data/lib/moto_web_engine.rb +4 -0
  35. data/lib/tasks/moto_web_engine_tasks.rake +4 -0
  36. data/test/controllers/moto_web_engine/api_runs_controller_test.rb +13 -0
  37. data/test/controllers/moto_web_engine/api_tests_controller_test.rb +13 -0
  38. data/test/controllers/moto_web_engine/runs_controller_test.rb +13 -0
  39. data/test/controllers/moto_web_engine/tests_controller_test.rb +13 -0
  40. data/test/dummy/Gemfile +4 -0
  41. data/test/dummy/Gemfile.lock +103 -0
  42. data/test/dummy/README.rdoc +28 -0
  43. data/test/dummy/Rakefile +6 -0
  44. data/test/dummy/app/assets/javascripts/application.js +13 -0
  45. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  46. data/test/dummy/app/controllers/application_controller.rb +5 -0
  47. data/test/dummy/app/helpers/application_helper.rb +2 -0
  48. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  49. data/test/dummy/bin/bundle +3 -0
  50. data/test/dummy/bin/rails +4 -0
  51. data/test/dummy/bin/rake +4 -0
  52. data/test/dummy/bin/setup +29 -0
  53. data/test/dummy/config/application.rb +26 -0
  54. data/test/dummy/config/boot.rb +5 -0
  55. data/test/dummy/config/database.yml +30 -0
  56. data/test/dummy/config/environment.rb +5 -0
  57. data/test/dummy/config/environments/development.rb +41 -0
  58. data/test/dummy/config/environments/production.rb +79 -0
  59. data/test/dummy/config/environments/test.rb +42 -0
  60. data/test/dummy/config/initializers/assets.rb +11 -0
  61. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  62. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  63. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  64. data/test/dummy/config/initializers/inflections.rb +16 -0
  65. data/test/dummy/config/initializers/mime_types.rb +4 -0
  66. data/test/dummy/config/initializers/session_store.rb +3 -0
  67. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  68. data/test/dummy/config/locales/en.yml +23 -0
  69. data/test/dummy/config/routes.rb +4 -0
  70. data/test/dummy/config/secrets.yml +22 -0
  71. data/test/dummy/config.ru +4 -0
  72. data/test/dummy/db/schema.rb +47 -0
  73. data/test/dummy/log/development.log +932 -0
  74. data/test/dummy/public/404.html +67 -0
  75. data/test/dummy/public/422.html +67 -0
  76. data/test/dummy/public/500.html +66 -0
  77. data/test/dummy/public/favicon.ico +0 -0
  78. data/test/dummy/restart.sh +5 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/1h_vlR3QYg48qXy8ao-75q_ZtYw8PDdhD2-ZY7IJE9o.cache +2 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/3RNZjnCTjTOaTcbNJc0OXZJCeaiTG8Ot_uiMQWNTYyM.cache +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/48YM6y-BZMlcy1xRcWkerX9inOc5fG-ClvvqFPmrbtA.cache +1 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/4D85A88n0UXK3nE-Em2_k0RkXvsIiWC4AcMX0plEM8E.cache +1 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/5NC7WrJ5pjU1XcJ8VrpPjxoLgCDU1kLiTMUzxLiDZr0.cache +2 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/61Gb_Sqvzpu1bppem62bR12Zey7heRoO1MeMTHXhfyg.cache +1 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6ElI3uUKGbz7fyoas6ATmRSTKczfvGFY3qu6feYGk4U.cache +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/8sb-eFs6lNCv2zVv06nLmRXtrJdn32rC6Z0lyLxjNe8.cache +1 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/B3R5sdJD7jB_Xj6qfc3ESiqW0SKx-Ebb0S88EVpTgbw.cache +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/CFEMfNhvs-SCspqGPSTbEtcOTWTMILl0P3UquPswLJo.cache +2 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/DO_-RYyEdB5Zr4xLTyMjDiRcV-Npo3JR4e1DYHAnV08.cache +1 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/DrD_0Vrc7zKGYb10FqmcgRDMJiqStbHx54qz1nANzgQ.cache +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/FEpOjAI615Q7AUHCGJ5-Is9ZWQf2UkFG6LpdROMR9vo.cache +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/FXvf21BDVZyLQF0CtK76q3EsGN4y-MDFzYP_040ZQZs.cache +2 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Gsuo7t7n3fe0sxT6c9eZLu3fuU4npUWktgLuXcFsSUg.cache +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ILJwqF5JA6nkghwP3nG_Qx0I6EBfpUgxaTibPsRyMdw.cache +2 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/IRPUtpQdQJqCvUC6RoHj48YWLaJ0AJKgHE3DA032tDI.cache +1 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Igpg8bT2_imtt15nxcJY1vd7-0-SuH-O9hcZAgt7ZNA.cache +1 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/JDyr4cqUofitLmVcOP1A_2ELgAoQ1g65JolSPd7l5Zk.cache +2 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/NXbS7q_iABFhTRIfQspraNZb7YqLOdDLxDmqi903S_0.cache +1 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/NbNSADnWLtMQoruEJ0yoH-DAyl9Bc9VtJ_0D1E1zheI.cache +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/PoJEmkx5CImwlV8TV4yA90f3de05jH1EkMizQkS5P8Q.cache +2 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/PxIMjNZjn6YZQaFHn7313igAMx4GIelLS2vIof7Qicc.cache +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/QAoARS40Puk_LRck6LbW8brvtyrfc8_ruKomB4NfI4E.cache +2 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/QHhxfkkibbsuMOAoZHZlpcKv5gHd5zMjUIEYJCdeFGE.cache +1 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RXOwjlbbnVk1bHfBTY96onufaZ_ReUxcYlXhUGCQ9og.cache +2 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/SNXJaKLK74CU5oQataDyY4XEXvIiK5NU8xkK1P7miJc.cache +1 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/TN3XhanpfvNhC5Y8UaYS1xkfUCu9sYHTAB9paV2hpv8.cache +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/VMAI-4ManxGLw2ZUNDmVQ8iJr0TGN1-14jL_JYjqW94.cache +1 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/YFR0rqLlJ-OQ9HkE_ARVNcU1S8EAsgN2OlyCKplJdtQ.cache +2 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Ye50l7H6xnIB1x931SSxhoWPdPeRl-zoaqKt6lTFAqU.cache +1 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/a-IYfoi41msuZIEjmp9AmNuKCp_Rnn7hPywJR2rB_wo.cache +1 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/eXBOrjXQzLcPl7YvA6KzxORKCZe16uZMRF4uKtkFvmA.cache +1 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ex8Q8kqC-uh72xVaO1m-E4-dX1YHTO_BEw69ZZWjgvk.cache +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/i7eNDGgNLOHWTGDYyHQcZ0DQ3rrhVhLUaeMV6K_uN-o.cache +2 -0
  114. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ig_ZrOyTxUnSMmdoIbTnZHaiUphPvHI1InA9OHLjfQU.cache +1 -0
  115. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jWkNH7O68UPt6GKCO9Al_IkHoYNWXfVpB6AIj_4iVR4.cache +2 -0
  116. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/lAuY0hNnn8oVaKg8UcM6QS6_fXEb6nugO99bZ4c3sEo.cache +1 -0
  117. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/mJVZEcTmlnglVCz0faMBkVdr5YjlP0a9RTqns8-MtL4.cache +1 -0
  118. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/mj3SjEv7qq5J5k8_1wrJuSkdID7X3yN3wsH5ghKmOvE.cache +1 -0
  119. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/s8HUqDF3BRwQLUNtHQaz8bXPrmFiFbIpJPX7-8onvR8.cache +2 -0
  120. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/sKI-Z1uuAyPbuVYgq4nf4SsE1miJmnBLrZ9EtjePFZQ.cache +2 -0
  121. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/tuQ7bxDXY-ZfKAecf49acTOsTXNcjh2ef9-NcUnyZFc.cache +2 -0
  122. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/vmHmiFgz3zPRMhShhHM4ZpxUgvmYL6mew-mcUGIJtuA.cache +1 -0
  123. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/wR0rlpP2wUXrG1Wz1EOdJDmkFbA074s7uqzqPMctwOU.cache +0 -0
  124. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/y4ZUurGxzhdtoR7ZRa2LmKohuKvhBqjBv0wZ1N5zhnk.cache +0 -0
  125. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ytqfMGdRkLyDLkHhWQhemcEIxEt1xjxS5P0HNH1g4i8.cache +2 -0
  126. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/z7BbcYjEH6gfLVMorONAiMQcdtGTvsphbzlujrGHGQU.cache +2 -0
  127. data/test/dummy/tmp/pids/server.pid +1 -0
  128. data/test/fixtures/moto_web_engine/runs.yml +11 -0
  129. data/test/fixtures/moto_web_engine/tests.yml +11 -0
  130. data/test/integration/navigation_test.rb +8 -0
  131. data/test/models/moto_web_engine/run_test.rb +9 -0
  132. data/test/models/moto_web_engine/test_test.rb +9 -0
  133. data/test/moto_web_engine_test.rb +7 -0
  134. data/test/test_helper.rb +21 -0
  135. metadata +306 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 94ed49086180848a35210ce3ec1818723b52bef8
4
+ data.tar.gz: e808d74237ceefb695598956d0f5440850fa5830
5
+ SHA512:
6
+ metadata.gz: af519e2fc6ff7065056281bbaf620851340b8c92dc381a727802f705f62efc1e4907008ae69e1254f228facb19e7034274aa82f22575ec4f9f45a73d8ba8e57c
7
+ data.tar.gz: 9421e58dcb2f5894b406d94f0a69b59e298fcf946307598040da06ac9e11cc215749a952f1d0894211040b87454499a3ed384e76f3e446c4cca556e1fc3d4a02
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2015
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = MotoWebEngine
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,37 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'MotoWebEngine'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+ load 'rails/tasks/statistics.rake'
22
+
23
+
24
+
25
+ Bundler::GemHelper.install_tasks
26
+
27
+ require 'rake/testtask'
28
+
29
+ Rake::TestTask.new(:test) do |t|
30
+ t.libs << 'lib'
31
+ t.libs << 'test'
32
+ t.pattern = 'test/**/*_test.rb'
33
+ t.verbose = false
34
+ end
35
+
36
+
37
+ task default: :test
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,13 @@
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 any plugin's vendor/assets/javascripts directory 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/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,15 @@
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 any plugin's vendor/assets/stylesheets directory 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 bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,38 @@
1
+ require_dependency "moto_web_engine/application_controller"
2
+
3
+ module MotoWebEngine
4
+ class ApiRunsController < ApplicationController
5
+
6
+ # skip_before_action :verify_authenticity_token
7
+
8
+ def index
9
+ offset = params[:offset] || 0
10
+ limit = params[:limit] || 20
11
+ @runs = Run.order('id DESC').offset(offset).limit(limit)
12
+ render json: @runs
13
+ end
14
+
15
+ def create
16
+ input = JSON.parse(request.body.read)
17
+ # validate input hash here (or delegate to some private method)
18
+ run = Run.new input
19
+ run.save!
20
+ render json: run
21
+ end
22
+
23
+ def update
24
+ run = Run.find params[:id]
25
+ input = JSON.parse(request.body.read)
26
+ puts input
27
+ # validate input hash here (or delegate to some private method)
28
+ run.update input
29
+ render json: run
30
+ end
31
+
32
+ def show
33
+ run = Run.find params[:id]
34
+ render json: run
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,38 @@
1
+ require_dependency "moto_web_engine/application_controller"
2
+
3
+ module MotoWebEngine
4
+ class ApiTestsController < ApplicationController
5
+
6
+ # skip_before_action :verify_authenticity_token
7
+
8
+ def index
9
+ offset = params[:offset] || 0
10
+ limit = params[:limit] || 20
11
+ @tests = Test.order('id DESC').offset(offset).limit(limit)
12
+ render json: @tests
13
+ end
14
+
15
+ def create
16
+ input = JSON.parse(request.body.read)
17
+ # validate input hash here (or delegate to some private method)
18
+ test = Test.new input
19
+ test.save!
20
+ render json: test
21
+ end
22
+
23
+ def update
24
+ test = Test.find params[:id]
25
+ input = JSON.parse(request.body.read)
26
+ puts input
27
+ # validate input hash here (or delegate to some private method)
28
+ test.update input
29
+ render json: test
30
+ end
31
+
32
+ def show
33
+ test = Test.find params[:id]
34
+ render json: test
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,4 @@
1
+ module MotoWebEngine
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,11 @@
1
+ require_dependency "moto_web_engine/application_controller"
2
+
3
+ module MotoWebEngine
4
+ class RunsController < ApplicationController
5
+
6
+ def index
7
+ @runs = Run.last 10
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ require_dependency "moto_web_engine/application_controller"
2
+
3
+ module MotoWebEngine
4
+ class TestsController < ApplicationController
5
+
6
+ def index
7
+ @tests = Test.last 10
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,4 @@
1
+ module MotoWebEngine
2
+ module ApiRunsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module MotoWebEngine
2
+ module ApiTestsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module MotoWebEngine
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module MotoWebEngine
2
+ module RunsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module MotoWebEngine
2
+ module TestsHelper
3
+ end
4
+ end
@@ -0,0 +1,16 @@
1
+ module MotoWebEngine
2
+ class Run < ActiveRecord::Base
3
+
4
+ has_many :tests, dependent: :destroy
5
+
6
+ enum result: {
7
+ pending: -2,
8
+ running: -1,
9
+ passed: 0,
10
+ failure: 1,
11
+ error: 2,
12
+ skipped: 3
13
+ }
14
+
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module MotoWebEngine
2
+ class Test < ActiveRecord::Base
3
+
4
+ belongs_to :run
5
+
6
+ enum result: {
7
+ pending: -2,
8
+ running: -1,
9
+ passed: 0,
10
+ failure: 1,
11
+ error: 2,
12
+ skipped: 3
13
+ }
14
+
15
+ end
16
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>MotoWebEngine</title>
5
+ <%= stylesheet_link_tag "moto_web_engine/application", media: "all" %>
6
+ <%= javascript_include_tag "moto_web_engine/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,2 @@
1
+ Fancy table with the results will come here. Results in raw format are:
2
+ <%= @runs.to_s %>
data/config/routes.rb ADDED
@@ -0,0 +1,11 @@
1
+ MotoWebEngine::Engine.routes.draw do
2
+
3
+ resources :runs
4
+ resources :tests
5
+
6
+ scope '/api' do
7
+ resources :runs, controller: :api_runs, defaults: {format: :json}
8
+ resources :tests, controller: :api_tests, defaults: {format: :json}
9
+ end
10
+
11
+ end
@@ -0,0 +1,18 @@
1
+ class CreateMotoWebEngineRuns < ActiveRecord::Migration
2
+ def change
3
+ create_table :moto_web_engine_runs do |t|
4
+ t.string :name
5
+ t.integer :result
6
+ t.integer :cnt_all
7
+ t.integer :cnt_passed
8
+ t.integer :cnt_failure
9
+ t.integer :cnt_error
10
+ t.integer :cnt_skipped
11
+ t.string :user
12
+ t.string :host
13
+ t.integer :pid
14
+ t.float :duration
15
+ t.timestamps null: false
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ class CreateMotoWebEngineTests < ActiveRecord::Migration
2
+ def change
3
+ create_table :moto_web_engine_tests do |t|
4
+ t.belongs_to :run
5
+ t.string :name
6
+ t.string :class_name
7
+ t.text :log, limit: 2097152 #2MB
8
+ t.text :parameters
9
+ t.integer :result
10
+ t.string :error
11
+ t.text :failures
12
+ t.string :env
13
+ t.float :duration
14
+ t.timestamps null: false
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ module MotoWebEngine
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace MotoWebEngine
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module MotoWebEngine
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,4 @@
1
+ require "moto_web_engine/engine"
2
+
3
+ module MotoWebEngine
4
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :moto_web_engine do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ module MotoWebEngine
4
+ class ApiRunsControllerTest < ActionController::TestCase
5
+ setup do
6
+ @routes = Engine.routes
7
+ end
8
+
9
+ # test "the truth" do
10
+ # assert true
11
+ # end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ module MotoWebEngine
4
+ class ApiTestsControllerTest < ActionController::TestCase
5
+ setup do
6
+ @routes = Engine.routes
7
+ end
8
+
9
+ # test "the truth" do
10
+ # assert true
11
+ # end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ module MotoWebEngine
4
+ class RunsControllerTest < ActionController::TestCase
5
+ setup do
6
+ @routes = Engine.routes
7
+ end
8
+
9
+ # test "the truth" do
10
+ # assert true
11
+ # end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ module MotoWebEngine
4
+ class TestsControllerTest < ActionController::TestCase
5
+ setup do
6
+ @routes = Engine.routes
7
+ end
8
+
9
+ # test "the truth" do
10
+ # assert true
11
+ # end
12
+ end
13
+ end
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'mysql2', '~> 0.3.18'
4
+ gem 'rails', '4.2.4'
@@ -0,0 +1,103 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ actionmailer (4.2.4)
5
+ actionpack (= 4.2.4)
6
+ actionview (= 4.2.4)
7
+ activejob (= 4.2.4)
8
+ mail (~> 2.5, >= 2.5.4)
9
+ rails-dom-testing (~> 1.0, >= 1.0.5)
10
+ actionpack (4.2.4)
11
+ actionview (= 4.2.4)
12
+ activesupport (= 4.2.4)
13
+ rack (~> 1.6)
14
+ rack-test (~> 0.6.2)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
+ actionview (4.2.4)
18
+ activesupport (= 4.2.4)
19
+ builder (~> 3.1)
20
+ erubis (~> 2.7.0)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
+ activejob (4.2.4)
24
+ activesupport (= 4.2.4)
25
+ globalid (>= 0.3.0)
26
+ activemodel (4.2.4)
27
+ activesupport (= 4.2.4)
28
+ builder (~> 3.1)
29
+ activerecord (4.2.4)
30
+ activemodel (= 4.2.4)
31
+ activesupport (= 4.2.4)
32
+ arel (~> 6.0)
33
+ activesupport (4.2.4)
34
+ i18n (~> 0.7)
35
+ json (~> 1.7, >= 1.7.7)
36
+ minitest (~> 5.1)
37
+ thread_safe (~> 0.3, >= 0.3.4)
38
+ tzinfo (~> 1.1)
39
+ arel (6.0.3)
40
+ builder (3.2.2)
41
+ erubis (2.7.0)
42
+ globalid (0.3.6)
43
+ activesupport (>= 4.1.0)
44
+ i18n (0.7.0)
45
+ json (1.8.3)
46
+ loofah (2.0.3)
47
+ nokogiri (>= 1.5.9)
48
+ mail (2.6.3)
49
+ mime-types (>= 1.16, < 3)
50
+ mime-types (2.6.2)
51
+ mini_portile (0.6.2)
52
+ minitest (5.8.2)
53
+ mysql2 (0.3.20)
54
+ nokogiri (1.6.6.2)
55
+ mini_portile (~> 0.6.0)
56
+ rack (1.6.4)
57
+ rack-test (0.6.3)
58
+ rack (>= 1.0)
59
+ rails (4.2.4)
60
+ actionmailer (= 4.2.4)
61
+ actionpack (= 4.2.4)
62
+ actionview (= 4.2.4)
63
+ activejob (= 4.2.4)
64
+ activemodel (= 4.2.4)
65
+ activerecord (= 4.2.4)
66
+ activesupport (= 4.2.4)
67
+ bundler (>= 1.3.0, < 2.0)
68
+ railties (= 4.2.4)
69
+ sprockets-rails
70
+ rails-deprecated_sanitizer (1.0.3)
71
+ activesupport (>= 4.2.0.alpha)
72
+ rails-dom-testing (1.0.7)
73
+ activesupport (>= 4.2.0.beta, < 5.0)
74
+ nokogiri (~> 1.6.0)
75
+ rails-deprecated_sanitizer (>= 1.0.1)
76
+ rails-html-sanitizer (1.0.2)
77
+ loofah (~> 2.0)
78
+ railties (4.2.4)
79
+ actionpack (= 4.2.4)
80
+ activesupport (= 4.2.4)
81
+ rake (>= 0.8.7)
82
+ thor (>= 0.18.1, < 2.0)
83
+ rake (10.4.2)
84
+ sprockets (3.4.0)
85
+ rack (> 1, < 3)
86
+ sprockets-rails (2.3.3)
87
+ actionpack (>= 3.0)
88
+ activesupport (>= 3.0)
89
+ sprockets (>= 2.8, < 4.0)
90
+ thor (0.19.1)
91
+ thread_safe (0.3.5)
92
+ tzinfo (1.2.2)
93
+ thread_safe (~> 0.1)
94
+
95
+ PLATFORMS
96
+ ruby
97
+
98
+ DEPENDENCIES
99
+ mysql2 (~> 0.3.18)
100
+ rails (= 4.2.4)
101
+
102
+ BUNDLED WITH
103
+ 1.10.6
@@ -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
+ Rails.application.load_tasks
@@ -0,0 +1,13 @@
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 any plugin's vendor/assets/javascripts directory 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/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,15 @@
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 any plugin's vendor/assets/stylesheets directory 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 bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -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