appydave-tools 0.3.0 → 0.3.2

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: 8286d4b7e2b48f01b4e30595bbcd36e13a34e4ab73d97001e7ad45271af7cefb
4
- data.tar.gz: ef6a38bddb0a0c40a812d7ffc66750072771d12377dcf63518eaab43472b42ae
3
+ metadata.gz: b3a84090fe26e9b28b2947af82cf7647f6f6bcbf3e0b0f0bd8cbcfddb9513c1a
4
+ data.tar.gz: 8cf4b4251ef2eff3fe897fa0ec545ffbf18f18f48700dea1978072ece796520a
5
5
  SHA512:
6
- metadata.gz: 5db672453f1c471840a0d3eee7df1af36a58f1639b3d8351741c3c0d884fb44552472f1b999b0dac1f5bd2e0d77323a17844dca0148eebbb7d8e407f400ada97
7
- data.tar.gz: fabecbfaa7e9a906479edeae8f29e49e14facc3eeceed148c9c04e15780b978891514e4b1c80f3690bfaf0106721fd8dad5547d50f54145f9378d54ee23ee292
6
+ metadata.gz: bf89c55719c8d05e1a49d695945675c3163d2715c76453ffb5c14ee00a70814df164fce00a2aded2d131f6e69fd09611d9ce7c1662bd419e483c6f00c6e4c75b
7
+ data.tar.gz: 5382b10ff12234a3d0a1fafc901a035342c89f7d7ed233656a6a75f5185f52f1a4ab42cd00b6cfb955a2a1677123864e3a96b2e85d6645c56e090953df2741c4
data/.rubocop.yml CHANGED
@@ -109,3 +109,5 @@ RSpec/NamedSubject:
109
109
  RSpec/MultipleExpectations:
110
110
  Max: 5
111
111
 
112
+ RSpec/NestedGroups:
113
+ Max: 8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [0.3.1](https://github.com/klueless-io/appydave-tools/compare/v0.3.0...v0.3.1) (2024-05-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add settings config to configuration component ([2c8afd1](https://github.com/klueless-io/appydave-tools/commit/2c8afd164fd6aa00fa47a01c9007c784a8adf820))
7
+
8
+ # [0.3.0](https://github.com/klueless-io/appydave-tools/compare/v0.2.0...v0.3.0) (2024-05-16)
9
+
10
+
11
+ ### Features
12
+
13
+ * configuration component ([2bf26f6](https://github.com/klueless-io/appydave-tools/commit/2bf26f690da17b651977eab79e7a3cd37ed2a3b5))
14
+
1
15
  # [0.2.0](https://github.com/klueless-io/appydave-tools/compare/v0.1.0...v0.2.0) (2024-05-14)
2
16
 
3
17
 
@@ -0,0 +1,3 @@
1
+ # Configuration Component
2
+
3
+ [ChatGPT conversation](https://chatgpt.com/g/g-4dMsIRK3E-ruby-script-assistant/c/d8ea5960-071b-48aa-9fd9-554ca302c7dd)
@@ -16,7 +16,7 @@ module Appydave
16
16
 
17
17
  def register(key, klass)
18
18
  @configurations ||= {}
19
- @configurations[key] = klass.new(config_base_path: config_path)
19
+ @configurations[key] = klass.new
20
20
  end
21
21
 
22
22
  def method_missing(method_name, *args, &block)
@@ -10,7 +10,7 @@ module Appydave
10
10
  class ConfigBase
11
11
  attr_reader :config_path, :data
12
12
 
13
- def initialize(config_name)
13
+ def initialize(config_name = 'unknown')
14
14
  @config_path = File.join(Config.config_path, "#{config_name}.json")
15
15
  @data = load
16
16
  end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'json'
4
+ require 'fileutils'
5
+
6
+ module Appydave
7
+ module Tools
8
+ module Configuration
9
+ # Specific configuration classes
10
+ class SettingsConfig < ConfigBase
11
+ def initialize
12
+ super('settings')
13
+ end
14
+ end
15
+
16
+ # class GptContextConfig < ConfigBase
17
+ # def initialize
18
+ # super('gpt_context')
19
+ # end
20
+ # end
21
+
22
+ # class ImageMoverConfig < ConfigBase
23
+ # def initialize
24
+ # super('image_mover')
25
+ # end
26
+ # end
27
+ end
28
+ end
29
+ end
@@ -1,29 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'json'
4
- require 'fileutils'
5
-
6
3
  module Appydave
7
4
  module Tools
8
5
  module Configuration
9
- # Specific configuration classes
6
+ # Global settings that can be referenced by other configurations or tools
10
7
  class SettingsConfig < ConfigBase
11
8
  def initialize
12
9
  super('settings')
13
10
  end
14
- end
15
11
 
16
- # class GptContextConfig < ConfigBase
17
- # def initialize
18
- # super('gpt_context')
19
- # end
20
- # end
12
+ def set(key, value)
13
+ data[key] = value
14
+ end
21
15
 
22
- # class ImageMoverConfig < ConfigBase
23
- # def initialize
24
- # super('image_mover')
25
- # end
26
- # end
16
+ def get(key, default = nil)
17
+ data.fetch(key, default)
18
+ end
19
+ end
27
20
  end
28
21
  end
29
22
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.2'
6
6
  end
7
7
  end
@@ -10,8 +10,8 @@ require 'appydave/tools/version'
10
10
  require 'appydave/tools/gpt_context/file_collector'
11
11
 
12
12
  require 'appydave/tools/configuration/config_base'
13
- require 'appydave/tools/configuration/settings_config'
14
13
  require 'appydave/tools/configuration/config'
14
+ require 'appydave/tools/configuration/settings_config'
15
15
 
16
16
  module Appydave
17
17
  module Tools
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appydave-tools",
9
- "version": "0.3.0",
9
+ "version": "0.3.2",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.3",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "AppyDave YouTube Automation Tools",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appydave-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -48,8 +48,10 @@ files:
48
48
  - bin/gpt_context.rb
49
49
  - bin/setup
50
50
  - lib/appydave/tools.rb
51
+ - lib/appydave/tools/configuration/_doc.md
51
52
  - lib/appydave/tools/configuration/config.rb
52
53
  - lib/appydave/tools/configuration/config_base.rb
54
+ - lib/appydave/tools/configuration/settings_config copy.xrb
53
55
  - lib/appydave/tools/configuration/settings_config.rb
54
56
  - lib/appydave/tools/gpt_context/file_collector.rb
55
57
  - lib/appydave/tools/version.rb