redbreast 1.3.0 → 1.4.0

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: f7a8875e2b36cd094a3d8dc5c74c7c1acf9d29de22c1d1efcbd9b545dfd469a8
4
- data.tar.gz: 67e244c0e183fc8d03d8edf45dc271a2f7e8dc40fd1efe7a732779ff618d83c3
3
+ metadata.gz: 0af297ef6e37a2914f39cefda66be835e4d8550728f87faebf68748843ba0e8d
4
+ data.tar.gz: c2b0b4251ae80070c635453c9988eec30d285e2a3e7cab4607a14aa10f54d220
5
5
  SHA512:
6
- metadata.gz: 3a01ac2f7e449861ce5697bf5f79a69a801d5e02b87804a7d88f704b10f3412da8636e8d0a7b06c7939759fbe37552a7bac3f5569b88dc6d94db7d9daab75d64
7
- data.tar.gz: c4fa84840d2fce0395367b503971327cdab83c2e997d8a7a28d0c48c26d246074072e395411a90476ff3268f2d943406d1672c39c69bee2153005f9c550d1a8c
6
+ metadata.gz: 7af2661161d5e3b4c6fd4764d4836065eb136494dbb70ff0767c51cb847ab66f9c6c631429267072a74fb255f22baa17bab18f95d7813ef287a21278a4d01690
7
+ data.tar.gz: 806e793afb6fe385b2207b96cc60bf239f58f249d1da38d048bd5f884c9d9ff3e76436dd124c0b983f06845898548040afff714b8be3353091daec87f2ea0d28
@@ -10,19 +10,21 @@ module Redbreast
10
10
  end
11
11
 
12
12
  def call
13
- return if bundles.first[:outputSourcePathColors].nil?
13
+ filtered_bundles = bundles.select { |bundle| bundle[:outputSourcePathColors] }
14
+ return if filtered_bundles.empty?
14
15
 
15
16
  prompt.say('Generating color resources...')
16
- generate_color_sources(bundles, programming_language, app_name)
17
+ generate_color_sources(filtered_bundles, app_name)
17
18
  success('Color resources generated!')
18
19
  end
19
20
 
20
21
  private
21
22
 
22
- def generate_color_sources(bundles, programming_language, app_name)
23
+ def generate_color_sources(bundles, app_name)
23
24
  bundles.each do |bundle|
24
25
  color_names = pull_asset_names(bundle[:assetsSearchPath])
25
- write_colors(color_names, bundle, programming_language, app_name)
26
+ bundle_language = bundle[:language] || programming_language
27
+ write_colors(color_names, bundle, bundle_language, app_name)
26
28
  end
27
29
  end
28
30
 
@@ -14,16 +14,17 @@ module Redbreast
14
14
  return if filtered_bundles.empty?
15
15
 
16
16
  prompt.say('Generating color test resources...')
17
- generate_test_sources(bundles, programming_language, app_name)
17
+ generate_test_sources(bundles, app_name)
18
18
  success('Color test resources generated!')
19
19
  end
20
20
 
21
21
  private
22
22
 
23
- def generate_test_sources(bundles, programming_language, app_name)
23
+ def generate_test_sources(bundles, app_name)
24
24
  bundles.each do |bundle|
25
25
  color_names = pull_asset_names(bundle[:assetsSearchPath])
26
- write_tests(color_names, bundle, programming_language, app_name)
26
+ bundle_language = bundle[:language] || programming_language
27
+ write_tests(color_names, bundle, bundle_language, app_name)
27
28
  end
28
29
  end
29
30
 
@@ -10,19 +10,21 @@ module Redbreast
10
10
  end
11
11
 
12
12
  def call
13
- return if bundles.first[:outputSourcePathImages].nil?
13
+ filtered_bundles = bundles.select { |bundle| bundle[:outputSourcePathImages] }
14
+ return if filtered_bundles.empty?
14
15
 
15
16
  prompt.say('Generating image resources...')
16
- generate_image_sources(bundles, programming_language, app_name)
17
+ generate_image_sources(filtered_bundles, app_name)
17
18
  success('Image resources generated!')
18
19
  end
19
20
 
20
21
  private
21
22
 
22
- def generate_image_sources(bundles, programming_language, app_name)
23
+ def generate_image_sources(bundles, app_name)
23
24
  bundles.each do |bundle|
24
25
  image_names = pull_asset_names(bundle[:assetsSearchPath])
25
- write_images(image_names, bundle, programming_language, app_name)
26
+ bundle_language = bundle[:language] || programming_language
27
+ write_images(image_names, bundle, bundle_language, app_name)
26
28
  end
27
29
  end
28
30
 
@@ -14,16 +14,17 @@ module Redbreast
14
14
  return if filtered_bundles.empty?
15
15
 
16
16
  prompt.say('Generating images test resources...')
17
- generate_test_sources(bundles, programming_language, app_name)
17
+ generate_test_sources(bundles, app_name)
18
18
  success('Images test resources generated!')
19
19
  end
20
20
 
21
21
  private
22
22
 
23
- def generate_test_sources(bundles, programming_language, app_name)
23
+ def generate_test_sources(bundles, app_name)
24
24
  bundles.each do |bundle|
25
25
  image_names = pull_asset_names(bundle[:assetsSearchPath])
26
- write_tests(image_names, bundle, programming_language, app_name)
26
+ bundle_language = bundle[:language] || programming_language
27
+ write_tests(image_names, bundle, bundle_language, app_name)
27
28
  end
28
29
  end
29
30
 
@@ -30,7 +30,7 @@ module Redbreast
30
30
  names_new_enum = []
31
31
  new_enum_name = enum_name
32
32
 
33
- text += "\n" + spacing + 'enum ' + upper_camel_case(enum_name) + ' {'
33
+ text += "\n" + spacing + 'public enum ' + upper_camel_case(enum_name) + ' {'
34
34
  names_new, names_new_enum = separate_variables_from_folders(names: names, enum_name: enum_name, new_enum_name: new_enum_name, names_new_enum: names_new_enum, names_new: names_new)
35
35
 
36
36
  if !names_new_enum.empty? && new_enum_name == enum_name
@@ -12,7 +12,7 @@ module Redbreast
12
12
  import SwiftUI
13
13
 
14
14
  // THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND
15
- // swiftlint:disable file_length type_body_length line_length superfluous_disable_commandextension_access_modifier
15
+ // swiftlint:disable file_length type_body_length line_length superfluous_disable_command extension_access_modifier
16
16
  <%= generate_extension('Image', app_name) %>
17
17
  <%= generate_file_swift(names: asset_names, variable: 'public static var %s: Image { Image("%s", bundle: %s) }', bundle: bundle) %>
18
18
  }
@@ -1,3 +1,3 @@
1
1
  module Redbreast
2
- VERSION = '1.3.0'
2
+ VERSION = '1.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redbreast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maroje
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler