diff --git a/Gemfile b/Gemfile index c9115b2..1db15e7 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,8 @@ gem 'high_voltage', '~> 3.1' gem "passenger", require: "phusion_passenger/rack_handler" +gem "dnsimple" + # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" diff --git a/Gemfile.lock b/Gemfile.lock index a7a3725..8a0907a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,6 +89,8 @@ GEM reline (>= 0.2.7) diff-lcs (1.5.0) digest (3.1.0) + dnsimple (7.1.1) + httparty erubi (1.10.0) erubis (2.7.0) ffi (1.15.5) @@ -109,6 +111,9 @@ GEM haml (>= 4.0, < 6) nokogiri (>= 1.6.0) ruby_parser (~> 3.5) + httparty (0.20.0) + mime-types (~> 3.0) + multi_xml (>= 0.5.2) i18n (1.10.0) concurrent-ruby (~> 1.0) importmap-rails (1.0.3) @@ -126,12 +131,16 @@ GEM marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) + mime-types (3.4.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2022.0105) mina (1.2.4) open4 (~> 1.3.4) rake mini_mime (1.1.2) minitest (5.15.0) msgpack (1.4.5) + multi_xml (0.6.0) net-imap (0.2.3) digest net-protocol @@ -266,6 +275,7 @@ DEPENDENCIES bootsnap capybara debug + dnsimple haml-rails high_voltage (~> 3.1) importmap-rails diff --git a/app/jobs/dns_update_job.rb b/app/jobs/dns_update_job.rb new file mode 100644 index 0000000..9480161 --- /dev/null +++ b/app/jobs/dns_update_job.rb @@ -0,0 +1,11 @@ +require "dnsimple" +class DnsUpdateJob < ApplicationJob + def self.get_client + Dnsimple::Client.new(access_token: Rails.application.credentials.simple_token) + end + queue_as :default + + def perform(*args) + # Do something later + end +end diff --git a/spec/jobs/dns_update_job_spec.rb b/spec/jobs/dns_update_job_spec.rb new file mode 100644 index 0000000..f7d8c35 --- /dev/null +++ b/spec/jobs/dns_update_job_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe DnsUpdateJob, type: :job do + pending "add some examples to (or delete) #{__FILE__}" +end