<commit_before>require 'sinatra'
require 'rack-flash'
require 'dotenv'
require 'twilio-ruby'

# Configuration
Dotenv.load
APP_ROOT = Pathname.new(File.expand_path('../', __FILE__))
configure do
	set :root, APP_ROOT.to_path
	set :views, File.join(Sinatra::Application.root, "app", "views")
end

enable :sessions
use Rack::Flash

# Routing
get '/' do
	erb :home
end

post '/arrived_safely' do
  @client = Twilio::REST::Client.new(ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN'])
#  @client = Twilio::REST::Client.new(ENV['TWILIO_API_KEY'], ENV['TWILIO_SECRET'], ENV['TWILIO_ACCOUNT_SID'])
  @client.messages.create(
    from: '+12406502723',
    to: '+13013258434',
    body: "It's working"
  )
	flash[:success] = 'it worked'
end<commit_msg>update template for text messages<commit_after>require 'sinatra'
require 'rack-flash'
require 'dotenv'
require 'twilio-ruby'

# Configuration
Dotenv.load
APP_ROOT = Pathname.new(File.expand_path('../', __FILE__))
configure do
	set :root, APP_ROOT.to_path
	set :views, File.join(Sinatra::Application.root, "app", "views")
end

enable :sessions
use Rack::Flash

# Routing
get '/' do
	erb :home
end

post '/arrived_safely' do
  @client = Twilio::REST::Client.new(ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN'])
#  @client = Twilio::REST::Client.new(ENV['TWILIO_API_KEY'], ENV['TWILIO_SECRET'], ENV['TWILIO_ACCOUNT_SID'])
  @client.messages.create(
    from: '+12406502723',
    to: '+13013258434',
    body: "Hi #{name}, it's Ariel. I'm sending you a text from #{location}. I just wanted to let you know I got in safe and sound :) Hope you're doing well! XOXO"
  )
	flash[:success] = 'it worked'
end
{'fraction_non_alphanumeric': 0.15815085158150852, 'fraction_numerical': 0.0267639902676399, 'mean_word_length': 5.553784860557769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5472286', 'n_tokens_mistral': 681, 'n_tokens_neox': 621, 'n_words': 142}