meroku 2.0.22 → 2.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.travis.yml +0 -10
- data/Guardfile +43 -0
- data/LICENSE.txt +1 -1
- data/README.md +29 -89
- data/bin/meroku +5 -3
- data/{frontend → data}/etc_nginx_sites-enabled_template +0 -0
- data/guard +25 -0
- data/lib/meroku.rb +17 -20
- data/lib/meroku/api.rb +15 -3
- data/lib/meroku/aws.rb +69 -6
- data/lib/meroku/cli.rb +23 -91
- data/lib/meroku/error.rb +11 -0
- data/lib/meroku/node.rb +70 -70
- data/lib/meroku/options.rb +79 -0
- data/lib/meroku/secrets.rb +38 -0
- data/lib/meroku/shared.rb +23 -0
- data/lib/meroku/user.rb +25 -0
- data/lib/meroku/version.rb +3 -1
- data/meroku.gemspec +10 -19
- metadata +20 -319
- data/circle.yml +0 -23
- data/frontend/.gitignore +0 -23
- data/frontend/.ruby-version +0 -2
- data/frontend/Gemfile +0 -61
- data/frontend/Gemfile.lock +0 -236
- data/frontend/README.md +0 -24
- data/frontend/Rakefile +0 -6
- data/frontend/app/assets/config/manifest.js +0 -3
- data/frontend/app/assets/images/.keep +0 -0
- data/frontend/app/assets/javascripts/application.js +0 -15
- data/frontend/app/assets/javascripts/apps.coffee +0 -3
- data/frontend/app/assets/javascripts/cable.js +0 -13
- data/frontend/app/assets/javascripts/channels/.keep +0 -0
- data/frontend/app/assets/javascripts/pages.coffee +0 -3
- data/frontend/app/assets/javascripts/publickeys.coffee +0 -3
- data/frontend/app/assets/stylesheets/application.css +0 -15
- data/frontend/app/assets/stylesheets/apps.scss +0 -3
- data/frontend/app/assets/stylesheets/pages.scss +0 -3
- data/frontend/app/assets/stylesheets/publickeys.scss +0 -3
- data/frontend/app/assets/stylesheets/scaffolds.scss +0 -84
- data/frontend/app/channels/application_cable/channel.rb +0 -4
- data/frontend/app/channels/application_cable/connection.rb +0 -4
- data/frontend/app/controllers/application_controller.rb +0 -4
- data/frontend/app/controllers/apps_controller.rb +0 -83
- data/frontend/app/controllers/concerns/.keep +0 -0
- data/frontend/app/controllers/publickeys_controller.rb +0 -82
- data/frontend/app/controllers/users/confirmations_controller.rb +0 -28
- data/frontend/app/controllers/users/omniauth_callbacks_controller.rb +0 -28
- data/frontend/app/controllers/users/passwords_controller.rb +0 -32
- data/frontend/app/controllers/users/registrations_controller.rb +0 -74
- data/frontend/app/controllers/users/sessions_controller.rb +0 -34
- data/frontend/app/controllers/users/unlocks_controller.rb +0 -28
- data/frontend/app/helpers/application_helper.rb +0 -2
- data/frontend/app/helpers/apps_helper.rb +0 -2
- data/frontend/app/helpers/pages_helper.rb +0 -2
- data/frontend/app/helpers/publickeys_helper.rb +0 -2
- data/frontend/app/jobs/application_job.rb +0 -2
- data/frontend/app/lib/cmd.rb +0 -11
- data/frontend/app/mailers/application_mailer.rb +0 -4
- data/frontend/app/models/app.rb +0 -37
- data/frontend/app/models/application_record.rb +0 -3
- data/frontend/app/models/concerns/.keep +0 -0
- data/frontend/app/models/publickey.rb +0 -15
- data/frontend/app/models/user.rb +0 -22
- data/frontend/app/policies/application_policy.rb +0 -53
- data/frontend/app/policies/publickey_policy.rb +0 -7
- data/frontend/app/serializable/serializable_app.rb +0 -6
- data/frontend/app/serializable/serializable_publickey.rb +0 -7
- data/frontend/app/serializable/serializable_user.rb +0 -8
- data/frontend/app/serializers/app_serializer.rb +0 -3
- data/frontend/app/serializers/publickey_serializer.rb +0 -4
- data/frontend/app/views/apps/_app.json.jbuilder +0 -2
- data/frontend/app/views/apps/_form.html.erb +0 -22
- data/frontend/app/views/apps/edit.html.erb +0 -6
- data/frontend/app/views/apps/index.html.erb +0 -27
- data/frontend/app/views/apps/index.json.jbuilder +0 -1
- data/frontend/app/views/apps/new.html.erb +0 -5
- data/frontend/app/views/apps/show.html.erb +0 -9
- data/frontend/app/views/apps/show.json.jbuilder +0 -1
- data/frontend/app/views/devise/confirmations/new.html.erb +0 -16
- data/frontend/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
- data/frontend/app/views/devise/mailer/email_changed.html.erb +0 -7
- data/frontend/app/views/devise/mailer/password_change.html.erb +0 -3
- data/frontend/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
- data/frontend/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
- data/frontend/app/views/devise/passwords/edit.html.erb +0 -25
- data/frontend/app/views/devise/passwords/new.html.erb +0 -16
- data/frontend/app/views/devise/registrations/edit.html.erb +0 -43
- data/frontend/app/views/devise/registrations/new.html.erb +0 -29
- data/frontend/app/views/devise/sessions/new.html.erb +0 -26
- data/frontend/app/views/devise/shared/_links.html.erb +0 -25
- data/frontend/app/views/devise/unlocks/new.html.erb +0 -16
- data/frontend/app/views/layouts/application.html.erb +0 -16
- data/frontend/app/views/layouts/mailer.html.erb +0 -13
- data/frontend/app/views/layouts/mailer.text.erb +0 -1
- data/frontend/app/views/publickeys/_form.html.erb +0 -32
- data/frontend/app/views/publickeys/_publickey.json.jbuilder +0 -2
- data/frontend/app/views/publickeys/edit.html.erb +0 -6
- data/frontend/app/views/publickeys/index.html.erb +0 -31
- data/frontend/app/views/publickeys/index.json.jbuilder +0 -1
- data/frontend/app/views/publickeys/new.html.erb +0 -5
- data/frontend/app/views/publickeys/show.html.erb +0 -19
- data/frontend/app/views/publickeys/show.json.jbuilder +0 -1
- data/frontend/bin/bundle +0 -3
- data/frontend/bin/rails +0 -9
- data/frontend/bin/rake +0 -9
- data/frontend/bin/setup +0 -38
- data/frontend/bin/spring +0 -17
- data/frontend/bin/update +0 -29
- data/frontend/bin/yarn +0 -11
- data/frontend/config.ru +0 -5
- data/frontend/config/application.rb +0 -18
- data/frontend/config/boot.rb +0 -3
- data/frontend/config/cable.yml +0 -10
- data/frontend/config/database.yml +0 -87
- data/frontend/config/environment.rb +0 -5
- data/frontend/config/environments/development.rb +0 -56
- data/frontend/config/environments/production.rb +0 -97
- data/frontend/config/environments/test.rb +0 -42
- data/frontend/config/initializers/ams.rb +0 -3
- data/frontend/config/initializers/application_controller_renderer.rb +0 -8
- data/frontend/config/initializers/assets.rb +0 -14
- data/frontend/config/initializers/backtrace_silencers.rb +0 -7
- data/frontend/config/initializers/cookies_serializer.rb +0 -5
- data/frontend/config/initializers/devise.rb +0 -277
- data/frontend/config/initializers/filter_parameter_logging.rb +0 -4
- data/frontend/config/initializers/inflections.rb +0 -16
- data/frontend/config/initializers/mime_types.rb +0 -4
- data/frontend/config/initializers/wrap_parameters.rb +0 -14
- data/frontend/config/locales/devise.en.yml +0 -64
- data/frontend/config/locales/en.yml +0 -33
- data/frontend/config/puma.rb +0 -66
- data/frontend/config/routes.rb +0 -11
- data/frontend/config/secrets.yml +0 -32
- data/frontend/config/spring.rb +0 -6
- data/frontend/db/migrate/20171023223732_devise_create_users.rb +0 -42
- data/frontend/db/migrate/20171025203706_create_apps.rb +0 -9
- data/frontend/db/migrate/20171025223804_add_user_to_apps.rb +0 -5
- data/frontend/db/migrate/20171026071440_create_publickeys.rb +0 -11
- data/frontend/db/migrate/20171028150506_add_apisecret_to_users.rb +0 -6
- data/frontend/db/schema.rb +0 -32
- data/frontend/db/seeds.rb +0 -7
- data/frontend/etc_nginx_sites-enabled_default +0 -29
- data/frontend/lib/assets/.keep +0 -0
- data/frontend/lib/tasks/.keep +0 -0
- data/frontend/log/.keep +0 -0
- data/frontend/package.json +0 -5
- data/frontend/public/404.html +0 -67
- data/frontend/public/422.html +0 -67
- data/frontend/public/500.html +0 -66
- data/frontend/public/Meroku.html +0 -140
- data/frontend/public/Meroku/Api.html +0 -129
- data/frontend/public/Meroku/Api/Request.html +0 -221
- data/frontend/public/Meroku/Aws/Ec2.html +0 -477
- data/frontend/public/Meroku/CLI.html +0 -796
- data/frontend/public/Meroku/CLI/Help.html +0 -224
- data/frontend/public/Meroku/CLI/Secrets.html +0 -191
- data/frontend/public/Meroku/CLI/Session.html +0 -456
- data/frontend/public/Meroku/Extensions.html +0 -405
- data/frontend/public/Meroku/Infrastructure.html +0 -279
- data/frontend/public/Meroku/Infrastructure/Server.html +0 -373
- data/frontend/public/Meroku/Node.html +0 -845
- data/frontend/public/Meroku/Tunnelable.html +0 -247
- data/frontend/public/_index.html +0 -273
- data/frontend/public/apple-touch-icon-precomposed.png +0 -0
- data/frontend/public/apple-touch-icon.png +0 -0
- data/frontend/public/class_list.html +0 -51
- data/frontend/public/css/common.css +0 -1
- data/frontend/public/css/full_list.css +0 -58
- data/frontend/public/css/style.css +0 -492
- data/frontend/public/favicon.ico +0 -0
- data/frontend/public/file.README.html +0 -179
- data/frontend/public/file_list.html +0 -56
- data/frontend/public/frames.html +0 -17
- data/frontend/public/index.html +0 -179
- data/frontend/public/js/app.js +0 -248
- data/frontend/public/js/full_list.js +0 -216
- data/frontend/public/js/jquery.js +0 -4
- data/frontend/public/method_list.html +0 -395
- data/frontend/public/robots.txt +0 -2
- data/frontend/public/top-level-namespace.html +0 -110
- data/frontend/test/application_system_test_case.rb +0 -5
- data/frontend/test/controllers/.keep +0 -0
- data/frontend/test/controllers/apps_controller_test.rb +0 -48
- data/frontend/test/controllers/pages_controller_test.rb +0 -9
- data/frontend/test/controllers/publickeys_controller_test.rb +0 -48
- data/frontend/test/fixtures/.keep +0 -0
- data/frontend/test/fixtures/apps.yml +0 -7
- data/frontend/test/fixtures/files/.keep +0 -0
- data/frontend/test/fixtures/publickeys.yml +0 -11
- data/frontend/test/fixtures/users.yml +0 -11
- 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 +0 -7
- data/frontend/test/models/publickey_test.rb +0 -7
- data/frontend/test/models/user_test.rb +0 -7
- data/frontend/test/policies/publickey_policy_test.rb +0 -19
- data/frontend/test/system/.keep +0 -0
- data/frontend/test/system/apps_test.rb +0 -9
- data/frontend/test/system/publickeys_test.rb +0 -9
- data/frontend/test/test_helper.rb +0 -9
- data/frontend/tmp/.keep +0 -0
- data/frontend/vendor/.keep +0 -0
- data/lib/meroku/api/request.rb +0 -17
- data/lib/meroku/aws/ec2.rb +0 -59
- data/lib/meroku/cli/help.rb +0 -27
- data/lib/meroku/cli/secrets.rb +0 -23
- data/lib/meroku/cli/session.rb +0 -46
- data/lib/meroku/extensions.rb +0 -32
- data/lib/meroku/infrastructure.rb +0 -23
- data/lib/meroku/infrastructure/server.rb +0 -20
- data/lib/meroku/tunnelable.rb +0 -35
- data/modified-cedar-14.sh +0 -171
@@ -1,84 +0,0 @@
|
|
1
|
-
body {
|
2
|
-
background-color: #fff;
|
3
|
-
color: #333;
|
4
|
-
margin: 33px;
|
5
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
6
|
-
font-size: 13px;
|
7
|
-
line-height: 18px;
|
8
|
-
}
|
9
|
-
|
10
|
-
p, ol, ul, td {
|
11
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
12
|
-
font-size: 13px;
|
13
|
-
line-height: 18px;
|
14
|
-
}
|
15
|
-
|
16
|
-
pre {
|
17
|
-
background-color: #eee;
|
18
|
-
padding: 10px;
|
19
|
-
font-size: 11px;
|
20
|
-
}
|
21
|
-
|
22
|
-
a {
|
23
|
-
color: #000;
|
24
|
-
|
25
|
-
&:visited {
|
26
|
-
color: #666;
|
27
|
-
}
|
28
|
-
|
29
|
-
&:hover {
|
30
|
-
color: #fff;
|
31
|
-
background-color: #000;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
th {
|
36
|
-
padding-bottom: 5px;
|
37
|
-
}
|
38
|
-
|
39
|
-
td {
|
40
|
-
padding: 0 5px 7px;
|
41
|
-
}
|
42
|
-
|
43
|
-
div {
|
44
|
-
&.field, &.actions {
|
45
|
-
margin-bottom: 10px;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
|
-
#notice {
|
50
|
-
color: green;
|
51
|
-
}
|
52
|
-
|
53
|
-
.field_with_errors {
|
54
|
-
padding: 2px;
|
55
|
-
background-color: red;
|
56
|
-
display: table;
|
57
|
-
}
|
58
|
-
|
59
|
-
#error_explanation {
|
60
|
-
width: 450px;
|
61
|
-
border: 2px solid red;
|
62
|
-
padding: 7px 7px 0;
|
63
|
-
margin-bottom: 20px;
|
64
|
-
background-color: #f0f0f0;
|
65
|
-
|
66
|
-
h2 {
|
67
|
-
text-align: left;
|
68
|
-
font-weight: bold;
|
69
|
-
padding: 5px 5px 5px 15px;
|
70
|
-
font-size: 12px;
|
71
|
-
margin: -7px -7px 0;
|
72
|
-
background-color: #c00;
|
73
|
-
color: #fff;
|
74
|
-
}
|
75
|
-
|
76
|
-
ul li {
|
77
|
-
font-size: 12px;
|
78
|
-
list-style: square;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
label {
|
83
|
-
display: block;
|
84
|
-
}
|
@@ -1,83 +0,0 @@
|
|
1
|
-
class AppsController < ApplicationController
|
2
|
-
before_action :set_app, only: [:show, :edit, :update, :destroy]
|
3
|
-
skip_before_action :verify_authenticity_token, only: [:create]
|
4
|
-
|
5
|
-
## GET /apps
|
6
|
-
## GET /apps.json
|
7
|
-
#def index
|
8
|
-
# @apps = App.all
|
9
|
-
#end
|
10
|
-
#
|
11
|
-
## GET /apps/1
|
12
|
-
## GET /apps/1.json
|
13
|
-
#def show
|
14
|
-
#end
|
15
|
-
#
|
16
|
-
## GET /apps/new
|
17
|
-
#def new
|
18
|
-
# @app = App.new
|
19
|
-
#end
|
20
|
-
#
|
21
|
-
## GET /apps/1/edit
|
22
|
-
#def edit
|
23
|
-
#end
|
24
|
-
|
25
|
-
# POST /apps
|
26
|
-
# POST /apps.json
|
27
|
-
def create
|
28
|
-
@app = App.new(app_params)
|
29
|
-
@app.name = "app#{SecureRandom.hex[0..6]}"
|
30
|
-
@app.user = User.find_by_apisecret(params[:apisecret])
|
31
|
-
if !@app.user
|
32
|
-
(render :jsonapi_errors => [{
|
33
|
-
title: 'Authentication failed',
|
34
|
-
detail: 'Authentication failed'
|
35
|
-
}]) and return
|
36
|
-
end
|
37
|
-
|
38
|
-
respond_to do |format|
|
39
|
-
if @app.save
|
40
|
-
format.html { redirect_to @app, notice: 'App was successfully created.' }
|
41
|
-
format.json { render jsonapi: @app }
|
42
|
-
else
|
43
|
-
format.html { render :new }
|
44
|
-
format.json { render jsonapi_errors: @app.errors }
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
## PATCH/PUT /apps/1
|
50
|
-
## PATCH/PUT /apps/1.json
|
51
|
-
#def update
|
52
|
-
# respond_to do |format|
|
53
|
-
# if @app.update(app_params)
|
54
|
-
# format.html { redirect_to @app, notice: 'App was successfully updated.' }
|
55
|
-
# format.json { render :show, status: :ok, location: @app }
|
56
|
-
# else
|
57
|
-
# format.html { render :edit }
|
58
|
-
# format.json { render json: @app.errors, status: :unprocessable_entity }
|
59
|
-
# end
|
60
|
-
# end
|
61
|
-
#end
|
62
|
-
#
|
63
|
-
## DELETE /apps/1
|
64
|
-
## DELETE /apps/1.json
|
65
|
-
#def destroy
|
66
|
-
# @app.destroy
|
67
|
-
# respond_to do |format|
|
68
|
-
# format.html { redirect_to apps_url, notice: 'App was successfully destroyed.' }
|
69
|
-
# format.json { head :no_content }
|
70
|
-
# end
|
71
|
-
#end
|
72
|
-
|
73
|
-
private
|
74
|
-
# Use callbacks to share common setup or constraints between actions.
|
75
|
-
def set_app
|
76
|
-
@app = App.find(params[:id])
|
77
|
-
end
|
78
|
-
|
79
|
-
# Never trust parameters from the scary internet, only allow the white list through.
|
80
|
-
def app_params
|
81
|
-
params.require(:app).permit(:name)
|
82
|
-
end
|
83
|
-
end
|
File without changes
|
@@ -1,82 +0,0 @@
|
|
1
|
-
class PublickeysController < ApplicationController
|
2
|
-
before_action :set_publickey, only: [:show, :edit, :update, :destroy]
|
3
|
-
skip_before_action :verify_authenticity_token, only: [:create]
|
4
|
-
|
5
|
-
## GET /publickeys
|
6
|
-
## GET /publickeys.json
|
7
|
-
#def index
|
8
|
-
# @publickeys = Publickey.all
|
9
|
-
#end
|
10
|
-
#
|
11
|
-
## GET /publickeys/1
|
12
|
-
## GET /publickeys/1.json
|
13
|
-
#def show
|
14
|
-
#end
|
15
|
-
#
|
16
|
-
## GET /publickeys/new
|
17
|
-
#def new
|
18
|
-
# @publickey = Publickey.new
|
19
|
-
#end
|
20
|
-
#
|
21
|
-
## GET /publickeys/1/edit
|
22
|
-
#def edit
|
23
|
-
#end
|
24
|
-
|
25
|
-
# POST /publickeys
|
26
|
-
# POST /publickeys.json
|
27
|
-
def create
|
28
|
-
@publickey = Publickey.new(publickey_params)
|
29
|
-
@publickey.user = User.find_by_apisecret(params[:apisecret])
|
30
|
-
if !@publickey.user
|
31
|
-
(render :jsonapi_errors => [{
|
32
|
-
title: 'Authentiction failed',
|
33
|
-
detail: 'Invalid Authentication failed. Try logging in again.'
|
34
|
-
}]) and return
|
35
|
-
end
|
36
|
-
|
37
|
-
respond_to do |format|
|
38
|
-
if @publickey.save
|
39
|
-
format.html { redirect_to @publickey, notice: 'Publickey was successfully created.' }
|
40
|
-
format.json { render jsonapi: @publickey }
|
41
|
-
else
|
42
|
-
format.html { render :new }
|
43
|
-
format.json { render jsonapi_errors: @publickey.errors }
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
## PATCH/PUT /publickeys/1
|
49
|
-
## PATCH/PUT /publickeys/1.json
|
50
|
-
#def update
|
51
|
-
# respond_to do |format|
|
52
|
-
# if @publickey.update(publickey_params)
|
53
|
-
# format.html { redirect_to @publickey, notice: 'Publickey was successfully updated.' }
|
54
|
-
# format.json { render :show, status: :ok, location: @publickey }
|
55
|
-
# else
|
56
|
-
# format.html { render :edit }
|
57
|
-
# format.json { render json: @publickey.errors, status: :unprocessable_entity }
|
58
|
-
# end
|
59
|
-
# end
|
60
|
-
#end
|
61
|
-
#
|
62
|
-
## DELETE /publickeys/1
|
63
|
-
## DELETE /publickeys/1.json
|
64
|
-
#def destroy
|
65
|
-
# @publickey.destroy
|
66
|
-
# respond_to do |format|
|
67
|
-
# format.html { redirect_to publickeys_url, notice: 'Publickey was successfully destroyed.' }
|
68
|
-
# format.json { head :no_content }
|
69
|
-
# end
|
70
|
-
#end
|
71
|
-
|
72
|
-
private
|
73
|
-
# Use callbacks to share common setup or constraints between actions.
|
74
|
-
def set_publickey
|
75
|
-
@publickey = Publickey.find(params[:id])
|
76
|
-
end
|
77
|
-
|
78
|
-
# Never trust parameters from the scary internet, only allow the white list through.
|
79
|
-
def publickey_params
|
80
|
-
params.require(:publickey).permit(:name, :data, :user_id)
|
81
|
-
end
|
82
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
class Users::ConfirmationsController < Devise::ConfirmationsController
|
2
|
-
# GET /resource/confirmation/new
|
3
|
-
# def new
|
4
|
-
# super
|
5
|
-
# end
|
6
|
-
|
7
|
-
# POST /resource/confirmation
|
8
|
-
# def create
|
9
|
-
# super
|
10
|
-
# end
|
11
|
-
|
12
|
-
# GET /resource/confirmation?confirmation_token=abcdef
|
13
|
-
# def show
|
14
|
-
# super
|
15
|
-
# end
|
16
|
-
|
17
|
-
# protected
|
18
|
-
|
19
|
-
# The path used after resending confirmation instructions.
|
20
|
-
# def after_resending_confirmation_instructions_path_for(resource_name)
|
21
|
-
# super(resource_name)
|
22
|
-
# end
|
23
|
-
|
24
|
-
# The path used after confirmation.
|
25
|
-
# def after_confirmation_path_for(resource_name, resource)
|
26
|
-
# super(resource_name, resource)
|
27
|
-
# end
|
28
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
2
|
-
# You should configure your model like this:
|
3
|
-
# devise :omniauthable, omniauth_providers: [:twitter]
|
4
|
-
|
5
|
-
# You should also create an action method in this controller like this:
|
6
|
-
# def twitter
|
7
|
-
# end
|
8
|
-
|
9
|
-
# More info at:
|
10
|
-
# https://github.com/plataformatec/devise#omniauth
|
11
|
-
|
12
|
-
# GET|POST /resource/auth/twitter
|
13
|
-
# def passthru
|
14
|
-
# super
|
15
|
-
# end
|
16
|
-
|
17
|
-
# GET|POST /users/auth/twitter/callback
|
18
|
-
# def failure
|
19
|
-
# super
|
20
|
-
# end
|
21
|
-
|
22
|
-
# protected
|
23
|
-
|
24
|
-
# The path used when OmniAuth fails
|
25
|
-
# def after_omniauth_failure_path_for(scope)
|
26
|
-
# super(scope)
|
27
|
-
# end
|
28
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
class Users::PasswordsController < Devise::PasswordsController
|
2
|
-
# GET /resource/password/new
|
3
|
-
# def new
|
4
|
-
# super
|
5
|
-
# end
|
6
|
-
|
7
|
-
# POST /resource/password
|
8
|
-
# def create
|
9
|
-
# super
|
10
|
-
# end
|
11
|
-
|
12
|
-
# GET /resource/password/edit?reset_password_token=abcdef
|
13
|
-
# def edit
|
14
|
-
# super
|
15
|
-
# end
|
16
|
-
|
17
|
-
# PUT /resource/password
|
18
|
-
# def update
|
19
|
-
# super
|
20
|
-
# end
|
21
|
-
|
22
|
-
# protected
|
23
|
-
|
24
|
-
# def after_resetting_password_path_for(resource)
|
25
|
-
# super(resource)
|
26
|
-
# end
|
27
|
-
|
28
|
-
# The path used after sending reset password instructions
|
29
|
-
# def after_sending_reset_password_instructions_path_for(resource_name)
|
30
|
-
# super(resource_name)
|
31
|
-
# end
|
32
|
-
end
|
@@ -1,74 +0,0 @@
|
|
1
|
-
class Users::RegistrationsController < Devise::RegistrationsController
|
2
|
-
#protect_from_forgery with: :null_session
|
3
|
-
skip_before_action :verify_authenticity_token
|
4
|
-
respond_to :json
|
5
|
-
|
6
|
-
# before_action :configure_sign_up_params, only: [:create]
|
7
|
-
# before_action :configure_account_update_params, only: [:update]
|
8
|
-
|
9
|
-
# GET /resource/sign_up
|
10
|
-
# def new
|
11
|
-
# super
|
12
|
-
# end
|
13
|
-
|
14
|
-
# POST /resource
|
15
|
-
def create
|
16
|
-
build_resource(sign_up_params)
|
17
|
-
|
18
|
-
resource.save
|
19
|
-
yield resource if block_given?
|
20
|
-
if resource.persisted?
|
21
|
-
render jsonapi: resource
|
22
|
-
else
|
23
|
-
clean_up_passwords resource
|
24
|
-
set_minimum_password_length
|
25
|
-
render jsonapi_errors: resource.errors
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
# GET /resource/edit
|
30
|
-
# def edit
|
31
|
-
# super
|
32
|
-
# end
|
33
|
-
|
34
|
-
# PUT /resource
|
35
|
-
# def update
|
36
|
-
# super
|
37
|
-
# end
|
38
|
-
|
39
|
-
# DELETE /resource
|
40
|
-
# def destroy
|
41
|
-
# super
|
42
|
-
# end
|
43
|
-
|
44
|
-
# GET /resource/cancel
|
45
|
-
# Forces the session data which is usually expired after sign
|
46
|
-
# in to be expired now. This is useful if the user wants to
|
47
|
-
# cancel oauth signing in/up in the middle of the process,
|
48
|
-
# removing all OAuth session data.
|
49
|
-
# def cancel
|
50
|
-
# super
|
51
|
-
# end
|
52
|
-
|
53
|
-
# protected
|
54
|
-
|
55
|
-
# If you have extra params to permit, append them to the sanitizer.
|
56
|
-
# def configure_sign_up_params
|
57
|
-
# devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute])
|
58
|
-
# end
|
59
|
-
|
60
|
-
# If you have extra params to permit, append them to the sanitizer.
|
61
|
-
# def configure_account_update_params
|
62
|
-
# devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
|
63
|
-
# end
|
64
|
-
|
65
|
-
# The path used after sign up.
|
66
|
-
# def after_sign_up_path_for(resource)
|
67
|
-
# super(resource)
|
68
|
-
# end
|
69
|
-
|
70
|
-
# The path used after sign up for inactive accounts.
|
71
|
-
# def after_inactive_sign_up_path_for(resource)
|
72
|
-
# super(resource)
|
73
|
-
# end
|
74
|
-
end
|