rxfreader 0.2.1 → 0.2.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: 88c5cd88a74400b7e567f87155effc79c2765c6c93edf8430cc770aab6658f9d
4
- data.tar.gz: 9f82b705e8154d26d89277fdf7cc6a2a37bf7abcec73631a3c8e661d79e1084a
3
+ metadata.gz: 484b86a38ee6a1eb367c9fbc452df14ea7affbff9463c82b367bf301a50bd53e
4
+ data.tar.gz: f7b14e2425704f17c87f6193025485cb635ca031fda59867cff2bfb69d864da7
5
5
  SHA512:
6
- metadata.gz: 64c81ead21828a0c2401c940736872cb788058bb2884a2a7f133d8ebc767e0020cc46994f1a02a267cf2aa24e752fcb3c9b9511d727a7997a991c49573a2210a
7
- data.tar.gz: 95025bc99aafe7053c545f90a932e57efc2330e5f5b5bafa512bf63e3fcf942b563084f14e618495d3959774d59030827f5e4cbe28695b58ddbca7c2ec28e9a5
6
+ metadata.gz: 2e770d3080daddb18caa3e35388964475d59e0960804cf7f9fb7ed6ed289e0426f2a3dfb82c83af146e32c30b26fa04b37f650da72c49946cce423c45a5b4807
7
+ data.tar.gz: d86a4361e24c33df96e210d18ce2f6e040aea2b7eb7736cbe0618ec3b9f2a1cfce00257e5c972314304c695751514909e8cee1d9b1c5ab642a15f3c211f524cd
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rxfreader.rb CHANGED
@@ -15,61 +15,61 @@ module RXFRead
15
15
 
16
16
  class FileX
17
17
 
18
- def self.exists?(filename)
18
+ def self.exists?(s) RXFReader.exists?(s) end
19
+ def self.filetype(s) RXFReader.filetype(s) end
20
+ def self.read(s) RXFReader.read(s).first end
19
21
 
20
- type = FileX.filetype(filename)
22
+ end
21
23
 
22
- filex = case type
23
- when :file
24
- File
25
- when :dfs
26
- DfsFile
27
- else
28
- nil
29
- end
24
+ end
30
25
 
31
- return nil unless filex
32
26
 
33
- filex.exists? filename
27
+ class RXFReaderException < Exception
28
+ end
34
29
 
35
- end
30
+ class RXFReader
31
+ using ColouredText
36
32
 
33
+ def self.exists?(filename)
37
34
 
38
- def self.filetype(x)
35
+ type = self.filetype(filename)
39
36
 
40
- return :string if x.lines.length > 1
37
+ filex = case type
38
+ when :file
39
+ File
40
+ when :dfs
41
+ DfsFile
42
+ else
43
+ nil
44
+ end
41
45
 
42
- case x
43
- when /^https?:\/\//
44
- :http
45
- when /^dfs:\/\//
46
- :dfs
47
- when /^file:\/\//
48
- :file
49
- else
46
+ return nil unless filex
50
47
 
51
- if File.exists?(x) then
52
- :file
53
- else
54
- :text
55
- end
48
+ filex.exists? filename
56
49
 
57
- end
58
- end
50
+ end
59
51
 
60
- def self.read(x)
61
- RXFReader.read(x).first
62
- end
52
+ def self.filetype(x)
63
53
 
64
- end
65
- end
54
+ return :string if x.lines.length > 1
66
55
 
56
+ case x
57
+ when /^https?:\/\//
58
+ :http
59
+ when /^dfs:\/\//
60
+ :dfs
61
+ when /^file:\/\//
62
+ :file
63
+ else
67
64
 
68
- class RXFReaderException < Exception
69
- end
65
+ if File.exists?(x) then
66
+ :file
67
+ else
68
+ :text
69
+ end
70
70
 
71
- class RXFReader
72
- using ColouredText
71
+ end
72
+ end
73
73
 
74
74
  def self.read(x, h={})
75
75
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxfreader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  ZhYGFOGLCyFBzNWg6gwMKjzpzDZB/H0+GTRB2c3+7DVuJWqyC5SbGnVLkT4Q8+B6
36
36
  Ws39Z48SRONdDWtHwAiUtnU+
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-22 00:00:00.000000000 Z
38
+ date: 2022-02-28 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: gpd-request
metadata.gz.sig CHANGED
Binary file