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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c480f664a7236aa040c135bbb0ac9ab3b0094079def7706d52e622f8761e50fe
4
- data.tar.gz: 7d0c140bd021d378e57c10bc83bd46bef2c18cf47df4805d82b2f45a970fcbe0
3
+ metadata.gz: 58587403662d735b14fe0d4c0c1aa45acca3bfc7fa93a8c0f6c78bd604849d16
4
+ data.tar.gz: 8456066d1d95ede4fbb08fb14eae08cf78462fd241df238acf5baf31ad9ecd89
5
5
  SHA512:
6
- metadata.gz: 4e189fc86aa4bb2908217306485a6a1a42d79347934f46b132e32b97111084508799363c6e4b23528b229778227a13f44ce1fb90ca9c344c5ee2ff778679784d
7
- data.tar.gz: e44abf29a209555d579a51d8cbbf9651f5c41b77d4a348c933b612992423aa8b83fb6631ff6b26f432ae74c0fba77c23a65e625034cadd33e5ddca41e3800e6d
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://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Turdus-migratorius-002.jpg/440px-Turdus-migratorius-002.jpg)
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 `redbreast.yml` file. This file is used for generating your extensions.
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 `redbreast.yml` file, run `redbreast generate` and all needed files will be generated.
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
- write_colors(color_names, bundle, bundle_language, app_name)
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
- write_images(image_names, bundle, bundle_language, app_name)
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
 
@@ -1,3 +1,3 @@
1
1
  module Redbreast
2
- VERSION = '1.4.1'
2
+ VERSION = '1.4.2'
3
3
  end
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.1
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: 2023-08-31 00:00:00.000000000 Z
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.txt
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.