<commit_before>require "the_sortable_tree/engine"
require "the_sortable_tree/version"

# include TheSortableTree::Scopes
module TheSortableTree
  module Scopes
    def self.included(base)
      base.class_eval do
        if Rails::VERSION::MAJOR == 3
          scope :nested_set,          order('lft ASC')
          scope :reversed_nested_set, order('lft DESC')
        elsif Rails::VERSION::MAJOR == 4
          scope :nested_set,          lambda { order('lft ASC')  }
          scope :reversed_nested_set, lambda { order('lft DESC') }
        else
          puts "[TheSortableTree] ERROR: required Rails 3 or Rails 4"
        end
      end
    end
  end
end<commit_msg>Update Rails version checking<commit_after>require "the_sortable_tree/engine"
require "the_sortable_tree/version"

# include TheSortableTree::Scopes
module TheSortableTree
  module Scopes
    def self.included(base)
      base.class_eval do
        if Rails::VERSION::MAJOR == 3
          scope :nested_set,          order('lft ASC')
          scope :reversed_nested_set, order('lft DESC')
        elsif Rails::VERSION::MAJOR >= 4
          scope :nested_set,          lambda { order('lft ASC')  }
          scope :reversed_nested_set, lambda { order('lft DESC') }
        else
          puts "[TheSortableTree] ERROR: required Rails 3 or Rails 4"
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0898379970544919, 'fraction_numerical': 0.005891016200294551, 'mean_word_length': 2.5575916230366493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2725875', 'n_tokens_mistral': 437, 'n_tokens_neox': 411, 'n_words': 108}