<commit_before>module Instapusher
  class Engine < Rails::Engine

    rake_tasks do
      require 'net/http'
      require 'uri'
      require 'multi_json'

      HPUSHER_URL = 'http://192.168.127.12/heroku'

      desc "pushes to heroku"
      task :push2heroku do
        branch_name = Git.new.current_branch
        project_name = File.basename(Dir.getwd)

        response = Net::HTTP.post_form(URI.parse(HPUSHER_URL), { project: project_name, branch: branch_name, 'options[callbacks]' => ENV['CALLBACKS']})

        if response.code == '200'
          tmp = MultiJson.load(response.body)
          puts 'The appliction will be deployed to: ' +  tmp['heroku_url']
          puts 'Monitor the job status at: ' +  tmp['status']
        else
          puts 'Something has gone wrong'
        end
      end
    end

  end
end
<commit_msg>more debugging messages<commit_after>module Instapusher
  class Engine < Rails::Engine

    rake_tasks do
      require 'net/http'
      require 'uri'
      require 'multi_json'


      desc "pushes to heroku"
      task :push2heroku do

        if ENV['LOCAL']
          URL = 'http://localhost:3000/heroku'
        else
          URL = 'http://192.168.127.12/heroku'
        end

        branch_name = Git.new.current_branch
        project_name = File.basename(Dir.getwd)

        puts "project: #{project_name}"
        puts "branch: #{branch_name}"
        puts "URL: #{URL}"

        response = Net::HTTP.post_form(URI.parse(URL), { project: project_name, branch: branch_name, 'options[callbacks]' => ENV['CALLBACKS']})

        if response.code == '200'
          tmp = MultiJson.load(response.body)
          puts 'The appliction will be deployed to: ' +  tmp['heroku_url']
          puts 'Monitor the job status at: ' +  tmp['status']
        else
          puts 'Something has gone wrong'
        end
      end
    end

  end
end

{'fraction_non_alphanumeric': 0.10969116080937168, 'fraction_numerical': 0.01810436634717785, 'mean_word_length': 2.267826086956522, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6929075', 'n_tokens_mistral': 611, 'n_tokens_neox': 578, 'n_words': 147}