diffend 0.2.40 → 0.2.45

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.github/workflows/ci.yml +3 -0
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +23 -1
  7. data/Gemfile.lock +3 -2
  8. data/Rakefile +43 -0
  9. data/certs/mensfeld.pem +21 -21
  10. data/diffend.gemspec +1 -1
  11. data/lib/diffend/commands.rb +2 -0
  12. data/lib/diffend/configs/error_messages.rb +11 -0
  13. data/lib/diffend/configs/validator.rb +22 -0
  14. data/lib/diffend/errors.rb +2 -0
  15. data/lib/diffend/execute.rb +4 -3
  16. data/lib/diffend/handle_errors/report.rb +4 -4
  17. data/lib/diffend/integration_repository.rb +92 -0
  18. data/lib/diffend/local_context/host.rb +12 -1
  19. data/lib/diffend/local_context/packages.rb +10 -27
  20. data/lib/diffend/plugin.rb +3 -0
  21. data/lib/diffend/repository.rb +109 -0
  22. data/lib/diffend/request_object.rb +1 -1
  23. data/lib/diffend/request_verdict.rb +4 -4
  24. data/lib/diffend/shell.rb +44 -0
  25. data/lib/diffend/track.rb +4 -4
  26. data/lib/diffend/version.rb +1 -1
  27. data/repositories/.diffend.yml +3 -0
  28. data/repositories/bundler_2_1_4/install_with_gemfile_lock/.diffend.yml +3 -0
  29. data/repositories/bundler_2_1_4/install_with_gemfile_lock/Gemfile +6 -0
  30. data/repositories/bundler_2_1_4/install_with_gemfile_lock/Gemfile.lock +22 -0
  31. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_added_gem/.diffend.yml +3 -0
  32. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_added_gem/Gemfile +6 -0
  33. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_added_gem/Gemfile.lock +16 -0
  34. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_changed_gem_version/.diffend.yml +3 -0
  35. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_changed_gem_version/Gemfile +6 -0
  36. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_changed_gem_version/Gemfile.lock +18 -0
  37. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_changed_gem_version/README.md +1 -0
  38. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_locked_gem_version/.diffend.yml +3 -0
  39. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_locked_gem_version/Gemfile +6 -0
  40. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_locked_gem_version/Gemfile.lock +19 -0
  41. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_removed_gem/.diffend.yml +3 -0
  42. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_removed_gem/Gemfile +5 -0
  43. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_removed_gem/Gemfile.lock +43 -0
  44. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/.diffend.yml +3 -0
  45. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/.ruby-version +1 -0
  46. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/Gemfile +10 -0
  47. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/Gemfile.lock +32 -0
  48. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/gem-with-two-platforms.gemspec +16 -0
  49. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_primary_sources/.diffend.yml +3 -0
  50. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_primary_sources/Gemfile +6 -0
  51. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +17 -0
  52. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_sources/.diffend.yml +3 -0
  53. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_sources/Gemfile +6 -0
  54. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_sources/Gemfile.lock +19 -0
  55. data/repositories/bundler_2_1_4/install_without_gemfile_lock/.diffend.yml +3 -0
  56. data/repositories/bundler_2_1_4/install_without_gemfile_lock/Gemfile +5 -0
  57. data/repositories/bundler_2_1_4/update_with_gemfile_lock/.diffend.yml +3 -0
  58. data/repositories/bundler_2_1_4/update_with_gemfile_lock/Gemfile +5 -0
  59. data/repositories/bundler_2_1_4/update_with_gemfile_lock/Gemfile.lock +16 -0
  60. data/repositories/bundler_2_1_4/update_with_gemfile_lock/README.md +1 -0
  61. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_added_gem/.diffend.yml +3 -0
  62. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_added_gem/Gemfile +6 -0
  63. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_added_gem/Gemfile.lock +16 -0
  64. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_added_gem/README.md +1 -0
  65. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_removed_gem/.diffend.yml +3 -0
  66. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_removed_gem/Gemfile +5 -0
  67. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_removed_gem/Gemfile.lock +43 -0
  68. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_removed_gem/README.md +1 -0
  69. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_primary_sources/.diffend.yml +3 -0
  70. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_primary_sources/Gemfile +6 -0
  71. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +17 -0
  72. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_primary_sources/README.md +1 -0
  73. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_sources/.diffend.yml +3 -0
  74. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_sources/Gemfile +6 -0
  75. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_sources/Gemfile.lock +44 -0
  76. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_sources/README.md +1 -0
  77. data/repositories/bundler_2_1_4/update_without_gemfile_lock/.diffend.yml +3 -0
  78. data/repositories/bundler_2_1_4/update_without_gemfile_lock/Gemfile +5 -0
  79. data/repositories/bundler_2_1_4/update_without_gemfile_lock/README.md +1 -0
  80. data/repositories/bundler_2_2_17/install_with_gemfile_lock/.diffend.yml +3 -0
  81. data/repositories/bundler_2_2_17/install_with_gemfile_lock/Gemfile +6 -0
  82. data/repositories/bundler_2_2_17/install_with_gemfile_lock/Gemfile.lock +21 -0
  83. data/repositories/bundler_2_2_17/install_with_gemfile_lock/README.md +1 -0
  84. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_added_gem/.diffend.yml +3 -0
  85. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_added_gem/Gemfile +6 -0
  86. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_added_gem/Gemfile.lock +16 -0
  87. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_added_gem/README.md +1 -0
  88. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_changed_gem_version/.diffend.yml +3 -0
  89. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_changed_gem_version/Gemfile +6 -0
  90. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_changed_gem_version/Gemfile.lock +18 -0
  91. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_changed_gem_version/README.md +1 -0
  92. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_locked_gem_version/.diffend.yml +3 -0
  93. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_locked_gem_version/Gemfile +6 -0
  94. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_locked_gem_version/Gemfile.lock +18 -0
  95. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_locked_gem_version/README.md +1 -0
  96. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_removed_gem/.diffend.yml +3 -0
  97. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_removed_gem/Gemfile +5 -0
  98. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_removed_gem/Gemfile.lock +41 -0
  99. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_removed_gem/README.md +1 -0
  100. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_platforms/.diffend.yml +3 -0
  101. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_platforms/Gemfile +10 -0
  102. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_platforms/Gemfile.lock +30 -0
  103. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_platforms/README.md +1 -0
  104. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_platforms/gem-with-two-platforms.gemspec +16 -0
  105. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_primary_sources/.diffend.yml +3 -0
  106. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_primary_sources/Gemfile +6 -0
  107. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +17 -0
  108. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_primary_sources/README.md +1 -0
  109. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_sources/.diffend.yml +3 -0
  110. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_sources/Gemfile +6 -0
  111. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_sources/Gemfile.lock +19 -0
  112. data/repositories/bundler_2_2_17/install_with_gemfile_lock_with_two_sources/README.md +1 -0
  113. data/repositories/bundler_2_2_17/install_without_gemfile_lock/.diffend.yml +3 -0
  114. data/repositories/bundler_2_2_17/install_without_gemfile_lock/Gemfile +5 -0
  115. data/repositories/bundler_2_2_17/install_without_gemfile_lock/README.md +1 -0
  116. data/repositories/bundler_2_2_17/update_with_gemfile_lock/.diffend.yml +3 -0
  117. data/repositories/bundler_2_2_17/update_with_gemfile_lock/Gemfile +5 -0
  118. data/repositories/bundler_2_2_17/update_with_gemfile_lock/Gemfile.lock +16 -0
  119. data/repositories/bundler_2_2_17/update_with_gemfile_lock/README.md +1 -0
  120. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_added_gem/.diffend.yml +3 -0
  121. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_added_gem/Gemfile +6 -0
  122. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_added_gem/Gemfile.lock +16 -0
  123. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_added_gem/README.md +1 -0
  124. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_changed_gem_version/Gemfile +6 -0
  125. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_changed_gem_version/Gemfile.lock +18 -0
  126. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_changed_gem_version/README.md +1 -0
  127. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_locked_gem_version/Gemfile +6 -0
  128. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_locked_gem_version/Gemfile.lock +18 -0
  129. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_locked_gem_version/README.md +1 -0
  130. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_removed_gem/.diffend.yml +3 -0
  131. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_removed_gem/Gemfile +5 -0
  132. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_removed_gem/Gemfile.lock +41 -0
  133. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_two_primary_sources/.diffend.yml +3 -0
  134. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_two_primary_sources/Gemfile +6 -0
  135. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +17 -0
  136. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_two_primary_sources/README.md +1 -0
  137. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_two_sources/.diffend.yml +3 -0
  138. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_two_sources/Gemfile +6 -0
  139. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_two_sources/Gemfile.lock +42 -0
  140. data/repositories/bundler_2_2_17/update_with_gemfile_lock_with_two_sources/README.md +1 -0
  141. data/repositories/bundler_2_2_17/update_without_gemfile_lock/.diffend.yml +3 -0
  142. data/repositories/bundler_2_2_17/update_without_gemfile_lock/Gemfile +5 -0
  143. data/repositories/bundler_2_2_7/install_with_gemfile_lock/.diffend.yml +3 -0
  144. data/repositories/bundler_2_2_7/install_with_gemfile_lock/Gemfile +6 -0
  145. data/repositories/bundler_2_2_7/install_with_gemfile_lock/Gemfile.lock +21 -0
  146. data/repositories/bundler_2_2_7/install_with_gemfile_lock/README.md +1 -0
  147. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_added_gem/.diffend.yml +3 -0
  148. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_added_gem/Gemfile +6 -0
  149. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_added_gem/Gemfile.lock +16 -0
  150. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_added_gem/README.md +1 -0
  151. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_changed_gem_version/.diffend.yml +3 -0
  152. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_changed_gem_version/Gemfile +6 -0
  153. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_changed_gem_version/Gemfile.lock +18 -0
  154. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_changed_gem_version/README.md +1 -0
  155. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_locked_gem_version/.diffend.yml +3 -0
  156. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_locked_gem_version/Gemfile +6 -0
  157. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_locked_gem_version/Gemfile.lock +18 -0
  158. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_locked_gem_version/README.md +1 -0
  159. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_removed_gem/.diffend.yml +3 -0
  160. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_removed_gem/Gemfile +5 -0
  161. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_removed_gem/Gemfile.lock +41 -0
  162. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_removed_gem/README.md +1 -0
  163. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/.diffend.yml +3 -0
  164. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/Gemfile +10 -0
  165. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/Gemfile.lock +30 -0
  166. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/README.md +1 -0
  167. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/gem-with-two-platforms.gemspec +16 -0
  168. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_primary_sources/.diffend.yml +3 -0
  169. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_primary_sources/Gemfile +6 -0
  170. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +17 -0
  171. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_primary_sources/README.md +1 -0
  172. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_sources/.diffend.yml +3 -0
  173. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_sources/Gemfile +6 -0
  174. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_sources/Gemfile.lock +19 -0
  175. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_sources/README.md +1 -0
  176. data/repositories/bundler_2_2_7/install_without_gemfile_lock/.diffend.yml +3 -0
  177. data/repositories/bundler_2_2_7/install_without_gemfile_lock/Gemfile +5 -0
  178. data/repositories/bundler_2_2_7/install_without_gemfile_lock/README.md +1 -0
  179. data/repositories/bundler_2_2_7/update_with_gemfile_lock/.diffend.yml +3 -0
  180. data/repositories/bundler_2_2_7/update_with_gemfile_lock/Gemfile +5 -0
  181. data/repositories/bundler_2_2_7/update_with_gemfile_lock/Gemfile.lock +16 -0
  182. data/repositories/bundler_2_2_7/update_with_gemfile_lock/README.md +1 -0
  183. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_added_gem/.diffend.yml +3 -0
  184. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_added_gem/Gemfile +6 -0
  185. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_added_gem/Gemfile.lock +16 -0
  186. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_added_gem/README.md +1 -0
  187. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_changed_gem_version/Gemfile +6 -0
  188. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_changed_gem_version/Gemfile.lock +18 -0
  189. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_changed_gem_version/README.md +1 -0
  190. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_locked_gem_version/Gemfile +6 -0
  191. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_locked_gem_version/Gemfile.lock +18 -0
  192. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_locked_gem_version/README.md +1 -0
  193. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_removed_gem/.diffend.yml +3 -0
  194. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_removed_gem/Gemfile +5 -0
  195. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_removed_gem/Gemfile.lock +41 -0
  196. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_primary_sources/.diffend.yml +3 -0
  197. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_primary_sources/Gemfile +6 -0
  198. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +17 -0
  199. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_primary_sources/README.md +1 -0
  200. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_sources/.diffend.yml +3 -0
  201. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_sources/Gemfile +6 -0
  202. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_sources/Gemfile.lock +42 -0
  203. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_sources/README.md +1 -0
  204. data/repositories/bundler_2_2_7/update_without_gemfile_lock/.diffend.yml +3 -0
  205. data/repositories/bundler_2_2_7/update_without_gemfile_lock/Gemfile +5 -0
  206. data/repositories/diffend.json +9 -0
  207. metadata +214 -31
  208. metadata.gz.sig +0 -0
  209. data/certs/tomaszpajor.pem +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab9ba402e382256b6318f8a4b278ae8e6ae0e68dc9ab15fedca98b8e46f8a105
4
- data.tar.gz: 7f0fa88a9af55b5b7d2992fa67fcde7f464f36b68801f4b69b3d0204033428df
3
+ metadata.gz: d225cf1331c630fd992dd9ab9336ca535307d995ac676930fd49e1c7e159e1d6
4
+ data.tar.gz: 7bb14c0d773b775cbcf74e6b78a312e079cedb5795d0e88a2917119f884da2d3
5
5
  SHA512:
6
- metadata.gz: e41cad9b056aed9f846424964a14862cf5dfeab3596b93673bf7ed9ceacc50beab92157cfe8b98aa4a35c8bce5341862c79e6a35ae03fdc754a85eeb730b7077
7
- data.tar.gz: dfd06d10e56962b7ffa3eca0530b8b7fcaa9bb83169c2bd52e672a957de9dba22dd63f2dd91c3d90441c466256446d4609c293e028e75deaa66db28f47fccbfc
6
+ metadata.gz: 78cc93592276ff199548aafa8e58097d8f111b621e739b58559be36f53da7fa125e54807330985ef1b28a81c31efac74820e0ce506bfb26022e91a36a66276e1
7
+ data.tar.gz: 34d2bdb077978a3eacacdb431772b7882c94f310769398ba49f71905ed83e000050c41412ddc1b03c25b36a033c36af7acdd0e40b31d994a2b83291c0d75fed2
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -19,6 +19,7 @@ jobs:
19
19
  bundler:
20
20
  - '2.1.4'
21
21
  - '2.2.7'
22
+ - '2.2.17'
22
23
  include:
23
24
  - ruby: '2.7'
24
25
  coverage: 'true'
@@ -48,6 +49,8 @@ jobs:
48
49
  env:
49
50
  GITHUB_COVERAGE: ${{matrix.coverage}}
50
51
  run: bundle _${{matrix.bundler}}_ exec rspec
52
+ - name: Run integration tests
53
+ run: bundle _${{matrix.bundler}}_ exec rake integration_suite
51
54
 
52
55
  diffend:
53
56
  runs-on: ubuntu-latest
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.0.1
data/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## [Unreleased][master]
4
4
 
5
+ ## [0.2.45] (2021-05-05)
6
+ - Bundler 2.2.17 support
7
+
8
+ ## [0.2.44] (2021-03-31)
9
+ - `project_id`, `shareable_id` and `shareable_key` need to be a valid UUID
10
+
11
+ ## [0.2.43] (2021-03-16)
12
+ - introduce `DIFFEND_TAGS` ([#119](https://github.com/diffend-io/diffend-ruby/pull/119))
13
+ - add support for `bundle add` command ([#118](https://github.com/diffend-io/diffend-ruby/pull/118))
14
+
15
+ ## [0.2.42] (2021-03-09)
16
+ - introduce `DIFFEND_SKIP_DENY` flag
17
+ - fix config not being passed properly to `build_error` in `Diffend::Execute` ([#116](https://github.com/diffend-io/diffend-ruby/pull/116))
18
+
19
+ ## [0.2.41] (2021-03-09)
20
+ - introduce integration specs ([#107](https://github.com/diffend-io/diffend-ruby/pull/107))
21
+ - use `Bundler::Definition.resolve` for specs ([#112](https://github.com/diffend-io/diffend-ruby/pull/112))
22
+
5
23
  ## [0.2.40] (2021-02-23)
6
24
  - don't expose ips, we can identify instance by a hostname ([#108](https://github.com/diffend-io/diffend-ruby/pull/108))
7
25
  - don't set `verify_mode` when creating request in `Diffend::Request`, use default value set by `use_ssl` flag instead ([#109](https://github.com/diffend-io/diffend-ruby/pull/109))
@@ -126,7 +144,11 @@
126
144
 
127
145
  - initial release
128
146
 
129
- [master]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.40...HEAD
147
+ [master]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.44...HEAD
148
+ [0.2.44]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.43...v0.2.44
149
+ [0.2.43]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.42...v0.2.43
150
+ [0.2.42]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.41...v0.2.42
151
+ [0.2.41]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.40...v0.2.41
130
152
  [0.2.40]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.39...v0.2.40
131
153
  [0.2.39]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.38...v0.2.39
132
154
  [0.2.38]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.37...v0.2.38
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- diffend (0.2.40)
4
+ diffend (0.2.45)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -26,6 +26,7 @@ GEM
26
26
  PLATFORMS
27
27
  java
28
28
  ruby
29
+ universal-java-11
29
30
  universal-java-13
30
31
  x86_64-darwin-19
31
32
 
@@ -37,4 +38,4 @@ DEPENDENCIES
37
38
  rspec
38
39
 
39
40
  BUNDLED WITH
40
- 2.2.7
41
+ 2.2.17
data/Rakefile ADDED
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ %w[
4
+ bundler/setup
5
+ ].each(&method(:require))
6
+
7
+ require 'diffend/errors'
8
+ require 'diffend/config'
9
+ require 'diffend/shell'
10
+ require 'diffend/repository'
11
+ require 'diffend/integration_repository'
12
+
13
+ task :integration_suite do
14
+ Diffend::Repository::SUPPORTED.each do |command, repositories|
15
+ repositories.each do |repository_name|
16
+ repository = Diffend::IntegrationRepository.new(command, repository_name)
17
+ repository.repository.isolate do |path|
18
+ start = Time.now.to_f
19
+
20
+ repository.config?(path)
21
+
22
+ Bundler.with_unbundled_env do
23
+ repository.install_plugin(path)
24
+
25
+ cmd = Diffend::Shell.call_in_path(
26
+ path,
27
+ "DIFFEND_TAGS=#{repository_name},bundler:#{Bundler::VERSION} bundle #{command}"
28
+ )
29
+
30
+ unless cmd[:exit_code].zero?
31
+ puts "#{repository.full_name} FAILED"
32
+ puts cmd[:stderr]
33
+ exit 1
34
+ end
35
+ end
36
+
37
+ took = Time.now.to_f - start
38
+
39
+ puts "#{repository.full_name} OK, took #{took.round(1)}s"
40
+ end
41
+ end
42
+ end
43
+ end
data/certs/mensfeld.pem CHANGED
@@ -1,25 +1,25 @@
1
1
  -----BEGIN CERTIFICATE-----
2
2
  MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
3
- ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMTkwNzMwMTQ1NDU0WhcNMjAwNzI5MTQ1
4
- NDU0WjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
5
- CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC9fCwtaHZG2SyyNXiH8r0QbJQx/xxl
6
- dkvwWz9QGJO+O8rEx20FB1Ab+MVkfOscwIv5jWpmk1U9whzDPl1uFtIbgu+sk+Zb
7
- uQlZyK/DPN6c+/BbBL+RryTBRyvkPLoCVwm7uxc/JZ1n4AI6eF4cCZ2ieZ9QgQbU
8
- MQs2QPqs9hT50Ez/40GnOdadVfiDDGz+NME2C4ms0BriXwZ1tcRTfJIHe2xjIbbb
9
- y5qRGfsLKcgMzvLQR24olixyX1MR0s4+Wveq3QL/gBhL4veUcv+UABJA8IJR0kyB
10
- seHHutusiwZ1v3SjjjW1xLLrc2ARV0mgCb0WaK2T4iA3oFTGLh6Ydz8LNl31KQFv
11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dazEMB5jYtwoA8gQlANETNGPi51KlkukhKgaIEDMkBDJOx
22
+ 65N7DzmkcyY0/GwjIVIxmRhcrCt1YeCUElmfFx0iida1/YRm6sB2AXqScc1+ECRi
23
+ 2DND//YJUikn1zwbz1kT70XmHd97B4Eytpln7K+M1u2g1pHVEPW4owD/ammXNpUy
24
+ nt70FcDD4yxJQ+0YNiHd0N8IcVBM1TMIVctMNQ==
25
25
  -----END CERTIFICATE-----
data/diffend.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem')
19
19
  end
20
20
 
21
- spec.cert_chain = %w[certs/tomaszpajor.pem]
21
+ spec.cert_chain = %w[certs/mensfeld.pem]
22
22
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
23
23
  spec.require_paths = %w[lib]
24
24
 
@@ -11,5 +11,7 @@ module Diffend
11
11
  EXEC = 'exec'
12
12
  # Bundler secure command introduced by diffend plugin
13
13
  SECURE = 'secure'
14
+ # Bundler add command
15
+ ADD = 'add'
14
16
  end
15
17
  end
@@ -32,6 +32,17 @@ module Diffend
32
32
  Expected #{Validator::KNOWN_KEYS[key].join(' or ')}, was #{config.public_send(key).class}.
33
33
  MSG
34
34
  end
35
+
36
+ # Invalid uuid value message
37
+ #
38
+ # @param key [String] invalid key
39
+ #
40
+ # @return [String]
41
+ def invalid_uuid(key)
42
+ <<~MSG
43
+ Diffend configuration value for #{key} is invalid.
44
+ MSG
45
+ end
35
46
  end
36
47
  end
37
48
  end
@@ -17,6 +17,14 @@ module Diffend
17
17
  development?: [TrueClass, FalseClass]
18
18
  }.freeze
19
19
 
20
+ # List of known uuid keys
21
+ UUID_KEYS = %i[project_id shareable_id shareable_key].freeze
22
+
23
+ # Imported from https://github.com/assaf/uuid/blob/master/lib/uuid.rb#L199
24
+ UUID_FORMAT = /\A[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12}\z/i
25
+
26
+ private_constant :UUID_KEYS, :UUID_FORMAT
27
+
20
28
  class << self
21
29
  # @param config [Diffend::Config]
22
30
  def call(config)
@@ -28,6 +36,12 @@ module Diffend
28
36
 
29
37
  config.errors << ErrorMessages.invalid_key(config, key) if invalid?(config, key)
30
38
  end
39
+
40
+ UUID_KEYS.each do |key|
41
+ next if valid_uuid?(config, key)
42
+
43
+ config.errors << ErrorMessages.invalid_uuid(key)
44
+ end
31
45
  end
32
46
 
33
47
  private
@@ -49,6 +63,14 @@ module Diffend
49
63
  def invalid?(config, key)
50
64
  !KNOWN_KEYS[key].include?(config.public_send(key).class)
51
65
  end
66
+
67
+ # @param config [Diffend::Config]
68
+ # @param key [String]
69
+ #
70
+ # @return [Boolean] true if key has a valid uuid, false otherwise
71
+ def valid_uuid?(config, key)
72
+ UUID_FORMAT.match?(config.public_send(key))
73
+ end
52
74
  end
53
75
  end
54
76
  end
@@ -21,5 +21,7 @@ module Diffend
21
21
  HandledException = Class.new(BaseError)
22
22
  # Raised when we are unable to resolve dependencies
23
23
  DependenciesResolveException = Class.new(BaseError)
24
+ # Failure of a shell command execution
25
+ FailedShellCommand = Class.new(BaseError)
24
26
  end
25
27
  end
@@ -30,7 +30,7 @@ module Diffend
30
30
  # @param response [Hash] response from diffend API
31
31
  def build_message(config, response)
32
32
  if response.key?('error')
33
- build_error(response)
33
+ build_error(config, response)
34
34
  elsif response.key?('action')
35
35
  build_verdict(config, response)
36
36
  else
@@ -43,8 +43,9 @@ module Diffend
43
43
  end
44
44
  end
45
45
 
46
+ # @param config [Diffend::Config]
46
47
  # @param response [Hash] response from diffend API
47
- def build_error(response)
48
+ def build_error(config, response)
48
49
  build_error_message(response)
49
50
  .tap(&config.logger.method(:error))
50
51
 
@@ -65,7 +66,7 @@ module Diffend
65
66
  build_deny_message(config.command, response)
66
67
  .tap(&config.logger.method(:error))
67
68
 
68
- exit 1
69
+ exit 1 unless ENV.key?('DIFFEND_SKIP_DENY')
69
70
  else
70
71
  Diffend::HandleErrors::Report.call(
71
72
  config: config,
@@ -39,10 +39,10 @@ module Diffend
39
39
  # @return [Diffend::RequestObject]
40
40
  def build_request_object(config, payload)
41
41
  Diffend::RequestObject.new(
42
- config: config,
43
- url: config.errors_url,
44
- payload: payload,
45
- request_method: :post
42
+ config,
43
+ config.errors_url,
44
+ payload,
45
+ :post
46
46
  )
47
47
  end
48
48
 
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Diffend
4
+ # Repository for integrations
5
+ class IntegrationRepository
6
+ # Plugin code entry in Gemfile
7
+ GEMFILE_PLUGIN_ENTRY = 'plugin \'diffend\''
8
+ # Gemfile file name
9
+ GEMFILE_FILE_NAME = 'Gemfile'
10
+ # Gemfile backup file name
11
+ GEMFILE_BACKUP_FILE_NAME = 'Gemfile.backup'
12
+ # Plugin install command
13
+ PLUGIN_INSTALL_COMMAND = 'bundle plugin install diffend'
14
+
15
+ attr_reader :command, :name, :repository
16
+
17
+ # @param command [String] command executed via bundler
18
+ # @param name [String] repository name
19
+ def initialize(command, name)
20
+ @command = command
21
+ @name = name
22
+ @repository = Diffend::Repository.new(command, name)
23
+ end
24
+
25
+ # @return [String] full name of the repository with command
26
+ def full_name
27
+ "#{command}_#{name}"
28
+ end
29
+
30
+ # @param path [String] path to the repository
31
+ def config?(path)
32
+ # check if .diffend.yml exists
33
+ return if File.exist?(File.join(path, Diffend::Config::FILENAME))
34
+
35
+ puts "Diffend configuration does not exist for #{command} #{name}"
36
+ exit 1
37
+ end
38
+
39
+ # @param path [String] path to the repository
40
+ def install_plugin(path)
41
+ cmd = Diffend::Shell.call_in_path(path, PLUGIN_INSTALL_COMMAND)
42
+
43
+ unless cmd[:exit_code].zero?
44
+ puts "#{PLUGIN_INSTALL_COMMAND} failed"
45
+ puts cmd[:stderr]
46
+ exit 1
47
+ end
48
+
49
+ switch_plugin_to_development(path, cmd[:stdout])
50
+ add_plugin_to_gemfile(path)
51
+ end
52
+
53
+ private
54
+
55
+ # @param path [String] path to the repository
56
+ # @param stdout [String] stdout from plugin install command
57
+ def switch_plugin_to_development(path, stdout)
58
+ installed_version = stdout.scan(/Installing diffend (\d*\.\d*\.\d*)/)[0][0]
59
+ diffend_working_path = File.expand_path('..', Bundler.bin_path)
60
+ bundler_plugins_path = File.join(path, '.bundle/plugin/gems')
61
+ bundler_diffend_plugin_path = File.join(bundler_plugins_path, "diffend-#{installed_version}")
62
+ FileUtils.mv(bundler_diffend_plugin_path, "#{bundler_diffend_plugin_path}-")
63
+ FileUtils.ln_s(diffend_working_path, bundler_diffend_plugin_path)
64
+ end
65
+
66
+ # @param path [String] path to the repository
67
+ def add_plugin_to_gemfile(path)
68
+ gemfile_path = File.join(path, GEMFILE_FILE_NAME)
69
+
70
+ FileUtils.mv(gemfile_path, File.join(path, GEMFILE_BACKUP_FILE_NAME))
71
+ file = File.open(gemfile_path, 'w')
72
+ source_detected = nil
73
+
74
+ File.readlines(
75
+ File.join(path, GEMFILE_BACKUP_FILE_NAME)
76
+ ).each do |line|
77
+ if line.start_with?('source') && source_detected.nil?
78
+ source_detected = true
79
+ elsif source_detected
80
+ source_detected = false
81
+ file.write("\n#{GEMFILE_PLUGIN_ENTRY}\n")
82
+ end
83
+
84
+ file.write(line)
85
+ end
86
+
87
+ file.close
88
+
89
+ FileUtils.rm(File.join(path, GEMFILE_BACKUP_FILE_NAME))
90
+ end
91
+ end
92
+ end
@@ -56,7 +56,7 @@ module Diffend
56
56
  #
57
57
  # @return [Array]
58
58
  def tags
59
- tags = []
59
+ tags = prepare_user_tags
60
60
 
61
61
  if ENV.key?('GITHUB_ACTIONS')
62
62
  tags << 'ci'
@@ -71,6 +71,17 @@ module Diffend
71
71
  tags
72
72
  end
73
73
 
74
+ # Prepare user tags
75
+ #
76
+ # @return [Array]
77
+ def prepare_user_tags
78
+ if ENV.key?('DIFFEND_TAGS')
79
+ ENV['DIFFEND_TAGS'].split(',')
80
+ else
81
+ []
82
+ end
83
+ end
84
+
74
85
  # @param str [String] that we want to clean and truncate
75
86
  def clean(str)
76
87
  str