net-ftp-list 3.2.6 → 3.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 69bc311c59fa08c91c3e3782da8d8bcea543c0e2
4
+ data.tar.gz: 42afcf4e9dbcf435bb6a8f506f9256ac1569d47e
5
+ SHA512:
6
+ metadata.gz: 2ae7b2ee79f1971aabd03d8049143c82a589ead321df5f51864c3058689cd01ec65c939dbdc2a98ed2881017d5a172ba6e8776bdd45e2b398ac5d562cdb63bcb
7
+ data.tar.gz: 37721746b25814156989f54a41ca2824ab73393a60795e5ef19b77a21853925b018a88a47573fbe11d86793aecd3a60369fcefdda248e58c252974c86bdfce91
@@ -1 +1 @@
1
- 1.8.7-p371
1
+ 2.0.0-p451
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,65 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ net-ftp-list (3.2.7)
5
+ net-ftp-list
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.3.6)
11
+ atomic (1.1.16)
12
+ builder (3.2.2)
13
+ descendants_tracker (0.0.4)
14
+ thread_safe (~> 0.3, >= 0.3.1)
15
+ faraday (0.9.0)
16
+ multipart-post (>= 1.2, < 3)
17
+ git (1.2.6)
18
+ github_api (0.11.3)
19
+ addressable (~> 2.3)
20
+ descendants_tracker (~> 0.0.1)
21
+ faraday (~> 0.8, < 0.10)
22
+ hashie (>= 1.2)
23
+ multi_json (>= 1.7.5, < 2.0)
24
+ nokogiri (~> 1.6.0)
25
+ oauth2
26
+ hashie (2.0.5)
27
+ highline (1.6.21)
28
+ jeweler (2.0.1)
29
+ builder
30
+ bundler (>= 1.0)
31
+ git (>= 1.2.5)
32
+ github_api
33
+ highline (>= 1.6.15)
34
+ nokogiri (>= 1.5.10)
35
+ rake
36
+ rdoc
37
+ json (1.8.1)
38
+ jwt (0.1.11)
39
+ multi_json (>= 1.5)
40
+ mini_portile (0.5.3)
41
+ multi_json (1.9.2)
42
+ multi_xml (0.5.5)
43
+ multipart-post (2.0.0)
44
+ nokogiri (1.6.1)
45
+ mini_portile (~> 0.5.0)
46
+ oauth2 (0.9.3)
47
+ faraday (>= 0.8, < 0.10)
48
+ jwt (~> 0.1.8)
49
+ multi_json (~> 1.3)
50
+ multi_xml (~> 0.5)
51
+ rack (~> 1.2)
52
+ rack (1.5.2)
53
+ rake (10.2.2)
54
+ rdoc (4.1.1)
55
+ json (~> 1.4)
56
+ thread_safe (0.3.1)
57
+ atomic (>= 1.1.7, < 2)
58
+
59
+ PLATFORMS
60
+ ruby
61
+
62
+ DEPENDENCIES
63
+ bundler
64
+ jeweler
65
+ net-ftp-list!
data/Rakefile CHANGED
@@ -11,6 +11,7 @@ begin
11
11
  gem.homepage = "http://github.com/stateless-systems/net-ftp-list"
12
12
  gem.authors = ["Stateless Systems"]
13
13
  end
14
+ Jeweler::RubygemsDotOrgTasks.new
14
15
  rescue LoadError
15
16
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
16
17
  end
@@ -1,5 +1,5 @@
1
- ---
1
+ ---
2
2
  :major: 3
3
- :build:
4
3
  :minor: 2
5
- :patch: 6
4
+ :patch: 7
5
+ :build:
@@ -52,13 +52,13 @@ class Net::FTP::List::Unix < Net::FTP::List::Parser
52
52
  # days or so. Future dates always specify a 4 digit year.
53
53
  # If the parsed date, with today's year, could be in the future, then
54
54
  # the date must be for the previous year
55
- mtime_string = if mtime_time_or_year.match(/^[0-9][0-9]:[0-9][0-9]$/)
55
+ mtime_string = if mtime_time_or_year.match(/^[0-9]{1,2}:[0-9]{2}$/)
56
56
  if Time.parse("#{mtime_month_and_day} #{Time.now.year}") > Time.now
57
57
  "#{mtime_month_and_day} #{mtime_time_or_year} #{Time.now.year - 1}"
58
58
  else
59
59
  "#{mtime_month_and_day} #{mtime_time_or_year} #{Time.now.year}"
60
60
  end
61
- elsif mtime_time_or_year.match(/^[0-9][0-9][0-9][0-9]$/)
61
+ elsif mtime_time_or_year.match(/^[0-9]{4}$/)
62
62
  "#{mtime_month_and_day} #{mtime_time_or_year}"
63
63
  end
64
64
 
@@ -4,18 +4,20 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{net-ftp-list}
8
- s.version = "3.2.6"
7
+ s.name = "net-ftp-list"
8
+ s.version = "3.2.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stateless Systems"]
12
- s.date = %q{2013-08-27}
13
- s.email = %q{enquiries@statelesssystems.com}
12
+ s.date = "2014-04-03"
13
+ s.email = "enquiries@statelesssystems.com"
14
14
  s.extra_rdoc_files = [
15
15
  "README.txt"
16
16
  ]
17
17
  s.files = [
18
18
  ".ruby-version",
19
+ "Gemfile",
20
+ "Gemfile.lock",
19
21
  "README.txt",
20
22
  "Rakefile",
21
23
  "VERSION.yml",
@@ -35,18 +37,27 @@ Gem::Specification.new do |s|
35
37
  "test/test_net_ftp_list_rumpus.rb",
36
38
  "test/test_net_ftp_list_unix.rb"
37
39
  ]
38
- s.homepage = %q{http://github.com/stateless-systems/net-ftp-list}
40
+ s.homepage = "http://github.com/stateless-systems/net-ftp-list"
39
41
  s.require_paths = ["lib"]
40
- s.rubygems_version = %q{1.6.2}
41
- s.summary = %q{Parse FTP LIST command output.}
42
+ s.rubygems_version = "2.0.14"
43
+ s.summary = "Parse FTP LIST command output."
42
44
 
43
45
  if s.respond_to? :specification_version then
44
- s.specification_version = 3
46
+ s.specification_version = 4
45
47
 
46
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<net-ftp-list>, [">= 0"])
50
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
51
+ s.add_development_dependency(%q<bundler>, [">= 0"])
47
52
  else
53
+ s.add_dependency(%q<net-ftp-list>, [">= 0"])
54
+ s.add_dependency(%q<jeweler>, [">= 0"])
55
+ s.add_dependency(%q<bundler>, [">= 0"])
48
56
  end
49
57
  else
58
+ s.add_dependency(%q<net-ftp-list>, [">= 0"])
59
+ s.add_dependency(%q<jeweler>, [">= 0"])
60
+ s.add_dependency(%q<bundler>, [">= 0"])
50
61
  end
51
62
  end
52
63
 
@@ -3,18 +3,18 @@ require 'net/ftp/list'
3
3
 
4
4
  class TestNetFTPListUnix < Test::Unit::TestCase
5
5
  def setup
6
- @dir = Net::FTP::List.parse "drwxr-xr-x 4 user group 4096 Jan 1 00:00 etc" rescue nil
7
- @file = Net::FTP::List.parse "-rw-r--r-- 1 root other 531 Dec 31 23:59 README" rescue nil
8
- @other_dir = Net::FTP::List.parse "drwxr-xr-x 8 1791 600 4096 Mar 11 07:57 forums" rescue nil
9
- @spaces = Net::FTP::List.parse 'drwxrwxr-x 2 danial danial 72 May 23 12:52 spaces suck' rescue nil
10
- @symlink = Net::FTP::List.parse "lrwxrwxrwx 1 danial danial 4 Oct 30 15:26 bar -> /etc" rescue nil
11
- @older_date = Net::FTP::List.parse "-rwxrwxrwx 1 owner group 154112 Feb 15 2008 participando.xls" rescue nil
12
- @block_dev = Net::FTP::List.parse 'brw-r----- 1 root disk 1, 0 Apr 13 2006 ram0' rescue nil
13
- @char_dev = Net::FTP::List.parse 'crw-rw-rw- 1 root root 1, 3 Apr 13 2006 null' rescue nil
14
- @socket_dev = Net::FTP::List.parse 'srw-rw-rw- 1 root root 0 Aug 20 14:15 log' rescue nil
15
- @pipe_dev = Net::FTP::List.parse 'prw-r----- 1 root adm 0 Nov 22 10:30 xconsole' rescue nil
16
- @file_no_inodes = Net::FTP::List.parse '-rw-r--r-- foo@localhost foo@localhost 6034 May 14 23:13 index.html' rescue nil
17
- @file_today = Net::FTP::List.parse 'crw-rw-rw- 1 root root 1, 3 Aug 16 14:28 today.txt' rescue nil
6
+ @dir = Net::FTP::List.parse 'drwxr-xr-x 4 user group 4096 Jan 1 00:00 etc' rescue nil
7
+ @file = Net::FTP::List.parse '-rw-r--r-- 1 root other 531 Dec 31 23:59 README' rescue nil
8
+ @other_dir = Net::FTP::List.parse 'drwxr-xr-x 8 1791 600 4096 Mar 11 07:57 forums' rescue nil
9
+ @spaces = Net::FTP::List.parse 'drwxrwxr-x 2 danial danial 72 May 23 12:52 spaces suck' rescue nil
10
+ @symlink = Net::FTP::List.parse 'lrwxrwxrwx 1 danial danial 4 Oct 30 15:26 bar -> /etc' rescue nil
11
+ @older_date = Net::FTP::List.parse '-rwxrwxrwx 1 owner group 154112 Feb 15 2008 participando.xls' rescue nil
12
+ @block_dev = Net::FTP::List.parse 'brw-r----- 1 root disk 1, 0 Apr 13 2006 ram0' rescue nil
13
+ @char_dev = Net::FTP::List.parse 'crw-rw-rw- 1 root root 1, 3 Apr 13 2006 null' rescue nil
14
+ @socket_dev = Net::FTP::List.parse 'srw-rw-rw- 1 root root 0 Aug 20 14:15 log' rescue nil
15
+ @pipe_dev = Net::FTP::List.parse 'prw-r----- 1 root adm 0 Nov 22 10:30 xconsole' rescue nil
16
+ @file_no_inodes = Net::FTP::List.parse '-rw-r--r-- foo@localhost foo@localhost 6034 May 14 23:13 index.html' rescue nil
17
+ @file_today = Net::FTP::List.parse 'crw-rw-rw- 1 root root 1, 3 Aug 16 14:28 today.txt' rescue nil
18
18
  end
19
19
 
20
20
  def test_parse_new
@@ -145,4 +145,14 @@ class TestNetFTPListUnix < Test::Unit::TestCase
145
145
  assert_equal 'xconsole', @pipe_dev.basename
146
146
  assert @pipe_dev.device?
147
147
  end
148
+
149
+ def test_single_digit_hour
150
+ assert_nothing_raised do
151
+ @single_digit_hour = Net::FTP::List.parse('-rw-r--r-- 1 root other 531 Dec 31 3:59 README')
152
+ end
153
+
154
+ Time.time_travel(Time.local(2013, 8, 16)) do
155
+ assert_equal Time.local(2013, 12, 31, 3, 59), @single_digit_hour.mtime
156
+ end
157
+ end
148
158
  end
metadata CHANGED
@@ -1,34 +1,67 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: net-ftp-list
3
- version: !ruby/object:Gem::Version
4
- hash: 3
5
- prerelease:
6
- segments:
7
- - 3
8
- - 2
9
- - 6
10
- version: 3.2.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.2.7
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Stateless Systems
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-08-27 00:00:00 +10:00
19
- default_executable:
20
- dependencies: []
21
-
11
+ date: 2014-04-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: net-ftp-list
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jeweler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
22
55
  description:
23
56
  email: enquiries@statelesssystems.com
24
57
  executables: []
25
-
26
58
  extensions: []
27
-
28
- extra_rdoc_files:
59
+ extra_rdoc_files:
29
60
  - README.txt
30
- files:
61
+ files:
31
62
  - .ruby-version
63
+ - Gemfile
64
+ - Gemfile.lock
32
65
  - README.txt
33
66
  - Rakefile
34
67
  - VERSION.yml
@@ -47,39 +80,27 @@ files:
47
80
  - test/test_net_ftp_list_netware.rb
48
81
  - test/test_net_ftp_list_rumpus.rb
49
82
  - test/test_net_ftp_list_unix.rb
50
- has_rdoc: true
51
83
  homepage: http://github.com/stateless-systems/net-ftp-list
52
84
  licenses: []
53
-
85
+ metadata: {}
54
86
  post_install_message:
55
87
  rdoc_options: []
56
-
57
- require_paths:
88
+ require_paths:
58
89
  - lib
59
- required_ruby_version: !ruby/object:Gem::Requirement
60
- none: false
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- hash: 3
65
- segments:
66
- - 0
67
- version: "0"
68
- required_rubygems_version: !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
77
100
  requirements: []
78
-
79
101
  rubyforge_project:
80
- rubygems_version: 1.6.2
102
+ rubygems_version: 2.0.14
81
103
  signing_key:
82
- specification_version: 3
104
+ specification_version: 4
83
105
  summary: Parse FTP LIST command output.
84
106
  test_files: []
85
-