k_config 0.0.5 → 0.0.8

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: 29acae4b3b93be3b2f682d783634c24f0bc9b6350f4ec62ff2cdc7dd66aef5b2
4
- data.tar.gz: 4ee04847aac6dd11a21108835f0b2040a9bd88c5cd1668f2296e4e6ba4536e68
3
+ metadata.gz: b9ff8e5f89aa9997d553aff14c17957a018e4e8f1038d75b69841acec90d1d23
4
+ data.tar.gz: 4820b7027b214d24b263578703e07a7f4699a02733a427d5fad82e20e663699d
5
5
  SHA512:
6
- metadata.gz: 3f1bda2d981ad6a02e34a2c56792e60dac755f36c929edbd837f092e89cf37ea909c1b47dd02d07501bbfe358e699bd73de8b4ba64a552b6fc28bc3148dd363c
7
- data.tar.gz: 85e9ae1e7fa10e326ef1eedccd76d2d71657b56bc96635433fe5a5d0b9ef4602f525fff0d9813b5d629fd95da00ecac0b1400fa5a034fa7c9faba781147c6118
6
+ metadata.gz: 867d0dad8f8793c736b3ad9445f2c60111659aa98571f88eca48cc6a578ffd31f344214dbfdf43acf93a58549d73e16560f3526ef1054e032d50a816e5fb1e64
7
+ data.tar.gz: 11121640d78cc614c3e0bb282a51ebc9d6c4f3d9e9ce8161dd37da547ccfaeafabc3bd96353dce630d0d865907e43e9e32e00f60092bc5a920149c8719377196
data/.builders/boot.rb CHANGED
@@ -37,10 +37,10 @@ def dasherize
37
37
  end
38
38
 
39
39
  def k_builder
40
- @k_builder ||= KBuilder::BaseBuilder.init(KBuilder.configuration(CONFIG_KEY))
40
+ @k_builder ||= KBuilder::BaseBuilder.init(KConfig.configuration(CONFIG_KEY))
41
41
  end
42
42
 
43
- KBuilder.configure(CONFIG_KEY) do |config|
43
+ KConfig.configure(CONFIG_KEY) do |config|
44
44
  builder_folder = Dir.pwd
45
45
  base_folder = File.expand_path('../', builder_folder)
46
46
  global_template = File.expand_path('~/dev/kgems/k_templates/templates')
@@ -52,7 +52,7 @@ KBuilder.configure(CONFIG_KEY) do |config|
52
52
  config.target_folders.add(:builder , builder_folder)
53
53
  end
54
54
 
55
- KBuilder.configuration(CONFIG_KEY).debug
55
+ KConfig.configuration(CONFIG_KEY).debug
56
56
 
57
57
  area = KManager.add_area(CONFIG_KEY)
58
58
  resource_manager = area.resource_manager
@@ -62,4 +62,4 @@ resource_manager
62
62
  .glob('generators/**/*.rb')
63
63
  resource_manager.add_resources
64
64
 
65
- KManager.fire_actions(:load_content, :register_document, :load_document)
65
+ KManager.boot
@@ -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,27 @@
1
+ ## [0.0.7](https://github.com/klueless-io/k_config/compare/v0.0.6...v0.0.7) (2022-02-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix cops ([5bab6f2](https://github.com/klueless-io/k_config/commit/5bab6f2fbebf565e2acba566f237c1d9969a82ec))
7
+ * remove redunant documents ([4aa4d13](https://github.com/klueless-io/k_config/commit/4aa4d13f8453ffdd184bdecb56313c3bf49e65ac))
8
+
9
+ ## [0.0.6](https://github.com/klueless-io/k_config/compare/v0.0.5...v0.0.6) (2022-02-05)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * add support for initialize hook ([2249edd](https://github.com/klueless-io/k_config/commit/2249edd72cfc8054b8fc18391bca907446d066db))
15
+
16
+ ## [0.0.5](https://github.com/klueless-io/k_config/compare/v0.0.4...v0.0.5) (2022-02-04)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * add registered extensions and support for debug and initialize_copy inside of registered extensions ([da0d62d](https://github.com/klueless-io/k_config/commit/da0d62dcd6b4d1c4f556e2bccf6bde56a06baf8c))
22
+ * add registered extensions and support for debug and initialize_copy inside of registered extensions ([ce35adb](https://github.com/klueless-io/k_config/commit/ce35adb700c16e189da7a70d9aa206a91f629f99))
23
+ * flakey test ([ca87322](https://github.com/klueless-io/k_config/commit/ca873225580d406c0a2dc8709f04a9dd223b5c23))
24
+
1
25
  ## [0.0.4](https://github.com/klueless-io/k_config/compare/v0.0.3...v0.0.4) (2022-02-04)
2
26
 
3
27
 
@@ -2,12 +2,28 @@
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
7
10
  include KLog::Logging
8
11
 
9
12
  attr_accessor :config_name
10
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.
11
27
  def debug
12
28
  log.section_heading(config_name) if config_name
13
29
 
@@ -17,6 +33,9 @@ module KConfig
17
33
  end
18
34
  end
19
35
 
36
+ # Initialize_copy, used during clone.
37
+ #
38
+ # Will call #{configuration_key}_initialize_copy method if it exists.
20
39
  def initialize_copy(orig)
21
40
  self.class.registered_keys.each do |key|
22
41
  method = "#{key}_initialize_copy".to_sym
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KConfig
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.8'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_config",
3
- "version": "0.0.5",
3
+ "version": "0.0.8",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "k_config",
9
- "version": "0.0.5",
9
+ "version": "0.0.8",
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.5",
3
+ "version": "0.0.8",
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.5
4
+ version: 0.0.8
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-04-08 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.