redbreast 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +9 -0
- data/README.md +80 -4
- data/lib/redbreast/commands/color_generator.rb +3 -1
- data/lib/redbreast/commands/image_generator.rb +3 -1
- data/lib/redbreast/version.rb +1 -1
- data/redbreast.svg +8 -0
- metadata +4 -3
- data/LICENSE.txt +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58587403662d735b14fe0d4c0c1aa45acca3bfc7fa93a8c0f6c78bd604849d16
|
4
|
+
data.tar.gz: 8456066d1d95ede4fbb08fb14eae08cf78462fd241df238acf5baf31ad9ecd89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52f3181555a1500ea5b9ce30d41b3d97705a06ec18761e83f3c8918010e27bca3e0ba37965a52bef04345c41935e6dc0486e010a5ab63a1c4306498952f805f6
|
7
|
+
data.tar.gz: f01695bf88db097e5eb13e72472d32f08c62b63424f2a36cb1d8f39f1b4f7e29a2e4689ef2c8e4f38f6cbbc6024cf7fcb832ab0f7f3d73dda1a0f36b4cd468e4
|
data/LICENSE.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Infinum
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Redbreast
|
2
2
|
|
3
|
-
![](https://
|
3
|
+
[![License](https://img.shields.io/cocoapods/l/SemanticVersioning.svg)](https://github.com/infinum/redbreast/blob/master/LICENSE.md)
|
4
|
+
|
5
|
+
<p align="center">
|
6
|
+
<img src="redbreast.svg" width="300" max-width="50%" alt="Japx"/>
|
7
|
+
</p>
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
@@ -103,20 +107,82 @@ For more examples checkout the sample project.
|
|
103
107
|
|
104
108
|
### Init
|
105
109
|
|
106
|
-
After installing redbreast run `redbreast init` to create
|
110
|
+
After installing redbreast run `redbreast init` to create `.redbreast.yml` file. This file is used for generating your extensions.
|
107
111
|
In the init you will be prompted to:
|
108
112
|
|
109
113
|
* Choose a language in which colors/images will be generated.
|
110
114
|
* Input the application name (optional)
|
111
115
|
* Input bundle names (default is main)
|
116
|
+
* Input whether you want to omit namespacing (optional)
|
112
117
|
* Choose whether you want to generate images, colors or both
|
113
118
|
* Input the path to assets folder
|
114
119
|
* Input the path where the files will be created
|
115
120
|
* Choose to create tests for generated assets
|
116
121
|
|
122
|
+
This is how your `.redbreast.yml` file should look after the `redbreast init` if you are using version 1.3.1 and lower:
|
123
|
+
|
124
|
+
```yml
|
125
|
+
---
|
126
|
+
:language: swift
|
127
|
+
:bundles:
|
128
|
+
- :name: main
|
129
|
+
:reference: ".main"
|
130
|
+
:shouldOmitNamespace: false
|
131
|
+
:assetsSearchPath: "MyProject/**/*.xcassets"
|
132
|
+
:outputSourcePathImages: "./MyProject/Common/Extensions/UIImage+Redbreast.swift"
|
133
|
+
:outputSourcePathColors: "./MyProject/Common/Extensions/UIColor+Redbreast.swift"
|
134
|
+
:outputTestPathImages: "./MyProject-UnitTests/Common/Extensions/UIImageExtensionTest.swift"
|
135
|
+
:outputTestPathColors: "./MyProject-UnitTests/Common/Extensions/UIColorExtensionTest.swift"
|
136
|
+
:testableImport: MyProject
|
137
|
+
:app_name: MyProject
|
138
|
+
```
|
139
|
+
|
140
|
+
Multiple language support is available from version 1.4.0. Example `.redbreast.yml` files from version 1.4.0 and higher:
|
141
|
+
|
142
|
+
If you are using only one language:
|
143
|
+
|
144
|
+
```yml
|
145
|
+
---
|
146
|
+
:bundles:
|
147
|
+
- :language: swift
|
148
|
+
:name: main
|
149
|
+
:reference: ".main"
|
150
|
+
:assetsSearchPath: "MyProject/**/*.xcassets"
|
151
|
+
:outputSourcePathImages: "./MyProject/Common/Extensions/UIImage+Redbreast.swift"
|
152
|
+
:outputSourcePathColors: "./MyProject/Common/Extensions/UIColor+Redbreast.swift"
|
153
|
+
:outputTestPathImages: "./MyProject-UnitTests/Common/Extensions/UIImageExtensionTest.swift"
|
154
|
+
:outputTestPathColors: "./MyProject-UnitTests/Common/Extensions/UIColorExtensionTest.swift"
|
155
|
+
:testableImport: MyProject
|
156
|
+
:app_name: MyProject
|
157
|
+
```
|
158
|
+
|
159
|
+
and if you are using two or more languages:
|
160
|
+
|
161
|
+
```yml
|
162
|
+
---
|
163
|
+
:bundles:
|
164
|
+
- :language: swift
|
165
|
+
:name: main
|
166
|
+
:reference: ".main"
|
167
|
+
:assetsSearchPath: "**/*.xcassets"
|
168
|
+
:outputSourcePathImages: ".MyProject/Common/Extensions/UIImageExtension.swift"
|
169
|
+
:outputTestPathImages: ".MyProject/Common/Extensions/UIImageExtensionTest.swift"
|
170
|
+
:testableImport: MyProject
|
171
|
+
- :language: swiftui
|
172
|
+
:name: MyProjectUI
|
173
|
+
:reference: ".MyProjectUI"
|
174
|
+
:assetsSearchPath: "MyProject/**/*.xcassets"
|
175
|
+
:outputSourcePathImages: ".MyProject/Common/Extensions/ImageExtension.swift"
|
176
|
+
:outputSourcePathColors: ".MyProject/Common/Extensions/ColorExtension.swift"
|
177
|
+
:outputTestPathImages: ".MyProject/Common/Extensions/ImageExtensionTest.swift"
|
178
|
+
:outputTestPathColors: ".MyProject/Common/Extensions/ColorExtensionTest.swift"
|
179
|
+
:testableImport: MyProject
|
180
|
+
:app_name: MyProject
|
181
|
+
```
|
182
|
+
|
117
183
|
### Generate
|
118
184
|
|
119
|
-
When you finish creating
|
185
|
+
When you finish creating `.redbreast.yml` file, run `redbreast generate` and all needed files will be generated.
|
120
186
|
|
121
187
|
### Install
|
122
188
|
|
@@ -130,8 +196,18 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
130
196
|
|
131
197
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
132
198
|
|
133
|
-
|
134
199
|
## License
|
135
200
|
|
136
201
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
137
202
|
|
203
|
+
## Credits
|
204
|
+
|
205
|
+
Maintained and sponsored by [Infinum](http://www.infinum.com).
|
206
|
+
<p align="center">
|
207
|
+
<a href='https://infinum.com'>
|
208
|
+
<picture>
|
209
|
+
<source srcset="https://assets.infinum.com/brand/logo/static/white.svg" media="(prefers-color-scheme: dark)">
|
210
|
+
<img src="https://assets.infinum.com/brand/logo/static/default.svg">
|
211
|
+
</picture>
|
212
|
+
</a>
|
213
|
+
</p>
|
@@ -24,7 +24,9 @@ module Redbreast
|
|
24
24
|
bundles.each do |bundle|
|
25
25
|
color_names = pull_asset_names(bundle[:assetsSearchPath])
|
26
26
|
bundle_language = bundle[:language] || programming_language
|
27
|
-
|
27
|
+
shouldOmitNamespace = bundle[:shouldOmitNamespace]
|
28
|
+
namespace = shouldOmitNamespace ? '' : app_name
|
29
|
+
write_colors(color_names, bundle, bundle_language, namespace)
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
@@ -24,7 +24,9 @@ module Redbreast
|
|
24
24
|
bundles.each do |bundle|
|
25
25
|
image_names = pull_asset_names(bundle[:assetsSearchPath])
|
26
26
|
bundle_language = bundle[:language] || programming_language
|
27
|
-
|
27
|
+
shouldOmitNamespace = bundle[:shouldOmitNamespace]
|
28
|
+
namespace = shouldOmitNamespace ? '' : app_name
|
29
|
+
write_images(image_names, bundle, bundle_language, namespace)
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
data/lib/redbreast/version.rb
CHANGED
data/redbreast.svg
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M35 60.5L29.5 74.5L42 65.5L53.5 74.5L49 60.5" stroke="#D82828" stroke-width="4" stroke-linejoin="round"/>
|
3
|
+
<path d="M63 33C63 47.1199 53.3093 58 42 58C30.6907 58 21 47.1199 21 33C21 18.8801 30.6907 8 42 8C53.3093 8 63 18.8801 63 33Z" stroke="#D82828" stroke-width="4"/>
|
4
|
+
<path d="M63 34.5C63 27.5 50.5 18.5 42 30.5C38 25.5001 28.2 19.3001 21 34.5" stroke="#D82828" stroke-width="4"/>
|
5
|
+
<circle cx="36" cy="16" r="3" fill="#D82828"/>
|
6
|
+
<path d="M31 12H16L23 20.5" stroke="#D82828" stroke-width="4" stroke-linejoin="round"/>
|
7
|
+
<path d="M58.5 50H63C64.1046 50 65 50.8954 65 52V58C65 59.1046 64.1046 60 63 60H21C19.8954 60 19 59.1046 19 58V52C19 50.8954 19.8954 50 21 50H26.5" stroke="#D82828" stroke-width="4"/>
|
8
|
+
</svg>
|
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.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maroje
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -137,7 +137,7 @@ files:
|
|
137
137
|
- ".travis.yml"
|
138
138
|
- CODE_OF_CONDUCT.md
|
139
139
|
- Gemfile
|
140
|
-
- LICENSE.
|
140
|
+
- LICENSE.md
|
141
141
|
- README.md
|
142
142
|
- Rakefile
|
143
143
|
- bin/console
|
@@ -178,6 +178,7 @@ files:
|
|
178
178
|
- lib/redbreast/template_generators/tests/images/swiftui_images_tests_template_generator.rb
|
179
179
|
- lib/redbreast/version.rb
|
180
180
|
- redbreast.gemspec
|
181
|
+
- redbreast.svg
|
181
182
|
homepage: https://github.com/infinum/redbreast
|
182
183
|
licenses:
|
183
184
|
- MIT
|
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2019 Vlaho
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|