meroku 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +2 -0
- data/Guardfile +7 -18
- data/README.md +78 -4
- data/bin/meroku +1 -1
- data/frontend/.gitignore +23 -0
- data/frontend/.ruby-version +2 -0
- data/frontend/Gemfile +58 -0
- data/frontend/Gemfile.lock +233 -0
- data/frontend/README.md +24 -0
- data/frontend/Rakefile +6 -0
- data/frontend/app/assets/config/manifest.js +3 -0
- data/frontend/app/assets/images/.keep +0 -0
- data/frontend/app/assets/javascripts/application.js +15 -0
- data/frontend/app/assets/javascripts/apps.coffee +3 -0
- data/frontend/app/assets/javascripts/cable.js +13 -0
- data/frontend/app/assets/javascripts/channels/.keep +0 -0
- data/frontend/app/assets/javascripts/pages.coffee +3 -0
- data/frontend/app/assets/javascripts/publickeys.coffee +3 -0
- data/frontend/app/assets/stylesheets/application.css +15 -0
- data/frontend/app/assets/stylesheets/apps.scss +3 -0
- data/frontend/app/assets/stylesheets/pages.scss +3 -0
- data/frontend/app/assets/stylesheets/publickeys.scss +3 -0
- data/frontend/app/assets/stylesheets/scaffolds.scss +84 -0
- data/frontend/app/channels/application_cable/channel.rb +4 -0
- data/frontend/app/channels/application_cable/connection.rb +4 -0
- data/frontend/app/controllers/application_controller.rb +3 -0
- data/frontend/app/controllers/apps_controller.rb +85 -0
- data/frontend/app/controllers/concerns/.keep +0 -0
- data/frontend/app/controllers/pages_controller.rb +4 -0
- data/frontend/app/controllers/publickeys_controller.rb +76 -0
- data/frontend/app/controllers/users/confirmations_controller.rb +28 -0
- data/frontend/app/controllers/users/omniauth_callbacks_controller.rb +28 -0
- data/frontend/app/controllers/users/passwords_controller.rb +32 -0
- data/frontend/app/controllers/users/registrations_controller.rb +89 -0
- data/frontend/app/controllers/users/sessions_controller.rb +25 -0
- data/frontend/app/controllers/users/unlocks_controller.rb +28 -0
- data/frontend/app/helpers/application_helper.rb +2 -0
- data/frontend/app/helpers/apps_helper.rb +2 -0
- data/frontend/app/helpers/pages_helper.rb +2 -0
- data/frontend/app/helpers/publickeys_helper.rb +2 -0
- data/frontend/app/jobs/application_job.rb +2 -0
- data/frontend/app/mailers/application_mailer.rb +4 -0
- data/frontend/app/models/app.rb +3 -0
- data/frontend/app/models/application_record.rb +3 -0
- data/frontend/app/models/concerns/.keep +0 -0
- data/frontend/app/models/publickey.rb +3 -0
- data/frontend/app/models/user.rb +12 -0
- data/frontend/app/serializable/serializable_app.rb +6 -0
- data/frontend/app/serializable/serializable_publickey.rb +7 -0
- data/frontend/app/serializable/serializable_user.rb +7 -0
- data/frontend/app/serializers/app_serializer.rb +3 -0
- data/frontend/app/serializers/publickey_serializer.rb +4 -0
- data/frontend/app/views/apps/_app.json.jbuilder +2 -0
- data/frontend/app/views/apps/_form.html.erb +22 -0
- data/frontend/app/views/apps/edit.html.erb +6 -0
- data/frontend/app/views/apps/index.html.erb +27 -0
- data/frontend/app/views/apps/index.json.jbuilder +1 -0
- data/frontend/app/views/apps/new.html.erb +5 -0
- data/frontend/app/views/apps/show.html.erb +9 -0
- data/frontend/app/views/apps/show.json.jbuilder +1 -0
- data/frontend/app/views/devise/confirmations/new.html.erb +16 -0
- data/frontend/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/frontend/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/frontend/app/views/devise/mailer/password_change.html.erb +3 -0
- data/frontend/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/frontend/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/frontend/app/views/devise/passwords/edit.html.erb +25 -0
- data/frontend/app/views/devise/passwords/new.html.erb +16 -0
- data/frontend/app/views/devise/registrations/edit.html.erb +43 -0
- data/frontend/app/views/devise/registrations/new.html.erb +29 -0
- data/frontend/app/views/devise/sessions/new.html.erb +26 -0
- data/frontend/app/views/devise/shared/_links.html.erb +25 -0
- data/frontend/app/views/devise/unlocks/new.html.erb +16 -0
- data/frontend/app/views/layouts/application.html.erb +16 -0
- data/frontend/app/views/layouts/mailer.html.erb +13 -0
- data/frontend/app/views/layouts/mailer.text.erb +1 -0
- data/frontend/app/views/pages/landing.html.erb +2 -0
- data/frontend/app/views/publickeys/_form.html.erb +32 -0
- data/frontend/app/views/publickeys/_publickey.json.jbuilder +2 -0
- data/frontend/app/views/publickeys/edit.html.erb +6 -0
- data/frontend/app/views/publickeys/index.html.erb +31 -0
- data/frontend/app/views/publickeys/index.json.jbuilder +1 -0
- data/frontend/app/views/publickeys/new.html.erb +5 -0
- data/frontend/app/views/publickeys/show.html.erb +19 -0
- data/frontend/app/views/publickeys/show.json.jbuilder +1 -0
- data/frontend/bin/bundle +3 -0
- data/frontend/bin/rails +9 -0
- data/frontend/bin/rake +9 -0
- data/frontend/bin/setup +38 -0
- data/frontend/bin/spring +17 -0
- data/frontend/bin/update +29 -0
- data/frontend/bin/yarn +11 -0
- data/frontend/config.ru +5 -0
- data/frontend/config/application.rb +18 -0
- data/frontend/config/boot.rb +3 -0
- data/frontend/config/cable.yml +10 -0
- data/frontend/config/database.yml +25 -0
- data/frontend/config/environment.rb +5 -0
- data/frontend/config/environments/development.rb +56 -0
- data/frontend/config/environments/production.rb +97 -0
- data/frontend/config/environments/test.rb +42 -0
- data/frontend/config/initializers/ams.rb +3 -0
- data/frontend/config/initializers/application_controller_renderer.rb +8 -0
- data/frontend/config/initializers/assets.rb +14 -0
- data/frontend/config/initializers/backtrace_silencers.rb +7 -0
- data/frontend/config/initializers/cookies_serializer.rb +5 -0
- data/frontend/config/initializers/devise.rb +277 -0
- data/frontend/config/initializers/filter_parameter_logging.rb +4 -0
- data/frontend/config/initializers/inflections.rb +16 -0
- data/frontend/config/initializers/mime_types.rb +4 -0
- data/frontend/config/initializers/wrap_parameters.rb +14 -0
- data/frontend/config/locales/devise.en.yml +64 -0
- data/frontend/config/locales/en.yml +33 -0
- data/frontend/config/puma.rb +66 -0
- data/frontend/config/routes.rb +19 -0
- data/frontend/config/secrets.yml +32 -0
- data/frontend/config/spring.rb +6 -0
- data/frontend/db/migrate/20171023223732_devise_create_users.rb +42 -0
- data/frontend/db/migrate/20171025193627_add_token_to_users.rb +5 -0
- data/frontend/db/migrate/20171025203706_create_apps.rb +9 -0
- data/frontend/db/migrate/20171025223804_add_user_to_apps.rb +5 -0
- data/frontend/db/migrate/20171026071440_create_publickeys.rb +11 -0
- data/frontend/db/schema.rb +32 -0
- data/frontend/db/seeds.rb +7 -0
- data/frontend/etc_nginx_sites-available_default +29 -0
- data/frontend/lib/assets/.keep +0 -0
- data/frontend/lib/tasks/.keep +0 -0
- data/frontend/log/.keep +0 -0
- data/frontend/package.json +5 -0
- data/frontend/public/404.html +67 -0
- data/frontend/public/422.html +67 -0
- data/frontend/public/500.html +66 -0
- data/frontend/public/apple-touch-icon-precomposed.png +0 -0
- data/frontend/public/apple-touch-icon.png +0 -0
- data/frontend/public/favicon.ico +0 -0
- data/frontend/public/robots.txt +1 -0
- data/frontend/test/application_system_test_case.rb +5 -0
- data/frontend/test/controllers/.keep +0 -0
- data/frontend/test/controllers/apps_controller_test.rb +48 -0
- data/frontend/test/controllers/pages_controller_test.rb +9 -0
- data/frontend/test/controllers/publickeys_controller_test.rb +48 -0
- data/frontend/test/fixtures/.keep +0 -0
- data/frontend/test/fixtures/apps.yml +7 -0
- data/frontend/test/fixtures/files/.keep +0 -0
- data/frontend/test/fixtures/publickeys.yml +11 -0
- data/frontend/test/fixtures/users.yml +11 -0
- data/frontend/test/helpers/.keep +0 -0
- data/frontend/test/integration/.keep +0 -0
- data/frontend/test/mailers/.keep +0 -0
- data/frontend/test/models/.keep +0 -0
- data/frontend/test/models/app_test.rb +7 -0
- data/frontend/test/models/publickey_test.rb +7 -0
- data/frontend/test/models/user_test.rb +7 -0
- data/frontend/test/system/.keep +0 -0
- data/frontend/test/system/apps_test.rb +9 -0
- data/frontend/test/system/publickeys_test.rb +9 -0
- data/frontend/test/test_helper.rb +9 -0
- data/frontend/tmp/.keep +0 -0
- data/frontend/vendor/.keep +0 -0
- data/lib/meroku.rb +11 -24
- data/lib/meroku/aws.rb +32 -0
- data/lib/meroku/cli.rb +131 -0
- data/lib/meroku/infrastructure.rb +10 -17
- data/lib/meroku/infrastructure/node.rb +68 -0
- data/lib/meroku/tunnel.rb +50 -0
- data/lib/meroku/version.rb +1 -1
- data/meroku.gemspec +7 -3
- data/modified-cedar-14.sh +175 -0
- 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
|
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,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
|
File without changes
|
@@ -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
|
File without changes
|
@@ -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
|