<commit_before>require 'sinatra/base'
require 'sequel'

module Sinatra
  module SequelConnector
    module Helpers
      def db
        options.db
      end
    end

    def db=(url)
      @db = nil
      set :database_url, url
      db
    end

    def db
      @db ||= Sequel.connect(database_url, encoding: 'utf-8')
    end

    def self.registered(app)
      app.helpers SequelConnector::Helpers
    end
  end
end
<commit_msg>Migrates deprecated options to settings<commit_after>require 'sinatra/base'
require 'sequel'

module Sinatra
  module SequelConnector
    module Helpers
      def db
        settings.db
      end
    end

    def db=(url)
      @db = nil
      set :database_url, url
      db
    end

    def db
      @db ||= Sequel.connect(database_url, encoding: 'utf-8')
    end

    def self.registered(app)
      app.helpers SequelConnector::Helpers
    end
  end
end

{'fraction_non_alphanumeric': 0.07666290868094701, 'fraction_numerical': 0.002254791431792559, 'mean_word_length': 2.2057761732851984, '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': '2623414', 'n_tokens_mistral': 290, 'n_tokens_neox': 288, 'n_words': 80}