Merge pull request #417 from skywinder/fix/move-deps-about
Travis: Collecting the config, gemspec: extract development deps to Gemfile
This commit is contained in:
commit
fac944786b
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@ coverage/
|
||||||
spec/*.lock
|
spec/*.lock
|
||||||
doc
|
doc
|
||||||
.yardoc
|
.yardoc
|
||||||
|
Gemfile.lock
|
||||||
|
|
15
.rubocop.yml
15
.rubocop.yml
|
@ -1,5 +1,12 @@
|
||||||
inherit_from: .rubocop_todo.yml
|
inherit_from: .rubocop_todo.yml
|
||||||
|
|
||||||
|
AllCops:
|
||||||
|
DisplayCopNames: true
|
||||||
|
DisplayStyleGuide: true
|
||||||
|
Exclude:
|
||||||
|
- 'vendor/**/*'
|
||||||
|
- 'gemfiles/**/*'
|
||||||
|
|
||||||
Metrics/LineLength:
|
Metrics/LineLength:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
@ -53,4 +60,10 @@ Style/RegexpLiteral:
|
||||||
|
|
||||||
Style/MutableConstant:
|
Style/MutableConstant:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
# "Use idx.positive? instead of idx > 0."
|
||||||
|
Style/NumericPredicate:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Style/SafeNavigation:
|
||||||
|
Enabled: false
|
1
.ruby-version
Normal file
1
.ruby-version
Normal file
|
@ -0,0 +1 @@
|
||||||
|
2.3.1
|
26
.travis.yml
26
.travis.yml
|
@ -1,23 +1,23 @@
|
||||||
|
language: ruby
|
||||||
cache:
|
cache:
|
||||||
- bundler
|
- bundler
|
||||||
language: ruby
|
|
||||||
before_install:
|
before_install:
|
||||||
- gem update --system
|
- gem update --system
|
||||||
- gem install bundler
|
- gem install bundler
|
||||||
rvm:
|
|
||||||
- 2.1
|
|
||||||
script: bundle exec rake checks
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Test install on clean system
|
- rvm: 2.2.2
|
||||||
- install: true
|
install: true # This skips 'bundle install'
|
||||||
script:
|
script: gem build github_changelog_generator && gem install *.gem
|
||||||
- gem build github_changelog_generator
|
- rvm: 2.2.2
|
||||||
- gem install *.gem
|
install: true # This skips 'bundle install'
|
||||||
- install: true
|
script: gem build github_changelog_generator && bundle install
|
||||||
script:
|
gemfile: spec/install-gem-in-bundler.gemfile
|
||||||
- gem build github_changelog_generator
|
- rvm: 2.1
|
||||||
- bundle install --gemfile spec/install-gem-in-bundler.gemfile
|
gemfile: gemfiles/Gemfile.with_rack16
|
||||||
|
- rvm: 2.3.1
|
||||||
|
gemfile: gemfiles/Gemfile.with_rack2
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
recipients:
|
recipients:
|
||||||
|
|
14
Gemfile
14
Gemfile
|
@ -1,15 +1,19 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
group :test do
|
group :development, :test do
|
||||||
gem "rake"
|
gem "rake"
|
||||||
gem "bundler"
|
gem "bundler"
|
||||||
gem "rubocop"
|
gem "overcommit", ">= 0.31"
|
||||||
gem "overcommit"
|
gem "rubocop", ">= 0.43"
|
||||||
|
end
|
||||||
|
|
||||||
|
group :test do
|
||||||
gem "coveralls", "~>0.8", require: false
|
gem "coveralls", "~>0.8", require: false
|
||||||
gem "simplecov", "~>0.10", require: false
|
gem "simplecov", "~>0.10", require: false
|
||||||
gem "codeclimate-test-reporter", "~>0.4"
|
gem "codeclimate-test-reporter", "~>0.4"
|
||||||
# JSON 2.0.1 is ruby 2.0+
|
gem "json"
|
||||||
gem "json", "< 2.0"
|
gem "rspec", "< 4"
|
||||||
end
|
end
|
||||||
|
|
32
Gemfile.lock
32
Gemfile.lock
|
@ -2,8 +2,8 @@ PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
github_changelog_generator (1.13.1)
|
github_changelog_generator (1.13.1)
|
||||||
|
github_api (>= 0.14)
|
||||||
rainbow (>= 2.1)
|
rainbow (>= 2.1)
|
||||||
github_api (>= 0.12)
|
|
||||||
rake (>= 10.0)
|
rake (>= 10.0)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
@ -28,32 +28,32 @@ GEM
|
||||||
faraday (0.9.2)
|
faraday (0.9.2)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
ffi (1.9.14)
|
ffi (1.9.14)
|
||||||
github_api (0.14.4)
|
github_api (0.14.5)
|
||||||
addressable (~> 2.4.0)
|
addressable (~> 2.4.0)
|
||||||
descendants_tracker (~> 0.0.4)
|
descendants_tracker (~> 0.0.4)
|
||||||
faraday (~> 0.8, < 0.10)
|
faraday (~> 0.8, < 0.10)
|
||||||
hashie (>= 3.4)
|
hashie (>= 3.4)
|
||||||
oauth2 (~> 1.0.0)
|
oauth2 (~> 1.0)
|
||||||
hashie (3.4.4)
|
hashie (3.4.6)
|
||||||
iniparse (1.4.2)
|
iniparse (1.4.2)
|
||||||
json (1.8.3)
|
json (1.8.3)
|
||||||
jwt (1.5.4)
|
jwt (1.5.6)
|
||||||
multi_json (1.12.1)
|
multi_json (1.12.1)
|
||||||
multi_xml (0.5.5)
|
multi_xml (0.5.5)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
oauth2 (1.0.0)
|
oauth2 (1.2.0)
|
||||||
faraday (>= 0.8, < 0.10)
|
faraday (>= 0.8, < 0.10)
|
||||||
jwt (~> 1.0)
|
jwt (~> 1.0)
|
||||||
multi_json (~> 1.3)
|
multi_json (~> 1.3)
|
||||||
multi_xml (~> 0.5)
|
multi_xml (~> 0.5)
|
||||||
rack (~> 1.2)
|
rack (>= 1.2, < 3)
|
||||||
overcommit (0.34.2)
|
overcommit (0.34.2)
|
||||||
childprocess (~> 0.5.8)
|
childprocess (~> 0.5.8)
|
||||||
iniparse (~> 1.4)
|
iniparse (~> 1.4)
|
||||||
parser (2.3.1.2)
|
parser (2.3.1.4)
|
||||||
ast (~> 2.2)
|
ast (~> 2.2)
|
||||||
powerpack (0.1.1)
|
powerpack (0.1.1)
|
||||||
rack (1.6.4)
|
rack (2.0.1)
|
||||||
rainbow (2.1.0)
|
rainbow (2.1.0)
|
||||||
rake (11.2.2)
|
rake (11.2.2)
|
||||||
rspec (3.5.0)
|
rspec (3.5.0)
|
||||||
|
@ -69,7 +69,7 @@ GEM
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.5.0)
|
||||||
rspec-support (3.5.0)
|
rspec-support (3.5.0)
|
||||||
rubocop (0.41.2)
|
rubocop (0.43.0)
|
||||||
parser (>= 2.3.1.1, < 3.0)
|
parser (>= 2.3.1.1, < 3.0)
|
||||||
powerpack (~> 0.1)
|
powerpack (~> 0.1)
|
||||||
rainbow (>= 1.99.1, < 3.0)
|
rainbow (>= 1.99.1, < 3.0)
|
||||||
|
@ -86,7 +86,7 @@ GEM
|
||||||
thor (0.19.1)
|
thor (0.19.1)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.5)
|
||||||
tins (1.6.0)
|
tins (1.6.0)
|
||||||
unicode-display_width (1.1.0)
|
unicode-display_width (1.1.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
@ -96,12 +96,12 @@ DEPENDENCIES
|
||||||
codeclimate-test-reporter (~> 0.4)
|
codeclimate-test-reporter (~> 0.4)
|
||||||
coveralls (~> 0.8)
|
coveralls (~> 0.8)
|
||||||
github_changelog_generator!
|
github_changelog_generator!
|
||||||
json (< 2.0)
|
json
|
||||||
overcommit
|
overcommit (>= 0.31)
|
||||||
rake
|
rake
|
||||||
rspec (>= 3.2)
|
rspec (< 4)
|
||||||
rubocop
|
rubocop (>= 0.43)
|
||||||
simplecov (~> 0.10)
|
simplecov (~> 0.10)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.12.5
|
1.13.1
|
||||||
|
|
29
README.md
29
README.md
|
@ -36,7 +36,9 @@ Because software tools are for people. If you don’t care, why are you contribu
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
[sudo] gem install github_changelog_generator
|
gem install github_changelog_generator
|
||||||
|
|
||||||
|
See also Troubleshooting.
|
||||||
|
|
||||||
## Output example
|
## Output example
|
||||||
|
|
||||||
|
@ -223,6 +225,31 @@ If you're seeing this warning, please do the following:
|
||||||
1. Make sure you're providing an OAuth token, so you're not making requests anonymously. Using an OAuth token increases your hourly request maximum from 60 to 5000.
|
1. Make sure you're providing an OAuth token, so you're not making requests anonymously. Using an OAuth token increases your hourly request maximum from 60 to 5000.
|
||||||
2. If you have a large repo with lots of issues/PRs, you can use `--max-issues NUM` to limit the number of issues that are pulled back. For example: `--max-issues 1000`
|
2. If you have a large repo with lots of issues/PRs, you can use `--max-issues NUM` to limit the number of issues that are pulled back. For example: `--max-issues 1000`
|
||||||
|
|
||||||
|
- ***My Ruby version is very old, can I use this?***
|
||||||
|
|
||||||
|
When your Ruby is old, and you don't want to upgrade, and your want to
|
||||||
|
control which libraries you use, you can use Bundler.
|
||||||
|
|
||||||
|
In a Gemfile, perhaps in a non-deployed `:development` group, add this
|
||||||
|
gem:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
group :development do
|
||||||
|
gem 'github_changelog_generator', require: false
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
Then you can keep back dependencies like rack, which currently is only
|
||||||
|
compatible with Ruby >= 2.2.2. So, use an older version for your app by
|
||||||
|
adding a line like this to the Gemfile:
|
||||||
|
|
||||||
|
```
|
||||||
|
gem 'rack', '~> 1.6'
|
||||||
|
```
|
||||||
|
|
||||||
|
This way, you can keep on using github_changelog_generator, even if you
|
||||||
|
can't get the latest version of Ruby installed.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
1. Create an issue and describe your idea
|
1. Create an issue and describe your idea
|
||||||
|
|
3
Rakefile
3
Rakefile
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
require "bundler"
|
require "bundler"
|
||||||
require "bundler/gem_tasks"
|
require "bundler/gem_tasks"
|
||||||
require "rubocop/rake_task"
|
require "rubocop/rake_task"
|
||||||
|
@ -36,4 +37,4 @@ task :copy_man_page_to_manpath do |_t|
|
||||||
end
|
end
|
||||||
|
|
||||||
task checks: [:rubocop, :rspec]
|
task checks: [:rubocop, :rspec]
|
||||||
task default: [:copy_man_page_to_manpath]
|
task default: [:rubocop, :rspec]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#! /usr/bin/env ruby
|
#! /usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../lib/github_changelog_generator"
|
require_relative "../lib/github_changelog_generator"
|
||||||
GitHubChangelogGenerator::ChangelogGenerator.new.run
|
GitHubChangelogGenerator::ChangelogGenerator.new.run
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#! /usr/bin/env ruby
|
#! /usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../lib/github_changelog_generator"
|
require_relative "../lib/github_changelog_generator"
|
||||||
GitHubChangelogGenerator::ChangelogGenerator.new.run
|
GitHubChangelogGenerator::ChangelogGenerator.new.run
|
||||||
|
|
2
gemfiles/Gemfile.with_rack16
Normal file
2
gemfiles/Gemfile.with_rack16
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
eval_gemfile File.expand_path('../../Gemfile', __FILE__)
|
||||||
|
gem 'rack', '~> 1.6'
|
2
gemfiles/Gemfile.with_rack2
Normal file
2
gemfiles/Gemfile.with_rack2
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
eval_gemfile File.expand_path('../../Gemfile', __FILE__)
|
||||||
|
gem 'rack', '>= 2'
|
|
@ -1,4 +1,5 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
# frozen_string_literal: true
|
||||||
lib = File.expand_path("../lib", __FILE__)
|
lib = File.expand_path("../lib", __FILE__)
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||||
require "github_changelog_generator/version"
|
require "github_changelog_generator/version"
|
||||||
|
@ -24,11 +25,6 @@ Gem::Specification.new do |spec|
|
||||||
spec.require_paths = ["lib"]
|
spec.require_paths = ["lib"]
|
||||||
|
|
||||||
spec.add_runtime_dependency "rake", ">= 10.0"
|
spec.add_runtime_dependency "rake", ">= 10.0"
|
||||||
spec.add_runtime_dependency "github_api", ">= 0.12"
|
spec.add_runtime_dependency "github_api", ">= 0.14"
|
||||||
spec.add_runtime_dependency "rainbow", ">= 2.1"
|
spec.add_runtime_dependency "rainbow", ">= 2.1"
|
||||||
|
|
||||||
spec.add_development_dependency "overcommit", ">= 0.31"
|
|
||||||
spec.add_development_dependency "rspec", ">= 3.2"
|
|
||||||
spec.add_development_dependency "bundler", ">= 1.7"
|
|
||||||
spec.add_development_dependency "rubocop", ">= 0.31"
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "github_api"
|
require "github_api"
|
||||||
require "json"
|
require "json"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
# A Fetcher responsible for all requests to GitHub and all basic manipulation with related data
|
# A Fetcher responsible for all requests to GitHub and all basic manipulation with related data
|
||||||
# (such as filtering, validating, e.t.c)
|
# (such as filtering, validating, e.t.c)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
require_relative "../fetcher"
|
require_relative "../fetcher"
|
||||||
require_relative "generator_generation"
|
require_relative "generator_generation"
|
||||||
require_relative "generator_fetcher"
|
require_relative "generator_fetcher"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
class Generator
|
class Generator
|
||||||
# Fetch event for issues and pull requests
|
# Fetch event for issues and pull requests
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
class Generator
|
class Generator
|
||||||
# Main function to start change log generation
|
# Main function to start change log generation
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
class Generator
|
class Generator
|
||||||
# delete all labels with labels from @options[:exclude_labels] array
|
# delete all labels with labels from @options[:exclude_labels] array
|
||||||
|
@ -130,11 +131,14 @@ module GitHubChangelogGenerator
|
||||||
end
|
end
|
||||||
|
|
||||||
def filter_by_include_labels(issues)
|
def filter_by_include_labels(issues)
|
||||||
filtered_issues = @options[:include_labels].nil? ? issues : issues.select do |issue|
|
if @options[:include_labels].nil?
|
||||||
labels = issue.labels.map(&:name) & @options[:include_labels]
|
issues
|
||||||
labels.any?
|
else
|
||||||
|
issues.select do |issue|
|
||||||
|
labels = issue.labels.map(&:name) & @options[:include_labels]
|
||||||
|
labels.any?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
filtered_issues
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# General filtered function
|
# General filtered function
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
class Generator
|
class Generator
|
||||||
# fetch, filter tags, fetch dates and sort them in time order
|
# fetch, filter tags, fetch dates and sort them in time order
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
require "logger"
|
require "logger"
|
||||||
require "rainbow"
|
require "rainbow"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
require "optparse"
|
require "optparse"
|
||||||
require "pp"
|
require "pp"
|
||||||
require_relative "version"
|
require_relative "version"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
require "pathname"
|
require "pathname"
|
||||||
|
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
#
|
#
|
||||||
# Author:: Enrico Stahn <mail@enricostahn.com>
|
# Author:: Enrico Stahn <mail@enricostahn.com>
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
require "rake"
|
require "rake"
|
||||||
require "rake/tasklib"
|
require "rake/tasklib"
|
||||||
require "github_changelog_generator"
|
require "github_changelog_generator"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
VERSION = "1.13.1"
|
VERSION = "1.13.1"
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
#
|
#
|
||||||
# Author:: Enrico Stahn <mail@enricostahn.com>
|
# Author:: Enrico Stahn <mail@enricostahn.com>
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
VALID_TOKEN = "0123456789abcdef"
|
VALID_TOKEN = "0123456789abcdef"
|
||||||
INVALID_TOKEN = "0000000000000000"
|
INVALID_TOKEN = "0000000000000000"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
describe Generator do
|
describe Generator do
|
||||||
context "#exclude_issues_by_labels" do
|
context "#exclude_issues_by_labels" do
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
describe GitHubChangelogGenerator::Generator do
|
describe GitHubChangelogGenerator::Generator do
|
||||||
def tag_mash_with_name(tag)
|
def tag_mash_with_name(tag)
|
||||||
Hashie::Mash.new.tap { |mash_tag| mash_tag.name = tag }
|
Hashie::Mash.new.tap { |mash_tag| mash_tag.name = tag }
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
describe GitHubChangelogGenerator::ParserFile do
|
describe GitHubChangelogGenerator::ParserFile do
|
||||||
describe ".github_changelog_generator" do
|
describe ".github_changelog_generator" do
|
||||||
let(:options) { {} }
|
let(:options) { {} }
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
describe GitHubChangelogGenerator::Parser do
|
describe GitHubChangelogGenerator::Parser do
|
||||||
describe ".user_project_from_remote" do
|
describe ".user_project_from_remote" do
|
||||||
context "when remote is type 1" do
|
context "when remote is type 1" do
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
#
|
#
|
||||||
# Author:: Enrico Stahn <mail@enricostahn.com>
|
# Author:: Enrico Stahn <mail@enricostahn.com>
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue
Block a user