groovestack-config 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: '097d8434f04198c3846567bd39613f5115f44928467a66648b2cc146693b065e'
4
+ data.tar.gz: 94837f11253d620b2fd3d25abc286763a667897000c73613f11dadc615df76d4
5
+ SHA512:
6
+ metadata.gz: 8cc13abd5b99f3ed2787937b8394020fa0b9a85f9b7a7f440e1c91ea10c7e5ba3568050e89c4e5ec20d3c18798c15229834eb3011598d0fc3e5eadf167f51340
7
+ data.tar.gz: 7a5345de002f5b86f6ee5ff21fa1e717d22bd1aee15661b41a29c9d00db939e4563884863a6872bcee9ba1ee6b32ead58a272c5f2ff522bb0f2f1fc33175e75f
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,48 @@
1
+ plugins:
2
+ - rubocop-graphql
3
+ - rubocop-rails
4
+
5
+ AllCops:
6
+ NewCops: enable
7
+ TargetRubyVersion: 3.1.3
8
+
9
+ GraphQL/FieldDescription:
10
+ Enabled: false
11
+
12
+ GraphQL/ObjectDescription:
13
+ Enabled: false
14
+
15
+ Layout/LineLength:
16
+ Exclude:
17
+ - spec/**/*
18
+
19
+ Metrics/BlockLength:
20
+ Exclude:
21
+ - spec/**/*
22
+ - '*.gemspec'
23
+
24
+ Metrics/MethodLength:
25
+ Max: 20
26
+
27
+ # TODO: reenable and replace puts / logs with global, configurable logger
28
+ Rails/Output:
29
+ Enabled: false
30
+
31
+ Style/Documentation:
32
+ Enabled: false
33
+
34
+ Style/RedundantConstantBase:
35
+ Enabled: false
36
+
37
+
38
+
39
+ # Style/StringLiterals:
40
+ # Enabled: true
41
+ # EnforcedStyle: double_quotes
42
+
43
+ # Style/StringLiteralsInInterpolation:
44
+ # Enabled: true
45
+ # EnforcedStyle: double_quotes
46
+
47
+ # Layout/LineLength:
48
+ # Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.1] - 2025-04-13
4
+
5
+ - Initial release
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Groovestack::Config
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/groovestack/config`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/groovestack-config.
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/groovestack/config/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'groovestack-config'
7
+ spec.version = Groovestack::Config::VERSION
8
+ spec.authors = ['Max Schridde']
9
+ spec.email = ['maxjschridde@gmail.com']
10
+
11
+ spec.summary = 'Groovestack extension for application config'
12
+ spec.description = 'Groovestack::Config is a config extension for the Groovestack Platform.'
13
+ spec.post_install_message = 'Groovestack::Config installed'
14
+
15
+ spec.homepage = 'https://talysto.com/tech/groovestack/'
16
+ spec.required_ruby_version = '>= 3.1.3'
17
+
18
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
19
+
20
+ spec.metadata['homepage_uri'] = spec.homepage
21
+ spec.metadata['source_code_uri'] = 'https://github.com/talysto/groovestack-core/'
22
+ spec.metadata['changelog_uri'] = 'https://github.com/talysto/groovestack-core/'
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ spec.files = Dir.chdir(__dir__) do
27
+ `git ls-files -z`.split("\x0").reject do |f|
28
+ (File.expand_path(f) == __FILE__) ||
29
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
30
+ end
31
+ end
32
+ spec.bindir = 'exe'
33
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
34
+ spec.require_paths = ['lib']
35
+
36
+ # Uncomment to register a new dependency of your gem
37
+ spec.add_dependency 'groovestack-base', '~> 0.1.5'
38
+
39
+ # For more information and examples about making a new gem, check out our
40
+ # guide at: https://bundler.io/guides/creating_gem.html
41
+ spec.metadata['rubygems_mfa_required'] = 'true'
42
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Groovestack
4
+ module Config
5
+ module GraphQL
6
+ module App
7
+ module Queries
8
+ extend ActiveSupport::Concern
9
+
10
+ included do
11
+ field :AppConfig, ::GraphQL::Types::JSON, null: false # rubocop:disable GraphQL/FieldName
12
+ end
13
+
14
+ def AppConfig # rubocop:disable Naming/MethodName
15
+ Groovestack::Config::App.generate_config
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ if defined?(Rails)
4
+ module Groovestack
5
+ module Config
6
+ class Railtie < Rails::Engine
7
+ include ::Groovestack::Base::CoreRailtie
8
+
9
+ def dx_validations
10
+ []
11
+ end
12
+
13
+ initializer :append_initializers do |app|
14
+ append_initializers app
15
+ end
16
+
17
+ config.after_initialize do
18
+ after_init
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Groovestack
4
+ module Config
5
+ VERSION = '0.1.1'
6
+ end
7
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'groovestack/base'
4
+
5
+ require_relative 'config/version'
6
+ require_relative 'config/railtie' if defined?(Rails::Railtie)
7
+ require_relative 'config/graphql/app/queries'
8
+
9
+ module Groovestack
10
+ module Config
11
+ class Error < StandardError; end
12
+
13
+ class App
14
+ # rubocop:disable Style/ClassVars
15
+ @@config = { app_level: 0 }
16
+ @@dynamic_config = []
17
+ # rubocop:enable Style/ClassVars
18
+
19
+ def self.generate_config
20
+ @@config.merge(
21
+ @@dynamic_config.each_with_object({}) do |rule, config|
22
+ config[rule[:key]] = rule[:build].call
23
+ end
24
+ )
25
+ end
26
+
27
+ def self.dynamic_config
28
+ class_variable_get(:@@dynamic_config)
29
+ end
30
+
31
+ def self.dynamic_config_include?(key)
32
+ dynamic_config.any? { |rule| rule[:key] == key }
33
+ end
34
+ end
35
+ end
36
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: groovestack-config
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Max Schridde
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-04-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: groovestack-base
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.1.5
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.5
27
+ description: Groovestack::Config is a config extension for the Groovestack Platform.
28
+ email:
29
+ - maxjschridde@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".rspec"
35
+ - ".rubocop.yml"
36
+ - CHANGELOG.md
37
+ - README.md
38
+ - groovestack-config.gemspec
39
+ - lib/groovestack/config.rb
40
+ - lib/groovestack/config/graphql/app/queries.rb
41
+ - lib/groovestack/config/railtie.rb
42
+ - lib/groovestack/config/version.rb
43
+ homepage: https://talysto.com/tech/groovestack/
44
+ licenses: []
45
+ metadata:
46
+ allowed_push_host: https://rubygems.org
47
+ homepage_uri: https://talysto.com/tech/groovestack/
48
+ source_code_uri: https://github.com/talysto/groovestack-core/
49
+ changelog_uri: https://github.com/talysto/groovestack-core/
50
+ rubygems_mfa_required: 'true'
51
+ post_install_message: Groovestack::Config installed
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 3.1.3
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubygems_version: 3.3.26
67
+ signing_key:
68
+ specification_version: 4
69
+ summary: Groovestack extension for application config
70
+ test_files: []