<commit_before>$:.unshift File.dirname(__FILE__)
require 'uri'
require 'digest/md5'
require 'zlib'
require 'iconv'
require 'css_parser/rule_set'
require 'css_parser/regexps'
require 'css_parser/parser'

module CssParser
  # Merge multiple CSS RuleSets by cascading according to the CSS 2.1 cascading rules 
  # (http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order).
  #
  # Takes one or more RuleSet objects.
  #
  # Returns a RuleSet.
  #
  # ==== Cascading
  # If a RuleSet object has its +specificity+ defined, that specificity is 
  # used in the cascade calculations.  
  #
  # If no specificity is explicitly set and the RuleSet has *one* selector, 
  # the specificity is calculated using that selector.
  #
  # If no selectors or multiple selectors are present, the specificity is 
  # treated as 0.
  #
  # ==== Example #1
  #   rs1 = RuleSet.new(nil, 'color: black;')
  #   rs2 = RuleSet.new(nil, 'margin: 0px;')
  #
  #   merged = CssParser.merge(rs1, rs2)
  #
  #   puts merged
  #   => "{ margin: 0px; color: black; }"<commit_msg>Added version constant<commit_after>require 'uri'
require 'digest/md5'
require 'zlib'
require 'iconv'
require File.dirname(__FILE__) + '/css_parser/rule_set'
require File.dirname(__FILE__) + '/css_parser/regexps'
require File.dirname(__FILE__) + '/css_parser/parser'

module CssParser
  VERSION = '1.1.0'

  # Merge multiple CSS RuleSets by cascading according to the CSS 2.1 cascading rules 
  # (http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order).
  #
  # Takes one or more RuleSet objects.
  #
  # Returns a RuleSet.
  #
  # ==== Cascading
  # If a RuleSet object has its +specificity+ defined, that specificity is 
  # used in the cascade calculations.  
  #
  # If no specificity is explicitly set and the RuleSet has *one* selector, 
  # the specificity is calculated using that selector.
  #
  # If no selectors or multiple selectors are present, the specificity is 
  # treated as 0.
  #
  # ==== Example #1
  #   rs1 = RuleSet.new(nil, 'color: black;')
  #   rs2 = RuleSet.new(nil, 'margin: 0px;')
  #
  #   merged = CssParser.merge(rs1, rs2)
  #
  #   puts merged
  #   => "{ margin: 0px; color: black; }"
{'fraction_non_alphanumeric': 0.11867525298988041, 'fraction_numerical': 0.013339466421343146, 'mean_word_length': 3.4478527607361964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7274158', 'n_tokens_mistral': 774, 'n_tokens_neox': 739, 'n_words': 225}