This commit is contained in:
Priit Tark 2015-06-12 12:35:50 +03:00
parent 0aa8058022
commit 51d22af52b
9 changed files with 4779 additions and 2 deletions

View file

@ -76,6 +76,10 @@ gem 'epp', '~> 1.4.2', github: 'gitlabeu/epp'
gem 'epp-xml', '~> 1.0.2' # EPP XMLs gem 'epp-xml', '~> 1.0.2' # EPP XMLs
gem 'uuidtools', '~> 2.1.4' # For unique IDs (used by the epp gem) gem 'uuidtools', '~> 2.1.4' # For unique IDs (used by the epp gem)
# que
gem 'que', '~> 0.10.0'
gem 'que-web', '~> 0.4.0'
# for importing legacy db # for importing legacy db
gem 'activerecord-import', '~> 0.7.0' # for inserting dummy data gem 'activerecord-import', '~> 0.7.0' # for inserting dummy data

View file

@ -317,11 +317,18 @@ GEM
coderay (~> 1.1.0) coderay (~> 1.1.0)
method_source (~> 0.8.1) method_source (~> 0.8.1)
slop (~> 3.4) slop (~> 3.4)
que (0.10.0)
que-web (0.4.0)
erubis
que (~> 0.8)
sinatra
rack (1.6.1) rack (1.6.1)
rack-accept (0.4.5) rack-accept (0.4.5)
rack (>= 0.4) rack (>= 0.4)
rack-mount (0.8.3) rack-mount (0.8.3)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-protection (1.5.3)
rack
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
railroady (1.3.0) railroady (1.3.0)
@ -444,6 +451,10 @@ GEM
simplecov-html (~> 0.9.0) simplecov-html (~> 0.9.0)
simplecov-html (0.9.0) simplecov-html (0.9.0)
simpleidn (0.0.5) simpleidn (0.0.5)
sinatra (1.4.6)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
slim (2.1.0) slim (2.1.0)
temple (~> 0.6.9) temple (~> 0.6.9)
tilt (>= 1.3.3, < 2.1) tilt (>= 1.3.3, < 2.1)
@ -562,6 +573,8 @@ DEPENDENCIES
phantomjs-binaries (~> 1.9.2.4) phantomjs-binaries (~> 1.9.2.4)
poltergeist (~> 1.5.1) poltergeist (~> 1.5.1)
pry (~> 0.10.1) pry (~> 0.10.1)
que (~> 0.10.0)
que-web (~> 0.4.0)
railroady (~> 1.3.0) railroady (~> 1.3.0)
rails (= 4.2.1) rails (= 4.2.1)
rails-settings-cached (~> 0.4.1) rails-settings-cached (~> 0.4.1)

View file

@ -65,7 +65,7 @@
-# %li= link_to t(:domains_history), admin_domain_versions_path -# %li= link_to t(:domains_history), admin_domain_versions_path
%li= link_to t(:epp_logs), admin_epp_logs_path %li= link_to t(:epp_logs), admin_epp_logs_path
%li= link_to t(:repp_logs), admin_repp_logs_path %li= link_to t(:repp_logs), admin_repp_logs_path
-# %li= link_to t(:background_jobs), admin_delayed_jobs_path %li= link_to t(:que), '/admin/que'
- if signed_in? - if signed_in?
%ul.nav.navbar-nav.navbar-right %ul.nav.navbar-nav.navbar-right

View file

@ -49,6 +49,8 @@ module Registry
# Instead, the errors will propagate normally just like in other Active Record callbacks. # Instead, the errors will propagate normally just like in other Active Record callbacks.
config.active_record.raise_in_transactional_callbacks = true config.active_record.raise_in_transactional_callbacks = true
config.active_record.schema_format = :sql
config.generators do |g| config.generators do |g|
g.stylesheets false g.stylesheets false
g.javascripts false g.javascripts false

View file

@ -224,6 +224,10 @@ Rails.application.routes.draw do
get 'logout' => '/devise/sessions#destroy' get 'logout' => '/devise/sessions#destroy'
end end
authenticate :user do
mount Que::Web, at: 'que'
end
root 'dashboards#show' root 'dashboards#show'
end end

View file

@ -0,0 +1,11 @@
class AddQue < ActiveRecord::Migration
def self.up
# The current version as of this migration's creation.
Que.migrate! :version => 3
end
def self.down
# Completely removes Que's job queue.
Que.migrate! :version => 0
end
end

View file

@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150609103333) do ActiveRecord::Schema.define(version: 20150611124920) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -306,6 +306,7 @@ ActiveRecord::Schema.define(version: 20150609103333) do
t.datetime "registrant_verification_asked_at" t.datetime "registrant_verification_asked_at"
t.string "registrant_verification_token" t.string "registrant_verification_token"
t.json "pending_json" t.json "pending_json"
t.datetime "force_delete_at"
end end
add_index "domains", ["delete_at"], name: "index_domains_on_delete_at", using: :btree add_index "domains", ["delete_at"], name: "index_domains_on_delete_at", using: :btree
@ -900,6 +901,17 @@ ActiveRecord::Schema.define(version: 20150609103333) do
t.string "operation_category" t.string "operation_category"
end end
create_table "que_jobs", id: false, force: :cascade do |t|
t.integer "priority", limit: 2, default: 100, null: false
t.datetime "run_at", default: "now()", null: false
t.integer "job_id", limit: 8, default: "nextval('que_jobs_job_id_seq'::regclass)", null: false
t.text "job_class", null: false
t.json "args", default: [], null: false
t.integer "error_count", default: 0, null: false
t.text "last_error"
t.text "queue", default: "", null: false
end
create_table "registrant_verifications", force: :cascade do |t| create_table "registrant_verifications", force: :cascade do |t|
t.string "domain_name" t.string "domain_name"
t.string "verification_token" t.string "verification_token"

4730
db/structure.sql Normal file

File diff suppressed because it is too large Load diff

View file

@ -2,6 +2,7 @@ class DeviseCustomFailure < Devise::FailureApp
def redirect_url def redirect_url
return registrant_login_url if request.original_fullpath.to_s.match(/^\/registrant/) return registrant_login_url if request.original_fullpath.to_s.match(/^\/registrant/)
return registrar_login_url if request.original_fullpath.to_s.match(/^\/registrar/) return registrar_login_url if request.original_fullpath.to_s.match(/^\/registrar/)
return '/admin' if request.original_fullpath.to_s.match(/^\/admin\/que/)
return admin_login_url if request.original_fullpath.to_s.match(/^\/admin/) return admin_login_url if request.original_fullpath.to_s.match(/^\/admin/)
root_url root_url
end end