<commit_before># encoding: UTF-8

require 'gooddata/models/profile'
require 'gooddata/models/domain'
require 'gooddata/models/project'

describe 'GoodData::Schedule::Params' do
  before(:all) do
    @deploy_dir = File.join(File.dirname(__FILE__), '..', '..', 'data/cc')
    @graph_path = 'graph.grf'

    @client = ConnectionHelper.create_default_connection
    @project = ProjectHelper.get_default_project

    @process = @project.deploy_process('./spec/data/cc/graph/graph.grf',
                                       type: 'GRAPH',
                                       name: 'Test ETL Process')
  end

  after(:all) do
    @client.disconnect
  end

  describe 'params' do
    it 'Works with params' do
      params = {
        :test => '1234'
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, params: params)
      expect(res).to be_true
    end

    it 'Works with nested params' do
      params = {
        :test => '1234',
        :nested => {
          :name => 'joe'
        }
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, params: params)
      expect(res).to be_true
    end

    it 'Works with array in params' do
      params = {
        :test => '1234',
        :array => [1, 2, 3, 4, 5]
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, params: params)
      expect(res).to be_true
    end
  end

  describe 'hiddenParams' do
    it 'Works with hiddenParams' do
      params = {
        :test => '1234'
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, hiddenParams: params)
      expect(res).to be_true
    end

    it 'Works with nested hiddenParams' do
      params = {
        :test => '1234',
        :nested => {
          :name => 'joe'
        }
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, hiddenParams: params)
      expect(res).to be_true
    end

    it 'Works with array in hiddenParams' do
      params = {
        :test => '1234',
        :array => [1, 2, 3, 4, 5]
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, hiddenParams: params)
      expect(res).to be_true
    end
  end
end<commit_msg>Delete stuff generated during params_spec.rb<commit_after># encoding: UTF-8

require 'gooddata/models/profile'
require 'gooddata/models/domain'
require 'gooddata/models/project'

describe 'GoodData::Schedule::Params' do
  before(:all) do
    @deploy_dir = File.join(File.dirname(__FILE__), '..', '..', 'data/cc')
    @graph_path = 'graph.grf'

    @client = ConnectionHelper.create_default_connection
    @project = ProjectHelper.get_default_project

    @process = @project.deploy_process('./spec/data/cc/graph/graph.grf',
                                       type: 'GRAPH',
                                       name: 'Test ETL Process')
  end

  after(:all) do
    @process.delete
    @client.disconnect
  end

  describe 'params' do
    it 'Works with params' do
      params = {
        :test => '1234'
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, params: params)
      expect(res).to be_true
      res.delete
    end

    it 'Works with nested params' do
      params = {
        :test => '1234',
        :nested => {
          :name => 'joe'
        }
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, params: params)
      expect(res).to be_true
      res.delete
    end

    it 'Works with array in params' do
      params = {
        :test => '1234',
        :array => [1, 2, 3, 4, 5]
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, params: params)
      expect(res).to be_true
      res.delete
    end
  end

  describe 'hiddenParams' do
    it 'Works with hiddenParams' do
      params = {
        :test => '1234'
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, hiddenParams: params)
      expect(res).to be_true
      res.delete
    end

    it 'Works with nested hiddenParams' do
      params = {
        :test => '1234',
        :nested => {
          :name => 'joe'
        }
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, hiddenParams: params)
      expect(res).to be_true
      res.delete
    end

    it 'Works with array in hiddenParams' do
      params = {
        :test => '1234',
        :array => [1, 2, 3, 4, 5]
      }

      res = @process.create_schedule("0 12 * * *", @graph_path, hiddenParams: params)
      expect(res).to be_true
      res.delete
    end
  end
end
{'fraction_non_alphanumeric': 0.1336446519902157, 'fraction_numerical': 0.023571269735379142, 'mean_word_length': 2.014745308310992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4716103', 'n_tokens_mistral': 1545, 'n_tokens_neox': 1412, 'n_words': 352}