k_director 0.10.3 → 0.10.4

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: fb7ed7623517d20d588f3fd176ee05dd8d28161d5164b099eaef39152475735d
4
- data.tar.gz: 54b3ce3d61554f6d6f85b82167b9f1fcb82de4ccaacd7ec970ca68ae8cf07ccf
3
+ metadata.gz: 698c7a115b9641c2e43e67a9687dc5915a4db15a01804213e8d9b032cc343989
4
+ data.tar.gz: 8c7fe44606d3d30bab53f338c40f9891673adc1758389cf26938946b936b7ae2
5
5
  SHA512:
6
- metadata.gz: d25fbb9ad8b1dcd71b6fb7a56a31d5a54022071f28559d0e31bb1d53b3274e6287342f87cca3ea2f0e7dd812f436db2eb4458454266e83ea5f9c4202d9d2ad34
7
- data.tar.gz: 486576cb37d37f4e973df1a4baf0a1430188d29a525fddc64b79528ed16f2bb830aa04de81fe65e94a3a258c5d8d75d1d901a7d1f272859f84430ad9cb48a1c8
6
+ metadata.gz: 89dde4df4e1e0560b05e73155cb22c508b299a7be4d43d6fea261f5fc26cd52ef62d13413f95638cb5832e259ff92aa5afead9ee48ec4d5a67bf815d2747b364
7
+ data.tar.gz: 37d154d3cf14db3b63eb83c9110851ff50cddc335d326bbf3676b74afd07c6e38b3a3bb34729f26c25024167a8fa2b6c243aa284b4e9764ce4ce1c424054047b
data/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.10.3](https://github.com/klueless-io/k_director/compare/v0.10.2...v0.10.3) (2022-02-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * package_json and multi-settings #settings(**opts, group: nil) ([7f23a08](https://github.com/klueless-io/k_director/commit/7f23a08751c3bca7ea99685f33a95eeed8786e1a))
7
+
1
8
  ## [0.10.2](https://github.com/klueless-io/k_director/compare/v0.10.1...v0.10.2) (2022-02-06)
2
9
 
3
10
 
@@ -32,6 +32,7 @@ module KDirector
32
32
  @options.template_base_folder ||= default_template_base_folder
33
33
  @options.on_exist ||= :skip # %i[skip write compare]
34
34
  @options.on_action ||= :queue # %i[queue execute]
35
+ @options.active = true unless defined?(@options.active)
35
36
  end
36
37
 
37
38
  def data(name = nil, **opts)
@@ -55,7 +56,8 @@ module KDirector
55
56
  {
56
57
  on_exist: @options.on_exist,
57
58
  on_action: @options.on_action,
58
- template_base_folder: @options.template_base_folder
59
+ template_base_folder: @options.template_base_folder,
60
+ active: @options.active
59
61
  }.merge(opts)
60
62
  end
61
63
 
@@ -63,6 +65,10 @@ module KDirector
63
65
  k_builder.configuration
64
66
  end
65
67
 
68
+ def active?
69
+ @options.active == true
70
+ end
71
+
66
72
  def director_name
67
73
  @options.director_name
68
74
  end
@@ -259,8 +259,8 @@ module KDirector
259
259
  # rubocop:enable Naming/AccessorMethodName
260
260
 
261
261
  # Setter for package file
262
- def package_file=(_value)
263
- @package_file = File.join(k_builder.target_folder, 'package.json')
262
+ def package_file=(value)
263
+ @package_file = File.join(k_builder.target_folder, value)
264
264
  end
265
265
 
266
266
  # Remove package-lock.json
@@ -36,12 +36,18 @@ module KDirector
36
36
  end
37
37
 
38
38
  # Setup the default package groups
39
+ # rubocop:disable Metrics/MethodLength
39
40
  def set_default_package_groups
40
41
  set_package_group('webpack' , 'Webpack V5' , %w[webpack webpack-cli webpack-dev-server])
41
42
  set_package_group('swc' , 'SWC Transpiler' , %w[@swc/cli @swc/core swc-loader])
42
43
  set_package_group('babel' , 'Babel Transpiler' , %w[@babel/core @babel/cli @babel/preset-env babel-loader])
43
44
  set_package_group('typescript' , 'Typescript' , %w[typescript ts-loader])
44
- set_package_group('semver-ruby' , 'Semantic Release for Ruby' , %w[semantic-release github:klueless-js/semantic-release-rubygem @semantic-release/changelog @semantic-release/git])
45
+ set_package_group('semver-ruby' , 'Semantic Release for Ruby' , %w[
46
+ semantic-release
47
+ @semantic-release/changelog
48
+ @semantic-release/git
49
+ @klueless-js/semantic-release-rubygem@github:klueless-js/semantic-release-rubygem
50
+ ])
45
51
 
46
52
  set_package_group('semver-nuxt' , 'Semantic Release for Nuxt' , %w[
47
53
  semantic-release
@@ -66,6 +72,7 @@ module KDirector
66
72
  # @storybook/addon-docs@6.4.18
67
73
  # @storybook/addon-essentials@6.4.18
68
74
  end
75
+ # rubocop:enable Metrics/MethodLength
69
76
 
70
77
  def debug
71
78
  log.structure(package_groups, convert_data_to: :open_struct)
@@ -10,21 +10,21 @@ module KDirector
10
10
 
11
11
  def github(**opts, &block)
12
12
  github = KDirector::Dsls::Children::Github.new(self, **opts)
13
- github.instance_eval(&block) if block_given?
13
+ github.instance_eval(&block) if github.active? && block_given?
14
14
 
15
15
  self
16
16
  end
17
17
 
18
18
  def package_json(**opts, &block)
19
19
  package_json = KDirector::Dsls::Children::PackageJson.new(self, **opts)
20
- package_json.instance_eval(&block) if block_given?
20
+ package_json.instance_eval(&block) if package_json.active? && block_given?
21
21
 
22
22
  self
23
23
  end
24
24
 
25
25
  def blueprint(**opts, &block)
26
26
  blueprint = KDirector::Dsls::Children::Blueprint.new(self, **opts)
27
- blueprint.instance_eval(&block) if block_given?
27
+ blueprint.instance_eval(&block) if blueprint.active? && block_given?
28
28
 
29
29
  self
30
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KDirector
4
- VERSION = '0.10.3'
4
+ VERSION = '0.10.4'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "k_director",
9
- "version": "0.10.3",
9
+ "version": "0.10.4",
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_director",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "Command line and CI/CD tools for k_director",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_director
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.10.4
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-06 00:00:00.000000000 Z
11
+ date: 2022-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: k_config