<commit_before>Pod::Spec.new do |s|
  s.name             = "SugarRecord"
  s.version          = "2.1.8"
  s.summary          = "CoreData wrapper written on Swift"
  s.homepage         = "https://github.com/pepibumur/SugarRecord"
  s.license          = 'MIT'
  s.author           = { "Pedro" => "<EMAIL>" }
  s.source           = { :git => "https://github.com/pepibumur/SugarRecord.git", :tag => s.version.to_s }
  s.social_media_url = 'https://twitter.com/pepibumur'
  s.requires_arc = true

  s.tvos.deployment_target = '9.0'
  s.ios.deployment_target = "8.0"
  s.osx.deployment_target = "10.10"
  s.watchos.deployment_target = "2.0"
  s.tvos.deployment_target = '9.0'

  s.subspec "Foundation" do |sp|
    sp.source_files = ['SugarRecord/Source/Foundation/**/*.{swift}']
    sp.exclude_files = ['SugarRecord/Source/Reactive/**/*.{swift}']
    sp.dependency "Result", "~> 1.0"
  end

  def rx_dependencies(spec)
    spec.dependency 'RxSwift', '~> 2.0.0'
    spec.dependency 'RxCocoa', '~> 2.0.0'
    spec.dependency 'RxBlocking', '~> 2.0.0'
  end

  def rac_dependencies(spec)
    spec.dependency "ReactiveCocoa", "4.0.0-RC.1"
  end
  
  s.subspec "CoreData" do |sp|
    sp.source_files = ['SugarRecord/Source/CoreData/**/*.{swift}']
    sp.exclude_files = ['SugarRecord/Source/CoreData/Reactive/**/*.{swift}']
    sp.dependency 'SugarRecord/Foundation'
    sp.frameworks = ['CoreData']

    sp.subspec "Rx" do |spp|
      spp.source_files = ['SugarRecord/Source/Reactive/*.{swift}', 'SugarRecord/Source/CoreData/Reactive/**/*.{swift}']
      spp.exclude_files = ['SugarRecord/Source/Reactive/ReactiveCocoa/**/*.{swift}']
      rx_dependencies(spp)
    end

    sp.subspec "ReactiveCocoa" do |spp|
      spp.source_files = ['SugarRecord/Source/Reactive/*.{swift}', 'SugarRecord/Source/CoreData/Reactive/**/*.{swift}']
      spp.exclude_files = ['SugarRecord/Source/Reactive/Rx/**/*.{swift}']
      rac_dependencies(spp)
    end
  end

  s.subspec "Realm" do |sp|
    sp.source_files = ['SugarRecord/Source/Realm/**/*.{swift}']
    sp.exclude_files = ['SugarRecord/Source/Realm/Reactive/**/*.{swift}']
    sp.dependency 'SugarRecord/Foundation'
    sp.dependency "RealmSwift", "~> 0.97"

    sp.subspec "Rx" do |spp|
      spp.source_files = ['SugarRecord/Source/Reactive/*.{swift}', 'SugarRecord/Source/Realm/Reactive/**/*.{swift}']
      spp.exclude_files = ['SugarRecord/Source/Reactive/ReactiveCocoa/**/*.{swift}']
      rx_dependencies(spp)
    end

    sp.subspec "ReactiveCocoa" do |sp|
      spp.source_files = ['SugarRecord/Source/Reactive/*.{swift}', 'SugarRecord/Source/Realm/Reactive/**/*.{swift}']
      spp.exclude_files = ['SugarRecord/Source/Reactive/Rx/**/*.{swift}']
      rac_dependencies(spp)
    end
  end
end
<commit_msg>Replaced methods by lambdas<commit_after>Pod::Spec.new do |s|
  s.name             = "SugarRecord"
  s.version          = "2.1.8"
  s.summary          = "CoreData wrapper written on Swift"
  s.homepage         = "https://github.com/pepibumur/SugarRecord"
  s.license          = 'MIT'
  s.author           = { "Pedro" => "<EMAIL>" }
  s.source           = { :git => "https://github.com/pepibumur/SugarRecord.git", :tag => s.version.to_s }
  s.social_media_url = 'https://twitter.com/pepibumur'
  s.requires_arc = true

  s.tvos.deployment_target = '9.0'
  s.ios.deployment_target = "8.0"
  s.osx.deployment_target = "10.10"
  s.watchos.deployment_target = "2.0"
  s.tvos.deployment_target = '9.0'

  s.subspec "Foundation" do |sp|
    sp.source_files = ['SugarRecord/Source/Foundation/**/*.{swift}']
    sp.exclude_files = ['SugarRecord/Source/Reactive/**/*.{swift}']
    sp.dependency "Result", "~> 1.0"
  end

  rx_dependencies = lambda do |spec|
    spec.dependency 'RxSwift', '~> 2.0.0'
    spec.dependency 'RxCocoa', '~> 2.0.0'
    spec.dependency 'RxBlocking', '~> 2.0.0'
  end

  rac_dependencies = lambda do |spec|
    spec.dependency "ReactiveCocoa", "4.0.0-RC.1"
  end
  
  s.subspec "CoreData" do |sp|
    sp.source_files = ['SugarRecord/Source/CoreData/**/*.{swift}']
    sp.exclude_files = ['SugarRecord/Source/CoreData/Reactive/**/*.{swift}']
    sp.dependency 'SugarRecord/Foundation'
    sp.frameworks = ['CoreData']

    sp.subspec "Rx" do |spp|
      spp.source_files = ['SugarRecord/Source/Reactive/*.{swift}', 'SugarRecord/Source/CoreData/Reactive/**/*.{swift}']
      spp.exclude_files = ['SugarRecord/Source/Reactive/ReactiveCocoa/**/*.{swift}']
      rx_dependencies.call(spp)
    end

    sp.subspec "ReactiveCocoa" do |spp|
      spp.source_files = ['SugarRecord/Source/Reactive/*.{swift}', 'SugarRecord/Source/CoreData/Reactive/**/*.{swift}']
      spp.exclude_files = ['SugarRecord/Source/Reactive/Rx/**/*.{swift}']
      rac_dependencies.call(spp)
    end
  end

  s.subspec "Realm" do |sp|
    sp.source_files = ['SugarRecord/Source/Realm/**/*.{swift}']
    sp.exclude_files = ['SugarRecord/Source/Realm/Reactive/**/*.{swift}']
    sp.dependency 'SugarRecord/Foundation'
    sp.dependency "RealmSwift", "~> 0.97"

    sp.subspec "Rx" do |spp|
      spp.source_files = ['SugarRecord/Source/Reactive/*.{swift}', 'SugarRecord/Source/Realm/Reactive/**/*.{swift}']
      spp.exclude_files = ['SugarRecord/Source/Reactive/ReactiveCocoa/**/*.{swift}']
      rx_dependencies.call(spp)
    end

    sp.subspec "ReactiveCocoa" do |sp|
      spp.source_files = ['SugarRecord/Source/Reactive/*.{swift}', 'SugarRecord/Source/Realm/Reactive/**/*.{swift}']
      spp.exclude_files = ['SugarRecord/Source/Reactive/Rx/**/*.{swift}']
      rac_dependencies.call(spp)
    end
  end
end

{'fraction_non_alphanumeric': 0.18309859154929578, 'fraction_numerical': 0.011917659804983749, 'mean_word_length': 3.170933734939759, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 6, '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': '5173595', 'n_tokens_mistral': 2218, 'n_tokens_neox': 2097, 'n_words': 289}