Commit 7da9d84
Changed files (5)
app
controllers
models
config
locales
app/controllers/my/clients_controller.rb
@@ -12,7 +12,12 @@ module My
def create
client = Client.create!(secure_params)
- redirect_to my_clients_path, notice: "client_id: #{client.to_param}, client_secret: #{client.password}"
+ notice = t(
+ '.success',
+ client_id: client.to_param,
+ client_secret: client.password
+ )
+ redirect_to my_clients_path, notice: notice
end
private
app/models/application_record.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
- UUID = /\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/
- URI_REGEX = /\A#{URI.regexp(%w[http https])}\z/
+ UUID = /\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/.freeze
+ URI_REGEX = /\A#{URI.regexp(%w[http https])}\z/.freeze
include Flippable
self.abstract_class = true
config/locales/en.yml
@@ -27,6 +27,8 @@ en:
index:
title: Audits
clients:
+ create:
+ success: Client ID %{client_id} Client Secret %{client_secret}
index:
new: New
title: OAuth Clients
.rubocop.yml
@@ -30,6 +30,10 @@ Metrics/LineLength:
Metrics/MethodLength:
Enabled: false
+Metrics/ParameterLists:
+ Exclude:
+ - 'spec/documentation.rb'
+
Metrics/PerceivedComplexity:
Enabled: false
@@ -56,6 +60,10 @@ RSpec/NestedGroups:
Style/Documentation:
Enabled: false
+Style/GlobalVars:
+ Exclude:
+ - 'spec/documentation.rb'
+
Style/RaiseArgs:
EnforcedStyle: compact
Gemfile.lock
@@ -1,37 +1,37 @@
GEM
remote: https://rubygems.org/
specs:
- actioncable (5.2.1)
- actionpack (= 5.2.1)
+ actioncable (5.2.2)
+ actionpack (= 5.2.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailer (5.2.1)
- actionpack (= 5.2.1)
- actionview (= 5.2.1)
- activejob (= 5.2.1)
+ actionmailer (5.2.2)
+ actionpack (= 5.2.2)
+ actionview (= 5.2.2)
+ activejob (= 5.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (5.2.1)
- actionview (= 5.2.1)
- activesupport (= 5.2.1)
+ actionpack (5.2.2)
+ actionview (= 5.2.2)
+ activesupport (= 5.2.2)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.2.1)
- activesupport (= 5.2.1)
+ actionview (5.2.2)
+ activesupport (= 5.2.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
- activejob (5.2.1)
- activesupport (= 5.2.1)
+ activejob (5.2.2)
+ activesupport (= 5.2.2)
globalid (>= 0.3.6)
- activemodel (5.2.1)
- activesupport (= 5.2.1)
- activerecord (5.2.1)
- activemodel (= 5.2.1)
- activesupport (= 5.2.1)
+ activemodel (5.2.2)
+ activesupport (= 5.2.2)
+ activerecord (5.2.2)
+ activemodel (= 5.2.2)
+ activesupport (= 5.2.2)
arel (>= 9.0)
activerecord-session_store (1.1.1)
actionpack (>= 4.0)
@@ -39,11 +39,11 @@ GEM
multi_json (~> 1.11, >= 1.11.2)
rack (>= 1.5.2, < 3)
railties (>= 4.0)
- activestorage (5.2.1)
- actionpack (= 5.2.1)
- activerecord (= 5.2.1)
+ activestorage (5.2.2)
+ actionpack (= 5.2.2)
+ activerecord (= 5.2.2)
marcel (~> 0.3.1)
- activesupport (5.2.1)
+ activesupport (5.2.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -64,20 +64,21 @@ GEM
bundler (~> 1.2)
thor (~> 0.18)
byebug (10.0.2)
- capybara (3.9.0)
+ capybara (3.12.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
- xpath (~> 3.1)
- capybara-screenshot (1.0.21)
+ regexp_parser (~> 1.2)
+ xpath (~> 3.2)
+ capybara-screenshot (1.0.22)
capybara (>= 1.0, < 4)
launchy
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
colorator (1.1.0)
- concurrent-ruby (1.0.5)
+ concurrent-ruby (1.1.3)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.4)
@@ -109,20 +110,21 @@ GEM
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
- i18n-tasks (0.9.25)
+ i18n-tasks (0.9.28)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
erubi
highline (>= 2.0.0)
i18n
parser (>= 2.2.3.0)
+ rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
jaro_winkler (1.5.1)
- jbuilder (2.7.0)
+ jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
- jekyll (3.8.4)
+ jekyll (3.8.5)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
@@ -153,7 +155,7 @@ GEM
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
local_time (2.1.0)
- loofah (2.2.2)
+ loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
@@ -161,7 +163,7 @@ GEM
marcel (0.3.3)
mimemagic (~> 0.3.2)
mercenary (0.3.6)
- method_source (0.9.0)
+ method_source (0.9.2)
mimemagic (0.3.2)
mini_mime (1.0.1)
mini_portile2 (2.3.0)
@@ -172,58 +174,62 @@ GEM
minitest (5.11.3)
msgpack (1.2.4)
multi_json (1.13.1)
- net-hippie (0.1.9)
+ net-hippie (0.2.1)
nio4r (2.3.1)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
- parser (2.5.1.2)
+ parser (2.5.3.0)
ast (~> 2.4.0)
- pathutil (0.16.1)
+ pathutil (0.16.2)
forwardable-extended (~> 2.6)
pg (1.1.3)
powerpack (0.1.2)
public_suffix (3.0.3)
puma (3.12.0)
- rack (2.0.5)
+ rack (2.0.6)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
- rails (5.2.1)
- actioncable (= 5.2.1)
- actionmailer (= 5.2.1)
- actionpack (= 5.2.1)
- actionview (= 5.2.1)
- activejob (= 5.2.1)
- activemodel (= 5.2.1)
- activerecord (= 5.2.1)
- activestorage (= 5.2.1)
- activesupport (= 5.2.1)
+ rails (5.2.2)
+ actioncable (= 5.2.2)
+ actionmailer (= 5.2.2)
+ actionpack (= 5.2.2)
+ actionview (= 5.2.2)
+ activejob (= 5.2.2)
+ activemodel (= 5.2.2)
+ activerecord (= 5.2.2)
+ activestorage (= 5.2.2)
+ activesupport (= 5.2.2)
bundler (>= 1.3.0)
- railties (= 5.2.1)
+ railties (= 5.2.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
+ rails-i18n (5.1.2)
+ i18n (>= 0.7, < 2)
+ railties (>= 5.0, < 6)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
- railties (5.2.1)
- actionpack (= 5.2.1)
- activesupport (= 5.2.1)
+ railties (5.2.2)
+ actionpack (= 5.2.2)
+ activesupport (= 5.2.2)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
- rake (12.3.1)
+ rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
+ regexp_parser (1.3.0)
rotp (3.3.1)
rouge (3.3.0)
rspec-core (3.8.0)
@@ -234,7 +240,7 @@ GEM
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
- rspec-rails (3.8.0)
+ rspec-rails (3.8.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
@@ -243,32 +249,32 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
- rubocop (0.59.2)
+ rubocop (0.61.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
- unicode-display_width (~> 1.0, >= 1.0.1)
- rubocop-rspec (1.30.0)
- rubocop (>= 0.58.0)
+ unicode-display_width (~> 1.4.0)
+ rubocop-rspec (1.30.1)
+ rubocop (>= 0.60.0)
ruby-progressbar (1.10.0)
ruby_dep (1.5.0)
rubyzip (1.2.2)
safe_yaml (1.0.4)
- saml-kit (1.0.25)
+ saml-kit (1.0.29)
activemodel (>= 4.2.0)
- net-hippie (~> 0.1.8)
- xml-kit (>= 0.1.13, <= 1.0.0)
- sass (3.6.0)
+ net-hippie (~> 0.1)
+ xml-kit (~> 0.2)
+ sass (3.7.2)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
scim-shady (0.2.1)
activesupport (>= 4.2.0)
- selenium-webdriver (3.14.1)
+ selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
spank (1.0.1441140881)
@@ -281,9 +287,9 @@ GEM
sprockets (>= 3.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
- thor (0.19.4)
+ thor (0.20.3)
thread_safe (0.3.6)
- tilt (2.0.8)
+ tilt (2.0.9)
turbolinks (5.2.0)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
@@ -307,10 +313,10 @@ GEM
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
- xml-kit (0.1.13)
+ xml-kit (0.2.0)
activemodel (>= 4.2.0)
builder (~> 3.2)
- nokogiri (>= 1.8.2)
+ nokogiri (>= 1.8.5)
tilt (>= 1.4.1)
xmldsig (~> 0.6)
xmldsig (0.6.6)