<commit_before>class WebflowGenerator < Rails::Generators::Base
  def create_initializer_file
    create_file "config/initializers/webflow.rb",

%q{# Imported from webflow_data generator
require File.join(Rails.root, "lib/client.rb")


# AREND
WebflowData.configure do |config|
  config.api_token = "" # Enter your api credentials here
  config.site_id   = ""
end


# need to expose the raw HTTP methods to proxy requests
module Webflow
  class Client

    def proxy(path, method: :get, params: nil, data: nil)
      request(path, method: method, params: params, data: data)
    end

  end
end

files = Dir[Rails.root + 'app/models/*.rb']
models = files.map{ |m| File.basename(m, '.rb').camelize } #get models so we don't define one it if is already defined

collections = Webflow::Collection.all(WEBFLOW_SITE_ID)

collections.each do |c|
  Object.const_set(c.singular_name.delete(" "), Class.new(WebflowData::Item)) unless models.include?(c.singular_name.delete(" ")) # create model unless we have already defined it
end}
  end
end<commit_msg>updated the generator<commit_after>class WebflowGenerator < Rails::Generators::Base
  def create_initializer_file
    create_file "config/initializers/webflow.rb",

%q{# Imported from webflow_data generator
WebflowData.configure do |config|
  config.api_token = "" # Enter your api credentials here
  config.site_id   = ""
end

files = Dir[Rails.root + 'app/models/*.rb']
models = files.map{ |m| File.basename(m, '.rb').camelize } #get models so we don't define one it if is already defined

collections = Webflow::Collection.all()

collections.each do |c|
  Object.const_set(c.singular_name.delete(" "), Class.new(WebflowData::Item)) unless models.include?(c.singular_name.delete(" ")) # create model unless we have already defined it
end}
  end
end
{'fraction_non_alphanumeric': 0.11817168338907469, 'fraction_numerical': 0.0, 'mean_word_length': 4.846905537459284, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2119302', 'n_tokens_mistral': 582, 'n_tokens_neox': 585, 'n_words': 163}