rubyls 0.1.2 → 0.1.4

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
  SHA1:
3
- metadata.gz: 3f77945fbbece2732870b17afeb8fae5403f777b
4
- data.tar.gz: 01bfa6b7b70a6d00c6ce114fa932f4f0a49d19d3
3
+ metadata.gz: 46c491baecca1a5d8e320f833491333f26233c7c
4
+ data.tar.gz: f2f6b03d52bec5e164d2abb6414a15c91d6725f9
5
5
  SHA512:
6
- metadata.gz: 88c751f650c65acee20bda1cabc2478dffa883040fbb27671dff8e44c79d5a2e9206499492766d70cf2423a0092c6cc43c54fdac6ffcc96263aa6ddb7316d669
7
- data.tar.gz: 312462b912542f9f37b572ef41c37f114e1f80a135a1926be8894ba35c97e832c9267b3438d4034ba05f25e0fb1c80e441a73cf868ed83feb2e45e49c72a4178
6
+ metadata.gz: 6a03ffc02ef9ad75da81810d6fe0d20187bb34355efe9bab829416e9297d6e88d86754e282672a334fcd9961ff128272f2ce4ad6601dac321b6817edcca9162f
7
+ data.tar.gz: c9bbf8a70f26c5a40c13b7e03c30c40d72ccbcc10f7dd3f06d60679cec141cce316139b5d06e98df2089b0eaf57da80d72863a25a4dc2b913a40f19f3fcab908
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubyls (0.1.2)
4
+ rubyls (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/exe/rubyls CHANGED
@@ -2,5 +2,4 @@
2
2
 
3
3
  require 'rubyls'
4
4
 
5
- path = ARGV[0] ? ARGV[0] : '.'
6
- Rubyls.ls(path)
5
+ Rubyls.ls(path: ARGV[0] || '.')
@@ -1,3 +1,3 @@
1
1
  module Rubyls
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/rubyls.rb CHANGED
@@ -3,14 +3,12 @@ require "rubyls/version"
3
3
  module Rubyls
4
4
  class Error < StandardError; end
5
5
 
6
- def self.ls(path)
7
- begin
8
- Dir.entries(path)[2..-1].each do |c|
9
- print "#{c}\t"
10
- end
11
- print "\n"
12
- rescue Errno::ENOENT
13
- puts "ls: #{path}: No such file or directory"
14
- end
6
+ def self.ls(path: '.')
7
+ entries = Dir.entries(path)
8
+ sorted = entries.sort
9
+ general = sorted.reject { |entry| entry.match(/^\./) }
10
+ print general.join("\t") + "\n"
11
+ rescue Errno::ENOENT
12
+ print "ls: #{path}: No such file or directory\n"
15
13
  end
16
14
  end
data/rubyls.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
 
18
18
  spec.metadata["homepage_uri"] = spec.homepage
19
19
  spec.metadata["source_code_uri"] = "https://github.com/kazu-horie/rubyls.git"
20
- spec.metadata["changelog_uri"] = "https://github.com/kazu-horie/rubyls/CHANGELOG.md"
20
+ spec.metadata["changelog_uri"] = "https://github.com/kazu-horie/rubyls/blob/master/CHANGELOG.md"
21
21
 
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuki Horie
@@ -82,7 +82,7 @@ licenses:
82
82
  metadata:
83
83
  homepage_uri: https://github.com/kazu-horie/rubyls.git
84
84
  source_code_uri: https://github.com/kazu-horie/rubyls.git
85
- changelog_uri: https://github.com/kazu-horie/rubyls/CHANGELOG.md
85
+ changelog_uri: https://github.com/kazu-horie/rubyls/blob/master/CHANGELOG.md
86
86
  post_install_message:
87
87
  rdoc_options: []
88
88
  require_paths: