-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enable to inject settings_gist_id instead of the settings #63
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
format: | ||
**!!invalid!!** | ||
line: '* [%{title}](%{url}) by %{user} %{status}' | ||
dictionary: | ||
status: | ||
merged: '**merged!**' | ||
closed: '**closed!**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
format: | ||
subject: '### %{subject}' | ||
line: '* [%{title}](%{url}) by %{user} %{status}' | ||
dictionary: | ||
status: | ||
merged: '**merged!**' | ||
closed: '**closed!**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,17 @@ | |
|
||
require 'github/nippou' | ||
|
||
Dir[File.expand_path('support/**/*.rb', __dir__)].each do |f| | ||
require f | ||
end | ||
|
||
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration | ||
RSpec.configure do |config| | ||
config.include LoadFixtureHelper | ||
|
||
config.before(:all) { silence_stdout } | ||
config.after(:all){ enable_stdout } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. いわゆる printf デバッグできないのでリバートしました...。→ 7a75ef5 |
||
|
||
# rspec-expectations config goes here. You can use an alternate | ||
# assertion/expectation library such as wrong or the stdlib/minitest | ||
# assertions if you prefer. | ||
|
@@ -46,6 +55,12 @@ | |
# triggering implicit auto-inclusion in groups with matching metadata. | ||
config.shared_context_metadata_behavior = :apply_to_host_groups | ||
|
||
# Run specs in random order to surface order dependencies. If you find an | ||
# order dependency and want to debug it, you can fix the order by providing | ||
# the seed, which is printed after each run. | ||
# --seed 1234 | ||
config.order = :random | ||
|
||
# The settings below are suggested to provide a good initial experience | ||
# with RSpec, but feel free to customize to your heart's content. | ||
=begin | ||
|
@@ -87,16 +102,22 @@ | |
# particularly slow. | ||
config.profile_examples = 10 | ||
|
||
# Run specs in random order to surface order dependencies. If you find an | ||
# order dependency and want to debug it, you can fix the order by providing | ||
# the seed, which is printed after each run. | ||
# --seed 1234 | ||
config.order = :random | ||
|
||
# Seed global randomization in this process using the `--seed` CLI option. | ||
# Setting this allows you to use `--seed` to deterministically reproduce | ||
# test failures related to randomization by passing the same `--seed` value | ||
# as the one that triggered the failure. | ||
Kernel.srand config.seed | ||
=end | ||
end | ||
|
||
# Redirects stdout to /dev/null. | ||
def silence_stdout | ||
@orig_stdout = $stdout | ||
$stdout = File.new('/dev/null', 'w') | ||
end | ||
|
||
# Replace stdout so anything else is output correctly. | ||
def enable_stdout | ||
$stdout = @orig_stdout | ||
@orig_stdout = nil | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module LoadFixtureHelper | ||
def load_fixture(name) | ||
File.read(File.expand_path("../fixtures/#{name}", __dir__)) | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebMock gem だとどうしてもうまくいかなかったので、この辺で妥協しておく。
WebMock.stub_request に JSON(つまり String)を渡すと、
Octokit::Client#gist
が Hash ライクなオブジェクト(Sawyer::Resource
)ではなく、JSON を返してしまう。https://stackoverflow.com/questions/37621783/how-to-correctly-replicate-response-body-of-an-octokit-requests-response-for-we
ならばと Hash を渡すと上記のエラーに遭遇。