added specs for the new octo_fetcher. Also had to refactor a bit to deal with hashes and arrays instead of objects

This commit is contained in:
Andrew Waage 2016-05-19 23:46:13 -07:00 committed by Olle Jonsson
parent e494fc004e
commit 4fb674b68e
26 changed files with 354 additions and 36 deletions

View File

@ -12,6 +12,7 @@ end
group :test do
gem "vcr"
gem "webmock"
gem "coveralls", "~>0.8", require: false
gem "simplecov", "~>0.10", require: false
gem "codeclimate-test-reporter", "~>0.4"

View File

@ -31,6 +31,8 @@ GEM
term-ansicolor (~> 1.3)
thor (~> 0.19.1)
tins (~> 1.6.0)
crack (0.4.3)
safe_yaml (~> 1.0.0)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.2.5)
@ -47,6 +49,7 @@ GEM
hashie (>= 3.4)
multi_json (>= 1.7.5, < 2.0)
oauth2 (~> 1.0)
hashdiff (0.3.0)
hashie (3.4.6)
i18n (0.7.0)
iniparse (1.4.2)
@ -93,6 +96,7 @@ GEM
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
safe_yaml (1.0.4)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
@ -110,6 +114,10 @@ GEM
thread_safe (~> 0.1)
unicode-display_width (1.1.1)
vcr (3.0.1)
webmock (2.0.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
PLATFORMS
ruby
@ -126,6 +134,7 @@ DEPENDENCIES
rubocop (>= 0.43)
simplecov (~> 0.10)
vcr
webmock
BUNDLED WITH
1.13.1

View File

@ -15,6 +15,8 @@ require_relative "github_changelog_generator/parser_file"
require_relative "github_changelog_generator/generator/generator"
require_relative "github_changelog_generator/version"
require_relative "github_changelog_generator/reader"
require_relative "github_changelog_generator/hash"
require_relative "github_changelog_generator/array"
# The main module, where placed all classes (now, at least)
module GitHubChangelogGenerator

View File

@ -0,0 +1,13 @@
class Array
def stringify_keys_deep!
new_ar = []
self.each do |value|
new_value = value
if value.is_a? Hash or value.is_a? Array
new_value = value.stringify_keys_deep!
end
new_ar << new_value
end
new_ar
end
end

View File

@ -107,13 +107,13 @@ module GitHubChangelogGenerator
issues.each do |dict|
added = false
dict.labels.each do |label|
if @options[:bug_labels].include? label.name
dict['labels'].each do |label|
if @options[:bug_labels].include? label['name']
bugs_a.push dict
added = true
next
end
if @options[:enhancement_labels].include? label.name
if @options[:enhancement_labels].include? label['name']
enhancement_a.push dict
added = true
next
@ -123,16 +123,16 @@ module GitHubChangelogGenerator
end
added_pull_requests = []
pull_requests.each do |dict|
dict.labels.each do |label|
if @options[:bug_labels].include? label.name
bugs_a.push dict
added_pull_requests.push dict
pull_requests.each do |pr|
pr['labels'].each do |label|
if @options[:bug_labels].include? label['name']
bugs_a.push pr
added_pull_requests.push pr
next
end
if @options[:enhancement_labels].include? label.name
enhancement_a.push dict
added_pull_requests.push dict
if @options[:enhancement_labels].include? label['name']
enhancement_a.push pr
added_pull_requests.push pr
next
end
end

View File

@ -166,9 +166,9 @@ module GitHubChangelogGenerator
# @param [Hash] issue Fetched issue from GitHub
# @return [String] Markdown-formatted single issue
def get_string_for_issue(issue)
encapsulated_title = encapsulate_string issue[:title]
encapsulated_title = encapsulate_string issue['title']
title_with_number = "#{encapsulated_title} [\\##{issue[:number]}](#{issue.html_url})"
title_with_number = "#{encapsulated_title} [\\##{issue['number']}](#{issue['html_url']})"
issue_line_with_user(title_with_number, issue)
end
@ -177,13 +177,13 @@ module GitHubChangelogGenerator
def issue_line_with_user(line, issue)
return line if !@options[:author] || issue.pull_request.nil?
user = issue.user
user = issue['user']
return "#{line} ({Null user})" unless user
if @options[:usernames_as_github_logins]
"#{line} (@#{user.login})"
"#{line} (@#{user['login']})"
else
"#{line} ([#{user.login}](#{user.html_url}))"
"#{line} ([#{user['login']}](#{user['html_url']}))"
end
end
end

View File

@ -8,7 +8,7 @@ module GitHubChangelogGenerator
return issues if !@options[:exclude_labels] || @options[:exclude_labels].empty?
issues.reject do |issue|
labels = issue.labels.map(&:name)
labels = issue['labels'].map{|l| l['name'] }
(labels & @options[:exclude_labels]).any?
end
end
@ -123,7 +123,7 @@ module GitHubChangelogGenerator
def filter_wo_labels(issues)
if @options[:add_issues_wo_labels]
issues_wo_labels = issues.select do |issue|
!issue.labels.map(&:name).any?
!issue['labels'].map{|l| l['name'] }.any?
end
return issues_wo_labels
end
@ -135,7 +135,7 @@ module GitHubChangelogGenerator
issues
else
issues.select do |issue|
labels = issue.labels.map(&:name) & @options[:include_labels]
labels = issue['labels'].map { |l| l['name'] } & @options[:include_labels]
labels.any?
end
end
@ -179,16 +179,16 @@ module GitHubChangelogGenerator
pull_requests.each do |pr|
fetched_pr = closed_pull_requests.find do |fpr|
fpr.number == pr.number
fpr['number'] == pr['number']
end
if fetched_pr
pr[:merged_at] = fetched_pr[:merged_at]
pr['merged_at'] = fetched_pr['merged_at']
closed_pull_requests.delete(fetched_pr)
end
end
pull_requests.select! do |pr|
!pr[:merged_at].nil?
!pr['merged_at'].nil?
end
pull_requests

View File

@ -0,0 +1,15 @@
class Hash
def stringify_keys_deep!
new_hash = {}
keys.each do |k|
ks = k.respond_to?(:to_s) ? k.to_s : k
if values_at(k).first.kind_of? Hash or values_at(k).first.kind_of? Array
new_hash[ks] = values_at(k).first.send(:stringify_keys_deep!)
else
new_hash[ks] = values_at(k).first
end
end
new_hash
end
end

View File

@ -50,7 +50,7 @@ module GitHubChangelogGenerator
# Fetch all tags from repo
#
# @return [Array] array of tags
# @return [Array <Hash>] array of tags
def get_all_tags
print "Fetching tags...\r" if @options[:verbose]
@ -79,7 +79,7 @@ module GitHubChangelogGenerator
# Fill input array with tags
#
# @return [Array] array of tags in repo
# @return [Array <Hash>] array of tags in repo
def github_fetch_tags
tags = []
page_i = 0
@ -98,13 +98,15 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
else
Helper.log.info "Found #{tags.count} tags"
end
# tags are a Sawyer::Resource. Convert to hash
tags = tags.map{|h| h.to_hash.stringify_keys_deep! }
tags
end
# This method fetch all closed issues and separate them to pull requests and pure issues
# (pull request is kind of issue in term of GitHub)
#
# @return [Tuple] with (issues, pull-requests)
# @return [Tuple] with (issues [Array <Hash>], pull-requests [Array <Hash>])
def fetch_closed_issues_and_pr
print "Fetching closed issues...\r" if @options[:verbose]
issues = []
@ -127,15 +129,17 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
print_empty_line
Helper.log.info "Received issues: #{issues.count}"
issues = issues.map{|h| h.to_hash.stringify_keys_deep! }
# separate arrays of issues and pull requests:
issues.partition do |x|
x[:pull_request].nil?
x['pull_request'].nil?
end
end
# Fetch all pull requests. We need them to detect :merged_at parameter
#
# @return [Array] all pull requests
# @return [Array <Hash>] all pull requests
def fetch_closed_pull_requests
pull_requests = []
options = { :state => 'closed' }
@ -156,6 +160,7 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
print_empty_line
Helper.log.info "Pull Request count: #{pull_requests.count}"
pull_requests = pull_requests.map{|h| h.to_hash.stringify_keys_deep! }
pull_requests
end
@ -174,6 +179,7 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
iterate_pages(@client, 'issue_events', issue['number'], {}) do |new_event|
issue[:events].concat(new_event)
end
issue[:events] = issue[:events].map{|h| h.to_hash.stringify_keys_deep! }
print_in_same_line("Fetching events for issues and PR: #{i + 1}/#{issues.count}")
i += 1
end
@ -203,7 +209,8 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
# @return [Hash]
def fetch_commit(event)
check_github_response do
@client.commit(user_project, event[:commit_id])
commit = @client.commit(user_project, event['commit_id'])
commit = commit.to_hash.stringify_keys_deep!
end
end
@ -250,10 +257,10 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
begin
value = yield
rescue Octokit::Unauthorized => e
Helper.log.error e.body.red
Helper.log.error e.message.red
abort "Error: wrong GitHub token"
rescue Octokit::Forbidden => e
Helper.log.warn e.body.red
Helper.log.warn e.message.red
Helper.log.warn GH_RATE_LIMIT_EXCEEDED_MSG.yellow
end
value

View File

@ -20,6 +20,7 @@ require "codeclimate-test-reporter"
require "simplecov"
require "coveralls"
require "vcr"
require "webmock/rspec"
# This module is only used to check the environment is currently a testing env
module SpecHelper
@ -40,8 +41,14 @@ VCR.configure do |c|
c.allow_http_connections_when_no_cassette = true
c.cassette_library_dir = 'spec/vcr'
c.ignore_localhost = true
c.default_cassette_options = { :record => :new_episodes }
c.hook_into :faraday
c.default_cassette_options = {
:record => :new_episodes,
:serialize_with => :json,
:preserve_exact_body_bytes => true,
:decode_compressed_response => true,
}
c.hook_into :webmock, :faraday
end
RSpec.configure do |config|

View File

@ -2,10 +2,10 @@
module GitHubChangelogGenerator
describe Generator do
context "#exclude_issues_by_labels" do
let(:label) { double("the-bad-label", name: "BAD") }
let(:issue) { double("the-issue-to-be-excluded", labels: [label]) }
let(:good_label) { double("a-good-label", name: "GOOD") }
let(:good_issue) { double("an-issue-to-be-kept", labels: [good_label]) }
let(:label) { { 'name' => "BAD" } }
let(:issue) { { 'labels' => [label] } }
let(:good_label) { { 'name' => "GOOD" } }
let(:good_issue) { { 'labels' => [good_label] } }
let(:issues) { [issue, good_issue] }
subject(:generator) { described_class.new(exclude_labels: %w(BAD BOO)) }

View File

@ -0,0 +1,250 @@
VALID_TOKEN = "0123456789abcdef"
INVALID_TOKEN = "0000000000000000"
describe GitHubChangelogGenerator::OctoFetcher do
let(:options) do
{
:user => "skywinder",
:project => "changelog_test",
}
end
let(:fetcher) { GitHubChangelogGenerator::OctoFetcher.new(options) }
describe "#fetch_github_token" do
token = GitHubChangelogGenerator::OctoFetcher::CHANGELOG_GITHUB_TOKEN
context "when token in ENV exist" do
before { stub_const("ENV", ENV.to_hash.merge(token => VALID_TOKEN)) }
subject { fetcher.send(:fetch_github_token) }
it { is_expected.to eq(VALID_TOKEN) }
end
context "when token in ENV is nil" do
before { stub_const("ENV", ENV.to_hash.merge(token => nil)) }
subject { fetcher.send(:fetch_github_token) }
it { is_expected.to be_nil }
end
context "when token in options and ENV is nil" do
let(:options) { { :token => VALID_TOKEN } }
before do
stub_const("ENV", ENV.to_hash.merge(token => nil))
end
subject { fetcher.send(:fetch_github_token) }
it { is_expected.to eq(VALID_TOKEN) }
end
context "when token in options and ENV specified" do
let(:options) { { :token => VALID_TOKEN } }
before do
stub_const("ENV", ENV.to_hash.merge(token => "no_matter_what"))
end
subject { fetcher.send(:fetch_github_token) }
it { is_expected.to eq(VALID_TOKEN) }
end
end
describe "#get_all_tags" do
context "when github_fetch_tags returns tags" do
it "returns tags" do
mock_tags = ['tag']
allow(fetcher).to receive(:github_fetch_tags).and_return(mock_tags)
expect(fetcher.get_all_tags).to eq(mock_tags)
end
end
end
describe "#github_fetch_tags" do
context "when wrong token provided" do
use_vcr_cassette
let(:options) do
{
:user => "skywinder",
:project => "changelog_test",
:token => INVALID_TOKEN
}
end
it "should raise Unauthorized error" do
expect { fetcher.github_fetch_tags }.to raise_error SystemExit, "Error: wrong GitHub token"
end
end
context "when API call is valid" do
use_vcr_cassette
it "should return tags" do
expected_tags = [{"name"=>"v0.0.3", "zipball_url"=>"https://api.github.com/repos/skywinder/changelog_test/zipball/v0.0.3", "tarball_url"=>"https://api.github.com/repos/skywinder/changelog_test/tarball/v0.0.3", "commit"=>{"sha"=>"a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90", "url"=>"https://api.github.com/repos/skywinder/changelog_test/commits/a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90"}}, {"name"=>"v0.0.2", "zipball_url"=>"https://api.github.com/repos/skywinder/changelog_test/zipball/v0.0.2", "tarball_url"=>"https://api.github.com/repos/skywinder/changelog_test/tarball/v0.0.2", "commit"=>{"sha"=>"9b35bb13dcd15b68e7bcbf10cde5eb937a54f710", "url"=>"https://api.github.com/repos/skywinder/changelog_test/commits/9b35bb13dcd15b68e7bcbf10cde5eb937a54f710"}}, {"name"=>"v0.0.1", "zipball_url"=>"https://api.github.com/repos/skywinder/changelog_test/zipball/v0.0.1", "tarball_url"=>"https://api.github.com/repos/skywinder/changelog_test/tarball/v0.0.1", "commit"=>{"sha"=>"4c2d6d1ed58bdb24b870dcb5d9f2ceed0283d69d", "url"=>"https://api.github.com/repos/skywinder/changelog_test/commits/4c2d6d1ed58bdb24b870dcb5d9f2ceed0283d69d"}}, {"name"=>"0.0.4", "zipball_url"=>"https://api.github.com/repos/skywinder/changelog_test/zipball/0.0.4", "tarball_url"=>"https://api.github.com/repos/skywinder/changelog_test/tarball/0.0.4", "commit"=>{"sha"=>"ece0c3ab7142b21064b885061c55ede00ef6ce94", "url"=>"https://api.github.com/repos/skywinder/changelog_test/commits/ece0c3ab7142b21064b885061c55ede00ef6ce94"}}]
expect(fetcher.github_fetch_tags).to eq(expected_tags)
end
it "should return tags count" do
tags = fetcher.github_fetch_tags
expect(tags.size).to eq(4)
end
end
end
describe "#fetch_closed_issues_and_pr" do
context "when API call is valid" do
use_vcr_cassette
it "returns issues" do
issues, pull_requests = fetcher.fetch_closed_issues_and_pr
expect(issues.size).to eq(7)
expect(pull_requests.size).to eq(14)
end
it "returns issue with proper key/values" do
issues, pull_requests = fetcher.fetch_closed_issues_and_pr
expected_issue = {"url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/14", "repository_url"=>"https://api.github.com/repos/skywinder/changelog_test", "labels_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/14/labels{/name}", "comments_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/14/comments", "events_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/14/events", "html_url"=>"https://github.com/skywinder/changelog_test/issues/14", "id"=>95419412, "number"=>14, "title"=>"Issue closed from commit from PR", "user"=>{"login"=>"skywinder", "id"=>3356474, "avatar_url"=>"https://avatars.githubusercontent.com/u/3356474?v=3", "gravatar_id"=>"", "url"=>"https://api.github.com/users/skywinder", "html_url"=>"https://github.com/skywinder", "followers_url"=>"https://api.github.com/users/skywinder/followers", "following_url"=>"https://api.github.com/users/skywinder/following{/other_user}", "gists_url"=>"https://api.github.com/users/skywinder/gists{/gist_id}", "starred_url"=>"https://api.github.com/users/skywinder/starred{/owner}{/repo}", "subscriptions_url"=>"https://api.github.com/users/skywinder/subscriptions", "organizations_url"=>"https://api.github.com/users/skywinder/orgs", "repos_url"=>"https://api.github.com/users/skywinder/repos", "events_url"=>"https://api.github.com/users/skywinder/events{/privacy}", "received_events_url"=>"https://api.github.com/users/skywinder/received_events", "type"=>"User", "site_admin"=>false}, "labels"=>[], "state"=>"closed", "locked"=>false, "assignee"=>nil, "milestone"=>nil, "comments"=>0, "created_at"=>"2015-07-16T12:06:08Z", "updated_at"=>"2015-07-16T12:21:42Z", "closed_at"=>"2015-07-16T12:21:42Z", "body"=>""}
# Convert times to Time
expected_issue.each_pair do |k,v|
if v =~ /^2015-/
expected_issue[k] = Time.parse(v)
end
end
expect(issues.first).to eq(expected_issue)
end
it "returns pull request with proper key/values" do
issues, pull_requests = fetcher.fetch_closed_issues_and_pr
expected_pr = {"url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/21", "repository_url"=>"https://api.github.com/repos/skywinder/changelog_test", "labels_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/21/labels{/name}", "comments_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/21/comments", "events_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/21/events", "html_url"=>"https://github.com/skywinder/changelog_test/pull/21", "id"=>124925759, "number"=>21, "title"=>"Merged br (should appear in change log with #20)", "user"=>{"login"=>"skywinder", "id"=>3356474, "avatar_url"=>"https://avatars.githubusercontent.com/u/3356474?v=3", "gravatar_id"=>"", "url"=>"https://api.github.com/users/skywinder", "html_url"=>"https://github.com/skywinder", "followers_url"=>"https://api.github.com/users/skywinder/followers", "following_url"=>"https://api.github.com/users/skywinder/following{/other_user}", "gists_url"=>"https://api.github.com/users/skywinder/gists{/gist_id}", "starred_url"=>"https://api.github.com/users/skywinder/starred{/owner}{/repo}", "subscriptions_url"=>"https://api.github.com/users/skywinder/subscriptions", "organizations_url"=>"https://api.github.com/users/skywinder/orgs", "repos_url"=>"https://api.github.com/users/skywinder/repos", "events_url"=>"https://api.github.com/users/skywinder/events{/privacy}", "received_events_url"=>"https://api.github.com/users/skywinder/received_events", "type"=>"User", "site_admin"=>false}, "labels"=>[], "state"=>"closed", "locked"=>false, "assignee"=>nil, "milestone"=>nil, "comments"=>0, "created_at"=>"2016-01-05T09:24:08Z", "updated_at"=>"2016-01-05T09:26:53Z", "closed_at"=>"2016-01-05T09:24:27Z", "pull_request"=>{"url"=>"https://api.github.com/repos/skywinder/changelog_test/pulls/21", "html_url"=>"https://github.com/skywinder/changelog_test/pull/21", "diff_url"=>"https://github.com/skywinder/changelog_test/pull/21.diff", "patch_url"=>"https://github.com/skywinder/changelog_test/pull/21.patch"}, "body"=>"to test https://github.com/skywinder/github-changelog-generator/pull/305\r\nshould appear in change log with #20"}
# Convert times to Time
expected_pr.each_pair do |k,v|
if v =~ /^2016-01/
expected_pr[k] = Time.parse(v)
end
end
expect(pull_requests.first).to eq(expected_pr)
end
it "returns issues with labels" do
issues, pull_requests = fetcher.fetch_closed_issues_and_pr
expected = [[], [], ["Bug"], [], ["enhancement"], ["some label"], []]
expect(issues.map{|i| i['labels'].map{|l| l['name']} }).to eq(expected)
end
it "returns pull_requests with labels" do
issues, pull_requests = fetcher.fetch_closed_issues_and_pr
expected = [[], [], [], [], [], ["enhancement"], [], [], ["invalid"], [], [], [], [], ["invalid"]]
expect(pull_requests.map{|i| i['labels'].map{|l| l['name']} }).to eq(expected)
end
end
end
describe "#fetch_closed_pull_requests" do
context "when API call is valid" do
use_vcr_cassette
it "returns pull requests" do
pull_requests = fetcher.fetch_closed_pull_requests
expect(pull_requests.size).to eq(14)
end
it "returns correct pull request keys" do
pull_requests = fetcher.fetch_closed_pull_requests
pr = pull_requests.first
expect(pr.keys).to eq(["url", "id", "html_url", "diff_url", "patch_url", "issue_url", "number", "state", "locked", "title", "user", "body", "created_at", "updated_at", "closed_at", "merged_at", "merge_commit_sha", "assignee", "milestone", "commits_url", "review_comments_url", "review_comment_url", "comments_url", "statuses_url", "head", "base", "_links"])
end
end
end
describe "#fetch_events_async" do
context "when API call is valid" do
use_vcr_cassette
it "populates issues" do
issues = [{"url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/14", "repository_url"=>"https://api.github.com/repos/skywinder/changelog_test", "labels_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/14/labels{/name}", "comments_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/14/comments", "events_url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/14/events", "html_url"=>"https://github.com/skywinder/changelog_test/issues/14", "id"=>95419412, "number"=>14, "title"=>"Issue closed from commit from PR", "user"=>{"login"=>"skywinder", "id"=>3356474, "avatar_url"=>"https://avatars.githubusercontent.com/u/3356474?v=3", "gravatar_id"=>"", "url"=>"https://api.github.com/users/skywinder", "html_url"=>"https://github.com/skywinder", "followers_url"=>"https://api.github.com/users/skywinder/followers", "following_url"=>"https://api.github.com/users/skywinder/following{/other_user}", "gists_url"=>"https://api.github.com/users/skywinder/gists{/gist_id}", "starred_url"=>"https://api.github.com/users/skywinder/starred{/owner}{/repo}", "subscriptions_url"=>"https://api.github.com/users/skywinder/subscriptions", "organizations_url"=>"https://api.github.com/users/skywinder/orgs", "repos_url"=>"https://api.github.com/users/skywinder/repos", "events_url"=>"https://api.github.com/users/skywinder/events{/privacy}", "received_events_url"=>"https://api.github.com/users/skywinder/received_events", "type"=>"User", "site_admin"=>false}, "labels"=>[], "state"=>"closed", "locked"=>false, "assignee"=>nil, "milestone"=>nil, "comments"=>0, "created_at"=>"2015-07-16T12:06:08Z", "updated_at"=>"2015-07-16T12:21:42Z", "closed_at"=>"2015-07-16T12:21:42Z", "body"=>""}]
# Check that they are blank to begin with
expect(issues.first[:events]).to be_nil
fetcher.fetch_events_async(issues)
issue_events = issues.first[:events]
expected_events = [{"id"=>357462189, "url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/events/357462189", "actor"=>{"login"=>"skywinder", "id"=>3356474, "avatar_url"=>"https://avatars.githubusercontent.com/u/3356474?v=3", "gravatar_id"=>"", "url"=>"https://api.github.com/users/skywinder", "html_url"=>"https://github.com/skywinder", "followers_url"=>"https://api.github.com/users/skywinder/followers", "following_url"=>"https://api.github.com/users/skywinder/following{/other_user}", "gists_url"=>"https://api.github.com/users/skywinder/gists{/gist_id}", "starred_url"=>"https://api.github.com/users/skywinder/starred{/owner}{/repo}", "subscriptions_url"=>"https://api.github.com/users/skywinder/subscriptions", "organizations_url"=>"https://api.github.com/users/skywinder/orgs", "repos_url"=>"https://api.github.com/users/skywinder/repos", "events_url"=>"https://api.github.com/users/skywinder/events{/privacy}", "received_events_url"=>"https://api.github.com/users/skywinder/received_events", "type"=>"User", "site_admin"=>false}, "event"=>"referenced", "commit_id"=>"decfe840d1a1b86e0c28700de5362d3365a29555", "commit_url"=>"https://api.github.com/repos/skywinder/changelog_test/commits/decfe840d1a1b86e0c28700de5362d3365a29555", "created_at"=>"2015-07-16T12:21:16Z"}, {"id"=>357462542, "url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/events/357462542", "actor"=>{"login"=>"skywinder", "id"=>3356474, "avatar_url"=>"https://avatars.githubusercontent.com/u/3356474?v=3", "gravatar_id"=>"", "url"=>"https://api.github.com/users/skywinder", "html_url"=>"https://github.com/skywinder", "followers_url"=>"https://api.github.com/users/skywinder/followers", "following_url"=>"https://api.github.com/users/skywinder/following{/other_user}", "gists_url"=>"https://api.github.com/users/skywinder/gists{/gist_id}", "starred_url"=>"https://api.github.com/users/skywinder/starred{/owner}{/repo}", "subscriptions_url"=>"https://api.github.com/users/skywinder/subscriptions", "organizations_url"=>"https://api.github.com/users/skywinder/orgs", "repos_url"=>"https://api.github.com/users/skywinder/repos", "events_url"=>"https://api.github.com/users/skywinder/events{/privacy}", "received_events_url"=>"https://api.github.com/users/skywinder/received_events", "type"=>"User", "site_admin"=>false}, "event"=>"closed", "commit_id"=>"decfe840d1a1b86e0c28700de5362d3365a29555", "commit_url"=>"https://api.github.com/repos/skywinder/changelog_test/commits/decfe840d1a1b86e0c28700de5362d3365a29555", "created_at"=>"2015-07-16T12:21:42Z"}]
# Convert times to Time
expected_events.map! do |event|
event.each_pair do |k, v|
if v =~ /^201[56]-/
event[k] = Time.parse(v)
end
end
end
expect(issue_events).to eq(expected_events)
end
end
end
describe "#fetch_date_of_tag" do
context "when API call is valid" do
use_vcr_cassette
it "returns date" do
tag = {"name"=>"v0.0.3", "zipball_url"=>"https://api.github.com/repos/skywinder/changelog_test/zipball/v0.0.3", "tarball_url"=>"https://api.github.com/repos/skywinder/changelog_test/tarball/v0.0.3", "commit"=>{"sha"=>"a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90", "url"=>"https://api.github.com/repos/skywinder/changelog_test/commits/a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90"}}
dt = fetcher.fetch_date_of_tag(tag)
expect(dt).to eq(Time.parse("2015-03-04 19:01:48 UTC"))
end
end
end
describe "#fetch_commit" do
context "when API call is valid" do
use_vcr_cassette
it "returns commit" do
event = {"id"=>357462189, "url"=>"https://api.github.com/repos/skywinder/changelog_test/issues/events/357462189", "actor"=>{"login"=>"skywinder", "id"=>3356474, "avatar_url"=>"https://avatars.githubusercontent.com/u/3356474?v=3", "gravatar_id"=>"", "url"=>"https://api.github.com/users/skywinder", "html_url"=>"https://github.com/skywinder", "followers_url"=>"https://api.github.com/users/skywinder/followers", "following_url"=>"https://api.github.com/users/skywinder/following{/other_user}", "gists_url"=>"https://api.github.com/users/skywinder/gists{/gist_id}", "starred_url"=>"https://api.github.com/users/skywinder/starred{/owner}{/repo}", "subscriptions_url"=>"https://api.github.com/users/skywinder/subscriptions", "organizations_url"=>"https://api.github.com/users/skywinder/orgs", "repos_url"=>"https://api.github.com/users/skywinder/repos", "events_url"=>"https://api.github.com/users/skywinder/events{/privacy}", "received_events_url"=>"https://api.github.com/users/skywinder/received_events", "type"=>"User", "site_admin"=>false}, "event"=>"referenced", "commit_id"=>"decfe840d1a1b86e0c28700de5362d3365a29555", "commit_url"=>"https://api.github.com/repos/skywinder/changelog_test/commits/decfe840d1a1b86e0c28700de5362d3365a29555", "created_at"=>"2015-07-16T12:21:16Z"}
commit = fetcher.fetch_commit(event)
expectations = [
["sha", "decfe840d1a1b86e0c28700de5362d3365a29555"],
["url",
"https://api.github.com/repos/skywinder/changelog_test/commits/decfe840d1a1b86e0c28700de5362d3365a29555"],
# OLD API: "https://api.github.com/repos/skywinder/changelog_test/git/commits/decfe840d1a1b86e0c28700de5362d3365a29555"],
["html_url",
"https://github.com/skywinder/changelog_test/commit/decfe840d1a1b86e0c28700de5362d3365a29555"],
["author",
{"login"=>"skywinder", "id"=>3356474, "avatar_url"=>"https://avatars.githubusercontent.com/u/3356474?v=3", "gravatar_id"=>"", "url"=>"https://api.github.com/users/skywinder", "html_url"=>"https://github.com/skywinder", "followers_url"=>"https://api.github.com/users/skywinder/followers", "following_url"=>"https://api.github.com/users/skywinder/following{/other_user}", "gists_url"=>"https://api.github.com/users/skywinder/gists{/gist_id}", "starred_url"=>"https://api.github.com/users/skywinder/starred{/owner}{/repo}", "subscriptions_url"=>"https://api.github.com/users/skywinder/subscriptions", "organizations_url"=>"https://api.github.com/users/skywinder/orgs", "repos_url"=>"https://api.github.com/users/skywinder/repos", "events_url"=>"https://api.github.com/users/skywinder/events{/privacy}", "received_events_url"=>"https://api.github.com/users/skywinder/received_events", "type"=>"User", "site_admin"=>false}],
["committer",
{"login"=>"skywinder", "id"=>3356474, "avatar_url"=>"https://avatars.githubusercontent.com/u/3356474?v=3", "gravatar_id"=>"", "url"=>"https://api.github.com/users/skywinder", "html_url"=>"https://github.com/skywinder", "followers_url"=>"https://api.github.com/users/skywinder/followers", "following_url"=>"https://api.github.com/users/skywinder/following{/other_user}", "gists_url"=>"https://api.github.com/users/skywinder/gists{/gist_id}", "starred_url"=>"https://api.github.com/users/skywinder/starred{/owner}{/repo}", "subscriptions_url"=>"https://api.github.com/users/skywinder/subscriptions", "organizations_url"=>"https://api.github.com/users/skywinder/orgs", "repos_url"=>"https://api.github.com/users/skywinder/repos", "events_url"=>"https://api.github.com/users/skywinder/events{/privacy}", "received_events_url"=>"https://api.github.com/users/skywinder/received_events", "type"=>"User", "site_admin"=>false}],
["parents",
[{"sha"=>"7ec095e5e3caceacedabf44d0b9b10da17c92e51",
"url"=>
"https://api.github.com/repos/skywinder/changelog_test/commits/7ec095e5e3caceacedabf44d0b9b10da17c92e51",
# OLD API: "https://api.github.com/repos/skywinder/changelog_test/git/commits/7ec095e5e3caceacedabf44d0b9b10da17c92e51",
"html_url"=>
"https://github.com/skywinder/changelog_test/commit/7ec095e5e3caceacedabf44d0b9b10da17c92e51"}]
]
]
expectations.each do |property, val|
expect(commit[property]).to eq(val)
end
end
end
end
end

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/skywinder/changelog_test/git/commits/decfe840d1a1b86e0c28700de5362d3365a29555","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1"],"Accept-Charset":["utf-8"],"User-Agent":["Github API Ruby Gem 0.13.1"]}},"response":{"status":{"code":200,"message":null},"headers":{"server":["GitHub.com"],"date":["Fri, 20 May 2016 06:39:17 GMT"],"content-type":["application/json; charset=utf-8"],"transfer-encoding":["chunked"],"status":["200 OK"],"x-ratelimit-limit":["60"],"x-ratelimit-remaining":["53"],"x-ratelimit-reset":["1463728508"],"cache-control":["public, max-age=60, s-maxage=60"],"vary":["Accept, Accept-Encoding"],"etag":["W/\"391047306d50dcb964a83bc94e45c33d\""],"last-modified":["Thu, 16 Jul 2015 12:11:01 GMT"],"x-github-media-type":["github.v3; format=json"],"access-control-expose-headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"access-control-allow-origin":["*"],"content-security-policy":["default-src 'none'"],"strict-transport-security":["max-age=31536000; includeSubdomains; preload"],"x-content-type-options":["nosniff"],"x-frame-options":["deny"],"x-xss-protection":["1; mode=block"],"x-served-by":["5aeb3f30c9e3ef6ef7bcbcddfd9a68f7"],"x-github-request-id":["6C2F0F69:1C0C4:9CDAEAF:573EB115"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJzaGEiOiJkZWNmZTg0MGQxYTFiODZlMGMyODcwMGRlNTM2MmQzMzY1YTI5\nNTU1IiwidXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS9yZXBvcy9za3l3\naW5kZXIvY2hhbmdlbG9nX3Rlc3QvZ2l0L2NvbW1pdHMvZGVjZmU4NDBkMWEx\nYjg2ZTBjMjg3MDBkZTUzNjJkMzM2NWEyOTU1NSIsImh0bWxfdXJsIjoiaHR0\ncHM6Ly9naXRodWIuY29tL3NreXdpbmRlci9jaGFuZ2Vsb2dfdGVzdC9jb21t\naXQvZGVjZmU4NDBkMWExYjg2ZTBjMjg3MDBkZTUzNjJkMzM2NWEyOTU1NSIs\nImF1dGhvciI6eyJuYW1lIjoiUGV0ciBLb3JvbGV2IiwiZW1haWwiOiJza3k0\nd2luZGVyQGdtYWlsLmNvbSIsImRhdGUiOiIyMDE1LTA3LTE2VDEyOjExOjAx\nWiJ9LCJjb21taXR0ZXIiOnsibmFtZSI6IlBldHIgS29yb2xldiIsImVtYWls\nIjoic2t5NHdpbmRlckBnbWFpbC5jb20iLCJkYXRlIjoiMjAxNS0wNy0xNlQx\nMjoxMTowMVoifSwidHJlZSI6eyJzaGEiOiIwNjk5YzE1MjU4YTdjMmIyZTE1\nNzA1MWZlMTk4NTFkNGY3MDVjYWM4IiwidXJsIjoiaHR0cHM6Ly9hcGkuZ2l0\naHViLmNvbS9yZXBvcy9za3l3aW5kZXIvY2hhbmdlbG9nX3Rlc3QvZ2l0L3Ry\nZWVzLzA2OTljMTUyNThhN2MyYjJlMTU3MDUxZmUxOTg1MWQ0ZjcwNWNhYzgi\nfSwibWVzc2FnZSI6ImZpeCAjMTQiLCJwYXJlbnRzIjpbeyJzaGEiOiI3ZWMw\nOTVlNWUzY2FjZWFjZWRhYmY0NGQwYjliMTBkYTE3YzkyZTUxIiwidXJsIjoi\naHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS9yZXBvcy9za3l3aW5kZXIvY2hhbmdl\nbG9nX3Rlc3QvZ2l0L2NvbW1pdHMvN2VjMDk1ZTVlM2NhY2VhY2VkYWJmNDRk\nMGI5YjEwZGExN2M5MmU1MSIsImh0bWxfdXJsIjoiaHR0cHM6Ly9naXRodWIu\nY29tL3NreXdpbmRlci9jaGFuZ2Vsb2dfdGVzdC9jb21taXQvN2VjMDk1ZTVl\nM2NhY2VhY2VkYWJmNDRkMGI5YjEwZGExN2M5MmU1MSJ9XX0=\n"},"http_version":null},"recorded_at":"Fri, 20 May 2016 06:39:21 GMT"}],"recorded_with":"VCR 3.0.1"}

View File

@ -0,0 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/skywinder/changelog_test/git/commits/a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1"],"Accept-Charset":["utf-8"],"User-Agent":["Github API Ruby Gem 0.13.1"]}},"response":{"status":{"code":200,"message":null},"headers":{"server":["GitHub.com"],"date":["Fri, 20 May 2016 06:39:16 GMT"],"content-type":["application/json; charset=utf-8"],"transfer-encoding":["chunked"],"status":["200 OK"],"x-ratelimit-limit":["60"],"x-ratelimit-remaining":["56"],"x-ratelimit-reset":["1463728508"],"cache-control":["public, max-age=60, s-maxage=60"],"vary":["Accept, Accept-Encoding"],"etag":["W/\"70e24649f6eca2e822b32129a2e73312\""],"last-modified":["Wed, 04 Mar 2015 19:01:48 GMT"],"x-github-media-type":["github.v3; format=json"],"access-control-expose-headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"access-control-allow-origin":["*"],"content-security-policy":["default-src 'none'"],"strict-transport-security":["max-age=31536000; includeSubdomains; preload"],"x-content-type-options":["nosniff"],"x-frame-options":["deny"],"x-xss-protection":["1; mode=block"],"x-served-by":["a7f8a126c9ed3f1c4715a34c0ddc7290"],"x-github-request-id":["6C2F0F69:1C0C6:A88FCCF:573EB114"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJzaGEiOiJhMGNiYTJiMWExZWE5MDExYWIwN2VlMWFjMTQwYmE1YTVlYjhi\nZDkwIiwidXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS9yZXBvcy9za3l3\naW5kZXIvY2hhbmdlbG9nX3Rlc3QvZ2l0L2NvbW1pdHMvYTBjYmEyYjFhMWVh\nOTAxMWFiMDdlZTFhYzE0MGJhNWE1ZWI4YmQ5MCIsImh0bWxfdXJsIjoiaHR0\ncHM6Ly9naXRodWIuY29tL3NreXdpbmRlci9jaGFuZ2Vsb2dfdGVzdC9jb21t\naXQvYTBjYmEyYjFhMWVhOTAxMWFiMDdlZTFhYzE0MGJhNWE1ZWI4YmQ5MCIs\nImF1dGhvciI6eyJuYW1lIjoiUGV0ciBLb3JvbGV2IiwiZW1haWwiOiJza3k0\nd2luZGVyQGdtYWlsLmNvbSIsImRhdGUiOiIyMDE1LTAzLTA0VDE5OjAxOjQ4\nWiJ9LCJjb21taXR0ZXIiOnsibmFtZSI6IlBldHIgS29yb2xldiIsImVtYWls\nIjoic2t5NHdpbmRlckBnbWFpbC5jb20iLCJkYXRlIjoiMjAxNS0wMy0wNFQx\nOTowMTo0OFoifSwidHJlZSI6eyJzaGEiOiIxZmYyNzZkZjJkY2Q1OGQ5MGEx\nMjY3ZmYyMTljZWQ5MjNh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":"VCR 3.0.1"}

View File

@ -0,0 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/skywinder/changelog_test/issues/14/events","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1"],"Accept-Charset":["utf-8"],"User-Agent":["Github API Ruby Gem 0.13.1"]}},"response":{"status":{"code":200,"message":null},"headers":{"server":["GitHub.com"],"date":["Fri, 20 May 2016 06:39:18 GMT"],"content-type":["application/json; charset=utf-8"],"transfer-encoding":["chunked"],"status":["200 OK"],"x-ratelimit-limit":["60"],"x-ratelimit-remaining":["51"],"x-ratelimit-reset":["1463728508"],"cache-control":["public, max-age=60, s-maxage=60"],"vary":["Accept, Accept-Encoding"],"etag":["W/\"9e001bcf4bf22abb6602f57d114ce205\""],"x-github-media-type":["github.v3; format=json"],"access-control-expose-headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"access-control-allow-origin":["*"],"content-security-policy":["default-src 'none'"],"strict-transport-security":["max-age=31536000; includeSubdomains; preload"],"x-content-type-options":["nosniff"],"x-frame-options":["deny"],"x-xss-protection":["1; mode=block"],"x-served-by":["bd82876e9bf04990f289ba22f246ee9b"],"x-github-request-id":["6C2F0F69:1C0C6:A88FE6B:573EB116"]},"body":{"encoding":"ASCII-8BIT","base64_string":"W3siaWQiOjM1NzQ2MjE4OSwidXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHViLmNv\nbS9yZXBvcy9za3l3aW5kZXIvY2hhbmdlbG9nX3Rlc3QvaXNzdWVzL2V2ZW50\ncy8zNTc0NjIxODkiLCJhY3RvciI6eyJsb2dpbiI6InNreXdpbmRlciIsImlk\nIjozMzU2NDc0LCJhdmF0YXJfdXJsIjoiaHR0cHM6Ly9hdmF0YXJzLmdpdGh1\nYnVzZXJjb250Z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IvZ2lzdHN7L2dpc3Rf\naWR9Iiwic3RhcnJlZF91cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3Vz\nZXJzL3NreXdpbmRlci9zdGFycmVkey9vd25lcn17L3JlcG99Iiwic3Vic2Ny\naXB0aW9uc191cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3VzZXJzL3Nr\neXdpbmRlci9zdWJzY3JpcHRpb25zIiwib3JnYW5pemF0aW9uc191cmwiOiJo\ndHRwczovL2FwaS5naXRodWIuY29tL3VzZXJzL3NreXdpbmRlci9vcmdzIiwi\ncmVwb3NfdXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS91c2Vycy9za3l3\naW5kZXIvcmVwb3MiLCJldmVudHNfdXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHVi\nLmNvbS91c2Vycy9za3l3aW5kZXIvZXZlbnRzey9wcml2YWN5fSIsInJlY2Vp\ndmVkX2V2ZW50c191cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3VzZXJz\nL3NreXdpbmRlci9yZWNlaXZlZF9ldmVudHMiLCJ0eXBlIjoiVXNlciIsInNp\ndGVfYWRtaW4iOmZhbHNlfSwiZXZlbnQiOiJjbG9zZWQiLCJjb21taXRfaWQi\nOiJkZWNmZTg0MGQxYTFiODZlMGMyODcwMGRlNTM2MmQzMzY1YTI5NTU1Iiwi\nY29tbWl0X3VybCI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3Mvc2t5\nd2luZGVyL2NoYW5nZWxvZ190ZXN0L2NvbW1pdHMvZGVjZmU4NDBkMWExYjg2\nZTBjMjg3MDBkZTUzNjJkMzM2NWEyOTU1NSIsImNyZWF0ZWRfYXQiOiIyMDE1\nLTA3LTE2VDEyOjIxOjQyWiJ9XQ==\n"},"http_version":null},"recorded_at":"Fri, 20 May 2016 06:39:22 GMT"}],"recorded_with":"VCR 3.0.1"}

View File

@ -0,0 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/skywinder/changelog_test/tags","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1"],"Accept-Charset":["utf-8"],"User-Agent":["Github API Ruby Gem 0.13.1"]}},"response":{"status":{"code":200,"message":null},"headers":{"server":["GitHub.com"],"date":["Fri, 20 May 2016 06:39:17 GMT"],"content-type":["application/json; charset=utf-8"],"transfer-encoding":["chunked"],"status":["200 OK"],"x-ratelimit-limit":["60"],"x-ratelimit-remaining":["54"],"x-ratelimit-reset":["1463728508"],"cache-control":["public, max-age=60, s-maxage=60"],"vary":["Accept, Accept-Encoding"],"etag":["W/\"012a78339961d33825609e388f651a3e\""],"last-modified":["Thu, 05 Mar 2015 10:27:55 GMT"],"x-github-media-type":["github.v3; format=json"],"access-control-expose-headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"access-control-allow-origin":["*"],"content-security-policy":["default-src 'none'"],"strict-transport-security":["max-age=31536000; includeSubdomains; preload"],"x-content-type-options":["nosniff"],"x-frame-options":["deny"],"x-xss-protection":["1; mode=block"],"x-served-by":["065b43cd9674091fec48a221b420fbb3"],"x-github-request-id":["6C2F0F69:1C0C5:BA21B36:573EB114"]},"body":{"encoding":"ASCII-8BIT","base64_string":"W3sibmFtZSI6InYwLjAuMyIsInppcGJhbGxfdXJsIjoiaHR0cHM6Ly9hcGku\nZ2l0aHViLmNvbS9yZXBvcy9za3l3aW5kZXIvY2hhbmdlbG9nX3Rlc3Qvemlw\nYmFsbC92MC4wLjMiLCJ0YXJiYWxsX3VybCI6Imh0dHBzOi8vYXBpLmdpdGh1\nYi5jb20vcmVwb3Mvc2t5d2luZGVyL2NoYW5nZWxvZ190ZXN0L3RhcmJhbGwv\ndjAuMC4zIiwiY29tbWl0Ijp7InNoYSI6ImEwY2JhMmIxYT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hcGkuZ2l0aHVi\nLmNvbS9yZXBvcy9za3l3aW5kZXIvY2hhbmdlbG9nX3Rlc3QvY29tbWl0cy80\nYzJkNmQxZWQ1OGJkYjI0Yjg3MGRjYjVkOWYyY2VlZDAyODNkNjlkIn19LHsi\nbmFtZSI6IjAuMC40IiwiemlwYmFsbF91cmwiOiJodHRwczovL2FwaS5naXRo\ndWIuY29tL3JlcG9zL3NreXdpbmRlci9jaGFuZ2Vsb2dfdGVzdC96aXBiYWxs\nLzAuMC40IiwidGFyYmFsbF91cmwiOiJodHRwczovL2FwaS5naXRodWIuY29t\nL3JlcG9zL3NreXdpbmRlci9jaGFuZ2Vsb2dfdGVzdC90YXJiYWxsLzAuMC40\nIiwiY29tbWl0Ijp7InNoYSI6ImVjZTBjM2FiNzE0MmIyMTA2NGI4ODUwNjFj\nNTVlZGUwMGVmNmNlOTQiLCJ1cmwiOiJodHRwczovL2FwaS5naXRodWIuY29t\nL3JlcG9zL3NreXdpbmRlci9jaGFuZ2Vsb2dfdGVzdC9jb21taXRzL2VjZTBj\nM2FiNzE0MmIyMTA2NGI4ODUwNjFjNTVlZGUwMGVmNmNlOTQifX1d\n"},"http_version":null},"recorded_at":"Fri, 20 May 2016 06:39:21 GMT"}],"recorded_with":"VCR 3.0.1"}

View File

@ -0,0 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/skywinder/changelog_test/tags?access_token=0000000000000000","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1"],"Accept-Charset":["utf-8"],"User-Agent":["Github API Ruby Gem 0.13.1"],"Authorization":["token 0000000000000000"]}},"response":{"status":{"code":401,"message":null},"headers":{"server":["GitHub.com"],"date":["Fri, 20 May 2016 06:39:16 GMT"],"content-type":["application/json; charset=utf-8"],"content-length":["83"],"status":["401 Unauthorized"],"x-github-media-type":["github.v3; format=json"],"x-ratelimit-limit":["60"],"x-ratelimit-remaining":["55"],"x-ratelimit-reset":["1463728508"],"access-control-expose-headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"access-control-allow-origin":["*"],"content-security-policy":["default-src 'none'"],"strict-transport-security":["max-age=31536000; includeSubdomains; preload"],"x-content-type-options":["nosniff"],"x-frame-options":["deny"],"x-xss-protection":["1; mode=block"],"x-github-request-id":["6C2F0F69:1C0C5:BA21AA0:573EB114"]},"body":{"encoding":"UTF-8","base64_string":"eyJtZXNzYWdlIjoiQmFkIGNyZWRlbnRpYWxzIiwiZG9jdW1lbnRhdGlvbl91\ncmwiOiJodHRwczovL2RldmVsb3Blci5naXRodWIuY29tL3YzIn0=\n"},"http_version":null},"recorded_at":"Fri, 20 May 2016 06:39:20 GMT"}],"recorded_with":"VCR 3.0.1"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/skywinder/changelog_test/issues/14/events?per_page=100","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["application/vnd.github.v3+json"],"User-Agent":["Octokit Ruby Gem 4.3.0"],"Content-Type":["application/json"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Fri, 20 May 2016 06:13:06 GMT"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Status":["200 OK"],"X-Ratelimit-Limit":["60"],"X-Ratelimit-Remaining":["37"],"X-Ratelimit-Reset":["1463724861"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Vary":["Accept","Accept-Encoding"],"Etag":["W/\"4d408c4e8053c706d7255563141ccb80\""],"X-Github-Media-Type":["github.v3; format=json"],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["2d7a5e35115884240089368322196939"],"X-Github-Request-Id":["6C2F0F69:7F8B:2084B01:573EAAF2"]},"body":{"encoding":"ASCII-8BIT","base64_string":"W3siaWQiOjM1NzQ2MjE4OSwidXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHViLmNv\nbS9yZXBvcy9za3l3aW5kZXIvY2hhbmdlbG9nX3Rlc3QvaXNzdWVzL2V2ZW50\ncy8zNTc0NjIxODkiLCJhY3RvciI6eyJsb2dpbiI6InNreXdpbmRlciIsImlk\nIjozMzU2NDc0LCJhdmF0YXJfdXJsIjoiaHR0cHM6Ly9hdmF0YXJzLmdpdGh1\nYnVzZXJjb250ZW50LmNvbS91LzMzNTY0NzQ/dj0zIiwiZ3JhdmF0YXJfaWQi\nOiIiLCJ1cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3VzZXJzL3NreXdp\nbmRlciIsImh0bWxfdXJsIjoiaHR0cHM6Ly9naXRodWIuY29tL3NreXdpbmRl\nciIsImZvbGxvd2Vyc191cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3Vz\nZXJzL3NreXdpbmRlci9mb2xsb3dlcnMiLCJmb2xsb3dpbmdfdXJsIjoiaHR0\ncHM6Ly9hcGkuZ2l0aHViLmNvbS91c2Vycy9za3l3aW5kZXIvZm9sbG93aW5n\ney9vdGhlcl91c2VyfSIsImdpc3RzX3VybCI6Imh0dHBzOi8vYXBpLmdpdGh1\nYi5jb20vdXNlcnMvc2t5d2luZGVyL2dpc3Rzey9naXN0X2lkfSIsInN0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XZlbnRzey9wcml2YWN5fSIsInJlY2Vp\ndmVkX2V2ZW50c191cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3VzZXJz\nL3NreXdpbmRlci9yZWNlaXZlZF9ldmVudHMiLCJ0eXBlIjoiVXNlciIsInNp\ndGVfYWRtaW4iOmZhbHNlfSwiZXZlbnQiOiJjbG9zZWQiLCJjb21taXRfaWQi\nOiJkZWNmZTg0MGQxYTFiODZlMGMyODcwMGRlNTM2MmQzMzY1YTI5NTU1Iiwi\nY29tbWl0X3VybCI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3Mvc2t5\nd2luZGVyL2NoYW5nZWxvZ190ZXN0L2NvbW1pdHMvZGVjZmU4NDBkMWExYjg2\nZTBjMjg3MDBkZTUzNjJkMzM2NWEyOTU1NSIsImNyZWF0ZWRfYXQiOiIyMDE1\nLTA3LTE2VDEyOjIxOjQyWiJ9XQ==\n"},"http_version":null},"recorded_at":"Fri, 20 May 2016 06:13:10 GMT"}],"recorded_with":"VCR 3.0.1"}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/skywinder/changelog_test/tags?per_page=100","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["application/vnd.github.v3+json"],"User-Agent":["Octokit Ruby Gem 4.3.0"],"Content-Type":["application/json"],"Authorization":["token 0000000000000000"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":401,"message":"Unauthorized"},"headers":{"Server":["GitHub.com"],"Date":["Fri, 20 May 2016 05:47:03 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["83"],"Status":["401 Unauthorized"],"X-Github-Media-Type":["github.v3; format=json"],"X-Ratelimit-Limit":["60"],"X-Ratelimit-Remaining":["42"],"X-Ratelimit-Reset":["1463724861"],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Github-Request-Id":["6C2F0F69:1271A:B8980B7:573EA4D6"]},"body":{"encoding":"UTF-8","base64_string":"eyJtZXNzYWdlIjoiQmFkIGNyZWRlbnRpYWxzIiwiZG9jdW1lbnRhdGlvbl91\ncmwiOiJodHRwczovL2RldmVsb3Blci5naXRodWIuY29tL3YzIn0=\n"},"http_version":null},"recorded_at":"Fri, 20 May 2016 05:47:07 GMT"}],"recorded_with":"VCR 3.0.1"}