mymedia_ftp 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdfae1127b5532481e69af2799cecff89c08c092b5cdf6ff782b497a410c1aad
4
- data.tar.gz: 9a026fec231bc2763a19e9ae1696daced22055bf58ad1789907c0c99d735d428
3
+ metadata.gz: 70b64854b4af1689d9c02b6db9af47760a956c428630a05ab9681fcb109a8e33
4
+ data.tar.gz: 7e216ea42a4aa8635f31ea0d0bdd63e3efd25ba743e53b8c5d8623967dfeffbe
5
5
  SHA512:
6
- metadata.gz: 5a69a11adf2e762df3f40123a567eb80690e8514b3e53999d82386a41532d547ceb2be038ebb4b4dead8c167d503aedd5c431e441e9d6d402a85648e8a87dcd7
7
- data.tar.gz: 9d61a3263591215ea6d0ef71499a6778d5ba9b8500e25ac71bcd5121e576bc67c72e964ebb456b38d5b10d722ec6b4d55146d938063704bbdfc870a42e541e57
6
+ metadata.gz: 5ba16fcace08fd38a254afefcd4f97eda8b8a14914873ab24ab5deb29c007c6498edb59d4296302642f539761a503893eb8c57a473f9c5df3880874fa52b6106
7
+ data.tar.gz: 0563b8523d8050a66dd683a0ea390c9f25cebfe9650471eec542f121a6cacb611a8de55ec5a319f7dbf8b7aa1c52fb368f7c4856dd7c78692da39d0ed61474c6
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- R����4�֠<�N�@laM�q8ByV�����0� ��c*_��4��s@z�����8�Fk]mXn���F��㳱f�B�-xQ�蔽�C�R�?���p��r`���.��y��P=�q
2
- Fœ�<� �>Kh�;���^B�a'l��G#φc+�Tc�%)����v��F{4��\��SM_M&غ���r'�LT��
3
- ą��TJ��֨� �w���~:���p\Pu�^��m�sP��K`f�z$����~M_��v����S:��H�*��0��X{��0=���d�s���IM����>?ΫAY�yN��k�i1��a ��=�-���A�x�n��2��� ?8�����o�Uj3�6#�9"�-:
1
+ ����C$T�n
2
+ ����*�WKjq���%��}:v�X�Kׁ��.F��j��Ӧ�03E#��Cv^ؖt��PE�&������H������Ig��]a�d�z��Ԃq.�w>��<'��6}F�ݤ��#�K��1��O+k)9�+Rۨe. ��Ǫ��� '���7X��^U�X�_�0��w g����My?g
@@ -23,9 +23,9 @@ class MyMediaFTP < Net::FTP
23
23
 
24
24
  def self.ls(s, debug: false)
25
25
 
26
- uri, remotepath = s.match(/^(ftp:\/\/[^\/]+)(\/[^$]*)/).captures
27
- puts 'remotepath' + remotepath if debug
28
- new(uri, debug: debug).ls(remotepath)
26
+ uri, remotepath = s.match(/^(ftp:\/\/[^\/]+)(\/[^$]*)?/).captures
27
+ puts 'remotepath' + remotepath.inspect if debug
28
+ new(uri, debug: debug).ls(remotepath || '/')
29
29
 
30
30
  end
31
31
 
@@ -49,6 +49,14 @@ class MyMediaFTP < Net::FTP
49
49
 
50
50
  end
51
51
 
52
+ def self.write(s, content='', debug: false)
53
+
54
+ tmpfile = Tempfile.new('ftp')
55
+ File.write tmpfile.path, content
56
+ self.cp tmpfile.path, s
57
+
58
+ end
59
+
52
60
  def initialize(s=nil, host: '127.0.0.1', user: 'user', password: '1234',
53
61
  port: 21, debug: false)
54
62
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mymedia_ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  vmQbOdyo1gepCZyCN+UN/SCimjgu1yZtpI0S9lPHE1w/fMob3ohXflP/mnwUFxsN
36
36
  KVwzt+QIecFrRei1GVykx8z3
37
37
  -----END CERTIFICATE-----
38
- date: 2020-09-07 00:00:00.000000000 Z
38
+ date: 2020-09-12 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description:
41
41
  email: james@jamesrobertson.eu
metadata.gz.sig CHANGED
Binary file