Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/docker-s6-…
Browse files Browse the repository at this point in the history
…overlay
  • Loading branch information
icyleaf committed Jul 13, 2020
2 parents 40c3594 + edbed11 commit c495f04
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 134 deletions.
34 changes: 17 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ GEM
ruby_android (~> 0.7.7)
rubyzip (>= 1.2, < 3.0)
uuidtools (~> 2.1.5)
ast (2.4.0)
ast (2.4.1)
awesome_print (1.8.0)
bcrypt (3.1.13)
better_errors (2.7.1)
Expand All @@ -99,7 +99,7 @@ GEM
case_transform (0.2)
activesupport
chunky_png (1.3.11)
coderay (1.1.2)
coderay (1.1.3)
concurrent-ruby (1.1.6)
connection_pool (2.2.2)
crass (1.0.6)
Expand All @@ -117,10 +117,10 @@ GEM
devise (>= 4.7.1)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.5)
dotenv-rails (2.7.5)
dotenv (= 2.7.5)
railties (>= 3.2, < 6.1)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
erubi (1.9.0)
et-orbi (1.2.4)
tzinfo
Expand Down Expand Up @@ -246,7 +246,7 @@ GEM
nenv (0.3.0)
net-ldap (0.16.2)
nio4r (2.5.2)
nokogiri (1.10.9)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
notiffany (0.1.3)
nenv (~> 0.1)
Expand All @@ -269,9 +269,9 @@ GEM
omniauth (~> 1.9)
openssl (2.2.0)
orm_adapter (0.5.0)
parallel (1.19.1)
parser (2.7.1.3)
ast (~> 2.4.0)
parallel (1.19.2)
parser (2.7.1.4)
ast (~> 2.4.1)
pg (1.2.1)
plist (3.5.0)
pngdefry (0.1.3)
Expand All @@ -283,7 +283,7 @@ GEM
pry (~> 0.13.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
pry-rescue (1.5.1)
pry-rescue (1.5.2)
interception (>= 0.5)
pry (>= 0.12.0)
public_suffix (4.0.3)
Expand Down Expand Up @@ -346,16 +346,16 @@ GEM
chunky_png (~> 1.0)
rqrcode_core (~> 0.1)
rqrcode_core (0.1.1)
rubocop (0.85.1)
rubocop (0.87.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
parser (>= 2.7.1.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.0.3)
rubocop-ast (>= 0.1.0, < 1.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.0.3)
rubocop-ast (0.1.0)
parser (>= 2.7.0.1)
rubocop-rails (2.6.0)
activesupport (>= 4.2.0)
Expand Down Expand Up @@ -429,7 +429,7 @@ GEM
vmstat (2.3.1)
warden (1.2.8)
rack (>= 2.0.6)
web-console (4.0.3)
web-console (4.0.4)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
Expand All @@ -442,7 +442,7 @@ GEM
websocket-driver (0.7.2)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.3.0)
zeitwerk (2.3.1)

PLATFORMS
ruby
Expand Down
13 changes: 7 additions & 6 deletions app/controllers/releases/install_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

class Releases::InstallController < ApplicationController
def show
@release = Release.version_by_channel(params[:channel_id], params[:id])
@release = Release.version_by_channel(params[:channel_id], params[:release_id])
render content_type: 'text/xml', layout: false
end

private

if @release
render content_type: 'text/xml', layout: false
else
render json: { error: '没有找到对应的应用或版本' }, status: :not_found
end
def render_not_found_entity_response
render json: { error: '没有找到对应的应用或版本' }, status: :not_found
end
end

6 changes: 3 additions & 3 deletions app/models/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class Release < ApplicationRecord
paginates_per 20
max_paginates_per 50

def self.version_by_channel(slug, id = nil)
channel = Channel.friendly.find(slug)
id.present? ? channel.releases.find(id) : channel.releases.latest
def self.version_by_channel(channel_slug, release_id)
channel = Channel.friendly.find(channel_slug)
channel.releases.find(release_id)
end

# 上传pp
Expand Down
4 changes: 2 additions & 2 deletions app/views/dashboards/_analytics.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ section.analytics
i.fas.fa-bug
.info-box-content
span.info-box-text
a href="#{debug_files_path}" data-no-turbolink="true" Debug Files 数量
a href="#{debug_files_path}" data-no-turbolink="true" 调试文件
span.info-box-number
= @analytics[:debug_files]

Expand All @@ -27,7 +27,7 @@ section.analytics
i.fas.fa-user
.info-box-content
span.info-box-text
a href="#{admin_users_path}" data-no-turbolink="true" 用户数量
a href="#{admin_users_path}" data-no-turbolink="true" 用户
span.info-box-number
= @analytics[:users]

Expand Down
2 changes: 0 additions & 2 deletions lib/backup/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class Database

class Error < StandardError; end

attr_reader :config, :db_file_name

def self.dump
new.dump
end
Expand Down
2 changes: 0 additions & 2 deletions lib/backup/uploads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def self.restore
new.restore
end

attr_reader :uploads_path, :backup_tarball

def dump
FileUtils.mkdir_p(backup_path)
FileUtils.rm_f(backup_tarball)
Expand Down

0 comments on commit c495f04

Please sign in to comment.