salesforce-deploy-tool 2.1.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sf +1 -1
  3. data/build.xml +1 -0
  4. data/features/config.feature +7 -7
  5. data/features/pull.feature +7 -7
  6. data/features/push.feature +124 -69
  7. data/features/resources/mock/ant +201 -0
  8. data/features/resources/repo/COMMIT_EDITMSG +1 -0
  9. data/features/resources/repo/HEAD +1 -0
  10. data/features/resources/repo/config +5 -0
  11. data/features/resources/repo/description +1 -0
  12. data/features/resources/repo/hooks/applypatch-msg.sample +15 -0
  13. data/features/resources/repo/hooks/commit-msg.sample +24 -0
  14. data/features/resources/repo/hooks/post-update.sample +8 -0
  15. data/features/resources/repo/hooks/pre-applypatch.sample +14 -0
  16. data/features/resources/repo/hooks/pre-commit.sample +49 -0
  17. data/features/resources/repo/hooks/pre-push.sample +54 -0
  18. data/features/resources/repo/hooks/pre-rebase.sample +169 -0
  19. data/features/resources/repo/hooks/prepare-commit-msg.sample +36 -0
  20. data/features/resources/repo/hooks/update.sample +128 -0
  21. data/features/resources/repo/index +0 -0
  22. data/features/resources/repo/info/exclude +6 -0
  23. data/features/resources/repo/logs/HEAD +10 -0
  24. data/features/resources/repo/logs/refs/heads/master +10 -0
  25. data/features/resources/repo/objects/08/d159fb570535461d73a45322c66495b5025c20 +3 -0
  26. data/features/resources/repo/objects/0a/ce763c3b6bc010c2a9a193f7d7c7bc03172800 +0 -0
  27. data/features/resources/repo/objects/18/75bbbe3a395a8d38c1097bfeda33da7995d8ba +0 -0
  28. data/features/resources/repo/objects/1b/f3c07d11fce01d255838eebd41a066e20e09f0 +0 -0
  29. data/features/resources/repo/objects/1d/300e3c8d30b80bb88cfce2b16c3070488f0440 +2 -0
  30. data/features/resources/repo/objects/1d/b81d6385e52f1ac897d8c119a01537b1624c05 +2 -0
  31. data/features/resources/repo/objects/1f/eb7a27c44c4b82a4e0551752e3aec20d39e867 +0 -0
  32. data/features/resources/repo/objects/21/a8635d944fb9d9c1779a5ce7a0e0e3ae0b560f +0 -0
  33. data/features/resources/repo/objects/21/f12831957736ffc4b5cb11beaf61020badb5ba +0 -0
  34. data/features/resources/repo/objects/24/f97074eaba38f18c29b4d89781a20bacd65bed +2 -0
  35. data/features/resources/repo/objects/25/8a8c1f2d788fa12fa87f994e96b3efbf2d0415 +0 -0
  36. data/features/resources/repo/objects/26/d3f397fe0eda1d7639542edf47982e408b856a +0 -0
  37. data/features/resources/repo/objects/2c/0414f10c4cb61f2ae352d54f36e84b877d49b8 +3 -0
  38. data/features/resources/repo/objects/3c/94ea5d2b74886cefeb5ecf7f7380bc8223e05b +0 -0
  39. data/features/resources/repo/objects/3d/0be981f941d665b9ffc59d0d734ceb18e1c551 +0 -0
  40. data/features/resources/repo/objects/3f/260c2394be8a70772376832c561d33365dc74c +0 -0
  41. data/features/resources/repo/objects/41/341113250717ca1d4e280cac7413074e110ceb +1 -0
  42. data/features/resources/repo/objects/44/b93fe01a1dfc0639577dd16969715bd9e6fe0c +0 -0
  43. data/features/resources/repo/objects/47/913885995720fb59e94d5766314a4728ea1944 +0 -0
  44. data/features/resources/repo/objects/48/587cabf050866f63b8743da1dbe0ebae23b348 +2 -0
  45. data/features/resources/repo/objects/51/394a26665e0ad7708091db12aff4510384fb2f +2 -0
  46. data/features/resources/repo/objects/51/f1b7da07050f62cd00f24774856a9d06d4fc47 +4 -0
  47. data/features/resources/repo/objects/54/5a9377aeb6a9d4e143c95e398c8968b35944cb +1 -0
  48. data/features/resources/repo/objects/58/acc8fd3f0888c0d4c735dbf945b8adc982723f +0 -0
  49. data/features/resources/repo/objects/59/c81a96f4e0b1ed588190e2c097c325556ab0df +2 -0
  50. data/features/resources/repo/objects/60/192eb56263416d0221556f33ffd4220aa536d4 +0 -0
  51. data/features/resources/repo/objects/6a/eb5e2a8bda5b4f04cbd2d942ae7940bf796c25 +4 -0
  52. data/features/resources/repo/objects/72/4a3c7678b7274af8806d0395594f3b0a059fcc +0 -0
  53. data/features/resources/repo/objects/76/8d5ed4528f6043dee289c7da0001c8a3ce45e4 +0 -0
  54. data/features/resources/repo/objects/79/e1ba418010d81ca3472ee271ce83abbea5104f +0 -0
  55. data/features/resources/repo/objects/7f/ee222d7d4008f9d6a6c6e5f10ef4923299c93d +2 -0
  56. data/features/resources/repo/objects/80/1416a319f26aac530d3663d8cd214cf7b7ef65 +0 -0
  57. data/features/resources/repo/objects/83/bbfc790b9974134c1591192634fa771075b535 +0 -0
  58. data/features/resources/repo/objects/87/09c1bfb261dedf83ab5793054940782c48b54f +2 -0
  59. data/features/resources/repo/objects/89/3df81588c577cfbae991baa7211062faacd4a0 +0 -0
  60. data/features/resources/repo/objects/8c/15363be6659c514f5e2cafd817efc656106027 +0 -0
  61. data/features/resources/repo/objects/90/0dd02ce96c29b918d4f38c0721ac61a62e2c75 +0 -0
  62. data/features/resources/repo/objects/91/54141b78af68bdeb8e9b79629012a720b6e8e5 +4 -0
  63. data/features/resources/repo/objects/93/50c5598f6bafd3aa1a6a6ceecec7f02a0b0203 +2 -0
  64. data/features/resources/repo/objects/96/b1ab4d31f29b149ff0b7eb60cb3a38dbaef37d +0 -0
  65. data/features/resources/repo/objects/99/9db58eef630156ab2fc4aa4a9451fb77c0137f +2 -0
  66. data/features/resources/repo/objects/9b/c11cdc1094120c76a59f222671d754297d3ea5 +0 -0
  67. data/features/resources/repo/objects/9f/2d034a0b311fc3ea68d920d100f8e3143cc664 +0 -0
  68. data/features/resources/repo/objects/a3/9d3fe0c289c12308749b73da61076bb4e1689d +2 -0
  69. data/features/resources/repo/objects/a5/ab41fa374d2682939feb0f8fcbf9b243544f5c +0 -0
  70. data/features/resources/repo/objects/aa/c66ee0d404c124fbcafd32a054664de4fdd3da +3 -0
  71. data/features/resources/repo/objects/ae/5379d68c15b3fc95efa7e6a640972865ef6d3d +0 -0
  72. data/features/resources/repo/objects/b8/580fa58bf91133b28d162bf2572667ae54c18d +0 -0
  73. data/features/resources/repo/objects/b9/4c5cf17b7e3baca053deb44fa0f6306eb7b890 +0 -0
  74. data/features/resources/repo/objects/bf/ae3371a43e95ebfbb1dd0643810a52cd958f14 +1 -0
  75. data/features/resources/repo/objects/cb/db0117efc4c6709ae5069a1dcefe841666a704 +0 -0
  76. data/features/resources/repo/objects/cf/235b88b53b5cf3031e67bfd6ab5a7b3ca25c52 +0 -0
  77. data/features/resources/repo/objects/d3/48f3b026e759f584548729a04f3b91ceb2e8d3 +0 -0
  78. data/features/resources/repo/objects/d3/7b8a2c894dbe1839d9428a336806ee151c2e4d +0 -0
  79. data/features/resources/repo/objects/d3/b508d876f1639a96afed4ca1d22c38583ea2d6 +0 -0
  80. data/features/resources/repo/objects/d5/cb74bf363ffbb0c7a1c69ee8b0bcf1e6093774 +0 -0
  81. data/features/resources/repo/objects/db/3cff2d90ba3bbcee7dd1113db69ac2b7b5e3a0 +0 -0
  82. data/features/resources/repo/objects/de/7978b6e388de73ddc31dbfc6a9afa030449cb1 +0 -0
  83. data/features/resources/repo/objects/e0/72bdd8a68660581d612b509ea7dc5d1dd1cfa1 +0 -0
  84. data/features/resources/repo/objects/e1/39fc1a7d4eca5e8b483cafa3af47d983a99e1b +0 -0
  85. data/features/resources/repo/objects/e7/4644c031e1cf36a268ae5041fb8dc7104bd357 +0 -0
  86. data/features/resources/repo/objects/ef/bfccdbb185bc64cb49d9942a53b7ab97e21b21 +0 -0
  87. data/features/resources/repo/objects/f5/bcc39104bda892895e9f338b45bad76b333d80 +0 -0
  88. data/features/resources/repo/objects/fb/4f268988e268cbf3bcc50ff338f98054e803cb +2 -0
  89. data/features/resources/repo/objects/fd/6723ee7c9a7acea74ab84f4af159952279d51f +0 -0
  90. data/features/resources/repo/objects/ff/8c6fa78f879d98393ca470a4ea07cae7221d38 +4 -0
  91. data/features/resources/repo/refs/heads/master +1 -0
  92. data/features/support/env.rb +19 -9
  93. data/features/support/hooks.rb +2 -34
  94. data/lib/salesforcedeploytool/app.rb +9 -3
  95. data/lib/salesforcedeploytool/cli.rb +9 -1
  96. data/lib/salesforcedeploytool/version.rb +1 -1
  97. data/salesforce-deploy-tool.gemspec +1 -1
  98. data/tpl/build.xml.erb +15 -2
  99. metadata +175 -5
  100. data/cucumber-config.yaml-tpl +0 -15
@@ -0,0 +1,6 @@
1
+ # git ls-files --others --exclude-from=.git/info/exclude
2
+ # Lines that start with '#' are comments.
3
+ # For a project mostly in C, the following would be a good set of
4
+ # exclude patterns (uncomment them if you want to use them):
5
+ # *.[oa]
6
+ # *~
@@ -0,0 +1,10 @@
1
+ 0000000000000000000000000000000000000000 8709c1bfb261dedf83ab5793054940782c48b54f Juan Breinlinger <juan.brein@breins.net> 1421673202 +0000 commit (initial): initial commit
2
+ 8709c1bfb261dedf83ab5793054940782c48b54f d37b8a2c894dbe1839d9428a336806ee151c2e4d Juan Breinlinger <juan.brein@breins.net> 1421683182 +0000 push
3
+ d37b8a2c894dbe1839d9428a336806ee151c2e4d ff8c6fa78f879d98393ca470a4ea07cae7221d38 Juan Breinlinger <juan.brein@breins.net> 1421830431 +0000 push
4
+ ff8c6fa78f879d98393ca470a4ea07cae7221d38 41341113250717ca1d4e280cac7413074e110ceb Juan Breinlinger <juan.brein@breins.net> 1427455933 +0000 push
5
+ 41341113250717ca1d4e280cac7413074e110ceb 1db81d6385e52f1ac897d8c119a01537b1624c05 Juan Breinlinger <juan.brein@breins.net> 1427701644 +0100 push
6
+ 1db81d6385e52f1ac897d8c119a01537b1624c05 9350c5598f6bafd3aa1a6a6ceecec7f02a0b0203 Juan Breinlinger <juan.brein@breins.net> 1427701742 +0100 push
7
+ 9350c5598f6bafd3aa1a6a6ceecec7f02a0b0203 51f1b7da07050f62cd00f24774856a9d06d4fc47 Juan Breinlinger <juan.brein@breins.net> 1427701839 +0100 push
8
+ 51f1b7da07050f62cd00f24774856a9d06d4fc47 9154141b78af68bdeb8e9b79629012a720b6e8e5 Juan Breinlinger <juan.brein@breins.net> 1427702375 +0100 push
9
+ 9154141b78af68bdeb8e9b79629012a720b6e8e5 1d300e3c8d30b80bb88cfce2b16c3070488f0440 Juan Breinlinger <juan.brein@breins.net> 1433250117 +0100 push
10
+ 1d300e3c8d30b80bb88cfce2b16c3070488f0440 aac66ee0d404c124fbcafd32a054664de4fdd3da Juan Breinlinger <juan.brein@breins.net> 1433313758 +0100 push
@@ -0,0 +1,10 @@
1
+ 0000000000000000000000000000000000000000 8709c1bfb261dedf83ab5793054940782c48b54f Juan Breinlinger <juan.brein@breins.net> 1421673202 +0000 commit (initial): initial commit
2
+ 8709c1bfb261dedf83ab5793054940782c48b54f d37b8a2c894dbe1839d9428a336806ee151c2e4d Juan Breinlinger <juan.brein@breins.net> 1421683182 +0000 push
3
+ d37b8a2c894dbe1839d9428a336806ee151c2e4d ff8c6fa78f879d98393ca470a4ea07cae7221d38 Juan Breinlinger <juan.brein@breins.net> 1421830431 +0000 push
4
+ ff8c6fa78f879d98393ca470a4ea07cae7221d38 41341113250717ca1d4e280cac7413074e110ceb Juan Breinlinger <juan.brein@breins.net> 1427455933 +0000 push
5
+ 41341113250717ca1d4e280cac7413074e110ceb 1db81d6385e52f1ac897d8c119a01537b1624c05 Juan Breinlinger <juan.brein@breins.net> 1427701644 +0100 push
6
+ 1db81d6385e52f1ac897d8c119a01537b1624c05 9350c5598f6bafd3aa1a6a6ceecec7f02a0b0203 Juan Breinlinger <juan.brein@breins.net> 1427701742 +0100 push
7
+ 9350c5598f6bafd3aa1a6a6ceecec7f02a0b0203 51f1b7da07050f62cd00f24774856a9d06d4fc47 Juan Breinlinger <juan.brein@breins.net> 1427701839 +0100 push
8
+ 51f1b7da07050f62cd00f24774856a9d06d4fc47 9154141b78af68bdeb8e9b79629012a720b6e8e5 Juan Breinlinger <juan.brein@breins.net> 1427702375 +0100 push
9
+ 9154141b78af68bdeb8e9b79629012a720b6e8e5 1d300e3c8d30b80bb88cfce2b16c3070488f0440 Juan Breinlinger <juan.brein@breins.net> 1433250117 +0100 push
10
+ 1d300e3c8d30b80bb88cfce2b16c3070488f0440 aac66ee0d404c124fbcafd32a054664de4fdd3da Juan Breinlinger <juan.brein@breins.net> 1433313758 +0100 push
@@ -0,0 +1,3 @@
1
+ xM��
2
+ �0]�+B�榵�H�R�@ݧi�@�7�~���xvs�n�-�F6��dGt1Ԭ��QL�]x��v�l��QD����A#��X�W���Q'��8�M�P
3
+ �Q��Y�:k�]&ur�5�v%������Uk����/ ��"��:V
@@ -0,0 +1,2 @@
1
+ x���
2
+ �0E]�+f/��1m"�ҿ�c��JL�ߴ���.�ÍK�se��*3$m���GrYCƎ�y4;9(�I���\��Vz7L�1HNd�t�*��VD4��i~mϥ�}�n���˃+�_���F��~O����]G)8�Dqں�Cn[!��ϙ��tN'
@@ -0,0 +1,2 @@
1
+ x��A
2
+ 1=�sd&��"��_d'���FI"~��'x�C5մ<�y�`ٯzU�H�1�(�Y��yw쇘��
@@ -0,0 +1,2 @@
1
+ xu�QO� �}� �[pg��hL|3���J�-����evKy<~���]k\K���Fl��!{ Q;[ѻ�S�V�Nۡ�������B���0 ɸ�S�Ƣ_����r[q����0A �,H~��-3�j]r��
2
+ gb�@k��6nV���D�����+g{&H9v��~���v�`i�aTA��/_���$�<BJHm�!�%��6����yw����M��F�ų���,���B���d�$��
@@ -0,0 +1,3 @@
1
+ xu�MK�0�=�W��m���"i�E��R�O�iL�����|��B���<3�Lc\C���bw
2
+ =���X�!%��Xt��ع��Tnd���a#&h!��%���y��lK.ت�G��/�v�d&b��g\9��0Bʱk������؞���y@�Q�|��L&��R�@�6~�䀽�)�.!>_/�Z���h�.�Zl&
3
+ ��O��7�̓�
@@ -0,0 +1 @@
1
+ x��A� E]s�ٛ���c�Ko1�Ak,5����#�����<McCthU��)�KZ�(���:O^dHV3�� Շ��9��gv>{R�(�u�V]dq��D^�ڞs���nU���C*�_9
@@ -0,0 +1,2 @@
1
+ x=��j�@E�����s�P����B }� �uԅu'�M��cc�}��8�s�����P>f�髩��M�^�s@���!؞�����r.adρ�{���8N����F�y�Vf;N
2
+ /�a�F���u�9˪]Ig�-�42�$�����~ y��n��ޫ֔��i;o�lv�䅓�z��l��e~�TWw�S�
@@ -0,0 +1,2 @@
1
+ x=��j�0D{�WLr�k(9�`RC
2
+ 9�� ���Ȓ��I��q�9���t�wx?_�}�}_��mpm��_�_�o������H�"kFvH�ǩm_逓&�]�s�P~�g$a2�8/��x�>C`%6�eY�+i�b������z��l�⺡�g�vXSv�O��W�f�M^h�3�4��2j�*S�
@@ -0,0 +1,4 @@
1
+ x��M
2
+ �0F]���Lb~
3
+ "��[L��Vl*i����ͷx�=^��il�fתzs�sheG:Z�}N6SΔ&��*�Ao,&k�0��C6�Ď]I����1�F����s�� \���9��T8>V��9o�tE� 蠽G
4
+ &� Q������jm�I�#u碾 OE
@@ -0,0 +1 @@
1
+ x=��j�@Dsޯ��9F�E� ! 9,� ڙV�i�i��߯�a�TEU�������C��e���n�n��=$^�H�Y pQ�P�A� HP�©m�~��UI�q%�`x���4��Q!�B������Q����:�8ӵ�q �#������أ�t������Wخ�ئ]�Y��q�=��:c�+�����2����W�
@@ -0,0 +1,2 @@
1
+ x��K
2
+ 1]���;�IDĥ�H�=:b23��s7oQ���R�ևMo����4FFa���)0���)�H��37���'OS��$��,��H6G�2h�`��oK��+����1׫6��?d'_r��kW���s6 &[$D3�J���È���27��5o��M>
@@ -0,0 +1,4 @@
1
+ x�TMo�0 �9��v���%�[v���n���t�F� JN ��⏸E���|���G>�q��޾[\�J��Xx0��T�n4B���V�K���T ��/�� (������輀�tX*JE$���-]�
2
+ i�V�ea�ȍQ�j6�m�䏀�Ț
3
+ Y4�]�� �Z
4
+ ~�{o���K���[���Xlk����l��;C~ק����E���YS D��~���;'������g��n
@@ -0,0 +1,2 @@
1
+ x=�Qk�@���_1�s��XAR!�>�� �sՃ�.�M���Ԓy�aw��s�����T>g��GS�
2
+ �7�؞��
@@ -0,0 +1,2 @@
1
+ x��K
2
+ �0Ego.����@q�.�y�H�BL�o�;����=7l��էV�@F��N���h��6��m�q�*�lj0h�����U����R.K.�0�:��\�~��P 4�\����p<�>���r�-�~2�)F@�
@@ -0,0 +1,4 @@
1
+ x��K
2
+ �@D]�)z/��o' ".���|b�Ld���7�nj�zTX�yj��;��(���,�v9�6���|v��lً���4�[�)z$���
3
+ 1+Cdz���E�IH��ݗ
4
+ ����4��T�T���H�?r��ݕ�� �"B���%��ӶM�w^G��G|#�K&
@@ -0,0 +1,2 @@
1
+ x��A� D]s��7i�
2
+ $����C?Zm�P�_�n&�������L�1�Z��q�"&5Z��J�l�^�B�)�Fj4�A�s��q�a�Rtގ
@@ -0,0 +1,2 @@
1
+ xu�]K�0������c�H�1&�T����6�&1I��|#m��˗�<��lܙl9���`�C��V��䔠U�Ѷ��G}��;Y���� :$���}J�������uAa���6�?2�e&h ��%���i��<�\�U0���l�F��L� ��'\9��0@�k�� �;~�:`���L��
2
+ ����Wla4�zH ��x�ے� �K�1^]h�a5���
@@ -0,0 +1,2 @@
1
+ x��AK�@�=�WLs�Ŵ I��
2
+ ����I���-����ݴ+V�:����jj�{����i�{ڬ�xެ3�60�� �8K�4t�Π�#��$�d���o�j�ꀪ$������n`�#t�=(pPh6�OO2��e�������%�٢�*�J�H*�))g0]T�A���Ƀ[�E�>7�pĵ��(`�iq�t�:YRtVe^�*F\�&���%����R��T�X�^�k���d2���K�o�������_迦��k�����
@@ -0,0 +1,3 @@
1
+ x��M
2
+ �0�]��d��d
3
+ "��[$��VlZb�o�ܼ|���4�
@@ -0,0 +1 @@
1
+ x=��N�@D=�W�{�<$!+�&�|A3��$3Ӥ���E1ۧ�TU^�x|z��o���k�>����7 �W�/q#���*Tg�� ET���w�m�ˌ�$�ƴ�$0��fn�"+�5u�P���|_ͩƅ��'�4��J8�<�-�DgH�^}s����|�?k:�ʲL� ������u��ߖǸ.���67Z�
@@ -0,0 +1,2 @@
1
+ x��A �@�;�+���hFE�+!t���M%�;�.a��E
2
+ �4�y�7��+*Y/'"�u���ٚL��0� ME��\R~(���d v��� 2O��s���jC{��°"
@@ -0,0 +1,4 @@
1
+ x��K
2
+ �@D]�)z/��e> ".��tOG#f"� ^ߘ#X�Z<�G�<McmݡUf�=��8g�Q�O�\d(��NF��T�4��cH�B�Ys�:$c\��Y��4�,��s�ۚ
3
+ \+��5�;W8=7��\�^��� ���&��p�[�O�6��!
4
+  ��VWjke��bO�
@@ -0,0 +1 @@
1
+ aac66ee0d404c124fbcafd32a054664de4fdd3da
@@ -2,19 +2,25 @@ require 'aruba/cucumber'
2
2
  require 'filewatcher'
3
3
  require 'git'
4
4
 
5
- # Load configuratiohn
6
- config = YAML::load(File.open('cucumber-config.yaml'))
5
+ # Necesary environment variables:
6
+ ENV["SFDT_GIT_REPO"] = File.join(Dir.pwd,'features/resources/repo')
7
+ ENV["SFDT_GIT_DIR"] = 'repo'
8
+ ENV["SFDT_SRC_DIR"] = 'salesforce/src'
9
+ ENV["SFDT_USERNAME"] = 'john.doe@example.com'
10
+ ENV["SFDT_PASSWORD"] = 'mysecurepass'
11
+ ENV["SFDT_SANDBOX"] = 'testEnv'
12
+
13
+ # Create a temprary home directory:
14
+ new_home = File.join(Dir.pwd,'tmp','home')
15
+ ENV["HOME"] = new_home
16
+ FileUtils.rm_rf new_home if Dir.exists? new_home
17
+ FileUtils.mkdir new_home
7
18
 
8
19
  # Cucumber / aruba configuration parameters
9
20
  Before do
10
21
  @aruba_timeout_seconds = 300
11
- end
12
-
13
- # Set environment variables
14
- Before do
15
- config[:environment_variables].keys.each do |key|
16
- ENV[key.to_s.upcase] = config[:environment_variables][key]
17
- end
22
+ # Use mock ant
23
+ FileUtils.cp "features/resources/mock/ant","bin/ant"
18
24
  end
19
25
 
20
26
  # Remove current configurations only once
@@ -28,3 +34,7 @@ Before '@push,@pull' do
28
34
  name = File.join 'tmp', 'aruba', ENV['SFDT_GIT_DIR']
29
35
  Git.clone(uri, name)
30
36
  end
37
+
38
+ at_exit do
39
+ FileUtils.rm 'bin/ant'
40
+ end
@@ -1,17 +1,10 @@
1
- config = YAML::load(File.open('cucumber-config.yaml'))
2
-
3
- When /^I type my salesforce (.*)$/ do |input|
4
- raise "Please create credentials.yaml" if config[input.to_sym].nil?
5
- type(config[input.to_sym])
6
- end
7
-
8
1
  When /^I delete the repository directory/ do
9
2
  FileUtils.rm_rf File.join 'tmp', 'aruba', ENV['SFDT_GIT_DIR']
10
3
  end
11
4
 
12
5
  When /^I watch "(.+)" for changes and copy to "(.+)"$/ do |file,dest|
13
- file = File.join('tmp','aruba',file)
14
- dest = File.join('tmp','aruba',dest)
6
+ file = File.join(Dir.pwd,'tmp','aruba',file)
7
+ dest = File.join(Dir.pwd,'tmp','aruba',dest)
15
8
  fork do
16
9
  FileWatcher.new(file).watch do |filename|
17
10
  FileUtils.cp file, dest
@@ -19,28 +12,3 @@ When /^I watch "(.+)" for changes and copy to "(.+)"$/ do |file,dest|
19
12
  end
20
13
  end
21
14
  end
22
-
23
- Transform /^.+$/ do |arg|
24
- case arg
25
- when String
26
- config[:replacement_patterns].keys.each do |key|
27
- arg = arg.gsub /#{key.to_s}/, config[:replacement_patterns][key]
28
- end
29
- config[:environment_variables].keys.each do |key|
30
- arg = arg.gsub /#{key.to_s}/, config[:environment_variables][key]
31
- end
32
- when Cucumber::Ast::Table
33
- arg.cell_matrix.each do |c|
34
- config[:replacement_patterns].keys.each do |key|
35
- c[1].value = c[1].value.gsub /#{key.to_s}/, config[:replacement_patterns][key]
36
- end
37
- config[:environment_variables].keys.each do |key|
38
- c[1].value = c[1].value.gsub /#{key.to_s}/, config[:environment_variables][key]
39
- end
40
- end
41
- end
42
-
43
- arg
44
-
45
- end
46
-
@@ -4,6 +4,7 @@ module SalesforceDeployTool
4
4
 
5
5
  attr_accessor :build_number
6
6
  attr_accessor :run_all_tests
7
+ attr_accessor :check_only
7
8
 
8
9
  def initialize config
9
10
 
@@ -26,6 +27,7 @@ module SalesforceDeployTool
26
27
  @server_url = config[:salesforce_url]
27
28
 
28
29
  # Defaults
30
+ @check_only = false
29
31
  @run_tests = []
30
32
  @debug ||= config[:debug]
31
33
  @build_number ||= 'N/A'
@@ -166,14 +168,18 @@ module SalesforceDeployTool
166
168
  end
167
169
 
168
170
  if @run_all_tests
169
- cmd = " ant deployAndTestAllCode"
171
+ cmd = " ant deployAndTestCode"
170
172
  else
171
- if @run_tests
172
- cmd = " ant deployAndTestCode"
173
+ if ! @run_tests.empty?
174
+ cmd = " ant deployAndRunSpecifiedTests"
173
175
  else
174
176
  cmd = " ant deployCode"
175
177
  end
176
178
  end
179
+
180
+ if @check_only
181
+ cmd = " ant checkOnlyCode"
182
+ end
177
183
 
178
184
  full_cmd = env_vars + cmd
179
185
 
@@ -79,16 +79,19 @@ module SalesforceDeployTool
79
79
  c.option "--build_number NUMBER","Record build number on version file"
80
80
  c.option "--run-all-tests", "-T", "Deploy and test"
81
81
  c.option "--run-tests CSV_LIST", "-r CSV_LIST", "a CSV list of individual classes to run tests"
82
+ c.option "--check-only", "-c", "Check only, don't deploy"
83
+ c.option "--include CSV_LIST", "-i CSV_LIST", "A CSV list of metadata type to include when creating destructiveChange.xml"
82
84
  c.action do |args, options|
83
85
 
84
86
  # short flag mapping
87
+ options.check_only = true if options.c
85
88
  options.run_all_tests = true if options.T
86
89
  options.run_tests = options.r if options.r
87
90
  options.exclude = options.x if options.x
88
91
  options.sandbox = options.s if options.s
92
+ options.include = options.i if options.i
89
93
 
90
94
  # Parameter validation:
91
-
92
95
  if options.run_all_tests and options.run_tests
93
96
  puts "warning: --run-tests is ignored as --test has been declared "
94
97
  end
@@ -119,6 +122,7 @@ module SalesforceDeployTool
119
122
  config_tmp[:git_dir] = File.join(config[:tmp_dir],'repo_copy')
120
123
  FileUtils.cp_r config[:git_dir],config_tmp[:git_dir]
121
124
  sfdt_tmp = SalesforceDeployTool::App.new config_tmp
125
+ sfdt_tmp.clean_git_dir
122
126
  print "INFO: Pulling changes from #{config[:sandbox]} using url #{config[:salesforce_url]} to temporary directory to generate destructiveChanges.xml "
123
127
  print( options.debug.nil? ? "" : "\n\n" )
124
128
  sfdt_tmp.pull
@@ -130,6 +134,7 @@ module SalesforceDeployTool
130
134
  dc_gen.destination = File.join(config_tmp[:git_dir],config_tmp[:src_dir])
131
135
  dc_gen.output = destructive_change_file
132
136
  dc_gen.exclude = options.exclude.split(',') unless options.exclude.nil?
137
+ dc_gen.include = options.include.split(',') unless options.include.nil?
133
138
  dc_gen.verbose = false if not options.debug
134
139
  dc_gen.generate_destructive_changes
135
140
 
@@ -145,6 +150,9 @@ module SalesforceDeployTool
145
150
  sfdt.run_all_tests = options.run_all_tests.nil? ? false : true
146
151
  sfdt.run_tests = options.run_tests.split(',') unless options.run_tests.nil?
147
152
 
153
+ # Check only option:
154
+ sfdt.check_only = options.check_only
155
+
148
156
  # Push
149
157
  print( options.run_all_tests.nil? && options.run_tests.nil? ? "INFO: Deploying code to #{config[:sandbox]}: ": "INFO: Deploying and Testing code to #{config[:sandbox]}: " )
150
158
  print( options.debug.nil? ? "" : "\n\n" )
@@ -1,3 +1,3 @@
1
1
  module SalesforceDeployTool
2
- VERSION = "2.1.1"
2
+ VERSION = "3.1.0"
3
3
  end
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_runtime_dependency 'git', "~> 1.2"
28
28
  spec.add_runtime_dependency 'colorize', "~> 0.7"
29
29
  spec.add_runtime_dependency 'commander', "~> 4.2"
30
- spec.add_runtime_dependency 'salesforce-dcgen', "~> 0.7.0"
30
+ spec.add_runtime_dependency 'salesforce-dcgen', "~> 0.8.0"
31
31
  end
@@ -19,21 +19,34 @@
19
19
  </sf:deploy>
20
20
  </target>
21
21
 
22
- <target name="deployAndTestCode">
22
+ <target name="checkOnlyCode">
23
23
  <sf:deploy
24
24
  username="${env.SF_USERNAME}"
25
25
  password="${env.SF_PASSWORD}"
26
26
  serverurl="${env.SF_SERVERURL}"
27
27
  deployRoot="${env.SF_SRC_DIR}"
28
28
  maxPoll="200"
29
+ checkOnly="true"
29
30
  rollbackOnError="true" >
31
+ </sf:deploy>
32
+ </target>
33
+
34
+ <target name="deployAndRunSpecifiedTests">
35
+ <sf:deploy
36
+ username="${env.SF_USERNAME}"
37
+ password="${env.SF_PASSWORD}"
38
+ serverurl="${env.SF_SERVERURL}"
39
+ deployRoot="${env.SF_SRC_DIR}"
40
+ maxPoll="200"
41
+ rollbackOnError="true"
42
+ testLevel="RunSpecifiedTests">
30
43
  <% @run_tests.each do |test| -%>
31
44
  <runTest><%= test %></runTest>
32
45
  <% end -%>
33
46
  </sf:deploy>
34
47
  </target>
35
48
 
36
- <target name="deployAndTestAllCode">
49
+ <target name="deployAndTestCode">
37
50
  <sf:deploy
38
51
  username="${env.SF_USERNAME}"
39
52
  password="${env.SF_PASSWORD}"