summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanila Troschinsky <troschinsky@gmail.com>2017-07-25 11:19:30 +0300
committerDanila <troschinsky@gmail.com>2017-07-25 09:34:46 +0000
commit983230fe86cb2bdbe870d89ef32db64f1d156538 (patch)
treeec51ebe444332cb9be49049566ba61fd0f10f273
parent97e4d12ca277640c2d400c23e0e9906c37ce9c56 (diff)
Import of plugin's codeHEADmaster
Notes
Notes (review): Code-Review+2: Valeriy Ponomaryov <vponomaryov@mirantis.com> Workflow+1: Valeriy Ponomaryov <vponomaryov@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 31 Jul 2017 18:15:56 +0000 Reviewed-on: https://review.openstack.org/486928 Project: openstack/fuel-plugin-sensu Branch: refs/heads/master
-rw-r--r--README.md71
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/check-cpu.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/check-influxdb-query.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/check-influxdb.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/jsonpath22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/metrics-cpu-mpstat.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/metrics-cpu-pcnt-usage.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/metrics-cpu.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/metrics-influxdb.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/metrics-numastat.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/metrics-user-pct-usage.rb22
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/bin/mutator-influxdb-line-protocol.rb22
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/LICENCE.MIT19
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/README.md32
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/cause.gemspec17
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/lib/cause.rb12
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.gitignore11
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.pryrc2
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.travis.yml13
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/CHANGELOG.md141
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Gemfile9
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/README.md297
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Rakefile28
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/dentaku.gemspec27
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku.rb43
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/arithmetic.rb129
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case.rb52
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_conditional.rb23
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_else.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_switch_variable.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_then.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_when.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/combinators.rb36
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/comparators.rb51
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/function.rb73
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/if.rb30
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/max.rb5
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/min.rb5
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/not.rb5
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/round.rb5
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/rounddown.rb7
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/roundup.rb7
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/ruby_math.rb8
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/string_functions.rb111
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/grouping.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/identifier.rb36
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/literal.rb20
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/logical.rb8
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/negation.rb40
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/nil.rb9
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/node.rb17
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/numeric.rb8
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/operation.rb22
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/string.rb8
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/bulk_expression_solver.rb99
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/calculator.rb124
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/dependency_resolver.rb24
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/exceptions.rb25
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/parser.rb222
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/token.rb32
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/token_matcher.rb137
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/token_matchers.rb29
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/token_scanner.rb142
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/tokenizer.rb54
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/version.rb3
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/addition_spec.rb29
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/and_spec.rb32
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/case_spec.rb80
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/division_spec.rb29
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/function_spec.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/node_spec.rb40
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/numeric_spec.rb16
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/string_functions_spec.rb135
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/benchmark.rb70
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/bulk_expression_solver_spec.rb77
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/calculator_spec.rb450
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/dentaku_spec.rb22
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/exceptions_spec.rb9
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/external_function_spec.rb56
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/parser_spec.rb150
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/spec_helper.rb41
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/token_matcher_spec.rb135
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/token_scanner_spec.rb53
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/token_spec.rb10
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/tokenizer_spec.rb212
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/.gitignore23
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/.rubocop.yml35
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/.travis.yml52
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/CHANGELOG.md125
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/Gemfile14
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/LICENSE.txt22
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/README.md687
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/Rakefile51
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/influxdb.gemspec30
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb.rb19
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/client.rb82
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/client/http.rb134
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/config.rb120
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/errors.rb52
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/logging.rb23
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/max_queue.rb18
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/point_value.rb77
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/builder.rb44
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/cluster.rb17
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/continuous_query.rb31
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/core.rb149
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/database.rb22
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/retention_policy.rb34
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/user.rb51
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/version.rb3
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/writer/async.rb127
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/writer/udp.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/smoke/connect-and-get-version.rb18
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/smoke/noaa-sample-data.rb79
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/smoke/provision.sh92
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/async_client_spec.rb58
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_cluster_spec.rb81
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_continuous_query_spec.rb120
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_core_spec.rb36
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_database_spec.rb73
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_retention_policy_spec.rb81
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_series_spec.rb50
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_shard_space_spec.rb105
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_shard_spec.rb43
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_user_spec.rb124
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_with_params_spec.rb69
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/querying_issue_7000_spec.rb89
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/querying_spec.rb265
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/retry_requests_spec.rb104
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/udp_client_spec.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/write_points_spec.rb184
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/client_spec.rb120
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/config_spec.rb127
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/logging_spec.rb51
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/max_queue_spec.rb29
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/point_value_spec.rb89
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/query_builder_spec.rb63
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/worker_spec.rb27
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/spec_helper.rb39
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/.gemtest0
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/.gitignore5
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/.rspec3
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/.travis.yml5
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/Gemfile2
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/README.md132
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/Rakefile12
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/bin/jsonpath22
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/jsonpath.gemspec32
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath.rb93
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath/enumerable.rb135
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath/proxy.rb54
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath/version.rb3
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/test/test_jsonpath.rb231
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/test/test_jsonpath_bin.rb21
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/CHANGES11
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/MANIFEST7
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/README43
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/Rakefile36
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/lib/linux/kstat.rb78
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/linux-kstat.gemspec24
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/test/test_linux_kstat.rb36
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/CHANGELOG.md245
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/CONTRIBUTING.md46
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/LICENSE.md20
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/README.md121
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json.rb161
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb49
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapter_error.rb15
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/gson.rb20
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/jr_jackson.rb25
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb23
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_gem.rb11
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_pure.rb11
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/nsjsonserialization.rb32
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb25
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/ok_json.rb23
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/yajl.rb19
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/convertible_hash_keys.rb43
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/options.rb39
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/options_cache.rb29
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/parse_error.rb17
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/vendor/okjson.rb606
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/version.rb17
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/multi_json.gemspec20
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/CHANGELOG.md47
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/LICENSE22
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/README.md25
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/check-cpu.rb120
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/check-cpu.sh84
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-cpu-mpstat.rb87
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-cpu-pcnt-usage.rb85
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-cpu.rb71
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-numastat.rb58
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-user-pct-usage.rb79
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/lib/sensu-plugins-cpu-checks.rb1
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/lib/sensu-plugins-cpu-checks/version.rb9
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/CHANGELOG.md77
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/LICENSE22
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/README.md108
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/bin/check-influxdb-query.rb197
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/bin/check-influxdb.rb97
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/bin/metrics-influxdb.rb90
-rwxr-xr-xdeployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/bin/mutator-influxdb-line-protocol.rb62
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/lib/sensu-plugins-influxdb.rb1
-rw-r--r--deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/lib/sensu-plugins-influxdb/version.rb9
-rw-r--r--deployment_scripts/puppet/manifests/haproxy.pp47
-rw-r--r--deployment_scripts/puppet/manifests/hiera_override.pp108
-rw-r--r--deployment_scripts/puppet/manifests/influxdb_config.pp8
-rw-r--r--deployment_scripts/puppet/manifests/packages.pp15
-rw-r--r--deployment_scripts/puppet/manifests/rabbitmq_firewall.pp78
-rw-r--r--deployment_scripts/puppet/manifests/rabbitmq_sensu.pp25
-rw-r--r--deployment_scripts/puppet/manifests/redis_haproxy.pp59
-rw-r--r--deployment_scripts/puppet/manifests/redis_sentinel_config.pp8
-rw-r--r--deployment_scripts/puppet/manifests/sensu_config.pp8
-rw-r--r--deployment_scripts/puppet/modules/influxdb_config/manifests/init.pp20
-rw-r--r--deployment_scripts/puppet/modules/redis_sentinel_config/manifests/init.pp19
-rw-r--r--deployment_scripts/puppet/modules/redis_sentinel_config/templates/redis-sentinel.erb77
-rw-r--r--deployment_scripts/puppet/modules/redis_sentinel_config/templates/sentinel.conf.erb6
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/check-cpu.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/check-influxdb-query.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/check-influxdb.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/jsonpath22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/metrics-cpu-mpstat.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/metrics-cpu-pcnt-usage.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/metrics-cpu.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/metrics-influxdb.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/metrics-numastat.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/metrics-user-pct-usage.rb22
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/bin/mutator-influxdb-line-protocol.rb22
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/LICENCE.MIT19
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/README.md32
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/cause.gemspec17
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/lib/cause.rb12
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.gitignore11
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.pryrc2
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.travis.yml13
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/CHANGELOG.md141
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Gemfile9
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/README.md297
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Rakefile28
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/dentaku.gemspec27
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku.rb43
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/arithmetic.rb129
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case.rb52
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_conditional.rb23
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_else.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_switch_variable.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_then.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_when.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/combinators.rb36
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/comparators.rb51
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/function.rb73
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/if.rb30
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/max.rb5
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/min.rb5
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/not.rb5
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/round.rb5
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/rounddown.rb7
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/roundup.rb7
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/ruby_math.rb8
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/string_functions.rb111
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/grouping.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/identifier.rb36
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/literal.rb20
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/logical.rb8
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/negation.rb40
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/nil.rb9
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/node.rb17
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/numeric.rb8
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/operation.rb22
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/string.rb8
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/bulk_expression_solver.rb99
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/calculator.rb124
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/dependency_resolver.rb24
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/exceptions.rb25
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/parser.rb222
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/token.rb32
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/token_matcher.rb137
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/token_matchers.rb29
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/token_scanner.rb142
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/tokenizer.rb54
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/version.rb3
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/addition_spec.rb29
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/and_spec.rb32
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/case_spec.rb80
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/division_spec.rb29
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/function_spec.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/node_spec.rb40
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/numeric_spec.rb16
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/ast/string_functions_spec.rb135
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/benchmark.rb70
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/bulk_expression_solver_spec.rb77
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/calculator_spec.rb450
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/dentaku_spec.rb22
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/exceptions_spec.rb9
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/external_function_spec.rb56
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/parser_spec.rb150
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/spec_helper.rb41
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/token_matcher_spec.rb135
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/token_scanner_spec.rb53
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/token_spec.rb10
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/spec/tokenizer_spec.rb212
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/.gitignore23
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/.rubocop.yml35
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/.travis.yml52
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/CHANGELOG.md125
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/Gemfile14
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/LICENSE.txt22
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/README.md687
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/Rakefile51
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/influxdb.gemspec30
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb.rb19
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/client.rb82
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/client/http.rb134
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/config.rb120
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/errors.rb52
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/logging.rb23
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/max_queue.rb18
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/point_value.rb77
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/builder.rb44
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/cluster.rb17
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/continuous_query.rb31
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/core.rb149
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/database.rb22
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/retention_policy.rb34
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/query/user.rb51
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/version.rb3
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/writer/async.rb127
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/lib/influxdb/writer/udp.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/smoke/connect-and-get-version.rb18
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/smoke/noaa-sample-data.rb79
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/smoke/provision.sh92
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/async_client_spec.rb58
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_cluster_spec.rb81
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_continuous_query_spec.rb120
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_core_spec.rb36
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_database_spec.rb73
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_retention_policy_spec.rb81
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_series_spec.rb50
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_shard_space_spec.rb105
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_shard_spec.rb43
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_user_spec.rb124
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/query_with_params_spec.rb69
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/querying_issue_7000_spec.rb89
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/querying_spec.rb265
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/retry_requests_spec.rb104
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/udp_client_spec.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/cases/write_points_spec.rb184
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/client_spec.rb120
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/config_spec.rb127
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/logging_spec.rb51
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/max_queue_spec.rb29
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/point_value_spec.rb89
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/query_builder_spec.rb63
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/influxdb/worker_spec.rb27
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/influxdb-0.3.13/spec/spec_helper.rb39
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/.gemtest0
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/.gitignore5
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/.rspec3
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/.travis.yml5
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/Gemfile2
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/README.md132
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/Rakefile12
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/bin/jsonpath22
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/jsonpath.gemspec32
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath.rb93
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath/enumerable.rb135
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath/proxy.rb54
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath/version.rb3
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/test/test_jsonpath.rb231
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/jsonpath-0.5.8/test/test_jsonpath_bin.rb21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/CHANGES11
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/MANIFEST7
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/README43
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/Rakefile36
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/lib/linux/kstat.rb78
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/linux-kstat.gemspec24
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/linux-kstat-0.1.3-universal-linux/test/test_linux_kstat.rb36
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/CHANGELOG.md245
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/CONTRIBUTING.md46
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/LICENSE.md20
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/README.md121
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json.rb161
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb49
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapter_error.rb15
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/gson.rb20
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/jr_jackson.rb25
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb23
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_gem.rb11
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_pure.rb11
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/nsjsonserialization.rb32
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb25
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/ok_json.rb23
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/yajl.rb19
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/convertible_hash_keys.rb43
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/options.rb39
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/options_cache.rb29
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/parse_error.rb17
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/vendor/okjson.rb606
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/lib/multi_json/version.rb17
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/multi_json-1.12.1/multi_json.gemspec20
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/CHANGELOG.md47
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/LICENSE22
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/README.md25
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/check-cpu.rb120
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/check-cpu.sh84
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-cpu-mpstat.rb87
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-cpu-pcnt-usage.rb85
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-cpu.rb71
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-numastat.rb58
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/bin/metrics-user-pct-usage.rb79
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/lib/sensu-plugins-cpu-checks.rb1
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-cpu-checks-1.0.0/lib/sensu-plugins-cpu-checks/version.rb9
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/CHANGELOG.md77
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/LICENSE22
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/README.md108
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/bin/check-influxdb-query.rb197
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/bin/check-influxdb.rb97
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/bin/metrics-influxdb.rb90
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/bin/mutator-influxdb-line-protocol.rb62
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/lib/sensu-plugins-influxdb.rb1
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-influxdb-1.1.0/lib/sensu-plugins-influxdb/version.rb9
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/specifications/cause-0.1.gemspec21
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/specifications/dentaku-2.0.9.gemspec39
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/specifications/influxdb-0.3.13.gemspec50
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/specifications/jsonpath-0.5.8.gemspec52
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/specifications/multi_json-1.12.1.gemspec33
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/files/embedded/lib/ruby/gems/2.3.0/specifications/sensu-plugins-influxdb-1.1.0.gemspec73
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/manifests/init.pp116
-rwxr-xr-xdeployment_scripts/puppet/modules/sensu_config/templates/redis-sentinel.erb47
-rw-r--r--deployment_scripts/puppet/modules/sensu_config/templates/sentinel.conf.erb6
-rw-r--r--deployment_tasks.yaml126
-rw-r--r--environment_config.yaml14
-rw-r--r--metadata.yaml20
-rw-r--r--network_roles.yaml12
-rw-r--r--repositories/centos/.gitkeep0
-rw-r--r--repositories/ubuntu/.gitkeep0
439 files changed, 26248 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ab77e97
--- /dev/null
+++ b/README.md
@@ -0,0 +1,71 @@
1Sensu plugin for Fuel
2=================================
3
4Overview
5--------
6
7Sensu plugin for Fuel extends Mirantis OpenStack functionality by adding
8Sensu monitoring. It can be deployed on hosts with Stacklight plugins roles.
9Sensu plugin is 100% hot-pluggable.
10
11
12Compatible Fuel versions
13------------------------
14
159.0
16
17
18User Guide
19----------
20
211. Create an environment or open existing. In case of new environment select new nodes
22 with LMA Stacklights roles
232. Enable the plugin on the Settings/Other tab of the Fuel web UI and fill in form
24 fields:
25 * in development
26
273. Deploy the environment.
28
29
30Installation Guide
31==================
32
33Sensu Plugin for Fuel installation
34----------------------------------------------
35
36To install Sensu plugin, follow these steps:
37
381. Download the plugin
39 git clone https://github.com/openstack/fuel-plugin-sensu
40
412. Copy the plugin on already installed Fuel Master node; ssh can be used for
42 that. If you do not have the Fuel Master node yet, see
43 [Quick Start Guide](https://software.mirantis.com/quick-start/):
44
45 # scp fuel-plugin-sensu-0.1.1-1.noarch.rpm root@<Fuel_master_ip>:/tmp
46
473. Log into the Fuel Master node. Install the plugin:
48
49 # cd /tmp
50 # fuel plugins --install fuel-plugin-sensu-0.1.1-1.noarch.rpm
51
524. Check if the plugin was installed successfully:
53
54 # fuel plugins
55 id | name | version | package_version
56 ---|---------------------------------|---------|----------------
57 1 | fuel-plugin-sensu | 0.1.1 | 4.0.0
58
59
60Requirements
61------------
62
63| Requirement | Version/Comment |
64|:---------------------------------|:----------------|
65| Mirantis OpenStack compatibility | 9.0 |
66
67
68Limitations
69-----------
70
71This plugin can be used only with Stacklight LMA nodes
diff --git a/deployment_scripts/puppet/files/embedded/bin/check-cpu.rb b/deployment_scripts/puppet/files/embedded/bin/check-cpu.rb
new file mode 100755
index 0000000..5c7cf07
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/check-cpu.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-cpu-checks' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-cpu-checks', 'check-cpu.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/check-influxdb-query.rb b/deployment_scripts/puppet/files/embedded/bin/check-influxdb-query.rb
new file mode 100755
index 0000000..dd971cb
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/check-influxdb-query.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-influxdb' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-influxdb', 'check-influxdb-query.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/check-influxdb.rb b/deployment_scripts/puppet/files/embedded/bin/check-influxdb.rb
new file mode 100755
index 0000000..9da41d2
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/check-influxdb.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-influxdb' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-influxdb', 'check-influxdb.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/jsonpath b/deployment_scripts/puppet/files/embedded/bin/jsonpath
new file mode 100755
index 0000000..c81fc85
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/jsonpath
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'jsonpath' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('jsonpath', 'jsonpath', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/metrics-cpu-mpstat.rb b/deployment_scripts/puppet/files/embedded/bin/metrics-cpu-mpstat.rb
new file mode 100755
index 0000000..d62ddee
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/metrics-cpu-mpstat.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-cpu-checks' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-cpu-checks', 'metrics-cpu-mpstat.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/metrics-cpu-pcnt-usage.rb b/deployment_scripts/puppet/files/embedded/bin/metrics-cpu-pcnt-usage.rb
new file mode 100755
index 0000000..86e8c9e
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/metrics-cpu-pcnt-usage.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-cpu-checks' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-cpu-checks', 'metrics-cpu-pcnt-usage.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/metrics-cpu.rb b/deployment_scripts/puppet/files/embedded/bin/metrics-cpu.rb
new file mode 100755
index 0000000..beb9f4e
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/metrics-cpu.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-cpu-checks' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-cpu-checks', 'metrics-cpu.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/metrics-influxdb.rb b/deployment_scripts/puppet/files/embedded/bin/metrics-influxdb.rb
new file mode 100755
index 0000000..51c0a75
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/metrics-influxdb.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-influxdb' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-influxdb', 'metrics-influxdb.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/metrics-numastat.rb b/deployment_scripts/puppet/files/embedded/bin/metrics-numastat.rb
new file mode 100755
index 0000000..eed5bc5
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/metrics-numastat.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-cpu-checks' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-cpu-checks', 'metrics-numastat.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/metrics-user-pct-usage.rb b/deployment_scripts/puppet/files/embedded/bin/metrics-user-pct-usage.rb
new file mode 100755
index 0000000..a5fd00d
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/metrics-user-pct-usage.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-cpu-checks' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-cpu-checks', 'metrics-user-pct-usage.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/bin/mutator-influxdb-line-protocol.rb b/deployment_scripts/puppet/files/embedded/bin/mutator-influxdb-line-protocol.rb
new file mode 100755
index 0000000..d2742db
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/bin/mutator-influxdb-line-protocol.rb
@@ -0,0 +1,22 @@
1#!/opt/sensu/embedded/bin/ruby
2#
3# This file was generated by RubyGems.
4#
5# The application 'sensu-plugins-influxdb' is installed as part of a gem, and
6# this file is here to facilitate running it.
7#
8
9require 'rubygems'
10
11version = ">= 0.a"
12
13if ARGV.first
14 str = ARGV.first
15 str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
16 if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
17 version = $1
18 ARGV.shift
19 end
20end
21
22load Gem.activate_bin_path('sensu-plugins-influxdb', 'mutator-influxdb-line-protocol.rb', version)
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/LICENCE.MIT b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/LICENCE.MIT
new file mode 100644
index 0000000..381d9cf
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/LICENCE.MIT
@@ -0,0 +1,19 @@
1Copyright (c) 2013 Conrad Irwin <conrad@bugsnag.com>
2
3Permission is hereby granted, free of charge, to any person obtaining a copy
4of this software and associated documentation files (the "Software"), to deal
5in the Software without restriction, including without limitation the rights
6to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7copies of the Software, and to permit persons to whom the Software is
8furnished to do so, subject to the following conditions:
9
10The above copyright notice and this permission notice shall be included in
11all copies or substantial portions of the Software.
12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19THE SOFTWARE.
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/README.md b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/README.md
new file mode 100644
index 0000000..1ddb52e
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/README.md
@@ -0,0 +1,32 @@
1This is a back-port of Ruby 2.1.0's [`Exception#cause`](http://www.ruby-doc.org/core-2.1.0/Exception.html#method-i-cause) to older versions of Ruby.
2
3Installation
4------------
5
6Add `gem 'cause'` to your `Gemfile`, then run `bundle install`. If you're not
7using bundler, then just `gem install cause`.
8
9Usage
10-----
11
12Just continue programming as normal. When you rescue from exceptions they'll
13have a third property, cause, in addition to backtrace and message. The cause
14is the exception object that was being handled when the error was raised.
15
16While this is not directly useful in normal programming, it's very useful for
17debugging. Exception trackers like [Bugsnag](https://bugsnag.com/) can then pick up
18the cause of the exception to help you find out what went wrong.
19
20Limitations
21-----------
22
23At the moment you cannot set the cause yourself. Overriding `raise` is hairy
24business and I wrote this gem late at night, but with sufficient care it's
25probably doable.
26
27Meta-fu
28-------
29
30This gem is Copyright under the MIT licence. See LICENCE.MIT for details.
31
32Contributions and bug-reports are welcome.
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/cause.gemspec b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/cause.gemspec
new file mode 100644
index 0000000..0a1d6da
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/cause.gemspec
@@ -0,0 +1,17 @@
1Gem::Specification.new do |gem|
2 gem.name = 'cause'
3 gem.version = '0.1'
4
5 gem.summary = 'A backport of Exception#cause from Ruby 2.1.0'
6 gem.description = "Allows you access to the error that was being handled when this exception was raised."
7
8 gem.authors = ['Conrad Irwin']
9 gem.email = %w(conrad@bugsnag.com)
10 gem.homepage = 'http://github.com/ConradIrwin/cause'
11
12 gem.license = 'MIT'
13
14 gem.required_ruby_version = '>= 1.8.7'
15
16 gem.files = `git ls-files`.split("\n")
17end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/lib/cause.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/lib/cause.rb
new file mode 100644
index 0000000..0c3394c
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/cause-0.1/lib/cause.rb
@@ -0,0 +1,12 @@
1class Exception
2 unless method_defined?(:cause)
3 attr_reader :cause
4
5 alias old_initialize initialize
6
7 def initialize(*a)
8 @cause = $!
9 old_initialize(*a)
10 end
11 end
12end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.gitignore b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.gitignore
new file mode 100644
index 0000000..6a0a948
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.gitignore
@@ -0,0 +1,11 @@
1*.gem
2.bundle
3.rbenv-version
4Gemfile.lock
5bin/*
6pkg/*
7vendor/*
8
9/.ruby-gemset
10/.ruby-version
11/.rspec
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.pryrc b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.pryrc
new file mode 100644
index 0000000..562c9c5
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.pryrc
@@ -0,0 +1,2 @@
1require "bundler"
2Bundler.require
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.travis.yml b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.travis.yml
new file mode 100644
index 0000000..45b8912
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/.travis.yml
@@ -0,0 +1,13 @@
1language: ruby
2sudo: false
3rvm:
4 - 1.9.3
5 - 2.0.0
6 - 2.1.0
7 - 2.1.1
8 - 2.2.0
9 - 2.2.1
10 - 2.2.2
11 - 2.2.3
12 - 2.3.0
13 - rbx-2
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/CHANGELOG.md b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/CHANGELOG.md
new file mode 100644
index 0000000..61f36cb
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/CHANGELOG.md
@@ -0,0 +1,141 @@
1# Change Log
2
3## [v2.0.9] 2016-09-19
4- namespace tokenization errors
5- automatically coerce arguments to string functions as strings
6- selectively disable or clear AST cache
7
8## [v2.0.8] 2016-05-10
9- numeric input validations
10- fail with gem-specific error for invalid arithmetic operands
11- add `LEFT`, `RIGHT`, `MID`, `LEN`, `FIND`, `SUBSTITUTE`, and `CONCAT` string functions
12
13## [v2.0.7] 2016-02-25
14- fail with gem-specific error for parsing issues
15- support NULL literals and nil variables
16- keep reference to variable that caused failure when bulk-solving
17
18## [v2.0.6] 2016-01-26
19- support array parameters for external functions
20- support case statements
21- support precision for `ROUNDUP` and `ROUNDDOWN` functions
22- prevent errors from corrupting calculator memory
23
24## [v2.0.5] 2015-09-03
25- fix bug with detecting unbound nodes
26- silence warnings
27- allow registration of custom token scanners
28
29## [v2.0.4] 2015-09-03
30- fix BigDecimal conversion bug
31- add caching for bulk expression solving dependency order
32- allow for custom configuration for token scanners
33
34## [v2.0.3] 2015-08-25
35- bug fixes
36- performance enhancements
37- code cleanup
38
39## [v2.0.1] 2015-08-15
40- add support for boolean literals
41- implement basic parse-time type checking
42
43## [v2.0.0] 2015-08-07
44- shunting-yard parser for performance enhancement and AST generation
45- AST caching for performance enhancement
46- support comments in formulas
47- support all functions from the Ruby Math module
48
49## [v1.2.6] 2015-05-30
50- support custom error handlers for systems of formulas
51
52## [v1.2.5] 2015-05-23
53- fix memory leak
54
55## [v1.2.2] 2014-12-19
56- performance enhancements
57- unary minus bug fixes
58- preserve provided hash keys for systems of formulas
59
60## [v1.2.0] 2014-10-21
61- add dependency resolution to automatically solve systems of formulas
62
63## [v1.1.0] 2014-07-30
64- add strict evaluation mode to raise `UnboundVariableError` if not all variable values are provided
65- return division results as `BigDecimal` values
66
67## [v1.0.0] 2014-03-06
68- cleanup and 1.0 release
69
70## [v0.2.14] 2014-01-24
71- add modulo operator
72- add unary percentage operator
73- support registration of custom functions at runtime
74
75## [v0.2.10] 2012-12-10
76- return integer result for exact division, decimal otherwise
77
78## [v0.2.9] 2012-10-17
79- add `ROUNDUP` / `ROUNDDOWN` functions
80
81## [v0.2.8] 2012-09-30
82- make function name matching case-insensitive
83
84## [v0.2.7] 2012-09-26
85- support passing arbitrary expressions as function arguments
86
87## [v0.2.6] 2012-09-19
88- add `NOT` function
89
90## [v0.2.5] 2012-06-20
91- add exponent operator
92- add support for digits in variable identifiers
93
94## [v0.2.4] 2012-02-29
95- add support for `min < x < max` syntax for inequality ranges
96
97## [v0.2.2] 2012-02-22
98- support `ROUND` to arbitrary decimal place on older Rubies
99- ensure case is preserved for string values
100
101## [v0.2.1] 2012-02-12
102- add `ROUND` function
103
104## [v0.1.3] 2012-01-31
105- add support for string datatype
106
107## [v0.1.1] 2012-01-24
108- change from square bracket to parentheses for top-level evaluation
109- add `IF` function
110
111## [v0.1.0] 2012-01-20
112- initial release
113
114[v2.0.9]: https://github.com/rubysolo/dentaku/compare/v2.0.8...v2.0.9
115[v2.0.8]: https://github.com/rubysolo/dentaku/compare/v2.0.7...v2.0.8
116[v2.0.7]: https://github.com/rubysolo/dentaku/compare/v2.0.6...v2.0.7
117[v2.0.6]: https://github.com/rubysolo/dentaku/compare/v2.0.5...v2.0.6
118[v2.0.5]: https://github.com/rubysolo/dentaku/compare/v2.0.4...v2.0.5
119[v2.0.4]: https://github.com/rubysolo/dentaku/compare/v2.0.3...v2.0.4
120[v2.0.3]: https://github.com/rubysolo/dentaku/compare/v2.0.1...v2.0.3
121[v2.0.1]: https://github.com/rubysolo/dentaku/compare/v2.0.0...v2.0.1
122[v2.0.0]: https://github.com/rubysolo/dentaku/compare/v1.2.6...v2.0.0
123[v1.2.6]: https://github.com/rubysolo/dentaku/compare/v1.2.5...v1.2.6
124[v1.2.5]: https://github.com/rubysolo/dentaku/compare/v1.2.2...v1.2.5
125[v1.2.2]: https://github.com/rubysolo/dentaku/compare/v1.2.0...v1.2.2
126[v1.2.0]: https://github.com/rubysolo/dentaku/compare/v1.1.0...v1.2.0
127[v1.1.0]: https://github.com/rubysolo/dentaku/compare/v1.0.0...v1.1.0
128[v1.0.0]: https://github.com/rubysolo/dentaku/compare/v0.2.14...v1.0.0
129[v0.2.14]: https://github.com/rubysolo/dentaku/compare/v0.2.10...v0.2.14
130[v0.2.10]: https://github.com/rubysolo/dentaku/compare/v0.2.9...v0.2.10
131[v0.2.9]: https://github.com/rubysolo/dentaku/compare/v0.2.8...v0.2.9
132[v0.2.8]: https://github.com/rubysolo/dentaku/compare/v0.2.7...v0.2.8
133[v0.2.7]: https://github.com/rubysolo/dentaku/compare/v0.2.6...v0.2.7
134[v0.2.6]: https://github.com/rubysolo/dentaku/compare/v0.2.5...v0.2.6
135[v0.2.5]: https://github.com/rubysolo/dentaku/compare/v0.2.4...v0.2.5
136[v0.2.4]: https://github.com/rubysolo/dentaku/compare/v0.2.2...v0.2.4
137[v0.2.2]: https://github.com/rubysolo/dentaku/compare/v0.2.1...v0.2.2
138[v0.2.1]: https://github.com/rubysolo/dentaku/compare/v0.1.3...v0.2.1
139[v0.1.3]: https://github.com/rubysolo/dentaku/compare/v0.1.1...v0.1.3
140[v0.1.1]: https://github.com/rubysolo/dentaku/compare/v0.1.0...v0.1.1
141[v0.1.0]: https://github.com/rubysolo/dentaku/commit/68724fd9c8fa637baf7b9d5515df0caa31e226bd
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Gemfile b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Gemfile
new file mode 100644
index 0000000..5a20cac
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Gemfile
@@ -0,0 +1,9 @@
1source "http://rubygems.org"
2
3# Specify your gem's dependencies in dentaku.gemspec
4gemspec
5
6if RUBY_VERSION.to_f >= 2.0 && RUBY_ENGINE == 'ruby'
7 gem 'pry-byebug'
8 gem 'pry-stack_explorer'
9end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/README.md b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/README.md
new file mode 100644
index 0000000..b8c485e
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/README.md
@@ -0,0 +1,297 @@
1Dentaku
2=======
3
4[![Join the chat at https://gitter.im/rubysolo/dentaku](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/rubysolo/dentaku?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5[![Gem Version](https://badge.fury.io/rb/dentaku.png)](http://badge.fury.io/rb/dentaku)
6[![Build Status](https://travis-ci.org/rubysolo/dentaku.png?branch=master)](https://travis-ci.org/rubysolo/dentaku)
7[![Code Climate](https://codeclimate.com/github/rubysolo/dentaku.png)](https://codeclimate.com/github/rubysolo/dentaku)
8[![Hakiri](https://hakiri.io/github/rubysolo/dentaku/master.svg)](https://hakiri.io/github/rubysolo/dentaku)
9
10DESCRIPTION
11-----------
12
13Dentaku is a parser and evaluator for a mathematical and logical formula
14language that allows run-time binding of values to variables referenced in the
15formulas. It is intended to safely evaluate untrusted expressions without
16opening security holes.
17
18EXAMPLE
19-------
20
21This is probably simplest to illustrate in code:
22
23```ruby
24calculator = Dentaku::Calculator.new
25calculator.evaluate('10 * 2')
26#=> 20
27```
28
29Okay, not terribly exciting. But what if you want to have a reference to a
30variable, and evaluate it at run-time? Here's how that would look:
31
32```ruby
33calculator.evaluate('kiwi + 5', kiwi: 2)
34#=> 7
35```
36
37You can also store the variable values in the calculator's memory and then
38evaluate expressions against those stored values:
39
40```ruby
41calculator.store(peaches: 15)
42calculator.evaluate('peaches - 5')
43#=> 10
44calculator.evaluate('peaches >= 15')
45#=> true
46```
47
48For maximum CS geekery, `bind` is an alias of `store`.
49
50Dentaku understands precedence order and using parentheses to group expressions
51to ensure proper evaluation:
52
53```ruby
54calculator.evaluate('5 + 3 * 2')
55#=> 11
56calculator.evaluate('(5 + 3) * 2')
57#=> 16
58```
59
60The `evaluate` method will return `nil` if there is an error in the formula.
61If this is not the desired behavior, use `evaluate!`, which will raise an
62exception.
63
64```ruby
65calculator.evaluate('10 * x')
66#=> nil
67calculator.evaluate!('10 * x')
68Dentaku::UnboundVariableError: Dentaku::UnboundVariableError
69```
70
71Dentaku has built-in functions (including `if`, `not`, `min`, `max`, and
72`round`) and the ability to define custom functions (see below). Functions
73generally work like their counterparts in Excel:
74
75```ruby
76calculator.evaluate('if (pears < 10, 10, 20)', pears: 5)
77#=> 10
78calculator.evaluate('if (pears < 10, 10, 20)', pears: 15)
79#=> 20
80```
81
82`round` can be called with or without the number of decimal places:
83
84```ruby
85calculator.evaluate('round(8.2)')
86#=> 8
87calculator.evaluate('round(8.2759, 2)')
88#=> 8.28
89```
90
91`round` follows rounding rules, while `roundup` and `rounddown` are `ceil` and
92`floor`, respectively.
93
94If you're too lazy to be building calculator objects, there's a shortcut just
95for you:
96
97```ruby
98Dentaku('plums * 1.5', plums: 2)
99#=> 3.0
100```
101
102PERFORMANCE
103-----------
104
105The flexibility and safety of Dentaku don't come without a price. Tokenizing a
106string, parsing to an AST, and then evaluating that AST are about 2 orders of
107magnitude slower than doing the same math in pure Ruby!
108
109The good news is that most of the time is spent in the tokenization and parsing
110phases, so if performance is a concern, you can enable AST caching:
111
112```ruby
113Dentaku.enable_ast_cache!
114```
115
116After this, Dentaku will cache the AST of each formula that it evaluates, so
117subsequent evaluations (even with different values for variables) will be much
118faster -- closer to 4x native Ruby speed. As usual, these benchmarks should be
119considered rough estimates, and you should measure with representative formulas
120from your application. Also, if new formulas are constantly introduced to your
121application, AST caching will consume more memory with each new formula.
122
123BUILT-IN OPERATORS AND FUNCTIONS
124---------------------------------
125
126Math: `+`, `-`, `*`, `/`, `%`
127
128Logic: `<`, `>`, `<=`, `>=`, `<>`, `!=`, `=`, `AND`, `OR`
129
130Functions: `IF`, `NOT`, `MIN`, `MAX`, `ROUND`, `ROUNDDOWN`, `ROUNDUP`
131
132Selections: `CASE` (syntax see [spec](https://github.com/rubysolo/dentaku/blob/master/spec/calculator_spec.rb#L292))
133
134Math: all functions from Ruby's Math module, including `SIN`, `COS`, `TAN`, etc.
135
136String: `LEFT`, `RIGHT`, `MID`, `LEN`, `FIND`, `SUBSTITUTE`, `CONCAT`
137
138RESOLVING DEPENDENCIES
139----------------------
140
141If your formulas rely on one another, they may need to be resolved in a
142particular order. For example:
143
144```ruby
145calc = Dentaku::Calculator.new
146calc.store(monthly_income: 50)
147need_to_compute = {
148 income_taxes: "annual_income / 5",
149 annual_income: "monthly_income * 12"
150}
151```
152
153In the example, `annual_income` needs to be computed (and stored) before
154`income_taxes`.
155
156Dentaku provides two methods to help resolve formulas in order:
157
158#### Calculator.dependencies
159Pass a (string) expression to Dependencies and get back a list of variables (as
160`:symbols`) that are required for the expression. `Dependencies` also takes
161into account variables already (explicitly) stored into the calculator.
162
163```ruby
164calc.dependencies("monthly_income * 12")
165#=> []
166# (since monthly_income is in memory)
167
168calc.dependencies("annual_income / 5")
169#=> [:annual_income]
170```
171
172#### Calculator.solve! / Calculator.solve
173Have Dentaku figure out the order in which your formulas need to be evaluated.
174
175Pass in a hash of `{eventual_variable_name: "expression"}` to `solve!` and
176have Dentaku resolve dependencies (using `TSort`) for you.
177
178Raises `TSort::Cyclic` when a valid expression order cannot be found.
179
180```ruby
181calc = Dentaku::Calculator.new
182calc.store(monthly_income: 50)
183need_to_compute = {
184 income_taxes: "annual_income / 5",
185 annual_income: "monthly_income * 12"
186}
187calc.solve!(need_to_compute)
188#=> {annual_income: 600, income_taxes: 120}
189
190calc.solve!(
191 make_money: "have_money",
192 have_money: "make_money"
193}
194#=> raises TSort::Cyclic
195```
196
197`solve!` will also raise an exception if any of the formulas in the set cannot
198be evaluated (e.g. raise `ZeroDivisionError`). The non-bang `solve` method will
199find as many solutions as possible and return the symbol `:undefined` for the
200problem formulas.
201
202INLINE COMMENTS
203---------------------------------
204
205If your expressions grow long or complex, you may add inline comments for future
206reference. This is particularly useful if you save your expressions in a model.
207
208```ruby
209calculator.evaluate('kiwi + 5 /* This is a comment */', kiwi: 2)
210#=> 7
211```
212
213Comments can be single or multi-line. The following are also valid.
214
215```
216/*
217 * This is a multi-line comment
218 */
219
220/*
221 This is another type of multi-line comment
222 */
223```
224
225EXTERNAL FUNCTIONS
226------------------
227
228I don't know everything, so I might not have implemented all the functions you
229need. Please implement your favorites and send a pull request! Okay, so maybe
230that's not feasible because:
231
2321. You can't be bothered to share
2331. You can't wait for me to respond to a pull request, you need it `NOW()`
2341. The formula is the secret sauce for your startup
235
236Whatever your reasons, Dentaku supports adding functions at runtime. To add a
237function, you'll need to specify a name, a return type, and a lambda that
238accepts all function arguments and returns the result value.
239
240Here's an example of adding a function named `POW` that implements
241exponentiation.
242
243```ruby
244> c = Dentaku::Calculator.new
245> c.add_function(:pow, :numeric, ->(mantissa, exponent) { mantissa ** exponent })
246> c.evaluate('POW(3,2)')
247#=> 9
248> c.evaluate('POW(2,3)')
249#=> 8
250```
251
252Here's an example of adding a variadic function:
253
254```ruby
255> c = Dentaku::Calculator.new
256> c.add_function(:max, :numeric, ->(*args) { args.max })
257> c.evaluate 'MAX(8,6,7,5,3,0,9)'
258#=> 9
259```
260
261(However both of these are already built-in -- the `^` operator and the `MAX`
262function)
263
264Functions can be added individually using Calculator#add_function, or en masse
265using Calculator#add_functions.
266
267THANKS
268------
269
270Big thanks to [ElkStone Basements](http://www.elkstonebasements.com/) for
271allowing me to extract and open source this code. Thanks also to all the
272[contributors](https://github.com/rubysolo/dentaku/graphs/contributors)!
273
274
275LICENSE
276-------
277
278(The MIT License)
279
280Copyright © 2012-2016 Solomon White
281
282Permission is hereby granted, free of charge, to any person obtaining a copy of
283this software and associated documentation files (the ‘Software’), to deal in
284the Software without restriction, including without limitation the rights to
285use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
286the Software, and to permit persons to whom the Software is furnished to do so,
287subject to the following conditions:
288
289The above copyright notice and this permission notice shall be included in all
290copies or substantial portions of the Software.
291
292THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
293IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
294FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
295COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
296IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
297CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Rakefile b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Rakefile
new file mode 100644
index 0000000..dba88e6
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/Rakefile
@@ -0,0 +1,28 @@
1require 'bundler/gem_tasks'
2require 'rspec/core/rake_task'
3
4desc "Run specs"
5task :spec do
6 RSpec::Core::RakeTask.new(:spec) do |t|
7 t.rspec_opts = %w{--colour --format progress}
8 t.pattern = 'spec/**/*_spec.rb'
9 end
10end
11
12desc "Default: run specs."
13task default: :spec
14
15task :console do
16 begin
17 require 'pry'
18 console = Pry
19 rescue LoadError
20 require 'irb'
21 require 'irb/completion'
22 console = IRB
23 end
24
25 require 'dentaku'
26 ARGV.clear
27 console.start
28end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/dentaku.gemspec b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/dentaku.gemspec
new file mode 100644
index 0000000..3cb51fc
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/dentaku.gemspec
@@ -0,0 +1,27 @@
1# -*- encoding: utf-8 -*-
2$:.push File.expand_path("../lib", __FILE__)
3require "dentaku/version"
4
5Gem::Specification.new do |s|
6 s.name = "dentaku"
7 s.version = Dentaku::VERSION
8 s.authors = ["Solomon White"]
9 s.email = ["rubysolo@gmail.com"]
10 s.homepage = "http://github.com/rubysolo/dentaku"
11 s.licenses = %w(MIT)
12 s.summary = %q{A formula language parser and evaluator}
13 s.description = <<-DESC
14 Dentaku is a parser and evaluator for mathematical formulas
15 DESC
16
17 s.rubyforge_project = "dentaku"
18
19 s.add_development_dependency('rake')
20 s.add_development_dependency('rspec')
21 s.add_development_dependency('pry')
22
23 s.files = `git ls-files`.split("\n")
24 s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
25 s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
26 s.require_paths = ["lib"]
27end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku.rb
new file mode 100644
index 0000000..1b081b8
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku.rb
@@ -0,0 +1,43 @@
1require "bigdecimal"
2require "dentaku/calculator"
3require "dentaku/version"
4
5module Dentaku
6 @enable_ast_caching = false
7 @enable_dependency_order_caching = false
8
9 def self.evaluate(expression, data={})
10 calculator.evaluate(expression, data)
11 end
12
13 def self.enable_caching!
14 enable_ast_cache!
15 enable_dependency_order_cache!
16 end
17
18 def self.enable_ast_cache!
19 @enable_ast_caching = true
20 end
21
22 def self.cache_ast?
23 @enable_ast_caching
24 end
25
26 def self.enable_dependency_order_cache!
27 @enable_dependency_order_caching = true
28 end
29
30 def self.cache_dependency_order?
31 @enable_dependency_order_caching
32 end
33
34 private
35
36 def self.calculator
37 @calculator ||= Dentaku::Calculator.new
38 end
39end
40
41def Dentaku(expression, data={})
42 Dentaku.evaluate(expression, data)
43end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast.rb
new file mode 100644
index 0000000..95cd512
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast.rb
@@ -0,0 +1,21 @@
1require_relative './ast/node'
2require_relative './ast/nil'
3require_relative './ast/numeric'
4require_relative './ast/logical'
5require_relative './ast/string'
6require_relative './ast/identifier'
7require_relative './ast/arithmetic'
8require_relative './ast/negation'
9require_relative './ast/comparators'
10require_relative './ast/combinators'
11require_relative './ast/grouping'
12require_relative './ast/case'
13require_relative './ast/functions/if'
14require_relative './ast/functions/max'
15require_relative './ast/functions/min'
16require_relative './ast/functions/not'
17require_relative './ast/functions/round'
18require_relative './ast/functions/roundup'
19require_relative './ast/functions/rounddown'
20require_relative './ast/functions/ruby_math'
21require_relative './ast/functions/string_functions'
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/arithmetic.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/arithmetic.rb
new file mode 100644
index 0000000..74ac064
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/arithmetic.rb
@@ -0,0 +1,129 @@
1require_relative './operation'
2require 'bigdecimal'
3require 'bigdecimal/util'
4
5module Dentaku
6 module AST
7 class Arithmetic < Operation
8 def initialize(*)
9 super
10 unless valid_node?(left) && valid_node?(right)
11 fail ParseError, "#{ self.class } requires numeric operands"
12 end
13 end
14
15 def type
16 :numeric
17 end
18
19 def value(context={})
20 l = cast(left.value(context))
21 r = cast(right.value(context))
22 l.public_send(operator, r)
23 end
24
25 private
26
27 def cast(value, prefer_integer=true)
28 validate_numeric(value)
29 v = BigDecimal.new(value, Float::DIG+1)
30 v = v.to_i if prefer_integer && v.frac.zero?
31 v
32 end
33
34 def valid_node?(node)
35 node && (node.dependencies.any? || node.type == :numeric)
36 end
37
38 def validate_numeric(value)
39 Float(value)
40 rescue ::ArgumentError, ::TypeError
41 fail Dentaku::ArgumentError, "#{ self.class } requires numeric operands"
42 end
43 end
44
45 class Addition < Arithmetic
46 def operator
47 :+
48 end
49
50 def self.precedence
51 10
52 end
53 end
54
55 class Subtraction < Arithmetic
56 def operator
57 :-
58 end
59
60 def self.precedence
61 10
62 end
63 end
64
65 class Multiplication < Arithmetic
66 def operator
67 :*
68 end
69
70 def self.precedence
71 20
72 end
73 end
74
75 class Division < Arithmetic
76 def value(context={})
77 r = cast(right.value(context), false)
78 raise Dentaku::ZeroDivisionError if r.zero?
79
80 cast(cast(left.value(context)) / r)
81 end
82
83 def self.precedence
84 20
85 end
86 end
87
88 class Modulo < Arithmetic
89 def initialize(left, right)
90 @left = left
91 @right = right
92
93 unless (valid_node?(left) || left.nil?) && valid_node?(right)
94 fail ParseError, "#{ self.class } requires numeric operands"
95 end
96 end
97
98 def percent?
99 left.nil?
100 end
101
102 def value(context={})
103 if percent?
104 cast(right.value(context)) * 0.01
105 else
106 super
107 end
108 end
109
110 def operator
111 :%
112 end
113
114 def self.precedence
115 20
116 end
117 end
118
119 class Exponentiation < Arithmetic
120 def operator
121 :**
122 end
123
124 def self.precedence
125 30
126 end
127 end
128 end
129end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case.rb
new file mode 100644
index 0000000..449fd67
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case.rb
@@ -0,0 +1,52 @@
1require_relative './case/case_conditional'
2require_relative './case/case_when'
3require_relative './case/case_then'
4require_relative './case/case_switch_variable'
5require_relative './case/case_else'
6
7module Dentaku
8 module AST
9 class Case < Node
10 def initialize(*nodes)
11 @switch = nodes.shift
12
13 unless @switch.is_a?(AST::CaseSwitchVariable)
14 raise 'Case missing switch variable'
15 end
16
17 @conditions = nodes
18
19 @else = @conditions.pop if @conditions.last.is_a?(AST::CaseElse)
20
21 @conditions.each do |condition|
22 unless condition.is_a?(AST::CaseConditional)
23 raise "#{condition} is not a CaseConditional"
24 end
25 end
26 end
27
28 def value(context={})
29 switch_value = @switch.value(context)
30 @conditions.each do |condition|
31 if condition.when.value(context) == switch_value
32 return condition.then.value(context)
33 end
34 end
35
36 if @else
37 return @else.value(context)
38 else
39 raise "No block matched the switch value '#{switch_value}'"
40 end
41 end
42
43 def dependencies(context={})
44 # TODO: should short-circuit
45 @switch.dependencies(context) +
46 @conditions.flat_map do |condition|
47 condition.dependencies(context)
48 end
49 end
50 end
51 end
52end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_conditional.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_conditional.rb
new file mode 100644
index 0000000..846590f
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_conditional.rb
@@ -0,0 +1,23 @@
1module Dentaku
2 module AST
3 class CaseConditional < Node
4 attr_reader :when,
5 :then
6
7 def initialize(when_statement, then_statement)
8 @when = when_statement
9 unless @when.is_a?(AST::CaseWhen)
10 raise 'Expected first argument to be a CaseWhen'
11 end
12 @then = then_statement
13 unless @then.is_a?(AST::CaseThen)
14 raise 'Expected second argument to be a CaseThen'
15 end
16 end
17
18 def dependencies(context={})
19 @when.dependencies(context) + @then.dependencies(context)
20 end
21 end
22 end
23end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_else.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_else.rb
new file mode 100644
index 0000000..bc069de
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_else.rb
@@ -0,0 +1,21 @@
1module Dentaku
2 module AST
3 class CaseElse < Node
4 def self.arity
5 1
6 end
7
8 def initialize(node)
9 @node = node
10 end
11
12 def value(context={})
13 @node.value(context)
14 end
15
16 def dependencies(context={})
17 @node.dependencies(context)
18 end
19 end
20 end
21end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_switch_variable.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_switch_variable.rb
new file mode 100644
index 0000000..bc07b89
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_switch_variable.rb
@@ -0,0 +1,21 @@
1module Dentaku
2 module AST
3 class CaseSwitchVariable < Node
4 def initialize(node)
5 @node = node
6 end
7
8 def value(context={})
9 @node.value(context)
10 end
11
12 def dependencies(context={})
13 @node.dependencies(context)
14 end
15
16 def self.arity
17 1
18 end
19 end
20 end
21end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_then.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_then.rb
new file mode 100644
index 0000000..4c2d5d5
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_then.rb
@@ -0,0 +1,21 @@
1module Dentaku
2 module AST
3 class CaseThen < Node
4 def self.arity
5 1
6 end
7
8 def initialize(node)
9 @node = node
10 end
11
12 def value(context={})
13 @node.value(context)
14 end
15
16 def dependencies(context={})
17 @node.dependencies(context)
18 end
19 end
20 end
21end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_when.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_when.rb
new file mode 100644
index 0000000..c4079ae
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/case/case_when.rb
@@ -0,0 +1,21 @@
1module Dentaku
2 module AST
3 class CaseWhen < Operation
4 def self.arity
5 1
6 end
7
8 def initialize(node)
9 @node = node
10 end
11
12 def value(context={})
13 @node.value(context)
14 end
15
16 def dependencies(context={})
17 @node.dependencies(context)
18 end
19 end
20 end
21end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/combinators.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/combinators.rb
new file mode 100644
index 0000000..a02fd58
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/combinators.rb
@@ -0,0 +1,36 @@
1require_relative './operation'
2
3module Dentaku
4 module AST
5 class Combinator < Operation
6 def initialize(*)
7 super
8 unless valid_node?(left) && valid_node?(right)
9 fail ParseError, "#{ self.class } requires logical operands"
10 end
11 end
12
13 def type
14 :logical
15 end
16
17 private
18
19 def valid_node?(node)
20 node.dependencies.any? || node.type == :logical
21 end
22 end
23
24 class And < Combinator
25 def value(context={})
26 left.value(context) && right.value(context)
27 end
28 end
29
30 class Or < Combinator
31 def value(context={})
32 left.value(context) || right.value(context)
33 end
34 end
35 end
36end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/comparators.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/comparators.rb
new file mode 100644
index 0000000..c7c9ee0
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/comparators.rb
@@ -0,0 +1,51 @@
1require_relative './operation'
2
3module Dentaku
4 module AST
5 class Comparator < Operation
6 def self.precedence
7 5
8 end
9
10 def type
11 :logical
12 end
13 end
14
15 class LessThan < Comparator
16 def value(context={})
17 left.value(context) < right.value(context)
18 end
19 end
20
21 class LessThanOrEqual < Comparator
22 def value(context={})
23 left.value(context) <= right.value(context)
24 end
25 end
26
27 class GreaterThan < Comparator
28 def value(context={})
29 left.value(context) > right.value(context)
30 end
31 end
32
33 class GreaterThanOrEqual < Comparator
34 def value(context={})
35 left.value(context) >= right.value(context)
36 end
37 end
38
39 class NotEqual < Comparator
40 def value(context={})
41 left.value(context) != right.value(context)
42 end
43 end
44
45 class Equal < Comparator
46 def value(context={})
47 left.value(context) == right.value(context)
48 end
49 end
50 end
51end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/function.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/function.rb
new file mode 100644
index 0000000..2f1b82a
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/function.rb
@@ -0,0 +1,73 @@
1require_relative 'node'
2
3module Dentaku
4 module AST
5 class Function < Node
6 def initialize(*args)
7 @args = args
8 end
9
10 def dependencies(context={})
11 @args.flat_map { |a| a.dependencies(context) }
12 end
13
14 def self.get(name)
15 registry.fetch(function_name(name)) {
16 fail ParseError, "Undefined function #{ name }"
17 }
18 end
19
20 def self.register(name, type, implementation)
21 function = Class.new(self) do
22 def self.implementation=(impl)
23 @implementation = impl
24 end
25
26 def self.implementation
27 @implementation
28 end
29
30 def self.type=(type)
31 @type = type
32 end
33
34 def self.type
35 @type
36 end
37
38 def value(context={})
39 args = @args.map { |a| a.value(context) }
40 self.class.implementation.call(*args)
41 end
42
43 def type
44 self.class.type
45 end
46 end
47
48 function_class = name.to_s.capitalize
49 Dentaku::AST.send(:remove_const, function_class) if Dentaku::AST.const_defined?(function_class)
50 Dentaku::AST.const_set(function_class, function)
51
52 function.implementation = implementation
53 function.type = type
54
55 registry[function_name(name)] = function
56 end
57
58 def self.register_class(name, function_class)
59 registry[function_name(name)] = function_class
60 end
61
62 private
63
64 def self.function_name(name)
65 name.to_s.downcase
66 end
67
68 def self.registry
69 @registry ||= {}
70 end
71 end
72 end
73end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/if.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/if.rb
new file mode 100644
index 0000000..6fb240e
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/if.rb
@@ -0,0 +1,30 @@
1require_relative '../function'
2
3module Dentaku
4 module AST
5 class If < Function
6 attr_reader :predicate, :left, :right
7
8 def initialize(predicate, left, right)
9 @predicate = predicate
10 @left = left
11 @right = right
12 end
13
14 def value(context={})
15 predicate.value(context) ? left.value(context) : right.value(context)
16 end
17
18 def type
19 left.type
20 end
21
22 def dependencies(context={})
23 # TODO : short-circuit?
24 (predicate.dependencies(context) + left.dependencies(context) + right.dependencies(context)).uniq
25 end
26 end
27 end
28end
29
30Dentaku::AST::Function.register_class(:if, Dentaku::AST::If)
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/max.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/max.rb
new file mode 100644
index 0000000..5d6db1d
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/max.rb
@@ -0,0 +1,5 @@
1require_relative '../function'
2
3Dentaku::AST::Function.register(:max, :numeric, ->(*args) {
4 args.max
5})
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/min.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/min.rb
new file mode 100644
index 0000000..b3841b3
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/min.rb
@@ -0,0 +1,5 @@
1require_relative '../function'
2
3Dentaku::AST::Function.register(:min, :numeric, ->(*args) {
4 args.min
5})
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/not.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/not.rb
new file mode 100644
index 0000000..35df345
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/not.rb
@@ -0,0 +1,5 @@
1require_relative '../function'
2
3Dentaku::AST::Function.register(:not, :logical, ->(logical) {
4 ! logical
5})
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/round.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/round.rb
new file mode 100644
index 0000000..95c329a
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/round.rb
@@ -0,0 +1,5 @@
1require_relative '../function'
2
3Dentaku::AST::Function.register(:round, :numeric, ->(numeric, places=nil) {
4 numeric.round(places || 0)
5})
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/rounddown.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/rounddown.rb
new file mode 100644
index 0000000..4b2625d
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/rounddown.rb
@@ -0,0 +1,7 @@
1require_relative '../function'
2
3Dentaku::AST::Function.register(:rounddown, :numeric, ->(numeric, precision=0) {
4 tens = 10.0**precision
5 result = (numeric * tens).floor / tens
6 precision <= 0 ? result.to_i : result
7})
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/roundup.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/roundup.rb
new file mode 100644
index 0000000..5714682
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/roundup.rb
@@ -0,0 +1,7 @@
1require_relative '../function'
2
3Dentaku::AST::Function.register(:roundup, :numeric, ->(numeric, precision=0) {
4 tens = 10.0**precision
5 result = (numeric * tens).ceil / tens
6 precision <= 0 ? result.to_i : result
7})
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/ruby_math.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/ruby_math.rb
new file mode 100644
index 0000000..65f4387
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/ruby_math.rb
@@ -0,0 +1,8 @@
1# import all functions from Ruby's Math module
2require_relative "../function"
3
4Math.methods(false).each do |method|
5 Dentaku::AST::Function.register(method, :numeric, ->(*args) {
6 Math.send(method, *args)
7 })
8end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/string_functions.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/string_functions.rb
new file mode 100644
index 0000000..2133c35
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/string_functions.rb
@@ -0,0 +1,111 @@
1require_relative '../function'
2
3module Dentaku
4 module AST
5 module StringFunctions
6 class Left < Function
7 def initialize(string, length)
8 @string = string
9 @length = length
10 end
11
12 def value(context={})
13 string = @string.value(context).to_s
14 length = @length.value(context)
15 string[0, length]
16 end
17 end
18
19 class Right < Function
20 def initialize(string, length)
21 @string = string
22 @length = length
23 end
24
25 def value(context={})
26 string = @string.value(context).to_s
27 length = @length.value(context)
28 string[length * -1, length] || string
29 end
30 end
31
32 class Mid < Function
33 def initialize(string, offset, length)
34 @string = string
35 @offset = offset
36 @length = length
37 end
38
39 def value(context={})
40 string = @string.value(context).to_s
41 offset = @offset.value(context)
42 length = @length.value(context)
43 string[offset - 1, length].to_s
44 end
45 end
46
47 class Len < Function
48 def initialize(string)
49 @string = string
50 end
51
52 def value(context={})
53 string = @string.value(context).to_s
54 string.length
55 end
56 end
57
58 class Find < Function
59 def initialize(needle, haystack)
60 @needle = needle
61 @haystack = haystack
62 end
63
64 def value(context={})
65 needle = @needle.value(context)
66 needle = needle.to_s unless needle.is_a?(Regexp)
67 haystack = @haystack.value(context).to_s
68 pos = haystack.index(needle)
69 pos && pos + 1
70 end
71 end
72
73 class Substitute < Function
74 def initialize(original, search, replacement)
75 @original = original
76 @search = search
77 @replacement = replacement
78 end
79
80 def value(context={})
81 original = @original.value(context).to_s
82 search = @search.value(context)
83 search = search.to_s unless search.is_a?(Regexp)
84 replacement = @replacement.value(context).to_s
85 original.sub(search, replacement)
86 end
87 end
88
89 class Concat < Function
90 def initialize(left, right)
91 @left = left
92 @right = right
93 end
94
95 def value(context={})
96 left = @left.value(context).to_s
97 right = @right.value(context).to_s
98 left + right
99 end
100 end
101 end
102 end
103end
104
105Dentaku::AST::Function.register_class(:left, Dentaku::AST::StringFunctions::Left)
106Dentaku::AST::Function.register_class(:right, Dentaku::AST::StringFunctions::Right)
107Dentaku::AST::Function.register_class(:mid, Dentaku::AST::StringFunctions::Mid)
108Dentaku::AST::Function.register_class(:len, Dentaku::AST::StringFunctions::Len)
109Dentaku::AST::Function.register_class(:find, Dentaku::AST::StringFunctions::Find)
110Dentaku::AST::Function.register_class(:substitute, Dentaku::AST::StringFunctions::Substitute)
111Dentaku::AST::Function.register_class(:concat, Dentaku::AST::StringFunctions::Concat)
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/grouping.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/grouping.rb
new file mode 100644
index 0000000..e319caa
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/grouping.rb
@@ -0,0 +1,21 @@
1module Dentaku
2 module AST
3 class Grouping
4 def initialize(node)
5 @node = node
6 end
7
8 def value(context={})
9 @node.value(context)
10 end
11
12 def type
13 @node.type
14 end
15
16 def dependencies(context={})
17 @node.dependencies(context)
18 end
19 end
20 end
21end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/identifier.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/identifier.rb
new file mode 100644
index 0000000..05a87a9
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/identifier.rb
@@ -0,0 +1,36 @@
1require_relative '../exceptions'
2
3module Dentaku
4 module AST
5 class Identifier < Node
6 attr_reader :identifier
7
8 def initialize(token)
9 @identifier = token.value.downcase
10 end
11
12 def value(context={})
13 v = context.fetch(identifier) do
14 raise UnboundVariableError.new([identifier])
15 end
16
17 case v
18 when Node
19 v.value(context)
20 else
21 v
22 end
23 end
24
25 def dependencies(context={})
26 context.has_key?(identifier) ? dependencies_of(context[identifier]) : [identifier]
27 end
28
29 private
30
31 def dependencies_of(node)
32 node.respond_to?(:dependencies) ? node.dependencies : []
33 end
34 end
35 end
36end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/literal.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/literal.rb
new file mode 100644
index 0000000..b7d8003
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/literal.rb
@@ -0,0 +1,20 @@
1module Dentaku
2 module AST
3 class Literal < Node
4 attr_reader :type
5
6 def initialize(token)
7 @value = token.value
8 @type = token.category
9 end
10
11 def value(*)
12 @value
13 end
14
15 def dependencies(*)
16 []
17 end
18 end
19 end
20end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/logical.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/logical.rb
new file mode 100644
index 0000000..287cdf6
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/logical.rb
@@ -0,0 +1,8 @@
1require_relative "./literal"
2
3module Dentaku
4 module AST
5 class Logical < Literal
6 end
7 end
8end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/negation.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/negation.rb
new file mode 100644
index 0000000..bb281b2
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/negation.rb
@@ -0,0 +1,40 @@
1module Dentaku
2 module AST
3 class Negation < Operation
4 def initialize(node)
5 @node = node
6 fail ParseError, "Negation requires numeric operand" unless valid_node?(node)
7 end
8
9 def value(context={})
10 @node.value(context) * -1
11 end
12
13 def type
14 :numeric
15 end
16
17 def self.arity
18 1
19 end
20
21 def self.right_associative?
22 true
23 end
24
25 def self.precedence
26 40
27 end
28
29 def dependencies(context={})
30 @node.dependencies(context)
31 end
32
33 private
34
35 def valid_node?(node)
36 node && (node.dependencies.any? || node.type == :numeric)
37 end
38 end
39 end
40end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/nil.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/nil.rb
new file mode 100644
index 0000000..15ccc0f
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/nil.rb
@@ -0,0 +1,9 @@
1module Dentaku
2 module AST
3 class Nil < Node
4 def value(*)
5 nil
6 end
7 end
8 end
9end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/node.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/node.rb
new file mode 100644
index 0000000..a26c201
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/node.rb
@@ -0,0 +1,17 @@
1module Dentaku
2 module AST
3 class Node
4 def self.precedence
5 0
6 end
7
8 def self.arity
9 nil
10 end
11
12 def dependencies(context={})
13 []
14 end
15 end
16 end
17end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/numeric.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/numeric.rb
new file mode 100644
index 0000000..8774cfb
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/numeric.rb
@@ -0,0 +1,8 @@
1require_relative "./literal"
2
3module Dentaku
4 module AST
5 class Numeric < Literal
6 end
7 end
8end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/operation.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/operation.rb
new file mode 100644
index 0000000..2f4c2cd
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/operation.rb
@@ -0,0 +1,22 @@
1require_relative './node'
2
3module Dentaku
4 module AST
5 class Operation < Node
6 attr_reader :left, :right
7
8 def initialize(left, right)
9 @left = left
10 @right = right
11 end
12
13 def dependencies(context={})
14 (left.dependencies(context) + right.dependencies(context)).uniq
15 end
16
17 def self.right_associative?
18 false
19 end
20 end
21 end
22end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/string.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/string.rb
new file mode 100644
index 0000000..1f833ad
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/string.rb
@@ -0,0 +1,8 @@
1require_relative "./literal"
2
3module Dentaku
4 module AST
5 class String < Literal
6 end
7 end
8end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/bulk_expression_solver.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/bulk_expression_solver.rb
new file mode 100644
index 0000000..aa8c7e4
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/bulk_expression_solver.rb
@@ -0,0 +1,99 @@
1require 'dentaku/calculator'
2require 'dentaku/dependency_resolver'
3require 'dentaku/exceptions'
4require 'dentaku/parser'
5require 'dentaku/tokenizer'
6
7module Dentaku
8 class BulkExpressionSolver
9 def initialize(expression_hash, calculator)
10 self.expression_hash = expression_hash
11 self.calculator = calculator
12 end
13
14 def solve!
15 solve(&raise_exception_handler)
16 end
17
18 def solve(&block)
19 error_handler = block || return_undefined_handler
20 results = load_results(&error_handler)
21
22 expression_hash.each_with_object({}) do |(k, _), r|
23 r[k] = results[k.to_s]
24 end
25 end
26
27 private
28
29 def self.dependency_cache
30 @dep_cache ||= {}
31 end
32
33 attr_accessor :expression_hash, :calculator
34
35 def return_undefined_handler
36 ->(*) { :undefined }
37 end
38
39 def raise_exception_handler
40 ->(ex) { raise ex }
41 end
42
43 def load_results(&block)
44 variables_in_resolve_order.each_with_object({}) do |var_name, r|
45 begin
46 value_from_memory = calculator.memory[var_name]
47
48 if value_from_memory.nil? &&
49 expressions[var_name].nil? &&
50 !calculator.memory.has_key?(var_name)
51 next
52 end
53
54 value = value_from_memory ||
55 evaluate!(expressions[var_name], expressions.merge(r))
56
57 r[var_name] = value
58 rescue Dentaku::UnboundVariableError, ZeroDivisionError => ex
59 ex.recipient_variable = var_name
60 r[var_name] = block.call(ex)
61 end
62 end
63 end
64
65 def expressions
66 @expressions ||= Hash[expression_hash.map { |k,v| [k.to_s, v] }]
67 end
68
69 def expression_dependencies
70 Hash[expressions.map { |var, expr| [var, calculator.dependencies(expr)] }].tap do |d|
71 d.values.each do |deps|
72 unresolved = deps.reject { |ud| d.has_key?(ud) }
73 unresolved.each { |u| add_dependencies(d, u) }
74 end
75 end
76 end
77
78 def add_dependencies(current_dependencies, variable)
79 node = calculator.memory[variable]
80 if node.respond_to?(:dependencies)
81 current_dependencies[variable] = node.dependencies
82 node.dependencies.each { |d| add_dependencies(current_dependencies, d) }
83 end
84 end
85
86 def variables_in_resolve_order
87 cache_key = expressions.keys.map(&:to_s).sort.join("|")
88 @ordered_deps ||= self.class.dependency_cache.fetch(cache_key) {
89 DependencyResolver.find_resolve_order(expression_dependencies).tap do |d|
90 self.class.dependency_cache[cache_key] = d if Dentaku.cache_dependency_order?
91 end
92 }
93 end
94
95 def evaluate!(expression, results)
96 calculator.evaluate!(expression, results)
97 end
98 end
99end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/calculator.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/calculator.rb
new file mode 100644
index 0000000..26f8810
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/calculator.rb
@@ -0,0 +1,124 @@
1require 'dentaku/bulk_expression_solver'
2require 'dentaku/exceptions'
3require 'dentaku/token'
4require 'dentaku/dependency_resolver'
5require 'dentaku/parser'
6
7module Dentaku
8 class Calculator
9 attr_reader :result, :memory, :tokenizer
10
11 def initialize
12 clear
13 @tokenizer = Tokenizer.new
14 @ast_cache = {}
15 @disable_ast_cache = false
16 end
17
18 def add_function(name, type, body)
19 Dentaku::AST::Function.register(name, type, body)
20 self
21 end
22
23 def add_functions(fns)
24 fns.each { |(name, type, body)| add_function(name, type, body) }
25 self
26 end
27
28 def disable_cache
29 @disable_ast_cache = true
30 yield(self) if block_given?
31 ensure
32 @disable_ast_cache = false
33 end
34
35 def evaluate(expression, data={})
36 evaluate!(expression, data)
37 rescue UnboundVariableError, ArgumentError
38 yield expression if block_given?
39 end
40
41 def evaluate!(expression, data={})
42 store(data) do
43 node = expression
44 node = ast(node) unless node.is_a?(AST::Node)
45 node.value(memory)
46 end
47 end
48
49 def solve!(expression_hash)
50 BulkExpressionSolver.new(expression_hash, self).solve!
51 end
52
53 def solve(expression_hash, &block)
54 BulkExpressionSolver.new(expression_hash, self).solve(&block)
55 end
56
57 def dependencies(expression)
58 ast(expression).dependencies(memory)
59 end
60
61 def ast(expression)
62 @ast_cache.fetch(expression) {
63 Parser.new(tokenizer.tokenize(expression)).parse.tap do |node|
64 @ast_cache[expression] = node if cache_ast?
65 end
66 }
67 end
68
69 def clear_cache(pattern=:all)
70 case pattern
71 when :all
72 @ast_cache = {}
73 when String
74 @ast_cache.delete(pattern)
75 when Regexp
76 @ast_cache.delete_if { |k,_| k =~ pattern }
77 else
78 fail Dentaku::ArgumentError
79 end
80 end
81
82 def store(key_or_hash, value=nil)
83 restore = Hash[memory]
84
85 if value.nil?
86 key_or_hash.each do |key, val|
87 memory[key.to_s.downcase] = val
88 end
89 else
90 memory[key_or_hash.to_s.downcase] = value
91 end
92
93 if block_given?
94 begin
95 result = yield
96 @memory = restore
97 return result
98 rescue => e
99 @memory = restore
100 raise e
101 end
102 end
103
104 self
105 end
106 alias_method :bind, :store
107
108 def store_formula(key, formula)
109 store(key, ast(formula))
110 end
111
112 def clear
113 @memory = {}
114 end
115
116 def empty?
117 memory.empty?
118 end
119
120 def cache_ast?
121 Dentaku.cache_ast? && !@disable_ast_cache
122 end
123 end
124end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/dependency_resolver.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/dependency_resolver.rb
new file mode 100644
index 0000000..0d74b3c
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/dependency_resolver.rb
@@ -0,0 +1,24 @@
1require 'tsort'
2
3module Dentaku
4 class DependencyResolver
5 include TSort
6
7 def self.find_resolve_order(vars_to_dependencies_hash)
8 self.new(vars_to_dependencies_hash).tsort
9 end
10
11 def initialize(vars_to_dependencies_hash)
12 # ensure variables are strings
13 @vars_to_deps = Hash[vars_to_dependencies_hash.map { |k, v| [k.to_s, v]}]
14 end
15
16 def tsort_each_node(&block)
17 @vars_to_deps.each_key(&block)
18 end
19
20 def tsort_each_child(node, &block)
21 @vars_to_deps.fetch(node.to_s, []).each(&block)
22 end
23 end
24end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/exceptions.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/exceptions.rb
new file mode 100644
index 0000000..7deab2c
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/exceptions.rb
@@ -0,0 +1,25 @@
1module Dentaku
2 class UnboundVariableError < StandardError
3 attr_accessor :recipient_variable
4
5 attr_reader :unbound_variables
6
7 def initialize(unbound_variables)
8 @unbound_variables = unbound_variables
9 super("no value provided for variables: #{ unbound_variables.join(', ') }")
10 end
11 end
12
13 class ParseError < StandardError
14 end
15
16 class TokenizerError < StandardError
17 end
18
19 class ArgumentError < ::ArgumentError
20 end
21
22 class ZeroDivisionError < ::ZeroDivisionError
23 attr_accessor :recipient_variable
24 end
25end
diff --git a/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/parser.rb b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/parser.rb
new file mode 100644
index 0000000..bba4c41
--- /dev/null
+++ b/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/parser.rb
@@ -0,0 +1,222 @@
1require_relative './ast'
2
3module Dentaku
4 class Parser
5 attr_reader :input, :output, :operations, :arities
6
7 def initialize(tokens, options={})
8 @input = tokens.dup
9 @output = []
10 @operations = options.fetch(:operations, [])
11 @arities = options.fetch(:arities, [])
12 end
13
14 def get_args(count)
15 Array.new(count) { output.pop }.reverse
16 end
17
18 def consume(count=2)
19 operator = operations.pop
20 output.push operator.new(*get_args(operator.arity || count))
21 end
22
23 def parse
24 return AST::Nil.new if input.empty?
25
26 while token = input.shift
27 case token.category
28 when :numeric
29 output.push AST::Numeric.new(token)
30
31 when :logical
32 output.push AST::Logical.new(token)
33
34 when :string
35 output.push AST::String.new(token)
36
37 when :identifier
38 output.push AST::Identifier.new(token)
39
40 when :operator, :comparator, :combinator
41 op_class = operation(token)
42
43 if op_class.right_associative?
44 while operations.last && operations.last < AST::Operation && op_class.precedence < operations.last.precedence
45 consume
46 end
47
48 operations.push op_class
49 else
50 while operations.last && operations.last < AST::Operation && op_class.precedence <= operations.last.precedence
51 consume
52 end
53
54 operations.push op_class
55 end
56
57 when :null
58 output.push AST::Nil.new
59
60 when :function
61 arities.push 0
62 operations.push function(token)
63
64 when :case
65 case token.value
66 when :open