This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: $0 [personal|work1|work2]" | |
| exit 1 | |
| fi | |
| if [ "$1" == "personal" ]; then | |
| git config --global user.name "Tu Nombre" | |
| git config --global user.email "[email protected]" | |
| elif [ "$1" == "chile" ]; then | |
| git config --global user.name "Tu Nombre Trabajo 1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Instalar el paquete de Intercom para PHP | |
| Primero, instala el paquete oficial de Intercom para PHP utilizando Composer: | |
| <dl> | |
| bash | |
| composer require intercom/intercom-php | |
| </dl> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MetaContractorObject | |
| VALID_SUB_CATEGORIES = ['PERMANENTE', 'ESPORÁDICO', 'HABITUAL'].freeze | |
| attr_accessor :sub_category, :meta_contractor_id | |
| def initialize(meta_contractor_id, sub_category) | |
| raise ArgumentError, "Invalid sub_category: #{sub_category}. Must be one of: #{VALID_SUB_CATEGORIES.join(', ')}" unless VALID_SUB_CATEGORIES.include?(sub_category) | |
| @meta_contractor_id = meta_contractor_id | |
| @sub_category = sub_category |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ContractorObject | |
| attr_accessor :activity, :contractor_id | |
| def initialize(activity, contractor_id) | |
| raise ArgumentError, "Activity must not be empty" if activity.nil? || activity.strip.empty? | |
| @contractor_id = contractor_id | |
| @activity = activity | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'aws-sdk-s3' | |
| require 'uri' | |
| class S3Downloader | |
| def initialize(region:, access_key_id:, secret_access_key:, bucket_name:) | |
| @s3 = Aws::S3::Client.new( | |
| region: region, | |
| access_key_id: access_key_id, | |
| secret_access_key: secret_access_key | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User < ApplicationRecord | |
| validates :name, presence: true, length: { maximum: 50 } | |
| validates :email, presence: true, length: { maximum: 255 } | |
| end | |
| # spec/models/user_spec.rb | |
| require 'rails_helper' | |
| RSpec.describe User, type: :model do |
OlderNewer