Skip to content

Commit e6737a6

Browse files
committed
Drop support for Ruby < 2.7
1 parent 1bb1b47 commit e6737a6

26 files changed

+620
-580
lines changed

.circleci/config.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,42 @@ jobs:
77
steps:
88
- checkout
99
- run: 'bundle install'
10-
- run: './test/test_git-status-tree'
10+
- run: './test/test_git_status_tree'
1111
build_ruby_2_7:
1212
docker:
1313
- image: 'cimg/ruby:2.7'
1414
steps:
1515
- checkout
1616
- run: 'bundle install'
17-
- run: './test/test_git-status-tree'
17+
- run: './test/test_git_status_tree'
1818
build_ruby_3_0:
1919
docker:
2020
- image: 'cimg/ruby:3.0'
2121
steps:
2222
- checkout
2323
- run: 'bundle install'
24-
- run: './test/test_git-status-tree'
24+
- run: './test/test_git_status_tree'
2525
build_ruby_3_1:
2626
docker:
2727
- image: 'cimg/ruby:3.1'
2828
steps:
2929
- checkout
3030
- run: 'bundle install'
31-
- run: './test/test_git-status-tree'
31+
- run: './test/test_git_status_tree'
3232
build_ruby_3_2:
3333
docker:
3434
- image: 'cimg/ruby:3.2'
3535
steps:
3636
- checkout
3737
- run: 'bundle install'
38-
- run: './test/test_git-status-tree'
38+
- run: './test/test_git_status_tree'
39+
build_rubocop:
40+
docker:
41+
- image: 'cimg/ruby:3.2'
42+
steps:
43+
- checkout
44+
- run: 'bundle install'
45+
- run: 'rubocop .'
3946
workflows:
4047
build_ruby_2_6:
4148
jobs:

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby-2.7.7

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

Gemfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
group :test do
4-
gem 'test-unit' if ENV['RUBY_VERSION'][0..9] >= 'ruby-2.2.0'
5-
gem 'cane', :require => false if ENV['RUBY_VERSION'][0..9] >= 'ruby-1.9.3'
6+
gem 'rubocop', require: false
7+
gem 'test-unit'
68
end

README.md

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://app.travis-ci.com/knugie/git-status-tree.svg?branch=master)](https://app.travis-ci.com/github/knugie/git-status-tree)
1+
[![CircleCI Status](https://circleci.com/gh/knugie/git-status-tree/tree/master.svg?style=svg)](https://circleci.com/gh/knugie/git-status-tree/tree/master)
22
[![Gem Version](https://img.shields.io/gem/v/git-status-tree.svg)](https://rubygems.org/gems/git-status-tree)
33

44
# git-status-tree
@@ -10,30 +10,27 @@ and files. Run `git tree` in the command line to list all files in your git repo
1010
untracked (?) or have been added (A), modified (M) or deleted (D). The colored output
1111
shows whether a file has been added/staged (green)(+) or not (red). The current status
1212
of each file is appended to it.
13+
___
14+
## Installation
15+
**git-status-tree** is available on [rubygems.org](https://rubygems.org/gems/git-status-tree). Install git-status-tree running:
16+
```
17+
gem install git-status-tree
18+
```
1319

1420
## Example
1521
![image](https://user-images.githubusercontent.com/1446195/134486179-290820c6-4a8c-4cf3-8707-43adacb77b4d.png)
1622

17-
## Requirements
23+
## Compatibility
24+
**git-status-tree** supports:
1825
* Git (http://git-scm.com): version 1.8+
19-
* Ruby (http://www.ruby-lang.org): version 1.8+
26+
* Ruby (http://www.ruby-lang.org): version 2.7+
2027

21-
## Install
22-
```
23-
gem install git-status-tree
24-
```
25-
26-
## Config
28+
## Configuration
2729
Set the indentation as you like, default is 4.
2830
```
2931
git config --global status-tree.indent <indent>
3032
```
3133

32-
## Uninstall
33-
```
34-
gem uninstall git-status-tree
35-
```
36-
3734
## Try it
3835
```
3936
gem install git-status-tree
@@ -58,3 +55,23 @@ git tree
5855
git reset HEAD --hard
5956
git clean -xdf
6057
```
58+
59+
## Uninstall
60+
```
61+
gem uninstall git-status-tree
62+
```
63+
___
64+
## Development
65+
66+
1. Clone this repository
67+
* `git clone https://github.com/knugie/git-status-tree.git`
68+
* `cd git-status-tree`
69+
2. Install dependencies
70+
* `bundle install`
71+
3. Run tests
72+
* `./test/test_git_status_tree`
73+
4. Run git-status-tree from repository
74+
* `./bin/git-status-tree`
75+
5. Build and install local gem
76+
* `gem build git-status-tree.gemspec`
77+
* `gem install git-status-tree-2.0.0.gem`

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
2.0.0

bin/git-status-tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env ruby
2-
# encoding: utf-8
2+
# frozen_string_literal: true
33

4-
require File.join File.dirname(__FILE__), '../src/git-status-tree'
4+
require File.join File.dirname(__FILE__), '../src/git_status_tree'
55

66
puts GitStatusTree.new.to_s

ext/git_tree/extconf.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1+
# frozen_string_literal: true
2+
13
require 'mkmf'
24

35
find_executable('bash')
46
find_executable('git')
57
find_executable('make')
68

79
# Trick Rubygems into thinking the generated Makefile was executed
8-
compile = File.join(Dir.pwd, 'git_tree.' + RbConfig::CONFIG['DLEXT'])
9-
File.open(compile, "w") {}
10+
compile = File.join(Dir.pwd, "git_tree.#{RbConfig::CONFIG['DLEXT']}")
11+
File.open(compile, 'w') {}
1012

1113
# Install "git tree"
1214
puts `../../bin/git_add_alias_tree`
1315

1416
# Trick Rubygems into thinking the Makefile was executed
15-
$makefile_created = true
17+
$makefile_created = true # rubocop:disable Style/GlobalVars

git-status-tree.gemspec

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
# frozen_string_literal: true
2+
13
Gem::Specification.new do |s|
2-
s.name = 'git-status-tree'
3-
s.version = '1.0.1'
4-
s.summary = 'counts bits'
5-
s.licenses = ['MIT', 'GPL-2.0']
6-
s.summary = "git status in file tree format"
7-
s.description = 'git-status-tree is a command line tool that shows git repository changes in a file tree.'
8-
s.authors = ["Wolfgang Teuber"]
9-
s.email = 'knugie@gmx.net'
10-
s.files = Dir['{lib/*.rb,src/*.rb,bin/*}'] + Dir['ext/git_tree/Makefile']
11-
s.require_paths = ['lib']
12-
s.executables = ['git-status-tree']
13-
s.extensions = Dir['ext/git_tree/extconf.rb']
14-
s.homepage = 'https://github.com/knugie/git-status-tree'
15-
s.metadata = { "source_code_uri" => "https://github.com/knugie/git-status-tree" }
4+
s.name = 'git-status-tree'
5+
s.required_ruby_version = '>= 2.7'
6+
s.version = '2.0.0'
7+
s.licenses = ['MIT', 'GPL-2.0']
8+
s.summary = 'git status in file tree format'
9+
s.description = 'git-status-tree is a command line tool that shows git repository changes in a file tree.'
10+
s.authors = ['Wolfgang Teuber']
11+
s.email = 'knugie@gmx.net'
12+
s.files = Dir['{lib/*.rb,src/*.rb,bin/*}'] + Dir['ext/git_tree/Makefile']
13+
s.require_paths = ['lib']
14+
s.executables = ['git-status-tree']
15+
s.extensions = Dir['ext/git_tree/extconf.rb']
16+
s.homepage = 'https://github.com/knugie/git-status-tree'
17+
s.metadata = { 'source_code_uri' => 'https://github.com/knugie/git-status-tree' }
1618
end

lib/bash_color.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# encoding: utf-8
1+
# frozen_string_literal: true
22

33
module BashColor
44
NONE = "\033[0m"

0 commit comments

Comments
 (0)