Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Basic directory support #42

Merged
merged 5 commits into from
Jul 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ Style/Documentation:
Metrics/BlockLength:
Exclude:
- 'spec/**/*'

Metrics/ClassLength:
Max: 400
33 changes: 8 additions & 25 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-07-30 23:29:00 -0400 using RuboCop version 0.49.1.
# on 2017-07-31 12:02:15 -0400 using RuboCop version 0.49.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
- 'lib/fake_ftp/server.rb'

# Offense count: 1
Lint/HandleExceptions:
Exclude:
- 'lib/fake_ftp/server.rb'

# Offense count: 1
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
Lint/UselessAccessModifier:
Exclude:
- 'lib/fake_ftp/server.rb'

# Offense count: 5
# Offense count: 6
Metrics/AbcSize:
Max: 37

Expand All @@ -32,27 +20,22 @@ Metrics/AbcSize:
Metrics/BlockLength:
Max: 34

# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 316

# Offense count: 2
# Offense count: 3
Metrics/CyclomaticComplexity:
Max: 14

# Offense count: 20
# Offense count: 15
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 123
Max: 118

# Offense count: 7
# Offense count: 9
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 43

# Offense count: 1
# Offense count: 2
Metrics/PerceivedComplexity:
Max: 14

Expand All @@ -66,7 +49,7 @@ Style/CaseEquality:
Exclude:
- 'lib/fake_ftp/file.rb'

# Offense count: 2
# Offense count: 3
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
Expand Down
4 changes: 4 additions & 0 deletions lib/fake_ftp/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def initialize(name = nil, data = nil, type = nil, last_modified_time = Time.now
@last_modified_time = last_modified_time.utc
end

def basename
::File.basename(@name)
end

def data=(data)
@data = data
@bytes = @data.nil? ? nil : data.length
Expand Down
Loading