k_config 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 53af9d714dc548d9c4c29abe2876d9e380809e3ef4eb871d013a048d4eee4dc7
4
+ data.tar.gz: ec8252bd1ab496b402ebcc73dec9d748128d52b64b726df986593b6a78857616
5
+ SHA512:
6
+ metadata.gz: f3d7d67c59e8c52840305f94756b17443d87412e70b44b06e9beaf4aeb5ff1cd85e30d2a20a367d5c4d80212293d5ea460cc840e793cb798d9d6936870094fa4
7
+ data.tar.gz: aab511ef8002737664a495bf892aa9d8b6bcdda08f8116518a8a5ecaaf59c5a080c1cc377b9189200d2e020996eb8f2839913183a554991425b717a1dc9e9931
data/.builders/boot.rb ADDED
@@ -0,0 +1,65 @@
1
+ # Boot Sequence
2
+
3
+ include KLog::Logging
4
+
5
+ CONFIG_KEY = :k_config
6
+
7
+ log.kv 'working folder', Dir.pwd
8
+
9
+ Handlebars::Helpers.configure do |config|
10
+ config.helper_config_file = File.join(Gem.loaded_specs['handlebars-helpers'].full_gem_path, '.handlebars_helpers.json')
11
+ config.string_formatter_config_file = File.join(Gem.loaded_specs['handlebars-helpers'].full_gem_path, '.handlebars_string_formatters.json')
12
+ end
13
+
14
+ def camel
15
+ require 'handlebars/helpers/string_formatting/camel'
16
+ Handlebars::Helpers::StringFormatting::Camel.new
17
+ end
18
+
19
+ def titleize
20
+ require 'handlebars/helpers/string_formatting/titleize'
21
+ Handlebars::Helpers::StringFormatting::Titleize.new
22
+ end
23
+
24
+ def pluralize
25
+ require 'handlebars/helpers/inflection/pluralize'
26
+ Handlebars::Helpers::Inflection::Pluralize.new
27
+ end
28
+
29
+ def singularize
30
+ require 'handlebars/helpers/inflection/singularize'
31
+ Handlebars::Helpers::Inflection::Singularize.new
32
+ end
33
+
34
+ def dasherize
35
+ require 'handlebars/helpers/string_formatting/dasherize'
36
+ Handlebars::Helpers::StringFormatting::Dasherize.new
37
+ end
38
+
39
+ def k_builder
40
+ @k_builder ||= KBuilder::BaseBuilder.init(KBuilder.configuration(CONFIG_KEY))
41
+ end
42
+
43
+ KBuilder.configure(CONFIG_KEY) do |config|
44
+ builder_folder = Dir.pwd
45
+ base_folder = File.expand_path('../', builder_folder)
46
+ global_template = File.expand_path('~/dev/kgems/k_templates/templates')
47
+
48
+ config.template_folders.add(:global_template , global_template)
49
+ config.template_folders.add(:template , File.expand_path('.templates', Dir.pwd))
50
+
51
+ config.target_folders.add(:app , base_folder)
52
+ config.target_folders.add(:builder , builder_folder)
53
+ end
54
+
55
+ KBuilder.configuration(CONFIG_KEY).debug
56
+
57
+ area = KManager.add_area(CONFIG_KEY)
58
+ resource_manager = area.resource_manager
59
+ resource_manager
60
+ .fileset
61
+ .glob('*.rb', exclude: ['boot.rb'])
62
+ .glob('generators/**/*.rb')
63
+ resource_manager.add_resources
64
+
65
+ KManager.fire_actions(:load_content, :register_document, :load_document)
@@ -0,0 +1,125 @@
1
+
2
+ KManager.action :bootstrap do
3
+ def on_action
4
+ application_name = :k_config
5
+ director = KDirector::Dsls::RubyGemDsl
6
+ .init(k_builder,
7
+ # on_exist: :skip, # %i[skip write compare]
8
+ # on_action: :queue # %i[queue execute]
9
+ )
10
+ .data(
11
+ ruby_version: '2.7',
12
+ application: application_name,
13
+ application_description: 'KConfig provides configuration for multi-plugin architecture',
14
+ application_lib_path: application_name.to_s,
15
+ application_lib_namespace: 'KConfig',
16
+ namespaces: ['KConfig'],
17
+ author: 'David Cruwys',
18
+ author_email: 'david@ideasmen.com.au',
19
+ avatar: 'Developer',
20
+ initial_semver: '0.0.1',
21
+ main_story: 'As a Developer, I want a standard configuration interface for plugins, so that I can have consistent and extensible configuration with each om my GEMs',
22
+ copyright_date: '2022',
23
+ website: 'http://appydave.com/gems/k_config'
24
+ )
25
+ .github(
26
+ repo_name: application_name.to_s
27
+ ) do
28
+ # create_repository
29
+ # delete_repository
30
+ # list_repositories
31
+ # open_repository
32
+ # run_command('git init')
33
+ end
34
+ .blueprint(
35
+ name: :bin_hook,
36
+ description: 'BIN/Hook structures',
37
+ on_exist: :write) do
38
+
39
+ cd(:app)
40
+
41
+ # oadd('bin/runonce/git-setup.sh', dom: dom)
42
+ # run_template_script('bin/runonce/git-setup.sh', dom: dom)
43
+
44
+ # add('.githooks/commit-msg') #, template_subfolder: 'ruby', template_file: 'commit-msg')
45
+ # add('.githooks/pre-commit') #, template_subfolder: 'ruby', template_file: 'pre-commit')
46
+
47
+ # run_command('chmod +x .githooks/commit-msg')
48
+ # run_command('chmod +x .githooks/pre-commit')
49
+
50
+ # add('.gitignore')
51
+
52
+ # add('bin/setup')
53
+ # add('bin/console')
54
+
55
+ # run_command('git config core.hooksPath .githooks') # enable sharable githooks (developer needs to turn this on before editing rep)
56
+ # run_command("gh repo edit -d \"#{dom[:application_description]}\"")
57
+
58
+ # run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
59
+ end
60
+ .blueprint(
61
+ name: :opinionated,
62
+ description: 'opinionated GEM files',
63
+ on_exist: :write) do
64
+
65
+ cd(:app)
66
+
67
+ dd = OpenStruct.new(dom)
68
+
69
+ # add("lib/#{dd.application}.rb" , template_file: 'lib/applet_name.rb' , dom: dom)
70
+ # add("lib/#{dd.application}/version.rb" , template_file: 'lib/applet_name/version.rb' , dom: dom)
71
+
72
+ # add('spec/spec_helper.rb')
73
+ # add("spec/#{dd.application}_spec.rb" , template_file: 'spec/applet_name_spec.rb', dom: dom)
74
+
75
+ # add("#{dd.application}.gemspec" , template_file: 'applet_name.gemspec', dom: dom)
76
+ # add('Gemfile', dom: dom)
77
+ # add('Guardfile', dom: dom)
78
+ # add('Rakefile', dom: dom)
79
+ # add('.rspec', dom: dom)
80
+ # add('.rubocop.yml', dom: dom)
81
+ # add('README.md', dom: dom)
82
+ # add('docs/CODE_OF_CONDUCT.md', dom: dom)
83
+ # add('docs/LICENSE.txt', dom: dom)
84
+
85
+ # run_command("rubocop -a")
86
+
87
+ # run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
88
+ end
89
+ .blueprint(
90
+ name: :ci_cd,
91
+ description: 'github actions (CI/CD)',
92
+ on_exist: :write) do
93
+
94
+ cd(:app)
95
+
96
+ # run_command("gh secret set SLACK_WEBHOOK --body \"$SLACK_REPO_WEBHOOK\"")
97
+ # run_command("gh secret set GEM_HOST_API_KEY --body \"$GEM_HOST_API_KEY\"")
98
+ # add('.github/workflows/main.yml')
99
+
100
+ # add('package.json')
101
+
102
+ # run_command('npm install -D --package-lock-only semantic-release')
103
+ # run_command('npm install -D --package-lock-only @semantic-release/changelog')
104
+ # run_command('npm install -D --package-lock-only @semantic-release/git')
105
+ # run_command('npm install -D --package-lock-only https://github.com/klueless-js/semantic-release-rubygem')
106
+ # add('.releaserc.json')
107
+
108
+ run_command("git add .; git commit -m 'fix: #{self.options.description.downcase}'; git push")
109
+ end
110
+
111
+ # director.k_builder.debug
112
+ director.play_actions
113
+ # director.builder.logit
114
+ end
115
+ end
116
+
117
+ KManager.opts.app_name = 'Boot Strap'
118
+ KManager.opts.sleep = 2
119
+ KManager.opts.reboot_on_kill = 0
120
+ KManager.opts.reboot_sleep = 4
121
+ KManager.opts.exception_style = :short
122
+ KManager.opts.show.time_taken = true
123
+ KManager.opts.show.finished = true
124
+ KManager.opts.show.finished_message = 'FINISHED :)'
125
+
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # template_variant: :ruby
4
+
5
+ if ! head -1 "$1" | grep -qE "^.{1,200}$"; then
6
+ echo -e "\033[41mAborting commit. Your commit message is too long.\033[0m" >&2
7
+ exit 1
8
+ fi
9
+ if ! head -1 "$1" | grep -qE "^(merge master)"; then
10
+ exit 0
11
+ fi
12
+ if ! head -1 "$1" | grep -qE "^(feat|fix|ci|chore|docs|test|style|refactor|perf|build|revert)(\(.+?\))?!?: .{1,}$"; then
13
+ echo -e "\033[41mWARNING: this commit does not follow conventional commit message guidelines\033[0m" >&2
14
+ fi
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # template_variant: :ruby
5
+
6
+ require 'English'
7
+
8
+ # NOTE: you may need change file permissions
9
+ # chmod +x hooks/pre-commit
10
+
11
+ exit 0 if ARGV.include?('--no-verify')
12
+
13
+ warning_keywords = %w[console.log]
14
+ keywords = %w[binding.pry console.dir byebug debugger]
15
+ files_changed = `git diff-index --name-only HEAD --`.split
16
+
17
+ # puts '----------------------------------------------------------------------'
18
+ # puts remove files changed from the pre-commit checking if they are one of the following files
19
+ # puts '----------------------------------------------------------------------'
20
+ # files_changed = files_changed - ['hooks/pre-commit']
21
+ # files_changed = files_changed - ['hooks/update-version']
22
+
23
+ # byebug may need to be in these files
24
+ files_changed -= ['Gemfile']
25
+ files_changed -= ['Gemfile.lock']
26
+ files_changed -= ['.gitignore']
27
+ files_changed -= ['README.md']
28
+
29
+ files_changed = files_changed.reject { |f| f.downcase.end_with?('.json') }
30
+ files_changed = files_changed.reject { |f| f.downcase.end_with?('.yml') }
31
+
32
+ # ignore files from specific folders
33
+
34
+ file_groups = files_changed.select do |item|
35
+ item.start_with?('.githooks') # ||
36
+ # item.start_with?('lib/generators')
37
+ end
38
+
39
+ files_changed -= file_groups
40
+
41
+ # remove files that are changed because they are deleted
42
+ files_changed = files_changed.select { |filename| File.file?(filename) }
43
+
44
+ # puts '----------------------------------------------------------------------'
45
+ # puts 'Files Changed'
46
+ # puts '----------------------------------------------------------------------'
47
+ # puts files_changed
48
+ # puts '----------------------------------------------------------------------'
49
+
50
+ unless files_changed.length.zero?
51
+ # puts "#{keywords.join('|')}"
52
+ # puts "#{files_changed.join(' ')}"
53
+
54
+ `git grep -q -E "#{warning_keywords.join('|')}" #{files_changed.join(' ')}`
55
+
56
+ if $CHILD_STATUS.exitstatus.zero?
57
+ puts '' # Check following lines:''
58
+ puts $CHILD_STATUS.exitstatus
59
+ files_changed.each do |file|
60
+ warning_keywords.each do |keyword|
61
+ # puts "#{keyword} ::: #{file}"
62
+ `git grep -q -E #{keyword} #{file}`
63
+ if $CHILD_STATUS.exitstatus.zero?
64
+ line = `git grep -n #{keyword} #{file} | awk -F ":" '{print $2}'`.split.join(', ')
65
+ puts "WARNING:\t\033[31m#{file}\033[0m contains #{keyword} at line \033[33m#{line}\033[0m."
66
+ end
67
+ end
68
+ end
69
+ end
70
+
71
+ `git grep -q -E "#{keywords.join('|')}" #{files_changed.join(' ')}`
72
+
73
+ if $CHILD_STATUS.exitstatus.zero?
74
+ puts '' # Check following lines:''
75
+ puts $CHILD_STATUS.exitstatus
76
+ files_changed.each do |file|
77
+ keywords.each do |keyword|
78
+ # puts "#{keyword} ::: #{file}"
79
+ `git grep -q -E #{keyword} #{file}`
80
+ if $CHILD_STATUS.exitstatus.zero?
81
+ line = `git grep -n #{keyword} #{file} | awk -F ":" '{print $2}'`.split.join(', ')
82
+ puts "ERROR :\t\033[31m#{file}\033[0m contains #{keyword} at line \033[33m#{line}\033[0m."
83
+ end
84
+ end
85
+ end
86
+ puts '# Force commit with --no-verify'
87
+ exit 1
88
+ end
89
+ end
@@ -0,0 +1,89 @@
1
+ name: Build Application
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ name: Ruby ${{ matrix.ruby }}
13
+ strategy:
14
+ matrix:
15
+ ruby: ['2.7.1'] #, '3.1.0']
16
+
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby }}
23
+ bundler-cache: true
24
+
25
+ - id: lint
26
+ name: Run rubocop
27
+ run: bundle exec rubocop
28
+
29
+ - name: Slack notification on rubocop error
30
+ if: steps.lint.conclusion == 'failure'
31
+ uses: rtCamp/action-slack-notify@v2
32
+ env:
33
+ SLACK_CHANNEL: klueless-repos
34
+ SLACK_COLOR: '#ff0000'
35
+ SLACK_ICON: https://avatars.githubusercontent.com/u/2956762?s=64&v=4
36
+ SLACK_TITLE: 'Rubocop failure on ${{github.repository}} - try:'
37
+ SLACK_MESSAGE: 'cop -a'
38
+ SLACK_USERNAME: klueless-io
39
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
40
+
41
+ - id: rspec
42
+ name: Run tests
43
+ run: bundle exec rspec
44
+
45
+ - name: Slack notify on rspec error
46
+ if: steps.rspec.conclusion == 'failure'
47
+ uses: rtCamp/action-slack-notify@v2
48
+ env:
49
+ SLACK_CHANNEL: klueless-repos
50
+ SLACK_COLOR: '#ff0000'
51
+ SLACK_ICON: https://avatars.githubusercontent.com/u/2956762?s=64&v=4
52
+ SLACK_TITLE: 'RSpec failure on $ - try:'
53
+ SLACK_MESSAGE: 'rspec'
54
+ SLACK_USERNAME: klueless-io
55
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
56
+
57
+ release:
58
+ needs: build
59
+ name: Update version and publish to RubyGems
60
+ runs-on: ubuntu-latest
61
+ steps:
62
+ - uses: actions/checkout@v2
63
+ - uses: actions/setup-node@v2
64
+ with:
65
+ node-version: '16'
66
+
67
+ - name: Cache node modules
68
+ uses: actions/cache@v2
69
+ id: cache-node-modules
70
+ env:
71
+ cache-name: cache-node-modules
72
+ with:
73
+ path: ~/.npm
74
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
75
+ restore-keys: |
76
+ ${{ runner.os }}-build-${{ env.cache-name }}-
77
+ ${{ runner.os }}-build-
78
+ ${{ runner.os }}-
79
+
80
+ - name: Install semantic-release dependencies
81
+ if: steps.cache.outputs.cache-hit != 'true'
82
+ run: npm ci
83
+
84
+ # SEE MORE: https://github.com/semantic-release/semantic-release/issues/753
85
+ - name: Run SemVer
86
+ run: npm run release
87
+ env:
88
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89
+ GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
data/.gitignore ADDED
@@ -0,0 +1,46 @@
1
+ # Move this into a KLUE SATELITE DOCUMENT
2
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
3
+ #
4
+ # If you find yourself ignoring temporary files generated by your text editor
5
+ # or operating system, you probably want to add a global ignore instead:
6
+ # git config --global core.excludesfile '~/.gitignore_global'
7
+ #
8
+ # The Octocat has a Gist containing some good rules to add to this file.
9
+ # https://gist.github.com/octocat/9257657
10
+
11
+ /_/
12
+ /.bundle/
13
+ /.history/
14
+ /.yardoc
15
+ /_yardoc/
16
+ /coverage/
17
+ /log/
18
+ !/log/.keep
19
+ /doc/
20
+ /pkg/
21
+ /spec/reports/
22
+ /tmp/
23
+ !/tmp/.keep
24
+ *.bundle
25
+ *.so
26
+ *.o
27
+ *.a
28
+ mkmf.log
29
+
30
+ # Ruby Version
31
+ .ruby-version
32
+
33
+ # Environment File
34
+ .env
35
+
36
+ # Gems should not use a Gemfile.lock
37
+ Gemfile.lock
38
+
39
+ # RubyGem definitions
40
+ *.gem
41
+
42
+ # rspec failure tracking
43
+ .rspec_status
44
+
45
+ # ByeBug history
46
+ .byebug_history
data/.releaserc.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "branches": [
3
+ "main"
4
+ ],
5
+ "plugins": [
6
+ "@semantic-release/commit-analyzer",
7
+ "@semantic-release/release-notes-generator",
8
+ [
9
+ "@semantic-release/npm",
10
+ {
11
+ "npmPublish": false
12
+ }
13
+ ],
14
+ [
15
+ "@klueless-js/semantic-release-rubygem",
16
+ {
17
+ "gemPublish": true
18
+ }
19
+ ],
20
+ [
21
+ "@semantic-release/changelog",
22
+ {
23
+ "changelogFile": "docs/CHANGELOG.md",
24
+ "changelogFileTitle": "K Config Changelog"
25
+ }
26
+ ],
27
+ [
28
+ "@semantic-release/git",
29
+ {
30
+ "assets": [
31
+ "lib/k_config/version.rb",
32
+ "docs/CHANGELOG.md"
33
+ ],
34
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
35
+ }
36
+ ],
37
+ "@semantic-release/github"
38
+ ],
39
+ "repositoryUrl": "git@github.com:klueless-io/k_config.git"
40
+ }
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,86 @@
1
+ inherit_mode:
2
+ merge:
3
+ - Exclude # see: https://stackoverflow.com/a/70818366/473923
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.7
7
+ DisplayCopNames: true
8
+ ExtraDetails: true
9
+ NewCops: enable
10
+ Exclude:
11
+ - ".builders/**/*"
12
+ - "spec/samples/**/*"
13
+
14
+ Metrics/BlockLength:
15
+ Exclude:
16
+ - "**/spec/**/*"
17
+ - "*.gemspec"
18
+ IgnoredMethods:
19
+ - configure
20
+ - context
21
+ - define
22
+ - describe
23
+ - draw
24
+ - factory
25
+ - feature
26
+ - guard
27
+ - included
28
+ - it
29
+ - let
30
+ - let!
31
+ - scenario
32
+ - setup
33
+ - shared_context
34
+ - shared_examples
35
+ - shared_examples_for
36
+ - transaction
37
+
38
+ Metrics/MethodLength:
39
+ Max: 25
40
+
41
+ Layout/LineLength:
42
+ Max: 200
43
+ # Ignores annotate output
44
+ IgnoredPatterns: ['\A# \*\*']
45
+ IgnoreCopDirectives: true
46
+
47
+ Lint/UnusedMethodArgument:
48
+ AllowUnusedKeywordArguments: true
49
+
50
+ Style/BlockComments:
51
+ Enabled: false
52
+ Include:
53
+ - "**/spec/*"
54
+
55
+ # My Preferences - Start
56
+ Metrics/ClassLength:
57
+ Enabled: false
58
+ Metrics/ModuleLength:
59
+ Exclude:
60
+ - "**/spec/**/*"
61
+ Naming/MemoizedInstanceVariableName:
62
+ Enabled: false
63
+ Naming/VariableNumber:
64
+ Exclude:
65
+ - "**/spec/**/*"
66
+ Style/EmptyMethod:
67
+ Exclude:
68
+ - "**/spec/**/*"
69
+ Metrics/ParameterLists:
70
+ Exclude:
71
+ - "**/spec/**/*"
72
+ Layout/EmptyLineBetweenDefs:
73
+ Exclude:
74
+ - "**/spec/**/*"
75
+
76
+ Lint/AmbiguousBlockAssociation:
77
+ Exclude:
78
+ - "**/spec/**/*"
79
+
80
+ Style/AccessorGrouping:
81
+ Enabled: false
82
+
83
+ Layout/SpaceBeforeComma:
84
+ Enabled: false
85
+ # My Preferences - End
86
+
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-02-04
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at david@ideasmen.com.au. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ group :development, :test do
8
+ gem 'guard-bundler'
9
+ gem 'guard-rspec'
10
+ gem 'guard-rubocop'
11
+ gem 'rake', '~> 12.0'
12
+ gem 'rake-compiler', require: false
13
+ gem 'rspec', '~> 3.0'
14
+ gem 'rubocop'
15
+ gem 'rubocop-rake', require: false
16
+ gem 'rubocop-rspec', require: false
17
+ end