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
|
||||
doc
|
||||
.yardoc
|
||||
Gemfile.lock
|
||||
|
|
15
.rubocop.yml
15
.rubocop.yml
|
@ -1,5 +1,12 @@
|
|||
inherit_from: .rubocop_todo.yml
|
||||
|
||||
AllCops:
|
||||
DisplayCopNames: true
|
||||
DisplayStyleGuide: true
|
||||
Exclude:
|
||||
- 'vendor/**/*'
|
||||
- 'gemfiles/**/*'
|
||||
|
||||
Metrics/LineLength:
|
||||
Enabled: false
|
||||
|
||||
|
@ -53,4 +60,10 @@ Style/RegexpLiteral:
|
|||
|
||||
Style/MutableConstant:
|
||||
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:
|
||||
- bundler
|
||||
language: ruby
|
||||
before_install:
|
||||
- gem update --system
|
||||
- gem install bundler
|
||||
rvm:
|
||||
- 2.1
|
||||
script: bundle exec rake checks
|
||||
matrix:
|
||||
include:
|
||||
# Test install on clean system
|
||||
- install: true
|
||||
script:
|
||||
- gem build github_changelog_generator
|
||||
- gem install *.gem
|
||||
- install: true
|
||||
script:
|
||||
- gem build github_changelog_generator
|
||||
- bundle install --gemfile spec/install-gem-in-bundler.gemfile
|
||||
- rvm: 2.2.2
|
||||
install: true # This skips 'bundle install'
|
||||
script: gem build github_changelog_generator && gem install *.gem
|
||||
- rvm: 2.2.2
|
||||
install: true # This skips 'bundle install'
|
||||
script: gem build github_changelog_generator && bundle install
|
||||
gemfile: spec/install-gem-in-bundler.gemfile
|
||||
- rvm: 2.1
|
||||
gemfile: gemfiles/Gemfile.with_rack16
|
||||
- rvm: 2.3.1
|
||||
gemfile: gemfiles/Gemfile.with_rack2
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
|
|
14
Gemfile
14
Gemfile
|
@ -1,15 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
source "https://rubygems.org"
|
||||
|
||||
gemspec
|
||||
|
||||
group :test do
|
||||
group :development, :test do
|
||||
gem "rake"
|
||||
gem "bundler"
|
||||
gem "rubocop"
|
||||
gem "overcommit"
|
||||
gem "overcommit", ">= 0.31"
|
||||
gem "rubocop", ">= 0.43"
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem "coveralls", "~>0.8", require: false
|
||||
gem "simplecov", "~>0.10", require: false
|
||||
gem "codeclimate-test-reporter", "~>0.4"
|
||||
# JSON 2.0.1 is ruby 2.0+
|
||||
gem "json", "< 2.0"
|
||||
gem "json"
|
||||
gem "rspec", "< 4"
|
||||
end
|
||||
|
|
32
Gemfile.lock
32
Gemfile.lock
|
@ -2,8 +2,8 @@ PATH
|
|||
remote: .
|
||||
specs:
|
||||
github_changelog_generator (1.13.1)
|
||||
github_api (>= 0.14)
|
||||
rainbow (>= 2.1)
|
||||
github_api (>= 0.12)
|
||||
rake (>= 10.0)
|
||||
|
||||
GEM
|
||||
|
@ -28,32 +28,32 @@ GEM
|
|||
faraday (0.9.2)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.9.14)
|
||||
github_api (0.14.4)
|
||||
github_api (0.14.5)
|
||||
addressable (~> 2.4.0)
|
||||
descendants_tracker (~> 0.0.4)
|
||||
faraday (~> 0.8, < 0.10)
|
||||
hashie (>= 3.4)
|
||||
oauth2 (~> 1.0.0)
|
||||
hashie (3.4.4)
|
||||
oauth2 (~> 1.0)
|
||||
hashie (3.4.6)
|
||||
iniparse (1.4.2)
|
||||
json (1.8.3)
|
||||
jwt (1.5.4)
|
||||
jwt (1.5.6)
|
||||
multi_json (1.12.1)
|
||||
multi_xml (0.5.5)
|
||||
multipart-post (2.0.0)
|
||||
oauth2 (1.0.0)
|
||||
oauth2 (1.2.0)
|
||||
faraday (>= 0.8, < 0.10)
|
||||
jwt (~> 1.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (~> 1.2)
|
||||
rack (>= 1.2, < 3)
|
||||
overcommit (0.34.2)
|
||||
childprocess (~> 0.5.8)
|
||||
iniparse (~> 1.4)
|
||||
parser (2.3.1.2)
|
||||
parser (2.3.1.4)
|
||||
ast (~> 2.2)
|
||||
powerpack (0.1.1)
|
||||
rack (1.6.4)
|
||||
rack (2.0.1)
|
||||
rainbow (2.1.0)
|
||||
rake (11.2.2)
|
||||
rspec (3.5.0)
|
||||
|
@ -69,7 +69,7 @@ GEM
|
|||
diff-lcs (>= 1.2.0, < 2.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)
|
||||
powerpack (~> 0.1)
|
||||
rainbow (>= 1.99.1, < 3.0)
|
||||
|
@ -86,7 +86,7 @@ GEM
|
|||
thor (0.19.1)
|
||||
thread_safe (0.3.5)
|
||||
tins (1.6.0)
|
||||
unicode-display_width (1.1.0)
|
||||
unicode-display_width (1.1.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -96,12 +96,12 @@ DEPENDENCIES
|
|||
codeclimate-test-reporter (~> 0.4)
|
||||
coveralls (~> 0.8)
|
||||
github_changelog_generator!
|
||||
json (< 2.0)
|
||||
overcommit
|
||||
json
|
||||
overcommit (>= 0.31)
|
||||
rake
|
||||
rspec (>= 3.2)
|
||||
rubocop
|
||||
rspec (< 4)
|
||||
rubocop (>= 0.43)
|
||||
simplecov (~> 0.10)
|
||||
|
||||
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
|
||||
|
||||
[sudo] gem install github_changelog_generator
|
||||
gem install github_changelog_generator
|
||||
|
||||
See also Troubleshooting.
|
||||
|
||||
## 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.
|
||||
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
|
||||
|
||||
1. Create an issue and describe your idea
|
||||
|
|
3
Rakefile
3
Rakefile
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "bundler"
|
||||
require "bundler/gem_tasks"
|
||||
require "rubocop/rake_task"
|
||||
|
@ -36,4 +37,4 @@ task :copy_man_page_to_manpath do |_t|
|
|||
end
|
||||
|
||||
task checks: [:rubocop, :rspec]
|
||||
task default: [:copy_man_page_to_manpath]
|
||||
task default: [:rubocop, :rspec]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#! /usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "../lib/github_changelog_generator"
|
||||
GitHubChangelogGenerator::ChangelogGenerator.new.run
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#! /usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "../lib/github_changelog_generator"
|
||||
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
|
||||
# frozen_string_literal: true
|
||||
lib = File.expand_path("../lib", __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require "github_changelog_generator/version"
|
||||
|
@ -24,11 +25,6 @@ Gem::Specification.new do |spec|
|
|||
spec.require_paths = ["lib"]
|
||||
|
||||
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_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
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "github_api"
|
||||
require "json"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module GitHubChangelogGenerator
|
||||
# A Fetcher responsible for all requests to GitHub and all basic manipulation with related data
|
||||
# (such as filtering, validating, e.t.c)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require_relative "../fetcher"
|
||||
require_relative "generator_generation"
|
||||
require_relative "generator_fetcher"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module GitHubChangelogGenerator
|
||||
class Generator
|
||||
# Fetch event for issues and pull requests
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module GitHubChangelogGenerator
|
||||
class Generator
|
||||
# Main function to start change log generation
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module GitHubChangelogGenerator
|
||||
class Generator
|
||||
# delete all labels with labels from @options[:exclude_labels] array
|
||||
|
@ -130,11 +131,14 @@ module GitHubChangelogGenerator
|
|||
end
|
||||
|
||||
def filter_by_include_labels(issues)
|
||||
filtered_issues = @options[:include_labels].nil? ? issues : issues.select do |issue|
|
||||
labels = issue.labels.map(&:name) & @options[:include_labels]
|
||||
labels.any?
|
||||
if @options[:include_labels].nil?
|
||||
issues
|
||||
else
|
||||
issues.select do |issue|
|
||||
labels = issue.labels.map(&:name) & @options[:include_labels]
|
||||
labels.any?
|
||||
end
|
||||
end
|
||||
filtered_issues
|
||||
end
|
||||
|
||||
# General filtered function
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module GitHubChangelogGenerator
|
||||
class Generator
|
||||
# fetch, filter tags, fetch dates and sort them in time order
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "logger"
|
||||
require "rainbow"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
require "optparse"
|
||||
require "pp"
|
||||
require_relative "version"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "pathname"
|
||||
|
||||
module GitHubChangelogGenerator
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
#
|
||||
# Author:: Enrico Stahn <mail@enricostahn.com>
|
||||
#
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require "rake"
|
||||
require "rake/tasklib"
|
||||
require "github_changelog_generator"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module GitHubChangelogGenerator
|
||||
VERSION = "1.13.1"
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
#
|
||||
# Author:: Enrico Stahn <mail@enricostahn.com>
|
||||
#
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
VALID_TOKEN = "0123456789abcdef"
|
||||
INVALID_TOKEN = "0000000000000000"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module GitHubChangelogGenerator
|
||||
describe Generator do
|
||||
context "#exclude_issues_by_labels" do
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
describe GitHubChangelogGenerator::Generator do
|
||||
def tag_mash_with_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 ".github_changelog_generator" do
|
||||
let(:options) { {} }
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
describe GitHubChangelogGenerator::Parser do
|
||||
describe ".user_project_from_remote" do
|
||||
context "when remote is type 1" do
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
#
|
||||
# Author:: Enrico Stahn <mail@enricostahn.com>
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user