kiba 2.0.0 → 2.5.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
- SHA1:
3
- metadata.gz: f048352971676a1a1a3f29e1e2e13b7784a10022
4
- data.tar.gz: 04dbac7b41da880e759356186fbf813beff621d6
2
+ SHA256:
3
+ metadata.gz: aebe72316fa16e820c9c11b7a2a274b05b77abed7eda8799858fe00a4279e2db
4
+ data.tar.gz: 686b359e9b74684472d17491c98a32adddd30603186b4f6ec7b6a40263d47d19
5
5
  SHA512:
6
- metadata.gz: 0bbba96a440dba7fc7a41e2c55a2bd063bf1a8ad71c17c9a8ab9832be5aaa1c07b459c2db340b2adc489cb329f0e91c807fa73ca3442a66cc4c8fc62627627e3
7
- data.tar.gz: 79ddd85e029eb1185610a7f2c59b8a39b093bb9ab318d2aae3cdd55e9493e62b724273e126f6681c8aa823e005a6f20ee4cfc07eec834e0671eb412d71978b12
6
+ metadata.gz: 41be9f07f5c7bef36d85c97bc3a9224c7f885de92f458407064d7fa153f8a0ed1443a626b82a4e97f1269154aac0aaca738b8ed63c596953cc1059ae0657f4d3
7
+ data.tar.gz: d03d4e66991f0b903ca6b86eda7ae33790218dc84d9de906337a0ddae709a7cbfa6adb9432bbb812396e6a122c942f2cecc8a95ee16d184714e6625cac411905
@@ -1,15 +1,14 @@
1
1
  language: ruby
2
- before_install:
3
- # https://stackoverflow.com/a/47972768
4
- - gem update --system
5
- - gem update bundler
6
- rvm:
7
- - ruby-head
8
- - 2.5.0
9
- - 2.4.3
10
- - 2.3
11
- - 2.2
12
- - 2.1
13
- - 2.0
14
- - jruby-1.7
15
- - jruby-9.1.15.0
2
+ matrix:
3
+ include:
4
+ # see https://www.ruby-lang.org/en/downloads/branches/
5
+ - rvm: ruby-head
6
+ - rvm: 2.6
7
+ - rvm: 2.5
8
+ - rvm: 2.4
9
+ # NOTE: EOL since 2019-03-31
10
+ - rvm: 2.3
11
+ # see https://www.jruby.org/download
12
+ - rvm: jruby-9.1
13
+ - rvm: jruby-9.2
14
+ - rvm: truffleruby
@@ -0,0 +1,348 @@
1
+ # LOGEEK LICENSE TERMS AND CONDITIONS
2
+
3
+ These terms and conditions and the corresponding subscription order, when validated by LoGeek (“**Order**”), form the “**Agreement**”.
4
+
5
+ The Agreement is made and entered into by and between (i) LoGeek, a French law corporation having a place of business at 12 rue des tulipes, Les Grands Andreaux, 17430 Champdolent, France, and with registration number R.C.S. Saintes 483 514 691, and (ii) the customer identified on the Order (“**Licensee**” or “**You**”).
6
+
7
+ The Agreement sets forth the terms and conditions under which LoGeek will grant to the Licensee a license to use the Software.
8
+
9
+ In the event of contradiction between the Order and the present terms and conditions, the Order shall prevail.
10
+
11
+ __**In order to get a license to use the Software, the Licensee must agree to these terms and conditions (the “Terms”). If the Licensee does not agree to these Terms, the Licensee is not permitted to use the Software.**__
12
+
13
+ The Representative accepts and agrees to these Terms on behalf of the Licensee as its authorized legal representative, by doing either of the following: “checking the box displayed at the beginning of these terms” and/or “clicking an “Agree” or similar button”, or by doing any similar action.
14
+
15
+ The Representative that completes the Order and accepts and agrees to these Terms represents that he has the right and authority to legally bind the Licensee to enter into this Agreement.
16
+
17
+ The Software must be used for business purposes only. Non-professional use of the Software is not authorized.
18
+
19
+ ## ARTICLE 1 - DEFINITIONS
20
+
21
+ In this Agreement, the terms used hereunder shall have the following meaning unless the context otherwise requires:
22
+
23
+ * “**Agreement**“: means these Terms and the corresponding Order.
24
+
25
+ * “**Data Protection Laws**”: means, with respect to European Union member countries, the EU General Protection Regulation 2016/679 (the “**Regulation**”) and any applicable subordinate legislation, save that in the event of any conflict between the provisions of the EU General Protection Regulation and data protection laws, the Regulation shall prevail. For other countries, “Data Protection Laws” means laws similar to or addressing the same subject matter as the Regulation.
26
+
27
+ * “**Documentation**”: means the related user documentation for the Software.
28
+
29
+ * “**Error**”: means any material failure of the Software to conform substantially to the Documentation applicable to the Software at the time the Software was delivered to the Licensee.
30
+
31
+ * “**Gem Server**”: means the server which provides the Software Releases online, protected behind an authentication token.
32
+
33
+ * “**(License) Fees**”: means the applicable fees for the Software License set forth on the Order.
34
+
35
+ * “**Licensee Product**”: means any application, framework or element developed by Licensee with which the Software is integrated for marketing and distribution to end users under Licensee’s own trademarks and product names.
36
+
37
+ * “**Order**”: means the order mentioned in the recitals of the present terms and conditions.
38
+
39
+ * “**Party(ies)**”: means individually or collectively the Licensee and/or LoGeek.
40
+
41
+ * “**Patches**”: means changes made to the Software that restore substantial conformity with the applicable Documentation.
42
+
43
+ * “**Release(s)**”: means any maintenance release relating to the Software including but not limited to Error fixes and Patches.
44
+
45
+ * “**Representative**”: means the representative of the Licensee identified in the Order.
46
+
47
+ * “**Software**”: means package of the software programs and/or libraries named and described on the Order, including the Releases that may be provided by LoGeek to the Licensee. Unless otherwise specified in the Order, the Software corresponds to Kiba Pro.
48
+
49
+ * “**Use**”: means access, install, store, load, execute and display one copy on one device at a time.
50
+
51
+ ## ARTICLE 2 - PURPOSE OF THE LICENSE
52
+
53
+ LoGeek shall have sole and exclusive ownership of all right, title and interest in and to the Software and all modifications, versions, Patches, Releases and enhancements thereof (including, without limitation, ownership of all trade secrets, trademarks, brands, logos, and copyrights pertaining thereto), and LoGeek grants limited rights to the Licensee, as specified in this Agreement.
54
+
55
+ The Licensee must have an active subscription to Use the Software. In case of termination of the Agreement, the Licensee must immediately stop using the Software and comply with the provisions of the article “Termination”.
56
+
57
+ The Licensee can choose in the Order between the different kinds of licenses, i.e. “Standard License” and “Appliance License”, described hereafter.
58
+
59
+ ### 2.1 - Common provisions
60
+
61
+ Whatever kind of license the Licensee subscribes to, the Licensee shall have no rights other than the ones expressly granted in this Agreement. In particular, the Licensee shall not (and shall not allow any third party to):
62
+
63
+ * Decompile, disassemble, or otherwise reverse engineer the Software or attempt to reconstruct or discover any source code, underlying ideas, algorithms, file formats or programming interfaces of the Software by any means whatsoever (except and only to the extent that applicable law prohibits reverse engineering restrictions);
64
+ * Distribute, sell, sublicense, rent, lease or use the Software for time sharing, hosting, service provider or like purposes;
65
+ * Concerning those Licensees who have an Appliance License, Use the Software other than by including all or part of the Software within the Licensee Product, which must have substantially different functionality than the Software;
66
+ * Allow any third party to use all or part of the Software for software development or application development purposes;
67
+ * Remove any product identification, proprietary, copyright or other notices contained in the Software;
68
+ * Publicly disseminate performance information or analysis (including, without limitation, benchmarks) from any source relating to the Software;
69
+ * Utilize any equipment, device, software, or other means designed to circumvent or remove any form of Source URL or copy protection used by LoGeek in connection with the Software, or use the Software together with any authorization code, Source URL, serial number, or other copy protection device not supplied by LoGeek;
70
+ * Use the Software to develop a product which is competitive with any LoGeek product offerings;
71
+ * Use unauthorized Source URLS or keycode(s) or distribute or publish source codes, Source URLs or keycode(s), except as may be expressly permitted by LoGeek in writing. If your unique Source URL is ever published, LoGeek reserves the right to terminate the Agreement without notice.
72
+
73
+ ### 2.2 - Software “Standard License”
74
+
75
+ In consideration of the payment of the License Fees, and subject to compliance with all the terms and conditions of this Agreement, LoGeek grants the Licensee a non-exclusive, non-transferable, non-perpetual, non-reusable and limited license to Use the Software for the period (the start date and the duration) and the scope provided for in the Order (the “**(Software) License**”).
76
+
77
+ The Software License is subject to one or more of the license parameters specified in the Order.
78
+
79
+ The Licensee can use the Software only on its own servers and provided these servers are under its sole control. However the Licensee is authorized to Use the Software for providing services the type of “Software as a Service (SaaS)”.
80
+
81
+ Every entity or organization running the Software on its own servers must have its own license. There is no limit to the number of servers or environments used by that entity or organization.
82
+
83
+ The Standard License does not allow any distribution rights. Software has an “Appliance License” option which does allow the Licensee to distribute it (see below).
84
+
85
+ All rights not expressly granted to the Licensee shall be prohibited. The attention of the Licensee is drawn on the fact that it shall not, under a Standard License:
86
+
87
+ * Modify any part of the Software (except as described in article 3.3 Modifications), create a derivative work of any part of the Software, or incorporate the Software;
88
+ * Distribute the Software as part of a product, "appliance" or "virtual server";
89
+ * Distribute the Software on any server which is not directly under control of the Licensee.
90
+
91
+ The Licensee will access the Software source code. The Licensee acknowledges that such access does not change its rights on the Software.
92
+
93
+ The Licensee may not remove or alter any proprietary rights, trademarks, brands or any other kind of legend that may be embedded in the Software or figure thereon.
94
+
95
+ ### 2.3 - Software “Appliance License”
96
+
97
+ Through an “Appliance License”, LoGeek grants Licensee a non-exclusive, non-perpetual, sublicensable, non-reusable, worldwide rights to install, reproduce, Use and further develop Software as an integral part of a Licensee Product. The period (the start date and the duration) and the scope of the Appliance License are specified in the applicable Order.
98
+
99
+ Sublicensing of Software is only allowed when incorporated with Licensee Product supplied to third party.
100
+
101
+ Software shall only be incorporated into such Licensee Products as specified in this Agreement.
102
+
103
+ Licensee is prohibited from reselling any Licensee Product in any manner that will infringe this Agreement. Licensee is prohibited from granting its customers permission to use the Software in a manner that contradicts the terms of this Agreement. The third party that acquires a Licensee Product cannot be granted more rights than those granted under the Software Standard License.
104
+
105
+ LoGeek acknowledges and agrees that (i) Licensee retains all rights, title and interest in and to any Licensee Product, and LoGeek does not acquire any right, title, or interest in or to such Product; and (ii) any integration of Software with Licensee Product shall not affect or diminish Licensee’s rights, title, and interest in and to such Licensee Product. On the contrary, integration of the Software in a Licensee Product does not grant the Licensee other rights to the Software than the ones expressly granted as stated in the first paragraph of this “Software Appliance License” article.
106
+
107
+ If Licensee purchases an Appliance License, Licensee may distribute the Software in any Licensee Product that Licensee develops using the Software in accordance with this Agreement, provided that such distribution does not violate the restrictions set in this Agreement.
108
+
109
+ Licensee must not remove, obscure or interfere with any copyright, acknowledgment, attribution, trademark, warning or disclaimer statement affixed to, incorporated in or otherwise applied in connection with the Software. Licensee is required to ensure that the Software is not reused by or with any applications other than those with which Licensee distributes it as permitted herein. For example, if Licensee installs the Software on a customer’s server, that customer is not permitted to use the Software independently of the Licensee Product.
110
+
111
+ Licensee must inform LoGeek of Licensee’s knowledge of any infringing use of the Software by any of Licensee’s customers. Licensee is liable for compliance by those third parties with the terms and conditions of this Agreement applicable to the Software Standard License.
112
+
113
+ Licensee will not owe LoGeek any royalties for the distribution of the Software in accordance with this Agreement, other than the Appliance License Fees.
114
+
115
+ ## ARTICLE 3 - REQUIREMENTS, DELIVERY, MODIFICATIONS AND RESTRICTIONS
116
+
117
+ ### 3.1 - Software requirements
118
+
119
+ The Licensee must ensure that the Software is installed on a technical environment that meets the minimum required specification as set out by LoGeek in the Documentation.
120
+
121
+ The Licensee shall:
122
+
123
+ * Use the Software and all other materials provided hereunder only in accordance with the terms of the License Agreement;
124
+ * Promptly install all Releases distributed by LoGeek if applicable and especially if the Release has been provided by LoGeek for security or safety reasons. The Licensee acknowledges that any failure to do so may result in Licensee’s inability to benefit fully from the Software and/or that the Software may operate in a degraded mode.
125
+
126
+ ### 3.2 - Delivery process
127
+
128
+ All Software and Documentation shall be delivered by digital means, unless otherwise specified on the applicable Order. Software shall be deemed delivered when it is made available to download by Licensee (“**Delivery**”).
129
+
130
+ The purchase gets the Licensee unique access credentials for downloading the Software gem. These credentials allow the Licensee to access the Gem Server (bundle install) during the duration of the Agreement. The Licensee must keep these access credentials private.
131
+
132
+ If LoGeek finds the Licensee access credentials are ever publicized, a request to remove them will be sent via email to the Licensee and the credentials will be revoked. LoGeek reserves the right to permanently remove access and terminate the Agreement for cause if the situation happens again.
133
+
134
+ ### 3.3 - Modifications
135
+
136
+ #### 3.3.1 - Modifications to the Software
137
+
138
+ LoGeek shall provide the Licensee with source code so Licensee can create modifications to the original Software (“**Modifications**”). Modifications include but are not limited to:
139
+ * Any addition to or deletion from the content of a file included in the Software or previous Modifications created by Licensee; or
140
+ * Any new file that contains any part of the Software or previous Modifications.
141
+
142
+ Should Licensee create any Modification, Licensee shall inform promptly LoGeek of such Modification and shall put at LoGeek’s disposal such Modification.
143
+
144
+ Licensee hereby assigns to LoGeek the most extensive intellectual property rights in relation to the Modifications. The rights so assigned include the rights of use, reproduction, modification and distribution. They are assigned to LoGeek and its licensees and successors free of charge, on a worldwide basis and for the longest period of legal protection. These rights are assigned on a non-exclusive basis, Licensee retaining the right to freely make use of the said Modifications.
145
+
146
+ Such assignment of rights is governed not only by the paragraph hereabove but also by the Contribution License Agreement. By signing the Agreement, the Licensee agrees with the terms of the Contribution License Agreement.
147
+
148
+ #### 3.3.2 - Modifications to the open source version of the Software
149
+
150
+ Following the signing of this Agreement, and for as long as this Agreement is valid, the terms corresponding to the license purchased by the Licensee and object of this Agreement may be extended, at the discretion of the Licensee, to the version of the Software as put by LoGeek in the open source community.
151
+
152
+ It is the Licensee’s responsibility to inform Logeek in the event the Licensee decides to Use the open source version of the Software under the terms of this Agreement.
153
+
154
+ Should the Licensee make such a decision, any Modifications to the open source version of the Software will be subject to the provisions of the article “Modifications to the Software”.
155
+
156
+ ### 3.4 - Third party programs or libraries
157
+
158
+ The Software may include third party software programs or libraries that are subject to open source, freeware or other commercial licenses and/or notices that LoGeek is required to distribute with the Software. These licenses and notices are available to the Licensee in files in the Software directory, in documentation that accompanies the Software or via a supplementary list provided by LoGeek. The Licensee shall comply with these agreements and notices.
159
+
160
+ This Agreement does not modify any rights or obligations that the Licensee may have under the third party licenses and notices applicable to such programs. Any use of such program is subject to the rights and obligations under the applicable license.
161
+
162
+ ### 3.5 - Responsibilities
163
+
164
+ LoGeek will assume no liability nor grant any warranty with respect to Errors, trouble or damages that have been caused by:
165
+ * Modifications, alterations or customizations of the Software not made by LoGeek;
166
+ * Use of the Software in a manner that is in violation of this Agreement, or that is contrary to the Documentation or to instructions given by LoGeek;
167
+ * Use of the Software with hardware, operating systems or other supporting environment other than the ones specified by LoGeek as being compatible with the Software;
168
+ * Use of the Software in a manner for which it was not designed;
169
+ versions of Software other than the most recent Release provided by LoGeek to the Licensee;
170
+ * Failure caused by components or technology on which the Software are installed and/or by programs used in conjunction with the Software;
171
+ * Open source software or any other third-party software and products, even included in the Software;
172
+ * Software damaged by external physical factors, natural disaster, act of nature, act of God, deliberate act, misuse, accident.
173
+
174
+ The Licensee is responsible for making and keeping adequate backup copies of data, databases and application programs and agrees that (i) it is solely responsible for any and all restoration and re-creation of damaged, altered or lost data and programs and (ii) LoGeek shall not be liable for any direct or indirect corresponding loss or damage.
175
+
176
+ ## ARTICLE 4 - PRIORITY EMAIL SUPPORT
177
+
178
+ An active Agreement gives access to “Priority Support”.
179
+
180
+ Priority Support covers one (1) email request per quarter. LoGeek will use reasonable endeavours to answer within two (2) French working days. Scope is limited to Kiba and Kiba Pro features and APIs, not the application or infrastructure. For support, email thibaut.barrere+kiba@gmail.com. Please email using the same domain as the original license email or explain your connection to the licensed company.
181
+
182
+ ## ARTICLE 5 - CUSTOM SUPPORT AND MAINTENANCE
183
+
184
+ This Agreement does not include custom support or maintenance or other services. If the Licensee wishes to benefit from such services, a separate contract shall be put into place.
185
+
186
+ Notwithstanding the foregoing, LoGeek may, at its discretion, decide to provide the Licensee with Releases, being understood that LoGeek makes no commitment under this Agreement to provide such Patches or other Releases.
187
+
188
+ Releases of the Software that may be provided by LoGeek to the Licensee are subject to the terms of this License Agreement. When the Licensee receives a Release that replaces previously licensed Software, its rights under this Agreement with regard to the previously licensed Software automatically ends when it deploys the Release.
189
+
190
+ Notwithstanding the foregoing, LoGeek may also, at its discretion, decide to provide an email address for assistance to Licensee, being understood that such assistance shall be delivered only if deemed appropriate by LoGeek and without commitment nor warranty of any kind.
191
+
192
+ ## ARTICLE 6 - LIMITED WARRANTY
193
+
194
+ IN SO FAR AS PERMITTED BY LAW, THE SOFTWARE SHALL BE DELIVERED “AS IS” WITHOUT ANY WARRANTY OR GUARANTEE WHATSOEVER, WRITTEN OR ORAL, EXPRESS OR IMPLIED. LOGEEK EXPRESSLY DECLINES ANY IMPLICIT WARRANTY OR GUARANTEE REGARDING COMMERCIAL QUALITY, SATISFACTORY QUALITY, PERFORMANCE, AND/OR SUITABILITY FOR A PARTICULAR USE.
195
+
196
+ LOGEEK IS NOT RESPONSIBLE FOR THE RESULTS OBTAINED FROM THE USE OF THE SOFTWARE.
197
+
198
+ UNDER NO CIRCUMSTANCES SHALL LOGEEK BE HELD LIABLE FOR ANY LOSS OF PROFITS, LOSS OF COMMERCIAL OPPORTUNITY, LOSS OF DATA, INTERRUPTION OF WORK, BODILY HARM, OR ANY INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, FORTUITOUS, CONSECUTIVE, OR DAMAGE OF ANY KIND WHATSOEVER RESULTING FROM THE USE, THE IMPOSSIBILITY OF USING, OR RESULTS OF THE USE OF THE SOFTWARE, EVEN IF LOGEEK WAS INFORMED OF THE POSSIBILITY OF SUCH DAMAGE. THE USE OF THE SOFTWARE BY THE LICENSEE SHALL BE ENTIRELY AT ITS OWN RISKS AND PERILS. SHOULD THE SOFTWARE BE FOUND DEFECTIVE, THE LICENSEE SHALL BEAR ALL COSTS FOR SERVICING, REPAIRS, OR CORRECTIONS AND, IN SO FAR AS ALLOWED BY LAW, THE LICENSEE SHALL UNCONDITIONALLY RENOUNCE ALL RIGHTS, LEGAL OR OTHERWISE, IT MAY HAVE AGAINST LOGEEK FOLLOWING SUCH FAULTS OR DEFAULTS.
199
+
200
+ Notwithstanding the foregoing, these presents shall not be construed as to limit the legal rights which may not be renounced according to applicable laws. IN SUCH CASE, THE CORRESPONDING GUARANTEES SHALL BE LIMITED TO THE DURATION OF THE CONTRACTUAL WARRANTY PERIOD OR THE MINIMUM PERIOD REQUIRED BY APPLICABLE REGULATIONS.
201
+
202
+ Any lawsuit originating from using the Software shall be prescribed after one (1) year from the last delivery of the Software to the Licensee.
203
+
204
+ ## ARTICLE 7 - INTELLECTUAL PROPERTY WARRANTY
205
+
206
+ LoGeek warrants the Licensee that the delivery of the Software shall not infringe any intellectual property (copyright, patent right, trademark right) of any third party.
207
+
208
+ LoGeek shall indemnify and hold the Licensee harmless from and against any third party claims and/or actions and/or proceedings relating to any item provided by LoGeek to the Licensee, based on an infringement of intellectual property rights, and shall bear, subject to the provisions of the article “Liability”, all related definitive damages and indemnities which may result from such claims and/or actions and/or proceedings in relation to this Agreement, provided that: (i) the Licensee promptly notifies LoGeek in writing of the claim, action or proceeding and provides LoGeek with all information useful for defending its interests; (ii) the Licensee agrees that LoGeek shall have sole and exclusive control of the defense of the claim, action or proceeding, should LoGeek so desire and (iii) the Licensee makes no admission or statement of any kind whatsoever that may prejudice LoGeek’s defense.
209
+
210
+ The indemnification referred to in this section is limited to the payment by LoGeek of all damages and costs finally awarded for the claim, based on the demonstration of a counterfeit exclusively under LoGeek’s responsibility, or settlements costs approved in writing by LoGeek.
211
+
212
+ If the Software infringes a third party’s intellectual property right or if LoGeek reasonably believes it is likely to infringe a third party’s intellectual property right, LoGeek may, at its discretion (i) procure the right for the Licensee to continue using the Software or (ii) replace or modify the Software and to make its use non-infringing.
213
+
214
+ If LoGeek cannot do either of the above, LoGeek or the Licensee may terminate automatically and without judicial formalities this Agreement (ipso jure) subject to LoGeek reimbursing the Licensee the residual value of the non-compliant Software purchase price, with prorata temporis amortization over a maximum period of three (3) years from the date the Software was delivered.
215
+
216
+ The foregoing warranty does not apply (i) if the Software has been altered, modified, customized, except by LoGeek; (ii) in case of unauthorized use of the Software or of use of the Software in excess of the License Software granted to the Licensee; (iii) to any unsupported Release of the Software or if the Licensee does not use the latest Release provided by LoGeek or (iv) to any open source software or to any other third party code embedded in the Software which may be subject to specific terms and conditions provided to the Licensee.
217
+
218
+ The preceding provisions set LoGeek’s liability limits with respect to the Licensee with regard to intellectual property rights infringement. Therefore, LoGeek shall not provide any guarantee other than that described in the present article regarding counterfeit.
219
+
220
+ ## ARTICLE 8 - PAYMENT OF CHARGES
221
+
222
+ ### 8.1 - License Fees
223
+
224
+ The Licensee shall pay the Fees set forth on the Order.
225
+
226
+ LoGeek will, unless otherwise stated on the Order, invoice the Licensee on the date of validation by LoGeek of the Order. Any Fees paid will not be refunded.
227
+
228
+ All fees set forth herein exclude value added tax, sales tax, use and excise taxes, and any other similar taxes, duties and charges of any kind imposed by any federal, state or local governmental entity. All fees will be heightened by any prevailing rights or taxes on the billing date. The Licensee is responsible for any taxes and the Licensee will pay LoGeek for the Software License without any reduction for these amounts.
229
+
230
+ ### 8.2 - Payment terms
231
+
232
+ All invoices must be paid by the Licensee in full under 14 days after the date of issuance of the applicable invoice.
233
+
234
+ Any late payment shall automatically result, on the day following the settlement date shown in the invoice, in the payability of late payment interests in an amount equal to the interest rate applied by the European Central Bank to its latest refinancing transaction increased by ten (10) percentage points.
235
+
236
+ LoGeek shall also be entitled to recover all costs including reasonable expenses, legal fees and cost of collection, in an amount equal to actual collection costs ant that, in any event, shall not be less than the flat fee provided for in French Code of commerce (40 euros).
237
+
238
+ If the Licensee contests part of an invoice, it will only be entitled to withhold payment of this part until the dispute on this part has been solved. In no case it will be entitled to suspend payment of the non-contested parts of the invoice.
239
+
240
+ ## ARTICLE 9 - DATA PROTECTION
241
+
242
+ Each Party warrants and undertakes that it will duly observe all its respective obligations under the applicable Data Protection Laws.
243
+
244
+ LoGeek is responsible for processing personal data regarding managing contractual relationships with its clients including the Licensee.
245
+
246
+ Personal data collected by LoGeek is needed for its processing and is intended for LoGeek’s relevant departments and, where appropriate, its subcontractors and co-contractors, for the requirements of executing the Agreement.
247
+
248
+ Pursuant to the legal provisions regarding protecting personal data, and under the conditions and to the extent provided by the applicable regulation, each Licensee’s employee concerned shall have a right to query, access, rectify, oppose, obtain erasure or restriction of processing regarding its personal data – rights which may be exercised by mail sent to the attention of thibaut.barrere+kiba@gmail.com, accompanied, if deemed appropriate by Logeek, by a copy of the relevant person’s identification papers.
249
+
250
+ ## ARTICLE 10 - AUDIT
251
+
252
+ LoGeek shall be permitted to audit (at least once annually and in accordance with LoGeek standard procedures, which may include on-site and/or remote audit) the usage of the Software.
253
+
254
+ The Licensee shall cooperate reasonably in the conduct of such audits.
255
+
256
+ Notwithstanding any other rights LoGeek may have, in the event an audit reveals that (i) the Licensee underpaid license fees and/or Services fees to LoGeek and/or (ii) that the Licensee has used the Software in excess of the rights granted or license quantities stated in the Order Form, Licensee shall pay such underpaid fees and/or for such excess usage based on the applicable rates in effect at the time of the audit.
257
+
258
+ Notwithstanding Logeek’s rights to claim for damages and to terminate the Agreement, reasonable costs of LoGeek’s audit shall be paid by the Licensee if the audit results indicate usage non-compliant with this Agreement.
259
+
260
+ ## ARTICLE 11 - LIABILITY
261
+
262
+ The Licensee acknowledges and agrees that it has accepted the terms of this Agreement in the knowledge that LoGeek’s liability is limited and that the prices and charges payable have been calculated so as to reflect such limitations and thus represent a reasonable and commercial allocation of risk between the Parties.
263
+
264
+ In no event shall LoGeek be liable for indirect damages, loss of profits, loss of goodwill, loss of business, loss of revenue, loss of contracts, loss of anticipated savings, loss of data, damage to or corruption of data or business information arising out of this Agreement or arising out of the use of or inability to use the Software, even if LoGeek has been advised of, knew or should have known of the possibility of such damages, and whether in a cause of action sounding in contract, tort, strict liability or otherwise.
265
+
266
+ LoGeek’s total aggregate liability, for the period of this Agreement, for all claims and damages arising from negligence, breach of contract, warranty or indemnity, or any other legal theory of liability or otherwise, under or in connection with this Agreement, shall not exceed an amount equivalent to fifty percent of the Fees (excluding taxes) payable or paid by the Licensee to LoGeek under this Agreement, during the year of occurrence of the (most serious) act or omission giving rise to the liability.
267
+
268
+ The limitation of liability has effect in relation both to any liability expressly provided for under this Agreement and to any liability arising by reason of the invalidity or unenforceability of any term of this Agreement.
269
+
270
+ The Licensee has a duty to mitigate the damages that would otherwise be recoverable from LoGeek pursuant to the Agreement by taking appropriate and reasonable actions to reduce or limit the amount of such damages.
271
+
272
+ For the avoidance of doubt, the provisions of this Article will survive the expiration or termination of the Agreement for any reason.
273
+
274
+ Regardless of any statute or law to the contrary, any claim or cause of action arising out of or related to use of the Services must be filed within one year after such claim or cause of action arose or be forever barred.
275
+
276
+ The Licensee acknowledges that by entering into and performing its obligations under the Agreement, LoGeek will not assume and should not be exposed to the business and operational risks associated with the Licensee’s business, and the Licensee therefore agrees to indemnify and defend LoGeek from any and all losses arising out of, under or in connection with any third-party claim, including any claim from direct or indirect user of the Software.
277
+
278
+ ## ARTICLE 12 - TERMINATION
279
+
280
+ ### 12.1 - Termination at the end of the contractual period
281
+
282
+ Each Party can terminate the Agreement at the end of the contractual period by informing (e.g. by email) the other Party in writing, at least 2 weeks before the end of the contractual period, of its intention not to renew.
283
+
284
+ If neither Party has informed the other of its intention not to renew, within the 2-week period, the Agreement will be automatically renewed.
285
+
286
+ If confirmation of payment is not received by the end of a 14-day period following the renewal date, LoGeek retains the right, without prejudice to its other rights or remedies, to automatically and without any further formality (_ipso jure_) terminate the Agreement. In such case the consequences of termination described below shall apply.
287
+
288
+ ### 12.2 - Termination for cause
289
+
290
+ Each Party shall have the right, without prejudice to its other rights or remedies, to terminate the Agreement immediately and without any further formality (ipso jure) by written notice to the other Party if the other Party is in material breach of any of its obligations under the Agreement and either such breach is incapable of remedy or is capable of remedy and the defaulting Party shall have failed substantially to remedy that breach within 30 days of written notice to the defaulting Party specifying the breach and requiring its remedy.
291
+
292
+ LoGeek may without any further formality (ipso jure) and without any indemnity terminate the Agreement if the Software is used in a manner not compliant with the applicable Documentation or with this Agreement.
293
+
294
+ ### 12.3 - Consequences of termination
295
+
296
+ Upon expiration or termination of the Agreement for any reason, the Licensee shall, upon effective termination date of the Agreement, cease any Use of the Software, and destroy it, or upon LoGeek’s request, deliver to LoGeek, any and all copies of the Software.
297
+
298
+ All sums paid by the Licensee to LoGeek shall remain acquired by the latter.
299
+
300
+ ## ARTICLE 13 - MODIFICATION OF THE TERMS
301
+
302
+ LoGeek reserves the right to change or modify these Terms or any other LoGeek terms, conditions, or policies related to use of the Software at any time and at its sole discretion by posting revisions on the GitHub Kiba repository, at the following url:
303
+
304
+ [https://github.com/thbar/kiba/blob/master/COMM-LICENSE.md](https://github.com/thbar/kiba/blob/master/COMM-LICENSE.md)
305
+
306
+ Continued use of the Software following the posting of these changes or modifications will constitute the Licensee’s acknowledgement and agreement to such changes or modifications.
307
+
308
+ ## ARTICLE 14 - MISCELLANEOUS
309
+
310
+ **Insurance**. At all times during the term of this Agreement, each Party shall maintain adequate insurance policies with a reputable insurance company.
311
+
312
+ **Communication**. The Licensee hereby authorizes LoGeek to mention it as a business reference, to make public reference, in general terms, to the Software provided to the Licensee and to reproduce its trademark and logo for such communication and promotion purposes.
313
+
314
+ **Waiver**. No omission, delay or forbearance on the part of a Party in enforcing any right or remedy arising in connection with the Agreement will be construed or operate as a waiver of either that or any other right or remedy.
315
+
316
+ No waiver by a Party will be valid unless in writing and signed by a duly authorized representative of that Party.
317
+
318
+ **Transfer**. LoGeek may at any time sublicense, assign, novate or deal in any other manner with any or all of its rights and obligations under the Agreement provided it gives written notice to the Licensee.
319
+
320
+ This Agreement may not be transferred, in whole or in part, with or without valuable consideration, by the Licensee, whether such transfer occurs due to a merger, absorption, acquisition, scission, or any other operation without prior written consent from LoGeek.
321
+
322
+ **Subcontracting**. LoGeek reserves the right to subcontract the execution of the services to third parties qualified by LoGeek. LoGeek will however remain primarily responsible for the execution of the services.
323
+
324
+ **Applicable laws and export control**. Licensee agrees to comply with all applicable laws and regulations, including laws, regulations, orders or other restrictions on export, re-export or redistribution of Software and particularly with export controls imposed by the United States.
325
+
326
+ **Survival**. Those provisions that by their nature should survive termination of the Agreement will survive termination of the Agreement.
327
+
328
+ **Remainder**. The invalidity, illegality or unenforceability of any of the provisions of the Agreement shall not affect or impair the continuation in force of the remainder the Agreement.
329
+
330
+ **Indemnification**. The Licensee agrees to defend, indemnify, and hold harmless LoGeek from and against any lawsuits, claims, losses, damages, fines and expenses (including attorneys' fees and costs) arising out of Licensee’s use of the Software or breach of this Agreement.
331
+
332
+ **Attorneys’ fees and costs**. The prevailing party in any action to enforce this Agreement will be entitled to recover its attorneys’ fees and costs in connection with such action.
333
+
334
+ **Entirety**. This Agreement contains the whole agreement between the Parties relating to the subject matter of this Agreement at the date of this Agreement to the exclusion of any terms implied by law which may be excluded by contract and supersedes any previous written or oral agreement between the Parties in relation to the matters dealt with in this Agreement.
335
+
336
+ ## ARTICLE 15 - DISPUTE RESOLUTION
337
+
338
+ In the event of a dispute arising out of or in connection with the Agreement, the Parties undertake to set up a diligent, good faith attempt to resolve amicably all disputes in accordance with the following principles.
339
+
340
+ In this respect, as soon as a Party considers there is a dispute with the other Party, it will summon a meeting with chief executive level representatives of both Parties in order to discuss possible settlement of the said dispute. Such meeting shall be summoned by registered letter, return receipt requested, and shall take place within 15 days of receipt of the said letter by the recipient Party.
341
+
342
+ Should, within the aforementioned 15-day time period, the dispute not be settled or the meeting not be held, then each Party will be free to submit the dispute to a court of competent jurisdiction.
343
+
344
+ ## ARTICLE 16 - APPLICABLE LAW AND JURISDICTION
345
+
346
+ The Agreement shall in all respects be governed by and construed exclusively (save for any applicable mandatory laws) in accordance with the laws of France.
347
+
348
+ If the Parties fail to settle a dispute in accordance with the dispute resolution process set forth in section “Dispute resolution” above, any dispute arising from or relating to the Agreement shall be submitted to the courts of **PARIS (FRANCE)**.
data/Changes.md CHANGED
@@ -1,5 +1,14 @@
1
- 2.0.0.rc1
2
- ---------
1
+ 2.5.0
2
+ -----
3
+
4
+ - Transform's `close` can now yield rows. This is useful to write "aggregating transforms", such as sorting, grouping etc. See [#57](https://github.com/thbar/kiba/pull/57) for more background & explanations.
5
+ - Kiba now requires MRI Ruby 2.3+, JRuby 9.1+ or TruffleRuby.
6
+ - Fix incorrect error message when calling `transform nil` ([#73](https://github.com/thbar/kiba/pull/73]) - thanks @envygeeks for the report.
7
+
8
+ 2.0.0
9
+ -----
10
+
11
+ Please review the [release notes](https://github.com/thbar/kiba/releases/tag/v2.0.0) if you plan to use the StreamingRunner.
3
12
 
4
13
  - New (opt-in) StreamingRunner allows class transforms to generate more than one row. See [#44](https://github.com/thbar/kiba/pull/44) for rationale & how to activate.
5
14
  - Potentially breaking change if you were using the internal class `Kiba::Parser` directly: ETL jobs parsing has been modified to improve the isolation between the evaluation scope and the Kiba classes. See [#46](https://github.com/thbar/kiba/pull/46) for more information.
@@ -0,0 +1,7 @@
1
+ **If you need help**, please:
2
+ * [Check existing answers on StackOverflow](https://stackoverflow.com/questions/tagged/kiba-etl).
3
+ * [Ask your question with tag kiba-etl on StackOverflow](http://stackoverflow.com/questions/ask?tags=kiba-etl) so that other can benefit from your contribution!
4
+
5
+ I monitor this specific tag and will reply to you.
6
+
7
+ Please only open an issue in case you found a bug. Thanks!
data/LICENSE CHANGED
@@ -2,4 +2,6 @@ Copyright (c) LoGeek SARL
2
2
 
3
3
  Kiba Common is an Open Source project licensed under the terms of
4
4
  the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
5
- for license text.
5
+ for license text.
6
+
7
+ Kiba Pro has a commercial-friendly license allowing private forks and modifications of Kiba. You can find the commercial license terms in COMM-LICENSE.md.
@@ -6,8 +6,13 @@ Kiba Pro is the commercial extension for Kiba. Documentation is available on the
6
6
  HEAD
7
7
  -------
8
8
 
9
- 1.0.0.rc1
10
- ---------
9
+ 1.1.0
10
+ -----
11
+
12
+ - Improvement: `SQLBulkInsert` now supports Postgres `INSERT ON CONFLICT` for batch operations (bulk upsert, conditional upserts, ignore if exist etc) via new `dataset` keyword. See [documentation](https://github.com/thbar/kiba/wiki/SQL-Bulk-Insert-Destination).
13
+
14
+ 1.0.0
15
+ -----
11
16
 
12
17
  NOTE: documentation & requirements/compatibility are available on the [wiki](https://github.com/thbar/kiba/wiki).
13
18
 
data/README.md CHANGED
@@ -6,50 +6,32 @@ Kiba lets you define and run such high-quality ETL ([Extract-Transform-Load](htt
6
6
 
7
7
  Learn more on the [Wiki](https://github.com/thbar/kiba/wiki), on my [blog](http://thibautbarrere.com) and on [StackOverflow](http://stackoverflow.com/questions/tagged/kiba-etl).
8
8
 
9
+ A new [kiba-blueprints](https://github.com/thbar/kiba-blueprints) repo has been also created to showcase the use of Kiba OSS and Kiba Pro. More examples are planned!
10
+
9
11
  [![Gem Version](https://badge.fury.io/rb/kiba.svg)](http://badge.fury.io/rb/kiba)
10
- [![Build Status](https://travis-ci.org/thbar/kiba.svg?branch=master)](https://travis-ci.org/thbar/kiba) [![Build status](https://ci.appveyor.com/api/projects/status/v05jcyhpp1mueq9i?svg=true)](https://ci.appveyor.com/project/thbar/kiba) [![Code Climate](https://codeclimate.com/github/thbar/kiba/badges/gpa.svg)](https://codeclimate.com/github/thbar/kiba) [![Dependency Status](https://gemnasium.com/thbar/kiba.svg)](https://gemnasium.com/thbar/kiba)
12
+ [![Build Status](https://travis-ci.org/thbar/kiba.svg?branch=master)](https://travis-ci.org/thbar/kiba) [![Build status](https://ci.appveyor.com/api/projects/status/v05jcyhpp1mueq9i?svg=true)](https://ci.appveyor.com/project/thbar/kiba) [![Code Climate](https://codeclimate.com/github/thbar/kiba/badges/gpa.svg)](https://codeclimate.com/github/thbar/kiba)
13
+
14
+ ## Kiba 2.0.0
11
15
 
12
- ## Kiba 2.0.0.rc1
16
+ Kiba 2.0.0 has been recently released with one major improvement for ETL components developers.
13
17
 
14
- Kiba 2.0.0.rc1 (available via `gem install kiba --prerelease`) is available for testing.
18
+ Please check out the [release notes](https://github.com/thbar/kiba/releases/tag/v2.0.0).
15
19
 
16
- ### New StreamingRunner engine
20
+ [Subscribe to my newsletter](https://tinyletter.com/kiba-etl) to get the upcoming detailed article on Kiba 2 benefits.
17
21
 
18
- Kiba 2 introduces a new, opt-in engine called the `StreamingRunner`, which allows to generate an arbitrary number of rows inside transforms. This drastically improves the reusability & composability of Kiba components (see [#44](https://github.com/thbar/kiba/pull/44) for some background).
22
+ ## Installation
19
23
 
20
- To use the `StreamingRunner`, use the following code:
24
+ Add the gem to your `Gemfile` and run the bundle command:
21
25
 
22
26
  ```ruby
23
- # activate the new Kiba internal config system
24
- extend Kiba::DSLExtensions::Config
25
- # opt-in for the new engine
26
- config :kiba, runner: Kiba::StreamingRunner
27
-
28
- # write transform class able to yield an arbitrary number of rows
29
- class MyYieldingTransform
30
- def process(row)
31
- yield {key: 1}
32
- yield {key: 2}
33
- {key: 3}
34
- end
35
- end
27
+ gem 'kiba'
36
28
  ```
37
29
 
38
- The improved runner is compatible with Ruby 2.0+.
39
-
40
- ### Compatibility with Kiba 1
41
-
42
- Kiba 2 is expected to be compatible with existing Kiba scripts as long as you did not use internal API.
43
-
44
- Internal changes include:
45
-
46
- * An opt-in, Elixir's mix-inspired `config` system, currently only used to select the runner you want at job declaration time
47
- * A stronger isolation in the `Parser`, to reduces the chances that ETL scripts could conflict with Kiba internal classes
48
-
49
30
  ## Getting Started
50
31
 
51
32
  * [How do you define ETL jobs with Kiba?](https://github.com/thbar/kiba/wiki/How-do-you-define-ETL-jobs-with-Kiba%3F)
52
- * [How do you run your ETL jobs?](https://github.com/thbar/kiba/wiki/How-do-you-run-your-ETL-jobs%3F)
33
+ * [Running Kiba jobs from the command line](https://github.com/thbar/kiba/wiki/Running-Kiba-jobs-from-the-command-line)
34
+ * [Considerations for running Kiba jobs programmatically (from Sidekiq, Faktory, Rake, ...)](https://github.com/thbar/kiba/wiki/Considerations-for-running-Kiba-jobs-programmatically-(from-Sidekiq,-Faktory,-Rake,-...))
53
35
  * [Implementing ETL sources](https://github.com/thbar/kiba/wiki/Implementing-ETL-sources).
54
36
  * [Implementing ETL transforms](https://github.com/thbar/kiba/wiki/Implementing-ETL-transforms).
55
37
  * [Implementing ETL destinations](https://github.com/thbar/kiba/wiki/Implementing-ETL-destinations).
@@ -57,6 +39,7 @@ Internal changes include:
57
39
 
58
40
  ## Useful links
59
41
 
42
+ * [Ruby Kaigi 2018 conference - Kiba 2 - Past, present & future of data processing with Ruby](https://www.youtube.com/watch?v=fxVtbog7pIQ) ([slides](https://speakerdeck.com/thbar/kiba-etl-v2-rubykaigi-2018))
60
43
  * [Live Coding Session - Processing data with Kiba ETL](http://thibautbarrere.com/2015/11/09/video-processing-data-with-kiba-etl/)
61
44
  * [Rubyists - are you doing ETL unknowningly?](http://thibautbarrere.com/2015/03/25/rubyists-are-you-doing-etl-unknowingly/)
62
45
  * [How to write solid data processing code](http://thibautbarrere.com/2015/04/05/how-to-write-solid-data-processing-code/)
@@ -68,7 +51,7 @@ Internal changes include:
68
51
 
69
52
  ## Supported Ruby versions
70
53
 
71
- Kiba currently supports Ruby 2.0+ and JRuby (with its default 1.9 syntax). See [test matrix](https://travis-ci.org/thbar/kiba).
54
+ Kiba currently supports Ruby 2.3+, JRuby 9.1+ and TruffleRuby. See [test matrix](https://travis-ci.org/thbar/kiba).
72
55
 
73
56
  ## Kiba Common
74
57
 
@@ -78,7 +61,7 @@ I'm starting to add commonly used reusable helpers in a separate gem called [kib
78
61
 
79
62
  **Consulting services**: if your organization needs help to implement a data pipeline or to build a data-intensive application, I provide consulting services. [More information](http://thibautbarrere.com/hire-me/).
80
63
 
81
- **Kiba Pro**: for more features & goodies, check out Kiba Pro ([Changelog & contact info](Pro-Changes.md)).
64
+ **Kiba Pro**: for more features & goodies, check out [Kiba Pro](https://github.com/thbar/kiba/wiki#kiba-pro).
82
65
 
83
66
  ## License
84
67
 
data/Rakefile CHANGED
@@ -4,4 +4,9 @@ Rake::TestTask.new(:test) do |t|
4
4
  t.pattern = 'test/test_*.rb'
5
5
  end
6
6
 
7
- task default: :test
7
+ # A simple check to verify TruffleRuby installation trick is really in effect
8
+ task :show_ruby_version do
9
+ puts "Running with #{RUBY_DESCRIPTION}"
10
+ end
11
+
12
+ task default: [:show_ruby_version, :test]
@@ -5,10 +5,12 @@ cache:
5
5
 
6
6
  environment:
7
7
  matrix:
8
+ - RUBY_VERSION: 26
9
+ - RUBY_VERSION: 25
8
10
  - RUBY_VERSION: 24
9
11
  - RUBY_VERSION: 23
10
- - RUBY_VERSION: 22
11
- - RUBY_VERSION: 21
12
+ # NOTE: jruby doesn't seem to be supported on default images
13
+ # see https://www.appveyor.com/docs/build-environment/#ruby
12
14
 
13
15
  install:
14
16
  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
@@ -13,6 +13,10 @@ Gem::Specification.new do |gem|
13
13
  gem.require_paths = ['lib']
14
14
  gem.version = Kiba::VERSION
15
15
  gem.executables = ['kiba']
16
+ gem.metadata = {
17
+ 'source_code_uri' => 'https://github.com/thbar/kiba',
18
+ 'documentation_uri' => 'https://github.com/thbar/kiba/wiki',
19
+ }
16
20
 
17
21
  gem.add_development_dependency 'rake'
18
22
  gem.add_development_dependency 'minitest', '~> 5.9'
@@ -63,15 +63,16 @@ module Kiba
63
63
  end
64
64
 
65
65
  def to_instance(klass, args, block, allow_block, allow_class)
66
- if klass
66
+ if klass && block
67
+ fail 'Class and block form cannot be used together at the moment'
68
+ elsif klass
67
69
  fail 'Class form is not allowed here' unless allow_class
68
70
  klass.new(*args)
69
71
  elsif block
70
72
  fail 'Block form is not allowed here' unless allow_block
71
73
  AliasingProc.new(&block)
72
- else
73
- # TODO: support block passing to a class form definition?
74
- fail 'Class and block form cannot be used together at the moment'
74
+ elsif
75
+ fail 'Nil parameters not allowed here'
75
76
  end
76
77
  end
77
78
  end
@@ -11,6 +11,11 @@ module Kiba
11
11
  end
12
12
  y << returned_row if returned_row
13
13
  end
14
+ if t.respond_to?(:close)
15
+ t.close do |close_row|
16
+ y << close_row
17
+ end
18
+ end
14
19
  end
15
20
  end
16
21
 
@@ -1,3 +1,3 @@
1
1
  module Kiba
2
- VERSION = '2.0.0'
2
+ VERSION = '2.5.0'
3
3
  end
@@ -3,9 +3,11 @@ require 'minitest/pride'
3
3
  require 'minitest/focus'
4
4
  require 'kiba'
5
5
 
6
- class Kiba::Test < Minitest::Test
7
- extend Minitest::Spec::DSL
6
+ if ENV['CI'] == 'true'
7
+ puts "Running with MiniTest version #{MiniTest::VERSION}"
8
+ end
8
9
 
10
+ class Kiba::Test < Minitest::Test
9
11
  def remove_files(*files)
10
12
  files.each do |file|
11
13
  File.delete(file) if File.exist?(file)
@@ -15,4 +17,10 @@ class Kiba::Test < Minitest::Test
15
17
  def fixture(file)
16
18
  File.join(File.dirname(__FILE__), 'fixtures', file)
17
19
  end
20
+
21
+ unless self.method_defined?(:assert_mock)
22
+ def assert_mock(mock)
23
+ mock.verify
24
+ end
25
+ end
18
26
  end
@@ -1,5 +1,6 @@
1
1
  require 'minitest/mock'
2
- require_relative '../support/test_enumerable_source'
2
+ require_relative 'support/test_enumerable_source'
3
+ require_relative 'support/test_destination_returning_nil'
3
4
 
4
5
  module SharedRunnerTests
5
6
  def kiba_run(job)
@@ -134,4 +135,28 @@ module SharedRunnerTests
134
135
  # and the second row should have been reformatted
135
136
  assert_equal [{new_identifier: 'second-row'}], @remaining_rows
136
137
  end
137
- end
138
+
139
+ def test_destination_returning_nil_does_not_remove_row_from_pipeline
140
+ # safeguard to avoid modification on the support code
141
+ assert_nil TestDestinationReturningNil.new.write("FOOBAR")
142
+
143
+ destinations = []
144
+ control = Kiba.parse do
145
+ source TestEnumerableSource, [{key: 'value'}]
146
+ 2.times do
147
+ destination TestDestinationReturningNil, on_init: lambda { |d| destinations << d }
148
+ end
149
+ end
150
+ kiba_run(control)
151
+ 2.times do |i|
152
+ assert_equal [{key: 'value'}], destinations[i].instance_variable_get(:@written_rows)
153
+ end
154
+ end
155
+
156
+ def test_nil_transform_error_message
157
+ control = Kiba.parse do
158
+ transform
159
+ end
160
+ assert_raises(RuntimeError, 'Nil parameters not allowed here') { kiba_run(control) }
161
+ end
162
+ end
@@ -0,0 +1,19 @@
1
+ class AggregateTransform
2
+ def initialize(options)
3
+ @aggregate_size = options.fetch(:aggregate_size)
4
+ end
5
+
6
+ def process(row)
7
+ @buffer ||= []
8
+ @buffer << row
9
+ if @buffer.size == @aggregate_size
10
+ yield @buffer
11
+ @buffer = []
12
+ end
13
+ nil
14
+ end
15
+
16
+ def close
17
+ yield @buffer unless @buffer.empty?
18
+ end
19
+ end
@@ -0,0 +1,11 @@
1
+ class CloseYieldingTransform
2
+ def initialize(options)
3
+ @yield_on_close = options.fetch(:yield_on_close)
4
+ end
5
+
6
+ def close
7
+ @yield_on_close.each do |item|
8
+ yield item
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ class TestDestinationReturningNil
2
+ def initialize(options = {})
3
+ on_init = options[:on_init]
4
+ # A little trick to allow outer references to this instance
5
+ on_init.call(self) if on_init
6
+ end
7
+
8
+ def write(row)
9
+ (@written_rows ||= []) << row
10
+ nil
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ class NonClosingTransform
2
+ def process(row)
3
+ row
4
+ end
5
+ end
@@ -8,10 +8,10 @@ require_relative 'support/test_source_that_reads_at_instantiation_time'
8
8
 
9
9
  # End-to-end tests go here
10
10
  class TestIntegration < Kiba::Test
11
- let(:output_file) { 'test/tmp/output.csv' }
12
- let(:input_file) { 'test/tmp/input.csv' }
11
+ def output_file; 'test/tmp/output.csv'; end
12
+ def input_file; 'test/tmp/input.csv'; end
13
13
 
14
- let(:sample_csv_data) do
14
+ def sample_csv_data
15
15
  <<CSV
16
16
  first_name,last_name,sex
17
17
  John,Doe,M
@@ -1,5 +1,5 @@
1
1
  require_relative 'helper'
2
- require_relative 'common/runner'
2
+ require_relative 'shared_runner_tests'
3
3
 
4
4
  class TestRunner < Kiba::Test
5
5
  include SharedRunnerTests
@@ -3,8 +3,9 @@ require_relative 'support/test_enumerable_source'
3
3
  require_relative 'support/test_array_destination'
4
4
  require_relative 'support/test_yielding_transform'
5
5
  require_relative 'support/test_duplicate_row_transform'
6
-
7
- require_relative 'common/runner'
6
+ require_relative 'support/test_close_yielding_transform'
7
+ require_relative 'support/test_non_closing_transform'
8
+ require_relative 'shared_runner_tests'
8
9
 
9
10
  class TestStreamingRunner < Kiba::Test
10
11
  include SharedRunnerTests
@@ -46,4 +47,27 @@ class TestStreamingRunner < Kiba::Test
46
47
  {item: 'classic-return-value'}
47
48
  ], destination_array
48
49
  end
50
+
51
+ def test_transform_yielding_from_close
52
+ destination_array = []
53
+ job = Kiba.parse do
54
+ extend Kiba::DSLExtensions::Config
55
+ config :kiba, runner: Kiba::StreamingRunner
56
+
57
+ transform CloseYieldingTransform, yield_on_close: [1, 2]
58
+ destination TestArrayDestination, destination_array
59
+ end
60
+ Kiba.run(job)
61
+ assert_equal [1, 2], destination_array
62
+ end
63
+
64
+ def test_transform_with_no_close_must_not_raise
65
+ job = Kiba.parse do
66
+ extend Kiba::DSLExtensions::Config
67
+ config :kiba, runner: Kiba::StreamingRunner
68
+
69
+ transform NonClosingTransform
70
+ end
71
+ Kiba.run(job)
72
+ end
49
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiba
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaut Barrère
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-05 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -76,8 +76,10 @@ extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
78
  - ".travis.yml"
79
+ - COMM-LICENSE.md
79
80
  - Changes.md
80
81
  - Gemfile
82
+ - ISSUE_TEMPLATE.md
81
83
  - LICENSE
82
84
  - Pro-Changes.md
83
85
  - README.md
@@ -94,18 +96,22 @@ files:
94
96
  - lib/kiba/runner.rb
95
97
  - lib/kiba/streaming_runner.rb
96
98
  - lib/kiba/version.rb
97
- - test/common/runner.rb
98
99
  - test/fixtures/bogus.etl
99
100
  - test/fixtures/namespace_conflict.etl
100
101
  - test/fixtures/some_extension.rb
101
102
  - test/fixtures/valid.etl
102
103
  - test/helper.rb
104
+ - test/shared_runner_tests.rb
103
105
  - test/support/shared_tests.rb
106
+ - test/support/test_aggregate_transform.rb
104
107
  - test/support/test_array_destination.rb
108
+ - test/support/test_close_yielding_transform.rb
105
109
  - test/support/test_csv_destination.rb
106
110
  - test/support/test_csv_source.rb
111
+ - test/support/test_destination_returning_nil.rb
107
112
  - test/support/test_duplicate_row_transform.rb
108
113
  - test/support/test_enumerable_source.rb
114
+ - test/support/test_non_closing_transform.rb
109
115
  - test/support/test_rename_field_transform.rb
110
116
  - test/support/test_source_that_reads_at_instantiation_time.rb
111
117
  - test/support/test_yielding_transform.rb
@@ -118,7 +124,9 @@ files:
118
124
  homepage: http://thbar.github.io/kiba/
119
125
  licenses:
120
126
  - LGPL-3.0
121
- metadata: {}
127
+ metadata:
128
+ source_code_uri: https://github.com/thbar/kiba
129
+ documentation_uri: https://github.com/thbar/kiba/wiki
122
130
  post_install_message:
123
131
  rdoc_options: []
124
132
  require_paths:
@@ -134,24 +142,27 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
142
  - !ruby/object:Gem::Version
135
143
  version: '0'
136
144
  requirements: []
137
- rubyforge_project:
138
- rubygems_version: 2.6.14
145
+ rubygems_version: 3.0.3
139
146
  signing_key:
140
147
  specification_version: 4
141
148
  summary: Lightweight ETL for Ruby
142
149
  test_files:
143
- - test/common/runner.rb
144
150
  - test/fixtures/bogus.etl
145
151
  - test/fixtures/namespace_conflict.etl
146
152
  - test/fixtures/some_extension.rb
147
153
  - test/fixtures/valid.etl
148
154
  - test/helper.rb
155
+ - test/shared_runner_tests.rb
149
156
  - test/support/shared_tests.rb
157
+ - test/support/test_aggregate_transform.rb
150
158
  - test/support/test_array_destination.rb
159
+ - test/support/test_close_yielding_transform.rb
151
160
  - test/support/test_csv_destination.rb
152
161
  - test/support/test_csv_source.rb
162
+ - test/support/test_destination_returning_nil.rb
153
163
  - test/support/test_duplicate_row_transform.rb
154
164
  - test/support/test_enumerable_source.rb
165
+ - test/support/test_non_closing_transform.rb
155
166
  - test/support/test_rename_field_transform.rb
156
167
  - test/support/test_source_that_reads_at_instantiation_time.rb
157
168
  - test/support/test_yielding_transform.rb