k_config 0.0.3 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1edaa1dc5bed9b7c3647d4026db9c9a63912bad4d98b018202da5ae2b4cc1dc3
4
- data.tar.gz: 1128004ce02570411ded4c05301912bd3f8e7ba31cbe408357bdafcd6bb008c7
3
+ metadata.gz: dd8d4fc8e8c4291d047f032e19900d41bdd819588300452c7f8af02a145c67a8
4
+ data.tar.gz: 814febe7d01f18a153dcb95eaf59242253fe63c8f94fe8d425e0e30a2ac11311
5
5
  SHA512:
6
- metadata.gz: 4cd0fef80d6e75ecc2116c693ec96f0950bd2cd2dca1a493909f1761e5b5ac6f879318d1d5f0af87bbcacb4e238dbfa9ad2676d9ab2afdc0dd71f03664811aa4
7
- data.tar.gz: '0918a50a5de0aa66aace3f54d90fb29c5da9f0f9d57246e1b06329dca02d5e2380b89e7ffcea58d202deac95e45994e1d52a23ca528fd703c9da35cee1cf79a1'
6
+ metadata.gz: f874439d7e25c67a1d77df4451639f8187bb07c83bb7f6032b083f3eff4960b9b64bfab85e701ba80e9c78abcfcd7258dfdcad7ce0122b1d228db7e580dc60e8
7
+ data.tar.gz: b17a2572759f1120ea29674b059ddeabf7b27daedabf7d3b099490a6e97ff3f1436b0cdd8024afeb64f0092c33cbca543906cf44ef738111b3132721e4e9a33c
@@ -105,7 +105,7 @@ KManager.action :bootstrap do
105
105
  # run_command('npm install -D --package-lock-only https://github.com/klueless-js/semantic-release-rubygem')
106
106
  # add('.releaserc.json')
107
107
 
108
- run_command("git add .; git commit -m 'fix: #{self.options.description.downcase}'; git push")
108
+ # run_command("git add .; git commit -m 'fix: #{self.options.description.downcase}'; git push")
109
109
  end
110
110
 
111
111
  # director.k_builder.debug
data/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,33 @@
1
+ ## [0.0.6](https://github.com/klueless-io/k_config/compare/v0.0.5...v0.0.6) (2022-02-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add support for initialize hook ([2249edd](https://github.com/klueless-io/k_config/commit/2249edd72cfc8054b8fc18391bca907446d066db))
7
+
8
+ ## [0.0.5](https://github.com/klueless-io/k_config/compare/v0.0.4...v0.0.5) (2022-02-04)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add registered extensions and support for debug and initialize_copy inside of registered extensions ([da0d62d](https://github.com/klueless-io/k_config/commit/da0d62dcd6b4d1c4f556e2bccf6bde56a06baf8c))
14
+ * add registered extensions and support for debug and initialize_copy inside of registered extensions ([ce35adb](https://github.com/klueless-io/k_config/commit/ce35adb700c16e189da7a70d9aa206a91f629f99))
15
+ * flakey test ([ca87322](https://github.com/klueless-io/k_config/commit/ca873225580d406c0a2dc8709f04a9dd223b5c23))
16
+
17
+ ## [0.0.4](https://github.com/klueless-io/k_config/compare/v0.0.3...v0.0.4) (2022-02-04)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * add custom debug support ([5e1c344](https://github.com/klueless-io/k_config/commit/5e1c34444a23b7e3e9d50106524ed055e50d2d9b))
23
+
24
+ ## [0.0.3](https://github.com/klueless-io/k_config/compare/v0.0.2...v0.0.3) (2022-02-04)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * update gem dependancies ([6de42d0](https://github.com/klueless-io/k_config/commit/6de42d0d94b447a4a246a8889b4e5c88af3427f2))
30
+
1
31
  ## [0.0.2](https://github.com/klueless-io/k_config/compare/v0.0.1...v0.0.2) (2022-02-04)
2
32
 
3
33
 
@@ -2,9 +2,64 @@
2
2
 
3
3
  module KConfig
4
4
  # Configuration object for all k_* GEMs.
5
+ #
6
+ # Hooks:
7
+ # You can use hooks to add your own customizations to configuration extensions.
5
8
  class Configuration
6
9
  include KUtil::Data::InstanceVariablesToH
10
+ include KLog::Logging
7
11
 
8
12
  attr_accessor :config_name
13
+
14
+ # Initialize configuration.
15
+ #
16
+ # Will call #{configuration_key}_initialize method if it exists.
17
+ def initialize
18
+ self.class.registered_keys.each do |key|
19
+ method = "#{key}_initialize".to_sym
20
+ send(method) if respond_to?(method)
21
+ end
22
+ end
23
+
24
+ # Debug configuration is used for debugging.
25
+ #
26
+ # Will call #{configuration_key}_debug method if it exists.
27
+ def debug
28
+ log.section_heading(config_name) if config_name
29
+
30
+ self.class.registered_keys.each do |key|
31
+ method = "#{key}_debug".to_sym
32
+ send(method) if respond_to?(method)
33
+ end
34
+ end
35
+
36
+ # Initialize_copy, used during clone.
37
+ #
38
+ # Will call #{configuration_key}_initialize_copy method if it exists.
39
+ def initialize_copy(orig)
40
+ self.class.registered_keys.each do |key|
41
+ method = "#{key}_initialize_copy".to_sym
42
+ send(method, orig) if respond_to?(method)
43
+ end
44
+ end
45
+
46
+ class << self
47
+ def registered_keys
48
+ @registered_keys ||= []
49
+ end
50
+
51
+ # Register configuration extension key
52
+ #
53
+ # This key provides a unique method name prefix to common methods such as debug and initialize_copy
54
+ def register(key, extension)
55
+ if registered_keys.include?(key)
56
+ puts "Key #{key} already registered ... skipping"
57
+ return registered_keys
58
+ end
59
+
60
+ include(extension)
61
+ registered_keys << key
62
+ end
63
+ end
9
64
  end
10
65
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KConfig
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.7'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_config",
3
- "version": "0.0.3",
3
+ "version": "0.0.7",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "k_config",
9
- "version": "0.0.3",
9
+ "version": "0.0.7",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.1",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k_config",
3
- "version": "0.0.3",
3
+ "version": "0.0.7",
4
4
  "description": "Command line and CI/CD tools for K Config",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: k_log
@@ -68,8 +68,6 @@ files:
68
68
  - ".releaserc.json"
69
69
  - ".rspec"
70
70
  - ".rubocop.yml"
71
- - CHANGELOG.md
72
- - CODE_OF_CONDUCT.md
73
71
  - Gemfile
74
72
  - Guardfile
75
73
  - LICENSE.txt
data/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- ## [Unreleased]
2
-
3
- ## [0.1.0] - 2022-02-04
4
-
5
- - Initial release
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
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.