Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.
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
4 changes: 3 additions & 1 deletion assets/lib/in.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def remote_ref
params['fetch_merge'] ? 'merge' : 'head'
end

$stderr.puts 'DEPRECATION: Please note that you should update to using `version: every` on your `get` for this resource.'
if input['source']['every']
$stderr.puts 'DEPRECATION: Please note that you should update to using `version: every` on your `get` for this resource.'
end

pr = Octokit.pull_request(input['source']['repo'], input['version']['pr'])
id = pr['number']
Expand Down
9 changes: 8 additions & 1 deletion spec/integration/in_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,15 @@ def commit(msg)
end

context 'when `every` is not defined' do
it 'shows a deprecation warning' do
it 'skips the deprecation warning' do
_, error = get(version: { ref: @ref, pr: '1' }, source: { uri: git_uri, repo: 'jtarchie/test' })
expect(error).not_to include 'DEPRECATION: Please note that you should update to using `version: every` on your `get` for this resource.'
end
end

context 'when `every` is defined' do
it 'shows a deprecation warning' do
_, error = get(version: { ref: @ref, pr: '1' }, source: { uri: git_uri, repo: 'jtarchie/test', every: true })
expect(error).to include 'DEPRECATION: Please note that you should update to using `version: every` on your `get` for this resource.'
end
end
Expand Down