<commit_before>#
# Cookbook Name:: knotx
# Resource:: knotx_instance
#
# Copyright 2016 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

class Chef
  class Resource
    class KnotxInstance < Chef::Resource
      provides :knotx_instance

      attr_accessor :installed
      attr_accessor :reconfigured
      attr_accessor :download_path
      attr_accessor :install_path
      attr_accessor :install_dir
      attr_accessor :app_config_path
      attr_accessor :app_config_extra
      attr_accessor :full_id
      attr_accessor :log_dir
      attr_accessor :checksum
      attr_accessor :source
      attr_accessor :filename

      # JVM opts
      attr_accessor :jvm_config_path
      attr_accessor :min_heap
      attr_accessor :max_heap
      attr_accessor :max_permsize
      attr_accessor :code_cache
      attr_accessor :extra_opts
      attr_accessor :jmx_ip
      attr_accessor :jmx_port
      attr_accessor :debug_port
      attr_accessor :port
      attr_accessor :jmx_enabled
      attr_accessor :debug_enabled

      # GIT opts
      attr_accessor :git_enabled
      attr_accessor :git_dir
      attr_accessor :git_url
      attr_accessor :git_user
      attr_accessor :git_pass
      attr_accessor :git_revision

      # SOURCE opts
      attr_accessor :knotx_init
      attr_accessor :knotx_conf
      attr_accessor :config_json
      attr_accessor :logback_xml

      def initialize(id, run_context = nil)
        super

        @resource_name = :knotx_instance
        @allowed_actions = :install
        @action = :install

        @id = name
        @version = '1.1.2'
        @source = nil
        @install_dir = nil
        @log_dir = nil
      end

      def id(arg = nil)
        set_or_return(:id, arg, :kind_of => String)
      end<commit_msg>attr_accessors updated<commit_after>#
# Cookbook Name:: knotx
# Resource:: knotx_instance
#
# Copyright 2016 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

class Chef
  class Resource
    class KnotxInstance < Chef::Resource
      provides :knotx_instance

      attr_accessor :installed
      attr_accessor :reconfigured
      attr_accessor :download_path
      attr_accessor :install_path
      attr_accessor :install_dir
      attr_accessor :app_config_path
      attr_accessor :app_config_extra
      attr_accessor :full_id
      attr_accessor :log_dir
      attr_accessor :checksum
      attr_accessor :source
      attr_accessor :filename

      # JVM opts
      attr_accessor :jvm_config_path
      attr_accessor :min_heap
      attr_accessor :max_heap
      attr_accessor :max_permsize
      attr_accessor :code_cache
      attr_accessor :extra_opts
      attr_accessor :jmx_ip
      attr_accessor :jmx_port
      attr_accessor :debug_port
      attr_accessor :port
      attr_accessor :jmx_enabled
      attr_accessor :debug_enabled

      # GIT opts
      attr_accessor :git_enabled
      attr_accessor :git_dir
      attr_accessor :git_url
      attr_accessor :git_user
      attr_accessor :git_pass
      attr_accessor :git_revision

      # SOURCE opts
      attr_accessor :knotx_init_cookbook
      attr_accessor :knotx_init_path
      attr_accessor :knotx_conf_cookbook
      attr_accessor :knotx_conf_path
      attr_accessor :config_json_cookbook
      attr_accessor :config_json_path
      attr_accessor :logback_xml_cookbook
      attr_accessor :logback_xml_path

      def initialize(id, run_context = nil)
        super

        @resource_name = :knotx_instance
        @allowed_actions = :install
        @action = :install

        @id = name
        @version = '1.1.2'
        @source = nil
        @install_dir = nil
        @log_dir = nil
      end

      def id(arg = nil)
        set_or_return(:id, arg, :kind_of => String)
      end
{'fraction_non_alphanumeric': 0.055637513171759745, 'fraction_numerical': 0.004636459430979979, 'mean_word_length': 2.871125611745514, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4211502', 'n_tokens_mistral': 1468, 'n_tokens_neox': 1433, 'n_words': 408}