Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename linguist command to github-linguist #4208

Merged
merged 3 commits into from
Aug 12, 2018
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Run this command each time a [sample][samples] has been modified.

To run Linguist from the cloned repository:

bundle exec bin/linguist --breakdown
bundle exec bin/github-linguist --breakdown

### Dependencies

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ A repository's languages stats can also be assessed from the command line using

```console
$ cd /path-to-repository/
$ linguist
$ github-linguist
```

You can try running `linguist` on the root directory in this repository itself:

```console
$ bundle exec bin/linguist --breakdown
$ bundle exec bin/github-linguist --breakdown
68.57% Ruby
22.90% C
6.93% Go
Expand All @@ -92,7 +92,7 @@ Ruby:
Gemfile
Rakefile
bin/git-linguist
bin/linguist
bin/github-linguist
ext/linguist/extconf.rb
github-linguist.gemspec
lib/linguist.rb
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion github-linguist.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |s|
s.license = "MIT"

s.files = Dir['lib/**/*'] + Dir['ext/**/*'] + Dir['grammars/*'] + ['LICENSE']
s.executables = ['linguist', 'git-linguist']
s.executables = ['github-linguist', 'git-linguist']
s.extensions = ['ext/linguist/extconf.rb']

s.add_dependency 'charlock_holmes', '~> 0.7.6'
Expand Down
4 changes: 2 additions & 2 deletions test/test_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def rugged_repository
end

def master_oid
'd40b4a33deba710e2f494db357c654fbe5d4b419'
'2a6dd02c6e81b7e30d978806d43d4ba1a7ba8003'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the commit that changed the name from bin/linguist to bin/github-linguist and is needed in order for the test_linguist_breakdown test to reflect the current state of the repo. This change is not essential, but nice to have but less likely to cause confusion later.

end

def linguist_repo(oid = master_oid)
Expand All @@ -27,7 +27,7 @@ def test_linguist_size

def test_linguist_breakdown
assert linguist_repo.breakdown_by_file.has_key?("Ruby")
assert linguist_repo.breakdown_by_file["Ruby"].include?("bin/linguist")
assert linguist_repo.breakdown_by_file["Ruby"].include?("bin/github-linguist")
assert linguist_repo.breakdown_by_file["Ruby"].include?("lib/linguist/language.rb")
end

Expand Down