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 +4 -4
- data/lib/redbreast/commands/color_generator.rb +6 -4
- data/lib/redbreast/commands/color_test_generator.rb +4 -3
- data/lib/redbreast/commands/image_generator.rb +6 -4
- data/lib/redbreast/commands/image_test_generator.rb +4 -3
- data/lib/redbreast/serializers/swiftui_serializer.rb +1 -1
- data/lib/redbreast/template_generators/images/swiftui_images_template_generator.rb +1 -1
- data/lib/redbreast/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0af297ef6e37a2914f39cefda66be835e4d8550728f87faebf68748843ba0e8d
|
4
|
+
data.tar.gz: c2b0b4251ae80070c635453c9988eec30d285e2a3e7cab4607a14aa10f54d220
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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(
|
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,
|
23
|
+
def generate_color_sources(bundles, app_name)
|
23
24
|
bundles.each do |bundle|
|
24
25
|
color_names = pull_asset_names(bundle[:assetsSearchPath])
|
25
|
-
|
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,
|
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,
|
23
|
+
def generate_test_sources(bundles, app_name)
|
24
24
|
bundles.each do |bundle|
|
25
25
|
color_names = pull_asset_names(bundle[:assetsSearchPath])
|
26
|
-
|
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
|
-
|
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(
|
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,
|
23
|
+
def generate_image_sources(bundles, app_name)
|
23
24
|
bundles.each do |bundle|
|
24
25
|
image_names = pull_asset_names(bundle[:assetsSearchPath])
|
25
|
-
|
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,
|
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,
|
23
|
+
def generate_test_sources(bundles, app_name)
|
24
24
|
bundles.each do |bundle|
|
25
25
|
image_names = pull_asset_names(bundle[:assetsSearchPath])
|
26
|
-
|
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
|
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
|
}
|
data/lib/redbreast/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|