meroku 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +2 -0
  3. data/Guardfile +7 -18
  4. data/README.md +78 -4
  5. data/bin/meroku +1 -1
  6. data/frontend/.gitignore +23 -0
  7. data/frontend/.ruby-version +2 -0
  8. data/frontend/Gemfile +58 -0
  9. data/frontend/Gemfile.lock +233 -0
  10. data/frontend/README.md +24 -0
  11. data/frontend/Rakefile +6 -0
  12. data/frontend/app/assets/config/manifest.js +3 -0
  13. data/frontend/app/assets/images/.keep +0 -0
  14. data/frontend/app/assets/javascripts/application.js +15 -0
  15. data/frontend/app/assets/javascripts/apps.coffee +3 -0
  16. data/frontend/app/assets/javascripts/cable.js +13 -0
  17. data/frontend/app/assets/javascripts/channels/.keep +0 -0
  18. data/frontend/app/assets/javascripts/pages.coffee +3 -0
  19. data/frontend/app/assets/javascripts/publickeys.coffee +3 -0
  20. data/frontend/app/assets/stylesheets/application.css +15 -0
  21. data/frontend/app/assets/stylesheets/apps.scss +3 -0
  22. data/frontend/app/assets/stylesheets/pages.scss +3 -0
  23. data/frontend/app/assets/stylesheets/publickeys.scss +3 -0
  24. data/frontend/app/assets/stylesheets/scaffolds.scss +84 -0
  25. data/frontend/app/channels/application_cable/channel.rb +4 -0
  26. data/frontend/app/channels/application_cable/connection.rb +4 -0
  27. data/frontend/app/controllers/application_controller.rb +3 -0
  28. data/frontend/app/controllers/apps_controller.rb +85 -0
  29. data/frontend/app/controllers/concerns/.keep +0 -0
  30. data/frontend/app/controllers/pages_controller.rb +4 -0
  31. data/frontend/app/controllers/publickeys_controller.rb +76 -0
  32. data/frontend/app/controllers/users/confirmations_controller.rb +28 -0
  33. data/frontend/app/controllers/users/omniauth_callbacks_controller.rb +28 -0
  34. data/frontend/app/controllers/users/passwords_controller.rb +32 -0
  35. data/frontend/app/controllers/users/registrations_controller.rb +89 -0
  36. data/frontend/app/controllers/users/sessions_controller.rb +25 -0
  37. data/frontend/app/controllers/users/unlocks_controller.rb +28 -0
  38. data/frontend/app/helpers/application_helper.rb +2 -0
  39. data/frontend/app/helpers/apps_helper.rb +2 -0
  40. data/frontend/app/helpers/pages_helper.rb +2 -0
  41. data/frontend/app/helpers/publickeys_helper.rb +2 -0
  42. data/frontend/app/jobs/application_job.rb +2 -0
  43. data/frontend/app/mailers/application_mailer.rb +4 -0
  44. data/frontend/app/models/app.rb +3 -0
  45. data/frontend/app/models/application_record.rb +3 -0
  46. data/frontend/app/models/concerns/.keep +0 -0
  47. data/frontend/app/models/publickey.rb +3 -0
  48. data/frontend/app/models/user.rb +12 -0
  49. data/frontend/app/serializable/serializable_app.rb +6 -0
  50. data/frontend/app/serializable/serializable_publickey.rb +7 -0
  51. data/frontend/app/serializable/serializable_user.rb +7 -0
  52. data/frontend/app/serializers/app_serializer.rb +3 -0
  53. data/frontend/app/serializers/publickey_serializer.rb +4 -0
  54. data/frontend/app/views/apps/_app.json.jbuilder +2 -0
  55. data/frontend/app/views/apps/_form.html.erb +22 -0
  56. data/frontend/app/views/apps/edit.html.erb +6 -0
  57. data/frontend/app/views/apps/index.html.erb +27 -0
  58. data/frontend/app/views/apps/index.json.jbuilder +1 -0
  59. data/frontend/app/views/apps/new.html.erb +5 -0
  60. data/frontend/app/views/apps/show.html.erb +9 -0
  61. data/frontend/app/views/apps/show.json.jbuilder +1 -0
  62. data/frontend/app/views/devise/confirmations/new.html.erb +16 -0
  63. data/frontend/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  64. data/frontend/app/views/devise/mailer/email_changed.html.erb +7 -0
  65. data/frontend/app/views/devise/mailer/password_change.html.erb +3 -0
  66. data/frontend/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  67. data/frontend/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  68. data/frontend/app/views/devise/passwords/edit.html.erb +25 -0
  69. data/frontend/app/views/devise/passwords/new.html.erb +16 -0
  70. data/frontend/app/views/devise/registrations/edit.html.erb +43 -0
  71. data/frontend/app/views/devise/registrations/new.html.erb +29 -0
  72. data/frontend/app/views/devise/sessions/new.html.erb +26 -0
  73. data/frontend/app/views/devise/shared/_links.html.erb +25 -0
  74. data/frontend/app/views/devise/unlocks/new.html.erb +16 -0
  75. data/frontend/app/views/layouts/application.html.erb +16 -0
  76. data/frontend/app/views/layouts/mailer.html.erb +13 -0
  77. data/frontend/app/views/layouts/mailer.text.erb +1 -0
  78. data/frontend/app/views/pages/landing.html.erb +2 -0
  79. data/frontend/app/views/publickeys/_form.html.erb +32 -0
  80. data/frontend/app/views/publickeys/_publickey.json.jbuilder +2 -0
  81. data/frontend/app/views/publickeys/edit.html.erb +6 -0
  82. data/frontend/app/views/publickeys/index.html.erb +31 -0
  83. data/frontend/app/views/publickeys/index.json.jbuilder +1 -0
  84. data/frontend/app/views/publickeys/new.html.erb +5 -0
  85. data/frontend/app/views/publickeys/show.html.erb +19 -0
  86. data/frontend/app/views/publickeys/show.json.jbuilder +1 -0
  87. data/frontend/bin/bundle +3 -0
  88. data/frontend/bin/rails +9 -0
  89. data/frontend/bin/rake +9 -0
  90. data/frontend/bin/setup +38 -0
  91. data/frontend/bin/spring +17 -0
  92. data/frontend/bin/update +29 -0
  93. data/frontend/bin/yarn +11 -0
  94. data/frontend/config.ru +5 -0
  95. data/frontend/config/application.rb +18 -0
  96. data/frontend/config/boot.rb +3 -0
  97. data/frontend/config/cable.yml +10 -0
  98. data/frontend/config/database.yml +25 -0
  99. data/frontend/config/environment.rb +5 -0
  100. data/frontend/config/environments/development.rb +56 -0
  101. data/frontend/config/environments/production.rb +97 -0
  102. data/frontend/config/environments/test.rb +42 -0
  103. data/frontend/config/initializers/ams.rb +3 -0
  104. data/frontend/config/initializers/application_controller_renderer.rb +8 -0
  105. data/frontend/config/initializers/assets.rb +14 -0
  106. data/frontend/config/initializers/backtrace_silencers.rb +7 -0
  107. data/frontend/config/initializers/cookies_serializer.rb +5 -0
  108. data/frontend/config/initializers/devise.rb +277 -0
  109. data/frontend/config/initializers/filter_parameter_logging.rb +4 -0
  110. data/frontend/config/initializers/inflections.rb +16 -0
  111. data/frontend/config/initializers/mime_types.rb +4 -0
  112. data/frontend/config/initializers/wrap_parameters.rb +14 -0
  113. data/frontend/config/locales/devise.en.yml +64 -0
  114. data/frontend/config/locales/en.yml +33 -0
  115. data/frontend/config/puma.rb +66 -0
  116. data/frontend/config/routes.rb +19 -0
  117. data/frontend/config/secrets.yml +32 -0
  118. data/frontend/config/spring.rb +6 -0
  119. data/frontend/db/migrate/20171023223732_devise_create_users.rb +42 -0
  120. data/frontend/db/migrate/20171025193627_add_token_to_users.rb +5 -0
  121. data/frontend/db/migrate/20171025203706_create_apps.rb +9 -0
  122. data/frontend/db/migrate/20171025223804_add_user_to_apps.rb +5 -0
  123. data/frontend/db/migrate/20171026071440_create_publickeys.rb +11 -0
  124. data/frontend/db/schema.rb +32 -0
  125. data/frontend/db/seeds.rb +7 -0
  126. data/frontend/etc_nginx_sites-available_default +29 -0
  127. data/frontend/lib/assets/.keep +0 -0
  128. data/frontend/lib/tasks/.keep +0 -0
  129. data/frontend/log/.keep +0 -0
  130. data/frontend/package.json +5 -0
  131. data/frontend/public/404.html +67 -0
  132. data/frontend/public/422.html +67 -0
  133. data/frontend/public/500.html +66 -0
  134. data/frontend/public/apple-touch-icon-precomposed.png +0 -0
  135. data/frontend/public/apple-touch-icon.png +0 -0
  136. data/frontend/public/favicon.ico +0 -0
  137. data/frontend/public/robots.txt +1 -0
  138. data/frontend/test/application_system_test_case.rb +5 -0
  139. data/frontend/test/controllers/.keep +0 -0
  140. data/frontend/test/controllers/apps_controller_test.rb +48 -0
  141. data/frontend/test/controllers/pages_controller_test.rb +9 -0
  142. data/frontend/test/controllers/publickeys_controller_test.rb +48 -0
  143. data/frontend/test/fixtures/.keep +0 -0
  144. data/frontend/test/fixtures/apps.yml +7 -0
  145. data/frontend/test/fixtures/files/.keep +0 -0
  146. data/frontend/test/fixtures/publickeys.yml +11 -0
  147. data/frontend/test/fixtures/users.yml +11 -0
  148. data/frontend/test/helpers/.keep +0 -0
  149. data/frontend/test/integration/.keep +0 -0
  150. data/frontend/test/mailers/.keep +0 -0
  151. data/frontend/test/models/.keep +0 -0
  152. data/frontend/test/models/app_test.rb +7 -0
  153. data/frontend/test/models/publickey_test.rb +7 -0
  154. data/frontend/test/models/user_test.rb +7 -0
  155. data/frontend/test/system/.keep +0 -0
  156. data/frontend/test/system/apps_test.rb +9 -0
  157. data/frontend/test/system/publickeys_test.rb +9 -0
  158. data/frontend/test/test_helper.rb +9 -0
  159. data/frontend/tmp/.keep +0 -0
  160. data/frontend/vendor/.keep +0 -0
  161. data/lib/meroku.rb +11 -24
  162. data/lib/meroku/aws.rb +32 -0
  163. data/lib/meroku/cli.rb +131 -0
  164. data/lib/meroku/infrastructure.rb +10 -17
  165. data/lib/meroku/infrastructure/node.rb +68 -0
  166. data/lib/meroku/tunnel.rb +50 -0
  167. data/lib/meroku/version.rb +1 -1
  168. data/meroku.gemspec +7 -3
  169. data/modified-cedar-14.sh +175 -0
  170. metadata +222 -19
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
@@ -0,0 +1,5 @@
1
+ require "test_helper"
2
+
3
+ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
+ driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5
+ end
File without changes
@@ -0,0 +1,48 @@
1
+ require 'test_helper'
2
+
3
+ class AppsControllerTest < ActionDispatch::IntegrationTest
4
+ setup do
5
+ @app = apps(:one)
6
+ end
7
+
8
+ test "should get index" do
9
+ get apps_url
10
+ assert_response :success
11
+ end
12
+
13
+ test "should get new" do
14
+ get new_app_url
15
+ assert_response :success
16
+ end
17
+
18
+ test "should create app" do
19
+ assert_difference('App.count') do
20
+ post apps_url, params: { app: { name: @app.name } }
21
+ end
22
+
23
+ assert_redirected_to app_url(App.last)
24
+ end
25
+
26
+ test "should show app" do
27
+ get app_url(@app)
28
+ assert_response :success
29
+ end
30
+
31
+ test "should get edit" do
32
+ get edit_app_url(@app)
33
+ assert_response :success
34
+ end
35
+
36
+ test "should update app" do
37
+ patch app_url(@app), params: { app: { name: @app.name } }
38
+ assert_redirected_to app_url(@app)
39
+ end
40
+
41
+ test "should destroy app" do
42
+ assert_difference('App.count', -1) do
43
+ delete app_url(@app)
44
+ end
45
+
46
+ assert_redirected_to apps_url
47
+ end
48
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ class PagesControllerTest < ActionDispatch::IntegrationTest
4
+ test "should get landing" do
5
+ get pages_landing_url
6
+ assert_response :success
7
+ end
8
+
9
+ end
@@ -0,0 +1,48 @@
1
+ require 'test_helper'
2
+
3
+ class PublickeysControllerTest < ActionDispatch::IntegrationTest
4
+ setup do
5
+ @publickey = publickeys(:one)
6
+ end
7
+
8
+ test "should get index" do
9
+ get publickeys_url
10
+ assert_response :success
11
+ end
12
+
13
+ test "should get new" do
14
+ get new_publickey_url
15
+ assert_response :success
16
+ end
17
+
18
+ test "should create publickey" do
19
+ assert_difference('Publickey.count') do
20
+ post publickeys_url, params: { publickey: { data: @publickey.data, name: @publickey.name, user_id: @publickey.user_id } }
21
+ end
22
+
23
+ assert_redirected_to publickey_url(Publickey.last)
24
+ end
25
+
26
+ test "should show publickey" do
27
+ get publickey_url(@publickey)
28
+ assert_response :success
29
+ end
30
+
31
+ test "should get edit" do
32
+ get edit_publickey_url(@publickey)
33
+ assert_response :success
34
+ end
35
+
36
+ test "should update publickey" do
37
+ patch publickey_url(@publickey), params: { publickey: { data: @publickey.data, name: @publickey.name, user_id: @publickey.user_id } }
38
+ assert_redirected_to publickey_url(@publickey)
39
+ end
40
+
41
+ test "should destroy publickey" do
42
+ assert_difference('Publickey.count', -1) do
43
+ delete publickey_url(@publickey)
44
+ end
45
+
46
+ assert_redirected_to publickeys_url
47
+ end
48
+ end
File without changes
@@ -0,0 +1,7 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ name: MyString
5
+
6
+ two:
7
+ name: MyString
File without changes
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ name: MyString
5
+ data: MyText
6
+ user: one
7
+
8
+ two:
9
+ name: MyString
10
+ data: MyText
11
+ user: two
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the '{}' from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class AppTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class PublickeyTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
File without changes
@@ -0,0 +1,9 @@
1
+ require "application_system_test_case"
2
+
3
+ class AppsTest < ApplicationSystemTestCase
4
+ # test "visiting the index" do
5
+ # visit apps_url
6
+ #
7
+ # assert_selector "h1", text: "App"
8
+ # end
9
+ end
@@ -0,0 +1,9 @@
1
+ require "application_system_test_case"
2
+
3
+ class PublickeysTest < ApplicationSystemTestCase
4
+ # test "visiting the index" do
5
+ # visit publickeys_url
6
+ #
7
+ # assert_selector "h1", text: "Publickey"
8
+ # end
9
+ end
@@ -0,0 +1,9 @@
1
+ require File.expand_path('../../config/environment', __FILE__)
2
+ require 'rails/test_help'
3
+
4
+ class ActiveSupport::TestCase
5
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
6
+ fixtures :all
7
+
8
+ # Add more helper methods to be used by all tests here...
9
+ end