From c35d7feae10236e223fff4792d95e16fced37247 Mon Sep 17 00:00:00 2001 From: becharda Date: Mon, 18 Mar 2024 19:17:26 -0400 Subject: [PATCH 1/4] feat: add n0c-api endpoints --- .circleci/config.yml | 4 +- .gitignore | 2 + Gemfile | 7 ++- Gemfile.lock | 32 +++++++++- README.md | 2 +- Rakefile | 6 +- bin/console | 6 +- lib/planethoster_api.rb | 14 ++++- lib/planethoster_api/api_interface.rb | 5 +- lib/planethoster_api/configuration.rb | 7 +-- lib/planethoster_api/domain.rb | 14 ++--- lib/planethoster_api/n0c.rb | 90 +++++++++++++++++++++++++++ lib/planethoster_api/version.rb | 4 +- lib/planethoster_api/world.rb | 14 ++--- lib/utilities/api_client.rb | 54 ++++++++-------- planethoster_api.gemspec | 28 ++++----- spec/planethoster_api_spec.rb | 20 +++--- 17 files changed, 218 insertions(+), 91 deletions(-) create mode 100644 lib/planethoster_api/n0c.rb diff --git a/.circleci/config.yml b/.circleci/config.yml index 56dfe15..85a2c4d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 orbs: - ruby: circleci/ruby@2.1.0 + ruby: circleci/ruby@2.1.1 jobs: build_and_test: @@ -24,4 +24,4 @@ workflows: - build_and_test: matrix: parameters: - ruby-version: ["2.6", "2.7", "3.0", "3.1"] + ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] diff --git a/.gitignore b/.gitignore index 89593cc..c8979f2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ /spec/reports/ /tmp/ +.idea/ + # rspec failure tracking .rspec_status .ruby-version diff --git a/Gemfile b/Gemfile index cab5b53..b1801ab 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source "https://rubygems.org" +source 'https://rubygems.org' gemspec @@ -7,4 +7,7 @@ gem 'rake' group :test do gem 'rspec', '> 0' gem 'rspec_junit_formatter', '> 0' -end \ No newline at end of file +end +gem 'dotenv', '~> 3.1' + +gem 'rubocop', '~> 1.62' diff --git a/Gemfile.lock b/Gemfile.lock index 314c02d..887689a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,13 +1,25 @@ PATH remote: . specs: - planethoster_api (1.0.0) + planethoster_api (1.1.0) GEM remote: https://rubygems.org/ specs: + ast (2.4.2) diff-lcs (1.5.1) + dotenv (3.1.0) + json (2.7.1) + language_server-protocol (3.17.0.3) + parallel (1.24.0) + parser (3.3.0.5) + ast (~> 2.4.1) + racc + racc (1.7.3) + rainbow (3.1.1) rake (13.1.0) + regexp_parser (2.9.0) + rexml (3.2.6) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -23,15 +35,33 @@ GEM rspec-support (3.13.1) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) + rubocop (1.62.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.2) + parser (>= 3.3.0.4) + ruby-progressbar (1.13.0) + unicode-display_width (2.5.0) PLATFORMS + x86_64-darwin-22 x86_64-linux DEPENDENCIES + dotenv (~> 3.1) planethoster_api! rake rspec (> 0) rspec_junit_formatter (> 0) + rubocop (~> 1.62) BUNDLED WITH 2.3.23 diff --git a/README.md b/README.md index d4ef05a..aaad687 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ You need to initialize api credentials. ```ruby require 'planethoster_api' -PlanethosterApi.configuration do |config| +PlanethosterApi.configure do |config| config.api_user = API_USER config.api_key = API_KEY end diff --git a/Rakefile b/Rakefile index b7e9ed5..4c774a2 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,6 @@ -require "bundler/gem_tasks" -require "rspec/core/rake_task" +require 'bundler/gem_tasks' +require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) -task :default => :spec +task default: :spec diff --git a/bin/console b/bin/console index 2a2ffeb..501631a 100755 --- a/bin/console +++ b/bin/console @@ -1,7 +1,7 @@ #!/usr/bin/env ruby -require "bundler/setup" -require "planethoster_api" +require 'bundler/setup' +require 'planethoster_api' # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. @@ -10,5 +10,5 @@ require "planethoster_api" # require "pry" # Pry.start -require "irb" +require 'irb' IRB.start(__FILE__) diff --git a/lib/planethoster_api.rb b/lib/planethoster_api.rb index 98ed92c..013daee 100644 --- a/lib/planethoster_api.rb +++ b/lib/planethoster_api.rb @@ -3,6 +3,7 @@ require 'planethoster_api/api_interface' require 'planethoster_api/domain' require 'planethoster_api/world' +require 'planethoster_api/n0c' module PlanethosterApi class << self @@ -39,12 +40,21 @@ def self.world end end + def self.n0c + creds_wrap do + PlanethosterApi::N0C.new( + @configuration.api_user, + @configuration.api_key + ) + end + end + private def self.creds_wrap if @configuration.nil? - raise "api_key and api_user are not defined - Please refer to documentation and configure credentials: https://github.com/PlanetHoster/planethoster-ruby" + raise 'api_key and api_user are not defined - Please refer to documentation and configure credentials: ' \ + 'https://github.com/PlanetHoster/planethoster-ruby' end yield end - end diff --git a/lib/planethoster_api/api_interface.rb b/lib/planethoster_api/api_interface.rb index 556482a..bf8555a 100644 --- a/lib/planethoster_api/api_interface.rb +++ b/lib/planethoster_api/api_interface.rb @@ -11,10 +11,9 @@ def initialize(api_user, api_key) def test_connection @api_client.call( :get, - "/reseller-api/test-connection", + '/reseller-api/test-connection', {} ) end - end -end \ No newline at end of file +end diff --git a/lib/planethoster_api/configuration.rb b/lib/planethoster_api/configuration.rb index e12ce97..8f58ac7 100644 --- a/lib/planethoster_api/configuration.rb +++ b/lib/planethoster_api/configuration.rb @@ -4,9 +4,8 @@ class Configuration # Empty strings if not defined def initialize - @api_user = "" - @api_key = "" + @api_user = '' + @api_key = '' end - end -end \ No newline at end of file +end diff --git a/lib/planethoster_api/domain.rb b/lib/planethoster_api/domain.rb index 3564e77..02300c5 100644 --- a/lib/planethoster_api/domain.rb +++ b/lib/planethoster_api/domain.rb @@ -1,8 +1,6 @@ module PlanethosterApi class Domain < ApiInterface - - BASE_DOMAIN_PATH = '/reseller-api' - + BASE_DOMAIN_PATH = '/reseller-api'.freeze DOMAINS_METHODS_PATH = { tld_prices: [:get, '/tld-prices'], account_info: [:get, '/account-info'], @@ -11,7 +9,7 @@ class Domain < ApiInterface get_contact_details: [:get, '/get-contact-details'], get_nameservers: [:get, '/get-nameservers'], get_ph_dns_records: [:get, '/get-ph-dns-records'], - get_registrar_lock: [:get, '/get-registrar-lock '], + get_registrar_lock: [:get, '/get-registrar-lock'], save_contact_details: [:post, '/save-contact-details'], save_nameservers: [:post, '/save-nameservers'], save_ph_dns_records: [:post, '/save-ph-dns-records'], @@ -21,17 +19,15 @@ class Domain < ApiInterface renew_domain: [:post, '/renew-domain'], transfer_domain: [:post, '/transfer-domain'], delete_ph_dns_zone: [:post, '/delete-php-dns-zone'] - } + }.freeze DOMAINS_METHODS_PATH.each do |function_name, info| method = info.first path = "#{BASE_DOMAIN_PATH}#{info.last}" - params = params || {} - define_method(function_name) do |params| + define_method(function_name) do |params = {}| @api_client.call(method, path, params) end end - end -end \ No newline at end of file +end diff --git a/lib/planethoster_api/n0c.rb b/lib/planethoster_api/n0c.rb new file mode 100644 index 0000000..1def60b --- /dev/null +++ b/lib/planethoster_api/n0c.rb @@ -0,0 +1,90 @@ +module PlanethosterApi + class N0C < ApiInterface + BASE_WORLD_PATH = '/n0c-api'.freeze + N0C_METHODS_PATH = { + # USER + temporary_domain: [:post, '/user/temp-domain'], + disable_temporary_domain: [:post, '/user/disable-temp-domain'], + ssh_keys: [:get, '/user/ssh-keys'], + add_ssh_keys: [:post, '/user/add-ssh-keys'], + edit_ssh_keys: [:post, '/user/edit-ssh-keys'], + remove_ssh_keys: [:post, '/user/remove-ssh-keys'], + # DOMAINS + domains: [:get, '/domains'], + add_domain: [:post, '/domain/add'], + remove_domain: [:post, '/domain/remove'], + add_sub_domain: [:post, '/domain/add-sub-domain'], + suspend_domain: [:post, '/domain/suspend'], + unsuspend_domain: [:post, '/domain/unsuspend'], + change_doc_root: [:post, '/domain/change-doc-root'], + domain_redirections: [:get, '/domain/redirections'], + domain_internal_redirection: [:post, '/domain/redirection'], + domain_external_redirection: [:post, '/domain/external-redirection'], + domain_delete_redirection: [:post, '/domain/delete-redirection'], + waf_logs: [:get, '/domain/waf-logs'], + waf_rules: [:get, '/domain/waf-rules'], + update_waf_rules: [:post, '/domain/update-waf-rules'], + # DNS + dns_zone: [:get, '/dns/get-records'], + reset_dns_zone: [:post, '/dns/reset-zone'], + edit_dns_zone: [:post, '/dns/edit-zone'], + # Email + emails: [:get, '/emails'], + add_email: [:post, '/email/add'], + remove_email: [:post, '/email/remove'], + email_change_password: [:post, '/email/change-password'], + email_change_quota: [:post, '/email/change-quota'], + suspend_email: [:post, '/email/suspend'], + unsuspend_email: [:post, '/email/unsuspend'], + email_authentication: [:get, '/email/auths'], + enable_email_authentication: [:post, '/email/auth/enable'], + disable_email_authentication: [:post, '/email/auth/disable'], + # DATABASE + databases: [:get, '/databases'], + add_database: [:post, '/database/add'], + remove_database: [:post, '/database/remove'], + database_users: [:get, '/database/users'], + add_database_users: [:post, '/database/user/add'], + remove_database_users: [:post, '/database/user/remove'], + add_permission_database_users: [:post, '/database/user/grant-access'], + remove_permission_database_users: [:post, '/database/user/remove-access'], + # CRON + crons: [:get, '/crons'], + add_cron: [:post, '/cron/add'], + remove_cron: [:post, '/cron/remove'], + set_cron_email: [:post, '/cron/email/set'], + remove_cron_email: [:post, '/cron/email/remove'], + # FTP + ftp_accounts: [:get, '/ftp-accounts'], + add_ftp_account: [:post, '/ftp-account/add'], + remove_ftp_account: [:post, '/ftp-account/remove'], + ftp_account_password: [:post, '/ftp-account/password'], + ftp_account_path: [:post, '/ftp-account/update-path'], + ftp_account_connections: [:get, '/ftp-account/active-connection'], + # WORDPRESS + wordpress: [:get, '/wordpress'], + add_wordpress: [:post, '/wordpress/add'], + remove_wordpress: [:post, '/wordpress/remove'], + # CMS + available_cms: [:get, '/cms/list-available'], + install_cms: [:post, '/cms/install'], + installed_cms: [:get, '/cms/list-installed'], + cms_installations_progress: [:get, '/cms/installations-progress'], + delete_cms: [:post, '/cms/delete'], + # STATS + stats_performance: [:post, '/stats/performance'], + stats_disk_usage: [:get, '/stats/disk-usage'], + stats_apache: [:post, '/stats/apache'], + stats_apache_unique: [:post, '/stats/apache/unique'] + }.freeze + + N0C_METHODS_PATH.each do |function_name, info| + method = info.first + path = "#{BASE_WORLD_PATH}#{info.last}" + + define_method(function_name) do |params = {}| + @api_client.call(method, path, params) + end + end + end +end diff --git a/lib/planethoster_api/version.rb b/lib/planethoster_api/version.rb index 27b383f..8b3ca8a 100644 --- a/lib/planethoster_api/version.rb +++ b/lib/planethoster_api/version.rb @@ -1,3 +1,3 @@ module PlanethosterApi - VERSION = "1.0.0" -end \ No newline at end of file + VERSION = '1.1.0'.freeze +end diff --git a/lib/planethoster_api/world.rb b/lib/planethoster_api/world.rb index 9948cdb..43b3fb2 100644 --- a/lib/planethoster_api/world.rb +++ b/lib/planethoster_api/world.rb @@ -1,26 +1,22 @@ module PlanethosterApi class World < ApiInterface - - BASE_WORLD_PATH = '/world-api' - + BASE_WORLD_PATH = '/world-api'.freeze WORLD_METHODS_PATH = { get_accounts: [:get, '/get-accounts'], create_account: [:post, '/create-account'], suspend_account: [:post, '/suspend-account'], unsuspend_account: [:post, '/unsuspend-account'], modify_ressources: [:post, '/modify-ressources'], - upgrade_plan: [:post, '/upgrade-plan'], - } + upgrade_plan: [:post, '/upgrade-plan'] + }.freeze WORLD_METHODS_PATH.each do |function_name, info| method = info.first path = "#{BASE_WORLD_PATH}#{info.last}" - params = params || {} - define_method(function_name) do |params| + define_method(function_name) do |params = {}| @api_client.call(method, path, params) end end - end -end \ No newline at end of file +end diff --git a/lib/utilities/api_client.rb b/lib/utilities/api_client.rb index da64dab..572eb06 100644 --- a/lib/utilities/api_client.rb +++ b/lib/utilities/api_client.rb @@ -1,11 +1,13 @@ require 'net/http' +require 'dotenv/load' require 'json' + module Utilities class ApiClient include Net - BASE_URL='https://api.planethoster.net' - + BASE_URL = ENV['API_URL'] || 'https://api.planethoster.net' + def initialize(api_user, api_key) @headers = { 'X-API-USER': api_user, @@ -25,36 +27,36 @@ def call(method, path, params) when :post post(params) else - {code: 405, error: "Method not allowed"} + { code: 405, error: 'Method not allowed' } end end private - def get(params) - @uri.query = URI.encode_www_form(params) - @req = HTTP::Get.new(@uri) - call! - end + def get(params) + @uri.query = URI.encode_www_form(params) + @req = HTTP::Get.new(@uri) + call! + end - def post(params) - @req = HTTP::Post.new(@uri) - @req.set_form(params) - call! - end + def post(params) + @req = HTTP::Post.new(@uri) + @req.set_form(params) + call! + end - def call! - @headers.each do |k, v| - @req.add_field "#{k}", "#{v}" - end + def call! + @headers.each do |k, v| + @req.add_field k.to_s, v.to_s + end - @res = HTTP.start(@uri.hostname, @uri.port, use_ssl: true) {|http| - http.request(@req) - } + @res = HTTP.start(@uri.hostname, @uri.port, use_ssl: true) do |http| + http.request(@req) + end - result = JSON.parse(@res.body) - result[:http_code] = @res.code + result = JSON.parse(@res.body) + result[:http_code] = @res.code - result - end - end -end \ No newline at end of file + result + end + end +end diff --git a/planethoster_api.gemspec b/planethoster_api.gemspec index 51d378d..7c3532f 100644 --- a/planethoster_api.gemspec +++ b/planethoster_api.gemspec @@ -1,28 +1,28 @@ -lib = File.expand_path("lib", __dir__) +lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require "planethoster_api/version" +require 'planethoster_api/version' Gem::Specification.new do |spec| - spec.name = "planethoster_api" + spec.name = 'planethoster_api' spec.version = PlanethosterApi::VERSION - spec.authors = ["marcandreg"] - spec.email = ["marc-andre.godin@planethoster.info"] + spec.authors = ['marcandreg'] + spec.email = ['marc-andre.godin@planethoster.info'] - spec.summary = "PlanetHoster API wrapper" + spec.summary = 'PlanetHoster API wrapper' spec.description = "Provide ruby gem for the PlanetHoster api's" - spec.homepage = "https://github.com/PlanetHoster/planethoster-ruby" - spec.license = "MIT" + spec.homepage = 'https://github.com/PlanetHoster/planethoster-ruby' + spec.license = 'MIT' - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = "https://github.com/PlanetHoster/planethoster-ruby" - spec.metadata["changelog_uri"] = "https://github.com/PlanetHoster/planethoster-ruby" + spec.metadata['homepage_uri'] = spec.homepage + spec.metadata['source_code_uri'] = 'https://github.com/PlanetHoster/planethoster-ruby' + spec.metadata['changelog_uri'] = 'https://github.com/PlanetHoster/planethoster-ruby' # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do + spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end - spec.bindir = "exe" + spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.require_paths = ["lib"] + spec.require_paths = ['lib'] end diff --git a/spec/planethoster_api_spec.rb b/spec/planethoster_api_spec.rb index ea2b463..21276ab 100644 --- a/spec/planethoster_api_spec.rb +++ b/spec/planethoster_api_spec.rb @@ -2,31 +2,31 @@ before do PlanethosterApi.configure do |config| - config.api_user = "API_USER" - config.api_key = "API_KEY" + config.api_user = 'API_USER' + config.api_key = 'API_KEY' end end - - it "has a version number" do + + it 'has a version number' do expect(PlanethosterApi::VERSION).not_to be nil end - it "has an api user" do + it 'has an api user' do config = PlanethosterApi.configuration - expect(config.api_user).to eq("API_USER") + expect(config.api_user).to eq('API_USER') end - it "has an api key" do + it 'has an api key' do config = PlanethosterApi.configuration - expect(config.api_key).to eq("API_KEY") + expect(config.api_key).to eq('API_KEY') end - it "initializing a domain object" do + it 'initializing a domain object' do domain = PlanethosterApi.domain expect(domain.class).to eq(PlanethosterApi::Domain) end - it "initializing a world object" do + it 'initializing a world object' do domain = PlanethosterApi.world expect(domain.class).to eq(PlanethosterApi::World) end From 1ae4442b37db61214379d0b34fce6bf4ceea7218 Mon Sep 17 00:00:00 2001 From: becharda Date: Fri, 22 Mar 2024 17:36:12 -0400 Subject: [PATCH 2/4] doc: updated README.md with new endpoints refactor: removed dotenv in api_client.rb --- README.md | 71 +++++++++++++++++++++++++++++++++++++ lib/utilities/api_client.rb | 3 +- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aaad687..4ab5f39 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,77 @@ PlanethosterApi.world[...] # options down below .modify_ressources() # Modify the resources associated with a World account. .upgrade_plan() # Increases resources associated with The World account. ``` +### N0C (Hosting) +[What is a N0C hosting?](https://kb.n0c.com/en/what-is-n0c/) +```ruby +PlanethosterApi.n0c[...] # options down below +``` +```ruby +.temporary_domain() # Generate a free temporary domain to access your main website. +.disable_temporary_domain() # Disable the temporary domain. +.ssh_keys() # Get SSH keys installed for an account. +.add_ssh_keys() # Add a SSH key to the World account. +.edit_ssh_keys() # Edit an existing SSH key. +.remove_ssh_keys() # Remove an existing SSH key. +.domains() # Get all domains of the account. +.add_domain() # Add a domain to the World account. +.remove_domain() # Remove the domain from the World account. +.add_sub_domain() # Add a sub-domain to the World account. +.suspend_domain() # Suspend one or multiple domains. +.unsuspend_domain() # Unsuspend one or multiple domains. +.change_doc_root() # Change document root for a domain. +.domain_redirections() # Get domain redirections. +.domain_internal_redirection() # Redirection that will force HTTPS or www, for example. +.domain_external_redirection() # Set an external domain redirection. +.domain_delete_redirection() # Delete redirection for a domain. +.waf_logs() # Get domain WAF logs. +.waf_rules() # Get the domain WAF rules. +.update_waf_rules() # Update WAF rules for the domain. +.dns_zone() # Find the complete dns zone. +.reset_dns_zone() # Will add the default values of the dns zone. +.edit_dns_zone() # Allows you to add or modify records on the DNS zone +.emails() # Get all account emails. +.add_email() # Create a new email address. +.remove_email() # Remove an email address. +.email_change_password() # Change the password of an email account. +.email_change_quota() # Change quota of an email account. +.suspend_email() # Suspend multiple email addresses. +.unsuspend_email() # Unsuspend multiple email addresses. +.email_authentication() # List email authentication. +.enable_email_authentication() # Enable email authentication. +.disable_email_authentication() # Disable email authentication. +.databases() # Get World account databases. +.add_database() # Create a new database. +.remove_database() # Remove database. +.database_users() # Get World account database users. +.add_database_users() # Create a new database user. +.remove_database_users() # Remove a database user. +.add_permission_database_users() # Grant access to a database for a user. +.remove_permission_database_users() # Remove access to a database for an user. +.crons() # Get world the cron jobs of the World account. +.add_cron() # Add cron to the World account. +.remove_cron() # Remove an existing cron job. +.set_cron_email() # Set cron email. +.remove_cron_email() # Remove cron email. +.ftp_accounts() # Get all FTP accounts. +.add_ftp_account() # Create an FTP account. +.remove_ftp_account() # Remove an FTP account. +.ftp_account_password() # Change the password of the FTP account. +.ftp_account_path() # Update the path of the FTP account. +.ftp_account_connections() # List all active connections. +.wordpress() # Get Wordpress paths installed. +.add_wordpress() # Wordpress installation +.remove_wordpress() # Removing a wordpress installation +.available_cms() # List the cms available for installation and their versions. +.install_cms() # Start the installation of a CMS +.installed_cms() # List the CMS installed on the hosting +.cms_installations_progress() # List CMS that have recently been installed or are in the process of being installed +.delete_cms() # Delete a CMS installation +.stats_performance() # Retrieve performance data +.stats_disk_usage() # Returns disk space usage (response always in BYTE) +.stats_apache() # Web server statistics (Visits) +.stats_apache_unique() # Web server statistics (Visits) +``` ## Development diff --git a/lib/utilities/api_client.rb b/lib/utilities/api_client.rb index 572eb06..309d465 100644 --- a/lib/utilities/api_client.rb +++ b/lib/utilities/api_client.rb @@ -1,12 +1,11 @@ require 'net/http' -require 'dotenv/load' require 'json' module Utilities class ApiClient include Net - BASE_URL = ENV['API_URL'] || 'https://api.planethoster.net' + BASE_URL = 'https://api.planethoster.net'.freeze def initialize(api_user, api_key) @headers = { From 93970b34c2e7b555d554f7c8fd5446db976fae87 Mon Sep 17 00:00:00 2001 From: becharda Date: Mon, 13 May 2024 12:03:08 -0400 Subject: [PATCH 3/4] refactor: removed dotenv from gemfile --- Gemfile | 1 - Gemfile.lock | 2 -- 2 files changed, 3 deletions(-) diff --git a/Gemfile b/Gemfile index b1801ab..6b68420 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,5 @@ group :test do gem 'rspec', '> 0' gem 'rspec_junit_formatter', '> 0' end -gem 'dotenv', '~> 3.1' gem 'rubocop', '~> 1.62' diff --git a/Gemfile.lock b/Gemfile.lock index 887689a..e51f20c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,6 @@ GEM specs: ast (2.4.2) diff-lcs (1.5.1) - dotenv (3.1.0) json (2.7.1) language_server-protocol (3.17.0.3) parallel (1.24.0) @@ -56,7 +55,6 @@ PLATFORMS x86_64-linux DEPENDENCIES - dotenv (~> 3.1) planethoster_api! rake rspec (> 0) From c666ecf48ce6a90e785feb83bc26b0a7de6ff1ab Mon Sep 17 00:00:00 2001 From: becharda Date: Mon, 13 May 2024 12:05:17 -0400 Subject: [PATCH 4/4] chore: bundle updated --- Gemfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e51f20c..427941b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,16 +8,16 @@ GEM specs: ast (2.4.2) diff-lcs (1.5.1) - json (2.7.1) + json (2.7.2) language_server-protocol (3.17.0.3) parallel (1.24.0) - parser (3.3.0.5) + parser (3.3.1.0) ast (~> 2.4.1) racc racc (1.7.3) rainbow (3.1.1) - rake (13.1.0) - regexp_parser (2.9.0) + rake (13.2.1) + regexp_parser (2.9.1) rexml (3.2.6) rspec (3.13.0) rspec-core (~> 3.13.0) @@ -28,13 +28,13 @@ GEM rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.62.1) + rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -45,8 +45,8 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.2) - parser (>= 3.3.0.4) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) ruby-progressbar (1.13.0) unicode-display_width (2.5.0)