appydave-tools 0.3.5 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/appydave/tools/configuration/config.rb +12 -1
- data/lib/appydave/tools/gpt_context/file_collector.rb +2 -0
- data/lib/appydave/tools/name_manager/project_name.rb +19 -6
- data/lib/appydave/tools/version.rb +1 -1
- data/lib/appydave/tools.rb +2 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b784a1ec20492303e8e4f67b1492543456b4c1b9b65a9d569fc364f2493e17ca
|
4
|
+
data.tar.gz: 7482ddc3382d2b7284a7db3a9e5fe4496b8cb7202f3d18f8d4b0396507ae35b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 158e93d40b043b74eeb1f46f3fde47b342ccd37ca67fe448c458a9cd671fa6072ba530dcd355922ec7deb31b951bacac200526e266e3314357ba4d4ae552acaf
|
7
|
+
data.tar.gz: a6cd05c7cfb91ec0e9308f8d39bfe72a939426d611bd72f9dce98b527bdca7149aebb28ffa1da93e8ba4e40b206ac224c18b44f233cff702f476335ef0c854ea
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## [0.3.6](https://github.com/klueless-io/appydave-tools/compare/v0.3.5...v0.3.6) (2024-05-19)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add default configuration and support for project name ([65d7c3e](https://github.com/klueless-io/appydave-tools/commit/65d7c3e8b05bbf9db4510762cccbd419ca988611))
|
7
|
+
* fix issue in CI[#1](https://github.com/klueless-io/appydave-tools/issues/1) ([867937e](https://github.com/klueless-io/appydave-tools/commit/867937e2ed271e4afe8dbbe3b3cee9d5ff15d986))
|
8
|
+
|
9
|
+
## [0.3.5](https://github.com/klueless-io/appydave-tools/compare/v0.3.4...v0.3.5) (2024-05-19)
|
10
|
+
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
* add support for configurable ([82852f8](https://github.com/klueless-io/appydave-tools/commit/82852f805809b133278de70be24314e83a1d4b05))
|
15
|
+
|
1
16
|
## [0.3.4](https://github.com/klueless-io/appydave-tools/compare/v0.3.3...v0.3.4) (2024-05-19)
|
2
17
|
|
3
18
|
|
@@ -10,9 +10,16 @@ module Appydave
|
|
10
10
|
|
11
11
|
attr_accessor :config_path
|
12
12
|
attr_reader :configurations
|
13
|
+
attr_reader :default_block
|
13
14
|
|
14
15
|
def configure
|
15
|
-
|
16
|
+
if block_given?
|
17
|
+
yield self
|
18
|
+
elsif default_block
|
19
|
+
default_block.call(self)
|
20
|
+
else
|
21
|
+
raise Appydave::Tools::Error, 'No configuration block provided'
|
22
|
+
end
|
16
23
|
ensure_config_directory
|
17
24
|
end
|
18
25
|
|
@@ -35,6 +42,10 @@ module Appydave
|
|
35
42
|
configurations.each_value(&:save)
|
36
43
|
end
|
37
44
|
|
45
|
+
def set_default(&block)
|
46
|
+
@default_block = block
|
47
|
+
end
|
48
|
+
|
38
49
|
def load
|
39
50
|
configurations.each_value(&:load)
|
40
51
|
end
|
@@ -6,7 +6,10 @@ module Appydave
|
|
6
6
|
module NameManager
|
7
7
|
# Parses and generates project names for Appydave video projects
|
8
8
|
class ProjectName
|
9
|
-
|
9
|
+
include Appydave::Tools::Configuration::Configurable
|
10
|
+
|
11
|
+
attr_accessor :sequence, :project_name
|
12
|
+
attr_reader :channel_code
|
10
13
|
|
11
14
|
def initialize(file_name)
|
12
15
|
parse_file_name(file_name)
|
@@ -20,8 +23,8 @@ module Appydave
|
|
20
23
|
end.downcase
|
21
24
|
end
|
22
25
|
|
23
|
-
def
|
24
|
-
|
26
|
+
def channel_code=(code)
|
27
|
+
@channel_code = (code if config.channels.code?(code))
|
25
28
|
end
|
26
29
|
|
27
30
|
private
|
@@ -29,10 +32,20 @@ module Appydave
|
|
29
32
|
def parse_file_name(file_name)
|
30
33
|
file_name = File.basename(file_name, File.extname(file_name))
|
31
34
|
parts = file_name.split('-')
|
35
|
+
length = parts.length
|
36
|
+
|
37
|
+
@sequence = part(parts, 0)
|
38
|
+
code = part(parts, 1)
|
39
|
+
if config.channels.code?(code)
|
40
|
+
@channel_code = code
|
41
|
+
@project_name = parts[2..length].join('-')
|
42
|
+
else
|
43
|
+
@project_name = parts[1..length].join('-')
|
44
|
+
end
|
45
|
+
end
|
32
46
|
|
33
|
-
|
34
|
-
|
35
|
-
@channel_code = parts.length == 3 ? parts[1] : nil
|
47
|
+
def part(parts, index)
|
48
|
+
parts[index] if parts.length > index
|
36
49
|
end
|
37
50
|
end
|
38
51
|
end
|
data/lib/appydave/tools.rb
CHANGED
@@ -18,7 +18,8 @@ require 'appydave/tools/configuration/channel_projects_config'
|
|
18
18
|
require 'appydave/tools/configuration/channels_config'
|
19
19
|
require 'appydave/tools/name_manager/project_name'
|
20
20
|
|
21
|
-
Appydave::Tools::Configuration::Config.
|
21
|
+
Appydave::Tools::Configuration::Config.set_default do |config|
|
22
|
+
config.config_path = File.expand_path('~/.config/appydave')
|
22
23
|
config.register(:settings, Appydave::Tools::Configuration::SettingsConfig)
|
23
24
|
config.register(:channels, Appydave::Tools::Configuration::ChannelsConfig)
|
24
25
|
config.register(:channel_projects, Appydave::Tools::Configuration::ChannelProjectsConfig)
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "appydave-tools",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.7",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "appydave-tools",
|
9
|
-
"version": "0.3.
|
9
|
+
"version": "0.3.7",
|
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