Skip to content

Commit

Permalink
[webapi] update vcr cassetes & rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
evanrolfe committed Jan 18, 2017
1 parent 185bb36 commit 43368e5
Show file tree
Hide file tree
Showing 43 changed files with 3,323 additions and 409 deletions.
2 changes: 1 addition & 1 deletion src/api/app/controllers/project/public_key_controller.rb
Expand Up @@ -14,4 +14,4 @@ def show
end
end
end
end
end
Expand Up @@ -6,8 +6,8 @@ def show

if project.public_key.present?
send_data(
project.public_key.content,
disposition: 'attachment',
project.public_key.content,
disposition: 'attachment',
filename: "#{project.title}_key.pub"
)
else
Expand All @@ -16,4 +16,4 @@ def show
end
end
end
end
end
Expand Up @@ -6,8 +6,8 @@ def show

if project.public_key.present? && project.public_key.ssl_certificate.present?
send_data(
project.public_key.ssl_certificate,
disposition: 'attachment',
project.public_key.ssl_certificate,
disposition: 'attachment',
filename: "#{project.title}_ssl.cert"
)
else
Expand All @@ -16,4 +16,4 @@ def show
end
end
end
end
end
8 changes: 3 additions & 5 deletions src/api/app/models/public_key.rb
Expand Up @@ -9,8 +9,8 @@ def self.find_by_project_name(project_name)

if parsed_response['pubkey'].present?
public_key_params = {
content: parsed_response['pubkey']['_content'],
algorithm: parsed_response['pubkey']['algo']
content: parsed_response['pubkey']['_content'],
algorithm: parsed_response['pubkey']['algo']
}

if parsed_response['sslcert'].present?
Expand All @@ -21,9 +21,7 @@ def self.find_by_project_name(project_name)
end
end

private

def self.backend_url(project_name)
"/source/#{project_name}/_keyinfo?withsslcert=1"
end
end
end
126 changes: 125 additions & 1 deletion src/api/spec/cassettes/Comments/can_be_answered.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

126 changes: 125 additions & 1 deletion src/api/spec/cassettes/Comments/can_be_created.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 43368e5

Please sign in to comment.