colorls 1.4.5.pre.885 → 1.4.5.pre.888
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +32 -0
- data/lib/colorls.rb +1 -0
- data/lib/colorls/core.rb +11 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98c2972fd70e2af553dd6db317edd6a5b1c7359c877bbc123fa9ece3db1c1036
|
4
|
+
data.tar.gz: c744972885038bebadcbacda38b99fd3a74c4135825d1e09ff4dbd0584880df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6203ef3679f228c9498bc7fca1ffd952f1df986254326a4574ceeeccf2862ab2993a7e820d194fd7b236daf3bd12e63d7df652755ea25d6ed070828395fa532d
|
7
|
+
data.tar.gz: 7fe63d9d88a07f7a5567c9142a5f3fac4db6ce7061d16b0829514ce4e487ad2981f14e066c0a63ada8f4111c7f9eebf144cd5c9271a57c6458d425b41ba8ab8c
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.6', '2.7', '3.0']
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
uses: ruby/setup-ruby@v1
|
28
|
+
with:
|
29
|
+
ruby-version: ${{ matrix.ruby-version }}
|
30
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
31
|
+
- name: Run tests
|
32
|
+
run: bundle exec rake
|
data/lib/colorls.rb
CHANGED
data/lib/colorls/core.rb
CHANGED
@@ -8,8 +8,17 @@ module ColorLS
|
|
8
8
|
@file_encoding
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
def self.terminal_width
|
12
|
+
console = IO.console
|
13
|
+
|
14
|
+
width = IO.console_size[1]
|
15
|
+
|
16
|
+
return width if console.nil? || console.winsize[1].zero?
|
17
|
+
|
18
|
+
console.winsize[1]
|
19
|
+
end
|
20
|
+
|
21
|
+
@screen_width = terminal_width
|
13
22
|
|
14
23
|
def self.screen_width
|
15
24
|
@screen_width
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: colorls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.5.pre.
|
4
|
+
version: 1.4.5.pre.888
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Athitya Kumar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -311,6 +311,7 @@ extensions: []
|
|
311
311
|
extra_rdoc_files: []
|
312
312
|
files:
|
313
313
|
- ".github/dependabot.yml"
|
314
|
+
- ".github/workflows/ruby.yml"
|
314
315
|
- ".gitignore"
|
315
316
|
- ".rubocop.yml"
|
316
317
|
- ".travis.yml"
|