<commit_before>require 'erb'

require 'imgix/version'
require 'imgix/style'
require 'imgix/attachment'
require 'imgix/attachment_options'
require 'imgix/instance_methods'
require 'imgix/view_helpers/imgix_tag'

module Imgix
  def self.options
    @options ||= {
      :protocol   => "http",
      :base_url   => "imgix.net"
    }
  end
  
  module ClassMethods
    def has_imgix_attachment(name, options = {})
      include InstanceMethods
      
      class_attribute :options
      self.options = options
      
      define_method(name) do |*args|
        a = attachment_for(name)
        (args.length > 0) ? a.to_s(args.first) : a
      end

      define_method "#{name}=" do |file|
        attachment_for(name).assign(file)
      end

      define_method "#{name}?" do
        attachment_for(name).file?
      end
    end
  end
end

ActiveRecord::Base.send(:extend, Imgix::ClassMethods)<commit_msg>change protocol to https<commit_after>require 'erb'

require 'imgix/version'
require 'imgix/style'
require 'imgix/attachment'
require 'imgix/attachment_options'
require 'imgix/instance_methods'
require 'imgix/view_helpers/imgix_tag'

module Imgix
  def self.options
    @options ||= {
      :protocol   => "https",
      :base_url   => "imgix.net"
    }
  end
  
  module ClassMethods
    def has_imgix_attachment(name, options = {})
      include InstanceMethods
      
      class_attribute :options
      self.options = options
      
      define_method(name) do |*args|
        a = attachment_for(name)
        (args.length > 0) ? a.to_s(args.first) : a
      end

      define_method "#{name}=" do |file|
        attachment_for(name).assign(file)
      end

      define_method "#{name}?" do
        attachment_for(name).file?
      end
    end
  end
end

ActiveRecord::Base.send(:extend, Imgix::ClassMethods)
{'fraction_non_alphanumeric': 0.11221122112211221, 'fraction_numerical': 0.0011001100110011, 'mean_word_length': 2.8214285714285716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4063505', 'n_tokens_mistral': 596, 'n_tokens_neox': 594, 'n_words': 124}