rubyls 0.1.4 → 0.1.5

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: 46c491baecca1a5d8e320f833491333f26233c7c
4
- data.tar.gz: f2f6b03d52bec5e164d2abb6414a15c91d6725f9
3
+ metadata.gz: 0641aa528df35d99e533ad84c89da8ad506fc229
4
+ data.tar.gz: a09a6d0d8d0b16c97f2b8c973dc4d595fd8cdb5a
5
5
  SHA512:
6
- metadata.gz: 6a03ffc02ef9ad75da81810d6fe0d20187bb34355efe9bab829416e9297d6e88d86754e282672a334fcd9961ff128272f2ce4ad6601dac321b6817edcca9162f
7
- data.tar.gz: c9bbf8a70f26c5a40c13b7e03c30c40d72ccbcc10f7dd3f06d60679cec141cce316139b5d06e98df2089b0eaf57da80d72863a25a4dc2b913a40f19f3fcab908
6
+ metadata.gz: f2c25edbb234c9cfff98c95c5319e62e0a2d047a68d893618dff7b25fe8a259d1b62c3403ab17e5f976390a38a5fd0becd9859d03cd6760114a6932e6cc308c6
7
+ data.tar.gz: b1f58632a16d3c3e6c7b6ae128a3569c9bcdf17cad8a9d730cba2cf77bb1fbc86ba435f80e1532cf357f02c998747bdfbf4728426e2b438b3f63ae09ee8ae34b
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.4.6
data/Gemfile CHANGED
@@ -2,3 +2,4 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in rubyls.gemspec
4
4
  gemspec
5
+ gem 'aruba', '~> 0.14.11'
data/Gemfile.lock CHANGED
@@ -1,12 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubyls (0.1.4)
4
+ rubyls (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ aruba (0.14.11)
10
+ childprocess (>= 0.6.3, < 3.0.0)
11
+ contracts (~> 0.9)
12
+ cucumber (>= 1.3.19)
13
+ ffi (~> 1.9)
14
+ rspec-expectations (>= 2.99)
15
+ thor (~> 0.19)
16
+ backports (3.15.0)
17
+ builder (3.2.3)
18
+ childprocess (2.0.0)
19
+ rake (< 13.0)
20
+ contracts (0.16.0)
21
+ cucumber (3.1.2)
22
+ builder (>= 2.1.2)
23
+ cucumber-core (~> 3.2.0)
24
+ cucumber-expressions (~> 6.0.1)
25
+ cucumber-wire (~> 0.0.1)
26
+ diff-lcs (~> 1.3)
27
+ gherkin (~> 5.1.0)
28
+ multi_json (>= 1.7.5, < 2.0)
29
+ multi_test (>= 0.1.2)
30
+ cucumber-core (3.2.1)
31
+ backports (>= 3.8.0)
32
+ cucumber-tag_expressions (~> 1.1.0)
33
+ gherkin (~> 5.0)
34
+ cucumber-expressions (6.0.1)
35
+ cucumber-tag_expressions (1.1.1)
36
+ cucumber-wire (0.0.1)
9
37
  diff-lcs (1.3)
38
+ ffi (1.11.1)
39
+ gherkin (5.1.0)
40
+ multi_json (1.13.1)
41
+ multi_test (0.1.2)
10
42
  rake (10.5.0)
11
43
  rspec (3.8.0)
12
44
  rspec-core (~> 3.8.0)
@@ -21,11 +53,13 @@ GEM
21
53
  diff-lcs (>= 1.2.0, < 2.0)
22
54
  rspec-support (~> 3.8.0)
23
55
  rspec-support (3.8.2)
56
+ thor (0.20.3)
24
57
 
25
58
  PLATFORMS
26
59
  ruby
27
60
 
28
61
  DEPENDENCIES
62
+ aruba (~> 0.14.11)
29
63
  bundler (~> 2.0)
30
64
  rake (~> 10.0)
31
65
  rspec (~> 3.0)
data/exe/rubyls CHANGED
@@ -2,4 +2,8 @@
2
2
 
3
3
  require 'rubyls'
4
4
 
5
- Rubyls.ls(path: ARGV[0] || '.')
5
+ begin
6
+ print Rubyls.ls(path: ARGV[0] || '.')
7
+ rescue ArgumentError => e
8
+ print e.message
9
+ end
data/lib/rubyls.rb CHANGED
@@ -5,10 +5,10 @@ module Rubyls
5
5
 
6
6
  def self.ls(path: '.')
7
7
  entries = Dir.entries(path)
8
- sorted = entries.sort
9
- general = sorted.reject { |entry| entry.match(/^\./) }
10
- print general.join("\t") + "\n"
8
+ entries.sort!
9
+ entries.reject! { |entry| entry.match(/^\./) }
10
+ "#{entries.join("\t")}\n"
11
11
  rescue Errno::ENOENT
12
- print "ls: #{path}: No such file or directory\n"
12
+ raise ArgumentError.new("ls: #{path}: No such file or directory\n")
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module Rubyls
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/rubyls.gemspec CHANGED
@@ -31,4 +31,5 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency "bundler", "~> 2.0"
32
32
  spec.add_development_dependency "rake", "~> 10.0"
33
33
  spec.add_development_dependency "rspec", "~> 3.0"
34
+ spec.add_development_dependency "aruba", "~> 0.14.1"
34
35
  end
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.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuki Horie
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: aruba
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.14.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.14.1
55
69
  description: simple ls-command implemented by Ruby
56
70
  email:
57
71
  - kazukihorie.jp@gmail.com
@@ -62,6 +76,7 @@ extra_rdoc_files: []
62
76
  files:
63
77
  - ".gitignore"
64
78
  - ".rspec"
79
+ - ".ruby-version"
65
80
  - ".travis.yml"
66
81
  - CHANGELOG.md
67
82
  - CODE_OF_CONDUCT.md