Skip to content
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
3 changes: 2 additions & 1 deletion lib/ember-cli/deploy/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def current_key
end

def deploy_key
redis_client.get(current_key).presence || deployment_not_activated!
key = redis_client.get(current_key).presence || deployment_not_activated!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [81/80]

"#{namespace}:#{key}"
end

def build_client
Expand Down
8 changes: 4 additions & 4 deletions spec/lib/ember-cli/deploy/redis_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@

context "when the current index is missing" do
it "raises a helpful exception" do
deploy_key = "#{namespace}:abc123"
deploy_key = "abc123"
stub_index_html(html: nil, deploy_key: deploy_key)
ember_cli_deploy = build_ember_cli_deploy

expect { ember_cli_deploy.html }.to raise_error(
/HTML for #{deploy_key} is missing/
/HTML for #{namespace}:#{deploy_key} is missing/
)
end
end
Expand Down Expand Up @@ -98,9 +98,9 @@ def stub_current_key(deploy_key)
redis.set(current_key, deploy_key)
end

def stub_index_html(deploy_key: "#{namespace}:123", html:)
def stub_index_html(deploy_key: "123", html:)
stub_current_key(deploy_key)
redis.set(deploy_key, html)
redis.set("#{namespace}:#{deploy_key}", html)
end

def redis
Expand Down