From 23440d80dc380706d1da583a0c8add2a2f7952e1 Mon Sep 17 00:00:00 2001 From: ignacio-chiazzo Date: Thu, 14 Sep 2023 20:43:11 -0400 Subject: [PATCH 1/2] shorten url paths --- test/whatsapp/api/api_configuration_test.rb | 2 +- test/whatsapp/api/business_profile_test.rb | 4 +- test/whatsapp/api/client_test.rb | 4 +- test/whatsapp/api/medias_test.rb | 4 +- test/whatsapp/api/messages_test.rb | 38 +++++++++---------- test/whatsapp/api/phone_numbers_test.rb | 6 +-- .../resource/button_parameter_test.rb | 2 +- test/whatsapp/resource/component_test.rb | 10 ++--- test/whatsapp/resource/currency_test.rb | 2 +- test/whatsapp/resource/date_time_test.rb | 2 +- test/whatsapp/resource/interactive_test.rb | 16 ++++---- test/whatsapp/resource/media_test.rb | 2 +- .../resource/parameter_object_test.rb | 12 +++--- 13 files changed, 52 insertions(+), 52 deletions(-) diff --git a/test/whatsapp/api/api_configuration_test.rb b/test/whatsapp/api/api_configuration_test.rb index b070419..fb62efa 100644 --- a/test/whatsapp/api/api_configuration_test.rb +++ b/test/whatsapp/api/api_configuration_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require 'test_helper' -require_relative '../../../lib/whatsapp_sdk/api/client' +require 'whatsapp_sdk/api/client' module WhatsappSdk module Api diff --git a/test/whatsapp/api/business_profile_test.rb b/test/whatsapp/api/business_profile_test.rb index 1ce2470..b9cbda2 100644 --- a/test/whatsapp/api/business_profile_test.rb +++ b/test/whatsapp/api/business_profile_test.rb @@ -1,8 +1,8 @@ # typed: true # frozen_string_literal: true -require_relative '../../../lib/whatsapp_sdk/api/business_profile' -require_relative '../../../lib/whatsapp_sdk/api/client' +require 'whatsapp_sdk/api/business_profile' +require 'whatsapp_sdk/api/client' module WhatsappSdk module Api diff --git a/test/whatsapp/api/client_test.rb b/test/whatsapp/api/client_test.rb index efdcb4a..e7fca4f 100644 --- a/test/whatsapp/api/client_test.rb +++ b/test/whatsapp/api/client_test.rb @@ -2,8 +2,8 @@ # frozen_string_literal: true require 'test_helper' -require_relative '../../../lib/whatsapp_sdk/api/client' -require_relative '../../../lib/whatsapp_sdk/api/api_configuration' +require 'whatsapp_sdk/api/client' +require 'whatsapp_sdk/api/api_configuration' module WhatsappSdk module Api diff --git a/test/whatsapp/api/medias_test.rb b/test/whatsapp/api/medias_test.rb index 913c63c..8409f87 100644 --- a/test/whatsapp/api/medias_test.rb +++ b/test/whatsapp/api/medias_test.rb @@ -2,8 +2,8 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/api/medias' -require_relative '../../../lib/whatsapp_sdk/api/client' +require 'whatsapp_sdk/api/medias' +require 'whatsapp_sdk/api/client' module WhatsappSdk module Api diff --git a/test/whatsapp/api/messages_test.rb b/test/whatsapp/api/messages_test.rb index a6526bc..96297a7 100644 --- a/test/whatsapp/api/messages_test.rb +++ b/test/whatsapp/api/messages_test.rb @@ -2,25 +2,25 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/api/responses/read_message_data_response' -require_relative '../../../lib/whatsapp_sdk/api/messages' -require_relative '../../../lib/whatsapp_sdk/resource/address_type' -require_relative '../../../lib/whatsapp_sdk/resource/address' -require_relative '../../../lib/whatsapp_sdk/resource/contact' -require_relative '../../../lib/whatsapp_sdk/resource/interactive' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_action' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_action_reply_button' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_action_section' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_action_section_row' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_body' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_footer' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_header' -require_relative '../../../lib/whatsapp_sdk/resource/phone_number' -require_relative '../../../lib/whatsapp_sdk/resource/url' -require_relative '../../../lib/whatsapp_sdk/resource/email' -require_relative '../../../lib/whatsapp_sdk/resource/org' -require_relative '../../../lib/whatsapp_sdk/resource/name' -require_relative '../../../lib/whatsapp_sdk/api/client' +require 'whatsapp_sdk/api/responses/read_message_data_response' +require 'whatsapp_sdk/api/messages' +require 'whatsapp_sdk/resource/address_type' +require 'whatsapp_sdk/resource/address' +require 'whatsapp_sdk/resource/contact' +require 'whatsapp_sdk/resource/interactive' +require 'whatsapp_sdk/resource/interactive_action' +require 'whatsapp_sdk/resource/interactive_action_reply_button' +require 'whatsapp_sdk/resource/interactive_action_section' +require 'whatsapp_sdk/resource/interactive_action_section_row' +require 'whatsapp_sdk/resource/interactive_body' +require 'whatsapp_sdk/resource/interactive_footer' +require 'whatsapp_sdk/resource/interactive_header' +require 'whatsapp_sdk/resource/phone_number' +require 'whatsapp_sdk/resource/url' +require 'whatsapp_sdk/resource/email' +require 'whatsapp_sdk/resource/org' +require 'whatsapp_sdk/resource/name' +require 'whatsapp_sdk/api/client' require_relative '../contact_helper' module WhatsappSdk diff --git a/test/whatsapp/api/phone_numbers_test.rb b/test/whatsapp/api/phone_numbers_test.rb index 8ba0471..9244d33 100644 --- a/test/whatsapp/api/phone_numbers_test.rb +++ b/test/whatsapp/api/phone_numbers_test.rb @@ -2,9 +2,9 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/api/phone_numbers' -require_relative '../../../lib/whatsapp_sdk/resource/contact_response' -require_relative '../../../lib/whatsapp_sdk/api/client' +require 'whatsapp_sdk/api/phone_numbers' +require 'whatsapp_sdk/resource/contact_response' +require 'whatsapp_sdk/api/client' module WhatsappSdk module Api diff --git a/test/whatsapp/resource/button_parameter_test.rb b/test/whatsapp/resource/button_parameter_test.rb index 6395d9d..d16b25e 100644 --- a/test/whatsapp/resource/button_parameter_test.rb +++ b/test/whatsapp/resource/button_parameter_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/resource/button_parameter' +require 'whatsapp_sdk/resource/button_parameter' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/component_test.rb b/test/whatsapp/resource/component_test.rb index 008cc7b..348272c 100644 --- a/test/whatsapp/resource/component_test.rb +++ b/test/whatsapp/resource/component_test.rb @@ -2,11 +2,11 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/resource/parameter_object' -require_relative '../../../lib/whatsapp_sdk/resource/media' -require_relative '../../../lib/whatsapp_sdk/resource/date_time' -require_relative '../../../lib/whatsapp_sdk/resource/currency' -require_relative '../../../lib/whatsapp_sdk/resource/component' +require 'whatsapp_sdk/resource/parameter_object' +require 'whatsapp_sdk/resource/media' +require 'whatsapp_sdk/resource/date_time' +require 'whatsapp_sdk/resource/currency' +require 'whatsapp_sdk/resource/component' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/currency_test.rb b/test/whatsapp/resource/currency_test.rb index f57cdc4..2b71f34 100644 --- a/test/whatsapp/resource/currency_test.rb +++ b/test/whatsapp/resource/currency_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/resource/currency' +require 'whatsapp_sdk/resource/currency' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/date_time_test.rb b/test/whatsapp/resource/date_time_test.rb index da35157..71306dc 100644 --- a/test/whatsapp/resource/date_time_test.rb +++ b/test/whatsapp/resource/date_time_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/resource/date_time' +require 'whatsapp_sdk/resource/date_time' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/interactive_test.rb b/test/whatsapp/resource/interactive_test.rb index 53cc0a8..b1fcf9e 100644 --- a/test/whatsapp/resource/interactive_test.rb +++ b/test/whatsapp/resource/interactive_test.rb @@ -2,14 +2,14 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/resource/interactive' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_action' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_action_reply_button' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_action_section' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_action_section_row' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_body' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_footer' -require_relative '../../../lib/whatsapp_sdk/resource/interactive_header' +require 'whatsapp_sdk/resource/interactive' +require 'whatsapp_sdk/resource/interactive_action' +require 'whatsapp_sdk/resource/interactive_action_reply_button' +require 'whatsapp_sdk/resource/interactive_action_section' +require 'whatsapp_sdk/resource/interactive_action_section_row' +require 'whatsapp_sdk/resource/interactive_body' +require 'whatsapp_sdk/resource/interactive_footer' +require 'whatsapp_sdk/resource/interactive_header' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/media_test.rb b/test/whatsapp/resource/media_test.rb index 13dd8ed..46fbadf 100644 --- a/test/whatsapp/resource/media_test.rb +++ b/test/whatsapp/resource/media_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/resource/media' +require 'whatsapp_sdk/resource/media' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/parameter_object_test.rb b/test/whatsapp/resource/parameter_object_test.rb index 925feb3..37fe961 100644 --- a/test/whatsapp/resource/parameter_object_test.rb +++ b/test/whatsapp/resource/parameter_object_test.rb @@ -2,12 +2,12 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../../lib/whatsapp_sdk/resource/parameter_object' -require_relative '../../../lib/whatsapp_sdk/resource/media' -require_relative '../../../lib/whatsapp_sdk/resource/date_time' -require_relative '../../../lib/whatsapp_sdk/resource/currency' -require_relative '../../../lib/whatsapp_sdk/error' -require_relative '../../../lib/whatsapp_sdk/resource/errors' +require 'whatsapp_sdk/resource/parameter_object' +require 'whatsapp_sdk/resource/media' +require 'whatsapp_sdk/resource/date_time' +require 'whatsapp_sdk/resource/currency' +require 'whatsapp_sdk/error' +require 'whatsapp_sdk/resource/errors' module WhatsappSdk module Resource From 3a44d72e06c19a6ac1147633d40aefff1bbb4dc5 Mon Sep 17 00:00:00 2001 From: ignacio-chiazzo Date: Thu, 14 Sep 2023 20:49:09 -0400 Subject: [PATCH 2/2] short urls --- test/test_helper.rb | 2 +- test/whatsapp/api/api_configuration_test.rb | 2 +- test/whatsapp/api/business_profile_test.rb | 4 +- test/whatsapp/api/client_test.rb | 4 +- test/whatsapp/api/medias_test.rb | 4 +- test/whatsapp/api/messages_test.rb | 38 +++++++++---------- test/whatsapp/api/phone_numbers_test.rb | 6 +-- .../resource/button_parameter_test.rb | 2 +- test/whatsapp/resource/component_test.rb | 10 ++--- test/whatsapp/resource/currency_test.rb | 2 +- test/whatsapp/resource/date_time_test.rb | 2 +- test/whatsapp/resource/interactive_test.rb | 16 ++++---- test/whatsapp/resource/media_test.rb | 2 +- .../resource/parameter_object_test.rb | 12 +++--- test/whatsapp/version_test.rb | 2 +- 15 files changed, 54 insertions(+), 54 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 9cebd9f..e6c6416 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,7 +1,7 @@ # typed: true # frozen_string_literal: true -$LOAD_PATH.unshift File.expand_path('../lib', __dir__) +$LOAD_PATH.unshift File.expand_path('../lib/whatsapp_sdk', __dir__) require "minitest/autorun" require "minitest/assertions" diff --git a/test/whatsapp/api/api_configuration_test.rb b/test/whatsapp/api/api_configuration_test.rb index fb62efa..7bad40b 100644 --- a/test/whatsapp/api/api_configuration_test.rb +++ b/test/whatsapp/api/api_configuration_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require 'test_helper' -require 'whatsapp_sdk/api/client' +require 'api/client' module WhatsappSdk module Api diff --git a/test/whatsapp/api/business_profile_test.rb b/test/whatsapp/api/business_profile_test.rb index b9cbda2..4ee0b48 100644 --- a/test/whatsapp/api/business_profile_test.rb +++ b/test/whatsapp/api/business_profile_test.rb @@ -1,8 +1,8 @@ # typed: true # frozen_string_literal: true -require 'whatsapp_sdk/api/business_profile' -require 'whatsapp_sdk/api/client' +require 'api/business_profile' +require 'api/client' module WhatsappSdk module Api diff --git a/test/whatsapp/api/client_test.rb b/test/whatsapp/api/client_test.rb index e7fca4f..cce2405 100644 --- a/test/whatsapp/api/client_test.rb +++ b/test/whatsapp/api/client_test.rb @@ -2,8 +2,8 @@ # frozen_string_literal: true require 'test_helper' -require 'whatsapp_sdk/api/client' -require 'whatsapp_sdk/api/api_configuration' +require 'api/client' +require 'api/api_configuration' module WhatsappSdk module Api diff --git a/test/whatsapp/api/medias_test.rb b/test/whatsapp/api/medias_test.rb index 8409f87..6fb65ca 100644 --- a/test/whatsapp/api/medias_test.rb +++ b/test/whatsapp/api/medias_test.rb @@ -2,8 +2,8 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/api/medias' -require 'whatsapp_sdk/api/client' +require 'api/medias' +require 'api/client' module WhatsappSdk module Api diff --git a/test/whatsapp/api/messages_test.rb b/test/whatsapp/api/messages_test.rb index 96297a7..0d3c2e4 100644 --- a/test/whatsapp/api/messages_test.rb +++ b/test/whatsapp/api/messages_test.rb @@ -2,25 +2,25 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/api/responses/read_message_data_response' -require 'whatsapp_sdk/api/messages' -require 'whatsapp_sdk/resource/address_type' -require 'whatsapp_sdk/resource/address' -require 'whatsapp_sdk/resource/contact' -require 'whatsapp_sdk/resource/interactive' -require 'whatsapp_sdk/resource/interactive_action' -require 'whatsapp_sdk/resource/interactive_action_reply_button' -require 'whatsapp_sdk/resource/interactive_action_section' -require 'whatsapp_sdk/resource/interactive_action_section_row' -require 'whatsapp_sdk/resource/interactive_body' -require 'whatsapp_sdk/resource/interactive_footer' -require 'whatsapp_sdk/resource/interactive_header' -require 'whatsapp_sdk/resource/phone_number' -require 'whatsapp_sdk/resource/url' -require 'whatsapp_sdk/resource/email' -require 'whatsapp_sdk/resource/org' -require 'whatsapp_sdk/resource/name' -require 'whatsapp_sdk/api/client' +require 'api/responses/read_message_data_response' +require 'api/messages' +require 'resource/address_type' +require 'resource/address' +require 'resource/contact' +require 'resource/interactive' +require 'resource/interactive_action' +require 'resource/interactive_action_reply_button' +require 'resource/interactive_action_section' +require 'resource/interactive_action_section_row' +require 'resource/interactive_body' +require 'resource/interactive_footer' +require 'resource/interactive_header' +require 'resource/phone_number' +require 'resource/url' +require 'resource/email' +require 'resource/org' +require 'resource/name' +require 'api/client' require_relative '../contact_helper' module WhatsappSdk diff --git a/test/whatsapp/api/phone_numbers_test.rb b/test/whatsapp/api/phone_numbers_test.rb index 9244d33..4c29269 100644 --- a/test/whatsapp/api/phone_numbers_test.rb +++ b/test/whatsapp/api/phone_numbers_test.rb @@ -2,9 +2,9 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/api/phone_numbers' -require 'whatsapp_sdk/resource/contact_response' -require 'whatsapp_sdk/api/client' +require 'api/phone_numbers' +require 'resource/contact_response' +require 'api/client' module WhatsappSdk module Api diff --git a/test/whatsapp/resource/button_parameter_test.rb b/test/whatsapp/resource/button_parameter_test.rb index d16b25e..ba41e57 100644 --- a/test/whatsapp/resource/button_parameter_test.rb +++ b/test/whatsapp/resource/button_parameter_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/resource/button_parameter' +require 'resource/button_parameter' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/component_test.rb b/test/whatsapp/resource/component_test.rb index 348272c..d398a30 100644 --- a/test/whatsapp/resource/component_test.rb +++ b/test/whatsapp/resource/component_test.rb @@ -2,11 +2,11 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/resource/parameter_object' -require 'whatsapp_sdk/resource/media' -require 'whatsapp_sdk/resource/date_time' -require 'whatsapp_sdk/resource/currency' -require 'whatsapp_sdk/resource/component' +require 'resource/parameter_object' +require 'resource/media' +require 'resource/date_time' +require 'resource/currency' +require 'resource/component' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/currency_test.rb b/test/whatsapp/resource/currency_test.rb index 2b71f34..cd0dc01 100644 --- a/test/whatsapp/resource/currency_test.rb +++ b/test/whatsapp/resource/currency_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/resource/currency' +require 'resource/currency' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/date_time_test.rb b/test/whatsapp/resource/date_time_test.rb index 71306dc..ceff30e 100644 --- a/test/whatsapp/resource/date_time_test.rb +++ b/test/whatsapp/resource/date_time_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/resource/date_time' +require 'resource/date_time' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/interactive_test.rb b/test/whatsapp/resource/interactive_test.rb index b1fcf9e..fdc9893 100644 --- a/test/whatsapp/resource/interactive_test.rb +++ b/test/whatsapp/resource/interactive_test.rb @@ -2,14 +2,14 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/resource/interactive' -require 'whatsapp_sdk/resource/interactive_action' -require 'whatsapp_sdk/resource/interactive_action_reply_button' -require 'whatsapp_sdk/resource/interactive_action_section' -require 'whatsapp_sdk/resource/interactive_action_section_row' -require 'whatsapp_sdk/resource/interactive_body' -require 'whatsapp_sdk/resource/interactive_footer' -require 'whatsapp_sdk/resource/interactive_header' +require 'resource/interactive' +require 'resource/interactive_action' +require 'resource/interactive_action_reply_button' +require 'resource/interactive_action_section' +require 'resource/interactive_action_section_row' +require 'resource/interactive_body' +require 'resource/interactive_footer' +require 'resource/interactive_header' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/media_test.rb b/test/whatsapp/resource/media_test.rb index 46fbadf..fb223ea 100644 --- a/test/whatsapp/resource/media_test.rb +++ b/test/whatsapp/resource/media_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/resource/media' +require 'resource/media' module WhatsappSdk module Resource diff --git a/test/whatsapp/resource/parameter_object_test.rb b/test/whatsapp/resource/parameter_object_test.rb index 37fe961..d11272f 100644 --- a/test/whatsapp/resource/parameter_object_test.rb +++ b/test/whatsapp/resource/parameter_object_test.rb @@ -2,12 +2,12 @@ # frozen_string_literal: true require "test_helper" -require 'whatsapp_sdk/resource/parameter_object' -require 'whatsapp_sdk/resource/media' -require 'whatsapp_sdk/resource/date_time' -require 'whatsapp_sdk/resource/currency' -require 'whatsapp_sdk/error' -require 'whatsapp_sdk/resource/errors' +require 'resource/parameter_object' +require 'resource/media' +require 'resource/date_time' +require 'resource/currency' +require 'error' +require 'resource/errors' module WhatsappSdk module Resource diff --git a/test/whatsapp/version_test.rb b/test/whatsapp/version_test.rb index 0d19d11..4e07086 100644 --- a/test/whatsapp/version_test.rb +++ b/test/whatsapp/version_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require_relative '../../lib/whatsapp_sdk/version' +require 'version' class VersionTest < Minitest::Test def test_that_it_has_a_version_number