#345: updated gems, views, fixed specs
This commit is contained in:
parent
5e1983c88b
commit
94e285e64f
7
Gemfile
7
Gemfile
|
@ -1,6 +1,6 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '4.0.3'
|
gem 'rails', '4.0.4'
|
||||||
|
|
||||||
gem 'pg', '~> 0.17.1'
|
gem 'pg', '~> 0.17.1'
|
||||||
gem 'schema_plus', '~> 1.4.0'
|
gem 'schema_plus', '~> 1.4.0'
|
||||||
|
@ -13,7 +13,8 @@ gem 'omniauth-facebook'
|
||||||
gem 'omniauth-google-oauth2'
|
gem 'omniauth-google-oauth2'
|
||||||
gem 'omniauth-github'
|
gem 'omniauth-github'
|
||||||
# gem 'omniauth-openid', '~> 1.0.1'
|
# gem 'omniauth-openid', '~> 1.0.1'
|
||||||
gem 'cancan', '1.6.10'
|
# gem 'cancan', '1.6.10'
|
||||||
|
gem 'cancan', git: 'git://github.com/rosa-abf/cancan.git', tag: '1.6.10-abf'
|
||||||
|
|
||||||
gem 'ancestry', '~> 2.0.0'
|
gem 'ancestry', '~> 2.0.0'
|
||||||
gem 'paperclip', '~> 4.1.1'
|
gem 'paperclip', '~> 4.1.1'
|
||||||
|
@ -78,7 +79,7 @@ gem 'time_diff'
|
||||||
|
|
||||||
gem 'sass-rails', '~> 4.0.1'
|
gem 'sass-rails', '~> 4.0.1'
|
||||||
gem 'coffee-rails', '~> 4.0.1'
|
gem 'coffee-rails', '~> 4.0.1'
|
||||||
gem 'compass-rails', '~> 1.1.2'
|
gem 'compass-rails', '~> 1.1.6'
|
||||||
gem 'uglifier', '~> 2.4'
|
gem 'uglifier', '~> 2.4'
|
||||||
gem 'therubyracer', '~> 0.12.1', platforms: [:mri, :rbx]
|
gem 'therubyracer', '~> 0.12.1', platforms: [:mri, :rbx]
|
||||||
gem 'therubyrhino', '~> 1.73.1', platforms: :jruby
|
gem 'therubyrhino', '~> 1.73.1', platforms: :jruby
|
||||||
|
|
107
Gemfile.lock
107
Gemfile.lock
|
@ -8,6 +8,13 @@ GIT
|
||||||
resque (> 1.25)
|
resque (> 1.25)
|
||||||
resque-scheduler
|
resque-scheduler
|
||||||
|
|
||||||
|
GIT
|
||||||
|
remote: git://github.com/rosa-abf/cancan.git
|
||||||
|
revision: fe1089b70c08d3ed11bac4f8e69ecb3d1d9adc29
|
||||||
|
tag: 1.6.10-abf
|
||||||
|
specs:
|
||||||
|
cancan (1.6.10)
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/rosa-abf/grack.git
|
remote: git://github.com/rosa-abf/grack.git
|
||||||
revision: 020be3fef3fb308b9d214252522aa5945bf6584a
|
revision: 020be3fef3fb308b9d214252522aa5945bf6584a
|
||||||
|
@ -27,37 +34,37 @@ GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
RedCloth (4.2.9)
|
RedCloth (4.2.9)
|
||||||
actionmailer (4.0.3)
|
actionmailer (4.0.4)
|
||||||
actionpack (= 4.0.3)
|
actionpack (= 4.0.4)
|
||||||
mail (~> 2.5.4)
|
mail (~> 2.5.4)
|
||||||
actionpack (4.0.3)
|
actionpack (4.0.4)
|
||||||
activesupport (= 4.0.3)
|
activesupport (= 4.0.4)
|
||||||
builder (~> 3.1.0)
|
builder (~> 3.1.0)
|
||||||
erubis (~> 2.7.0)
|
erubis (~> 2.7.0)
|
||||||
rack (~> 1.5.2)
|
rack (~> 1.5.2)
|
||||||
rack-test (~> 0.6.2)
|
rack-test (~> 0.6.2)
|
||||||
activemodel (4.0.3)
|
activemodel (4.0.4)
|
||||||
activesupport (= 4.0.3)
|
activesupport (= 4.0.4)
|
||||||
builder (~> 3.1.0)
|
builder (~> 3.1.0)
|
||||||
activerecord (4.0.3)
|
activerecord (4.0.4)
|
||||||
activemodel (= 4.0.3)
|
activemodel (= 4.0.4)
|
||||||
activerecord-deprecated_finders (~> 1.0.2)
|
activerecord-deprecated_finders (~> 1.0.2)
|
||||||
activesupport (= 4.0.3)
|
activesupport (= 4.0.4)
|
||||||
arel (~> 4.0.0)
|
arel (~> 4.0.0)
|
||||||
activerecord-deprecated_finders (1.0.3)
|
activerecord-deprecated_finders (1.0.3)
|
||||||
activesupport (4.0.3)
|
activesupport (4.0.4)
|
||||||
i18n (~> 0.6, >= 0.6.4)
|
i18n (~> 0.6, >= 0.6.9)
|
||||||
minitest (~> 4.2)
|
minitest (~> 4.2)
|
||||||
multi_json (~> 1.3)
|
multi_json (~> 1.3)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
tzinfo (~> 0.3.37)
|
tzinfo (~> 0.3.37)
|
||||||
airbrake (3.1.15)
|
airbrake (3.1.16)
|
||||||
builder
|
builder
|
||||||
multi_json
|
multi_json
|
||||||
ancestry (2.0.0)
|
ancestry (2.0.0)
|
||||||
activerecord (>= 3.0.0)
|
activerecord (>= 3.0.0)
|
||||||
angular-i18n (0.1.2)
|
angular-i18n (0.1.2)
|
||||||
angularjs-rails (1.2.7)
|
angularjs-rails (1.2.14)
|
||||||
arel (4.0.2)
|
arel (4.0.2)
|
||||||
atomic (1.1.15)
|
atomic (1.1.15)
|
||||||
attr_encrypted (1.3.2)
|
attr_encrypted (1.3.2)
|
||||||
|
@ -77,7 +84,6 @@ GEM
|
||||||
state_machine (~> 1.1)
|
state_machine (~> 1.1)
|
||||||
builder (3.1.4)
|
builder (3.1.4)
|
||||||
callsite (0.0.11)
|
callsite (0.0.11)
|
||||||
cancan (1.6.10)
|
|
||||||
cape (1.8.0)
|
cape (1.8.0)
|
||||||
capistrano (2.15.5)
|
capistrano (2.15.5)
|
||||||
highline
|
highline
|
||||||
|
@ -101,11 +107,11 @@ GEM
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.7.0)
|
coffee-script-source (1.7.0)
|
||||||
compass (0.12.2)
|
compass (0.12.3)
|
||||||
chunky_png (~> 1.2)
|
chunky_png (~> 1.2)
|
||||||
fssm (>= 0.2.7)
|
fssm (>= 0.2.7)
|
||||||
sass (~> 3.1)
|
sass (= 3.2.14)
|
||||||
compass-rails (1.1.3)
|
compass-rails (1.1.6)
|
||||||
compass (>= 0.12.2)
|
compass (>= 0.12.2)
|
||||||
creole (0.5.0)
|
creole (0.5.0)
|
||||||
daemons (1.1.9)
|
daemons (1.1.9)
|
||||||
|
@ -163,19 +169,20 @@ GEM
|
||||||
haml (>= 3.1, < 5.0)
|
haml (>= 3.1, < 5.0)
|
||||||
railties (>= 4.0.1)
|
railties (>= 4.0.1)
|
||||||
hashie (2.0.5)
|
hashie (2.0.5)
|
||||||
highline (1.6.20)
|
highline (1.6.21)
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
hirb (0.7.1)
|
hirb (0.7.1)
|
||||||
i18n (0.6.9)
|
i18n (0.6.9)
|
||||||
jbuilder (2.0.3)
|
jbuilder (2.0.4)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
multi_json (>= 1.2.0)
|
multi_json (>= 1.2.0)
|
||||||
jquery-migrate-rails (1.2.1)
|
jquery-migrate-rails (1.2.1)
|
||||||
jquery-rails (2.3.0)
|
jquery-rails (2.3.0)
|
||||||
railties (>= 3.0, < 5.0)
|
railties (>= 3.0, < 5.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
js-routes (0.9.6)
|
js-routes (0.9.7)
|
||||||
rails (>= 3.2)
|
railties (>= 3.2)
|
||||||
|
sprockets-rails
|
||||||
json (1.8.1)
|
json (1.8.1)
|
||||||
jwt (0.1.11)
|
jwt (0.1.11)
|
||||||
multi_json (>= 1.5)
|
multi_json (>= 1.5)
|
||||||
|
@ -211,10 +218,10 @@ GEM
|
||||||
mini_portile (0.5.2)
|
mini_portile (0.5.2)
|
||||||
minitest (4.7.5)
|
minitest (4.7.5)
|
||||||
mock_redis (0.11.0)
|
mock_redis (0.11.0)
|
||||||
momentjs-rails (2.5.0)
|
momentjs-rails (2.5.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
mono_logger (1.1.0)
|
mono_logger (1.1.0)
|
||||||
multi_json (1.8.4)
|
multi_json (1.9.0)
|
||||||
multi_xml (0.5.5)
|
multi_xml (0.5.5)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
nest (1.1.2)
|
nest (1.1.2)
|
||||||
|
@ -226,7 +233,7 @@ GEM
|
||||||
net-ssh (2.8.0)
|
net-ssh (2.8.0)
|
||||||
net-ssh-gateway (1.2.0)
|
net-ssh-gateway (1.2.0)
|
||||||
net-ssh (>= 2.6.5)
|
net-ssh (>= 2.6.5)
|
||||||
newrelic_rpm (3.7.2.195)
|
newrelic_rpm (3.7.3.204)
|
||||||
ng-rails-csrf (0.1.0)
|
ng-rails-csrf (0.1.0)
|
||||||
nokogiri (1.6.1)
|
nokogiri (1.6.1)
|
||||||
mini_portile (~> 0.5.0)
|
mini_portile (~> 0.5.0)
|
||||||
|
@ -267,9 +274,9 @@ GEM
|
||||||
pg (0.17.1)
|
pg (0.17.1)
|
||||||
polyglot (0.3.4)
|
polyglot (0.3.4)
|
||||||
posix-spawn (0.3.8)
|
posix-spawn (0.3.8)
|
||||||
protected_attributes (1.0.5)
|
protected_attributes (1.0.7)
|
||||||
activemodel (>= 4.0.1, < 5.0)
|
activemodel (>= 4.0.1, < 5.0)
|
||||||
puma (2.7.1)
|
puma (2.8.1)
|
||||||
rack (>= 1.1, < 2.0)
|
rack (>= 1.1, < 2.0)
|
||||||
pygments.rb (0.5.4)
|
pygments.rb (0.5.4)
|
||||||
posix-spawn (~> 0.3.6)
|
posix-spawn (~> 0.3.6)
|
||||||
|
@ -283,21 +290,21 @@ GEM
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rack-throttle (0.3.0)
|
rack-throttle (0.3.0)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rails (4.0.3)
|
rails (4.0.4)
|
||||||
actionmailer (= 4.0.3)
|
actionmailer (= 4.0.4)
|
||||||
actionpack (= 4.0.3)
|
actionpack (= 4.0.4)
|
||||||
activerecord (= 4.0.3)
|
activerecord (= 4.0.4)
|
||||||
activesupport (= 4.0.3)
|
activesupport (= 4.0.4)
|
||||||
bundler (>= 1.3.0, < 2.0)
|
bundler (>= 1.3.0, < 2.0)
|
||||||
railties (= 4.0.3)
|
railties (= 4.0.4)
|
||||||
sprockets-rails (~> 2.0.0)
|
sprockets-rails (~> 2.0.0)
|
||||||
rails3-generators (1.0.0)
|
rails3-generators (1.0.0)
|
||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
rails3-jquery-autocomplete (1.0.12)
|
rails3-jquery-autocomplete (1.0.12)
|
||||||
rails (>= 3.0)
|
rails (>= 3.0)
|
||||||
railties (4.0.3)
|
railties (4.0.4)
|
||||||
actionpack (= 4.0.3)
|
actionpack (= 4.0.4)
|
||||||
activesupport (= 4.0.3)
|
activesupport (= 4.0.4)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rake (10.1.1)
|
rake (10.1.1)
|
||||||
|
@ -323,13 +330,14 @@ GEM
|
||||||
redis-store (1.1.4)
|
redis-store (1.1.4)
|
||||||
redis (>= 2.2)
|
redis (>= 2.2)
|
||||||
ref (1.0.5)
|
ref (1.0.5)
|
||||||
resque (1.25.1)
|
resque (1.25.2)
|
||||||
mono_logger (~> 1.0)
|
mono_logger (~> 1.0)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
redis-namespace (~> 1.2)
|
redis-namespace (~> 1.3)
|
||||||
sinatra (>= 0.9.2)
|
sinatra (>= 0.9.2)
|
||||||
vegas (~> 0.1.2)
|
vegas (~> 0.1.2)
|
||||||
resque-scheduler (2.5.4)
|
resque-scheduler (2.5.5)
|
||||||
|
mono_logger (~> 1.0)
|
||||||
redis (~> 3.0.4)
|
redis (~> 3.0.4)
|
||||||
resque (~> 1.25.1)
|
resque (~> 1.25.1)
|
||||||
rufus-scheduler (~> 2.0.24)
|
rufus-scheduler (~> 2.0.24)
|
||||||
|
@ -340,9 +348,9 @@ GEM
|
||||||
rest-client (1.6.7)
|
rest-client (1.6.7)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
rinku (1.7.3)
|
rinku (1.7.3)
|
||||||
rouge (1.3.2)
|
rouge (1.3.3)
|
||||||
rr (1.1.2)
|
rr (1.1.2)
|
||||||
rspec-core (2.14.7)
|
rspec-core (2.14.8)
|
||||||
rspec-expectations (2.14.5)
|
rspec-expectations (2.14.5)
|
||||||
diff-lcs (>= 1.1.3, < 2.0)
|
diff-lcs (>= 1.1.3, < 2.0)
|
||||||
rspec-mocks (2.14.6)
|
rspec-mocks (2.14.6)
|
||||||
|
@ -366,11 +374,12 @@ GEM
|
||||||
sanitize (2.0.6)
|
sanitize (2.0.6)
|
||||||
nokogiri (>= 1.4.4)
|
nokogiri (>= 1.4.4)
|
||||||
sass (3.2.14)
|
sass (3.2.14)
|
||||||
sass-rails (4.0.1)
|
sass-rails (4.0.2)
|
||||||
railties (>= 4.0.0, < 5.0)
|
railties (>= 4.0.0, < 5.0)
|
||||||
sass (>= 3.1.10)
|
sass (~> 3.2.0)
|
||||||
|
sprockets (~> 2.8, <= 2.11.0)
|
||||||
sprockets-rails (~> 2.0.0)
|
sprockets-rails (~> 2.0.0)
|
||||||
schema_plus (1.4.0)
|
schema_plus (1.4.1)
|
||||||
rails (>= 3.2)
|
rails (>= 3.2)
|
||||||
valuable
|
valuable
|
||||||
scrivener (0.0.3)
|
scrivener (0.0.3)
|
||||||
|
@ -424,17 +433,17 @@ GEM
|
||||||
treetop (1.4.15)
|
treetop (1.4.15)
|
||||||
polyglot
|
polyglot
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
tzinfo (0.3.38)
|
tzinfo (0.3.39)
|
||||||
uglifier (2.4.0)
|
uglifier (2.4.0)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
json (>= 1.8.0)
|
json (>= 1.8.0)
|
||||||
underscore-rails (1.5.2)
|
underscore-rails (1.6.0)
|
||||||
valuable (0.9.8)
|
valuable (0.9.8)
|
||||||
vegas (0.1.11)
|
vegas (0.1.11)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
warden (1.2.3)
|
warden (1.2.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
whenever (0.9.0)
|
whenever (0.9.2)
|
||||||
activesupport (>= 2.3.4)
|
activesupport (>= 2.3.4)
|
||||||
chronic (>= 0.6.3)
|
chronic (>= 0.6.3)
|
||||||
wikicloth (0.8.1)
|
wikicloth (0.8.1)
|
||||||
|
@ -458,13 +467,13 @@ DEPENDENCIES
|
||||||
better_errors
|
better_errors
|
||||||
binding_of_caller
|
binding_of_caller
|
||||||
bluepill (~> 0.0.60)
|
bluepill (~> 0.0.60)
|
||||||
cancan (= 1.6.10)
|
cancan!
|
||||||
cape
|
cape
|
||||||
capistrano
|
capistrano
|
||||||
capistrano_colors
|
capistrano_colors
|
||||||
charlock_holmes (~> 0.6.9)
|
charlock_holmes (~> 0.6.9)
|
||||||
coffee-rails (~> 4.0.1)
|
coffee-rails (~> 4.0.1)
|
||||||
compass-rails (~> 1.1.2)
|
compass-rails (~> 1.1.6)
|
||||||
creole
|
creole
|
||||||
devise (~> 3.2.3)
|
devise (~> 3.2.3)
|
||||||
diff-display (~> 0.0.1)
|
diff-display (~> 0.0.1)
|
||||||
|
@ -504,7 +513,7 @@ DEPENDENCIES
|
||||||
protected_attributes
|
protected_attributes
|
||||||
puma
|
puma
|
||||||
rack-throttle (~> 0.3.0)
|
rack-throttle (~> 0.3.0)
|
||||||
rails (= 4.0.3)
|
rails (= 4.0.4)
|
||||||
rails3-generators
|
rails3-generators
|
||||||
rails3-jquery-autocomplete (~> 1.0)
|
rails3-jquery-autocomplete (~> 1.0)
|
||||||
rake
|
rake
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Api::V1::AdvisoriesController < Api::V1::BaseController
|
||||||
authorize_resource :build_list, only: [:create, :update]
|
authorize_resource :build_list, only: [:create, :update]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@advisories = @advisories.scoped(include: [:platforms, :projects]).
|
@advisories = @advisories.includes(:platforms, :projects).
|
||||||
paginate(paginate_params)
|
paginate(paginate_params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Api::V1::BuildListsController < Api::V1::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
filter = BuildList::Filter.new(@project, current_user, current_ability, params[:filter] || {})
|
filter = BuildList::Filter.new(@project, current_user, current_ability, params[:filter] || {})
|
||||||
@build_lists = filter.find.scoped(include: [:save_to_platform, :project, :user, :arch])
|
@build_lists = filter.find.includes(:save_to_platform, :project, :user, :arch)
|
||||||
@build_lists = @build_lists.recent.paginate(paginate_params)
|
@build_lists = @build_lists.recent.paginate(paginate_params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ class BuildList < ActiveRecord::Base
|
||||||
|
|
||||||
scope :recent, -> { order(updated_at: :desc) }
|
scope :recent, -> { order(updated_at: :desc) }
|
||||||
scope :for_extra_build_lists, ->(ids, current_ability, save_to_platform) {
|
scope :for_extra_build_lists, ->(ids, current_ability, save_to_platform) {
|
||||||
s = scoped
|
s = all
|
||||||
s = s.where(id: ids).published_container.accessible_by(current_ability, :read)
|
s = s.where(id: ids).published_container.accessible_by(current_ability, :read)
|
||||||
s = s.where(save_to_platform_id: save_to_platform.id) if save_to_platform && save_to_platform.main?
|
s = s.where(save_to_platform_id: save_to_platform.id) if save_to_platform && save_to_platform.main?
|
||||||
s
|
s
|
||||||
|
@ -116,13 +116,13 @@ class BuildList < ActiveRecord::Base
|
||||||
scope :scoped_to_project_version, ->(pr_version) { where(project_version: pr_version) if pr_version.present? }
|
scope :scoped_to_project_version, ->(pr_version) { where(project_version: pr_version) if pr_version.present? }
|
||||||
scope :scoped_to_is_circle, ->(is_circle) { where(is_circle: is_circle) }
|
scope :scoped_to_is_circle, ->(is_circle) { where(is_circle: is_circle) }
|
||||||
scope :for_creation_date_period, ->(start_date, end_date) {
|
scope :for_creation_date_period, ->(start_date, end_date) {
|
||||||
s = scoped
|
s = all
|
||||||
s = s.where(["#{table_name}.created_at >= ?", start_date]) if start_date
|
s = s.where(["#{table_name}.created_at >= ?", start_date]) if start_date
|
||||||
s = s.where(["#{table_name}.created_at <= ?", end_date]) if end_date
|
s = s.where(["#{table_name}.created_at <= ?", end_date]) if end_date
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
scope :for_notified_date_period, ->(start_date, end_date) {
|
scope :for_notified_date_period, ->(start_date, end_date) {
|
||||||
s = scoped
|
s = all
|
||||||
s = s.where("#{table_name}.updated_at >= ?", start_date) if start_date.present?
|
s = s.where("#{table_name}.updated_at >= ?", start_date) if start_date.present?
|
||||||
s = s.where("#{table_name}.updated_at <= ?", end_date) if end_date.present?
|
s = s.where("#{table_name}.updated_at <= ?", end_date) if end_date.present?
|
||||||
s
|
s
|
||||||
|
|
|
@ -20,11 +20,9 @@ class BuildList::Item < ActiveRecord::Base
|
||||||
scope :recent, order("#{table_name}.level ASC, #{table_name}.name ASC")
|
scope :recent, order("#{table_name}.level ASC, #{table_name}.name ASC")
|
||||||
|
|
||||||
def self.group_by_level
|
def self.group_by_level
|
||||||
items = scoped({}).recent
|
|
||||||
|
|
||||||
groups = []
|
groups = []
|
||||||
current_level = -1
|
current_level = -1
|
||||||
items.each do |item|
|
all.recent.find_each do |item|
|
||||||
groups << [] if current_level < item.level
|
groups << [] if current_level < item.level
|
||||||
groups.last << item
|
groups.last << item
|
||||||
current_level = item.level
|
current_level = item.level
|
||||||
|
|
|
@ -18,7 +18,7 @@ class Group < Avatar
|
||||||
validates :uname, presence: true, uniqueness: {case_sensitive: false}, format: {with: /\A[a-z0-9_]+\z/}, reserved_name: true
|
validates :uname, presence: true, uniqueness: {case_sensitive: false}, format: {with: /\A[a-z0-9_]+\z/}, reserved_name: true
|
||||||
validate { errors.add(:uname, :taken) if User.by_uname(uname).present? }
|
validate { errors.add(:uname, :taken) if User.by_uname(uname).present? }
|
||||||
|
|
||||||
scope :opened, -> { scoped }
|
scope :opened, -> { all }
|
||||||
scope :by_owner, ->(owner) { where(owner_id: owner.id) }
|
scope :by_owner, ->(owner) { where(owner_id: owner.id) }
|
||||||
scope :by_admin, ->(admin) {
|
scope :by_admin, ->(admin) {
|
||||||
joins(:actors).where('relations.role' => 'admin', 'relations.actor_id' => admin.id, 'relations.actor_type' => 'User')
|
joins(:actors).where('relations.role' => 'admin', 'relations.actor_id' => admin.id, 'relations.actor_type' => 'User')
|
||||||
|
|
|
@ -62,7 +62,7 @@ class CommentPresenter < ApplicationPresenter
|
||||||
end
|
end
|
||||||
if controller.can? :destroy, @comment
|
if controller.can? :destroy, @comment
|
||||||
res << link_to(t('layout.delete'), path, method: "delete",
|
res << link_to(t('layout.delete'), path, method: "delete",
|
||||||
confirm: t('layout.comments.confirm_delete')).html_safe
|
data: { confirm: t('layout.comments.confirm_delete') }).html_safe
|
||||||
end
|
end
|
||||||
res
|
res
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
%td= flash_notify.published
|
%td= flash_notify.published
|
||||||
%td
|
%td
|
||||||
= link_to t("layout.flash_notifies.edit"), edit_admin_flash_notify_path(flash_notify)
|
= link_to t("layout.flash_notifies.edit"), edit_admin_flash_notify_path(flash_notify)
|
||||||
= link_to t("layout.flash_notifies.delete"), admin_flash_notify_path(flash_notify), method: :delete, confirm: t("layout.mass_builds.cancel_confirm") if can?(:delete, flash_notify)
|
= link_to t("layout.flash_notifies.delete"), admin_flash_notify_path(flash_notify), method: :delete, data: { confirm: t("layout.mass_builds.cancel_confirm") } if can?(:delete, flash_notify)
|
||||||
|
|
||||||
= will_paginate @flash_notifies
|
= will_paginate @flash_notifies
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
users = @users.map do |user|
|
users = @users.map do |user|
|
||||||
link_block = [
|
link_block = [
|
||||||
(link_to t('layout.edit'), edit_admin_user_path(user) if can?(:edit, user) && !@system_list),
|
(link_to t('layout.edit'), edit_admin_user_path(user) if can?(:edit, user) && !@system_list),
|
||||||
(link_to t('layout.users.reset_token'), reset_auth_token_admin_user_path(user), method: :put, confirm: t('layout.users.confirm_reset_token') if can?(:edit, user) && @system_list),
|
(link_to t('layout.users.reset_token'), reset_auth_token_admin_user_path(user), method: :put, data: { confirm: t('layout.users.confirm_reset_token') } if can?(:edit, user) && @system_list),
|
||||||
(link_to t('layout.delete'), admin_user_path(user), method: :delete, confirm: t('layout.users.confirm_delete') if can? :destroy, user)
|
(link_to t('layout.delete'), admin_user_path(user), method: :delete, data: { confirm: t('layout.users.confirm_delete') } if can? :destroy, user)
|
||||||
].compact.join(' | ').html_safe
|
].compact.join(' | ').html_safe
|
||||||
|
|
||||||
if !@system_list
|
if !@system_list
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
.hr
|
.hr
|
||||||
.leftside= t("layout.groups.delete_warning")
|
.leftside= t("layout.groups.delete_warning")
|
||||||
.rightside
|
.rightside
|
||||||
= link_to t("layout.delete"), profile_group_path(@group), method: :delete, confirm: t("layout.groups.confirm_delete"), class: 'button' if can? :destroy, @group
|
= link_to t("layout.delete"), profile_group_path(@group), method: :delete, data: { confirm: t("layout.groups.confirm_delete") }, class: 'button' if can? :destroy, @group
|
||||||
.both
|
.both
|
||||||
|
|
||||||
- content_for :sidebar, render('sidebar')
|
- content_for :sidebar, render('sidebar')
|
||||||
|
|
|
@ -14,5 +14,5 @@
|
||||||
%td= link_to repository.key_pair.user.fullname, user_path(repository.key_pair.user)
|
%td= link_to repository.key_pair.user.fullname, user_path(repository.key_pair.user)
|
||||||
%td.buttons
|
%td.buttons
|
||||||
- if can? :destroy, repository.key_pair
|
- if can? :destroy, repository.key_pair
|
||||||
= link_to platform_key_pair_path(@platform, repository.key_pair), method: :delete, confirm: t("layout.key_pairs.confirm_delete") do
|
= link_to platform_key_pair_path(@platform, repository.key_pair), method: :delete, data: { confirm: t("layout.key_pairs.confirm_delete") } do
|
||||||
%span.delete
|
%span.delete
|
||||||
|
|
|
@ -39,15 +39,15 @@
|
||||||
- unless mass_build.auto_publish?
|
- unless mass_build.auto_publish?
|
||||||
= link_to t('layout.mass_builds.publish_success'),
|
= link_to t('layout.mass_builds.publish_success'),
|
||||||
publish_platform_mass_build_path(@platform, mass_build.id),
|
publish_platform_mass_build_path(@platform, mass_build.id),
|
||||||
method: :post, confirm: t("layout.confirm"), class: 'button'
|
method: :post, data: confirm: t("layout.confirm") }, class: 'button'
|
||||||
= link_to t('layout.mass_builds.publish_test_failed'),
|
= link_to t('layout.mass_builds.publish_test_failed'),
|
||||||
publish_platform_mass_build_path(@platform, mass_build.id, status: 'test_failed'),
|
publish_platform_mass_build_path(@platform, mass_build.id, status: 'test_failed'),
|
||||||
method: :post, confirm: t("layout.confirm"), class: 'button'
|
method: :post, data: { confirm: t("layout.confirm") }, class: 'button'
|
||||||
- if can?(:cancel, mass_build)
|
- if can?(:cancel, mass_build)
|
||||||
= link_to t('layout.cancel'),
|
= link_to t('layout.cancel'),
|
||||||
cancel_platform_mass_build_path(@platform, mass_build.id),
|
cancel_platform_mass_build_path(@platform, mass_build.id),
|
||||||
method: :post, class: 'button',
|
method: :post, class: 'button',
|
||||||
confirm: t('layout.mass_builds.cancel_confirm')
|
data: { confirm: t('layout.mass_builds.cancel_confirm') }
|
||||||
%td
|
%td
|
||||||
%a.toggle_btn{href: "#toggle_#{ mass_build.id }", :'data-target' => "#toggle_#{ mass_build.id }"}= t("layout.mass_builds.extended_data")
|
%a.toggle_btn{href: "#toggle_#{ mass_build.id }", :'data-target' => "#toggle_#{ mass_build.id }"}= t("layout.mass_builds.extended_data")
|
||||||
.toggle{id: "toggle_#{ mass_build.id }"}
|
.toggle{id: "toggle_#{ mass_build.id }"}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
.rightside= link_to t("layout.platforms.change_visibility_from_#{@platform.visibility}"),
|
.rightside= link_to t("layout.platforms.change_visibility_from_#{@platform.visibility}"),
|
||||||
change_visibility_platform_path(@platform),
|
change_visibility_platform_path(@platform),
|
||||||
method: :post,
|
method: :post,
|
||||||
confirm: t("layout.platforms.confirm_change_visibility"),
|
data: { confirm: t("layout.platforms.confirm_change_visibility") },
|
||||||
class: 'button'
|
class: 'button'
|
||||||
.both
|
.both
|
||||||
|
|
||||||
|
@ -41,15 +41,15 @@
|
||||||
.both
|
.both
|
||||||
|
|
||||||
.leftside
|
.leftside
|
||||||
.rightside= link_to t('layout.regeneration_statuses.regenerate_metadata'), regenerate_metadata_platform_path(@platform), method: :put, confirm: t('layout.confirm'), class: 'button'
|
.rightside= link_to t('layout.regeneration_statuses.regenerate_metadata'), regenerate_metadata_platform_path(@platform), method: :put, data: { confirm: t('layout.confirm') }, class: 'button'
|
||||||
.both
|
.both
|
||||||
|
|
||||||
- if can? :destroy, @platform
|
- if can? :destroy, @platform
|
||||||
.hr
|
.hr
|
||||||
.leftside= t("layout.platforms.delete_warning")
|
.leftside= t("layout.platforms.delete_warning")
|
||||||
.rightside= link_to t("layout.delete"), platform_path(@platform), method: :delete, confirm: t("layout.platforms.confirm_delete"), class: 'button'
|
.rightside= link_to t("layout.delete"), platform_path(@platform), method: :delete, data: { confirm: t("layout.platforms.confirm_delete") }, class: 'button'
|
||||||
- if can? :clear, @platform
|
- if can? :clear, @platform
|
||||||
.hr
|
.hr
|
||||||
.leftside= t("layout.repositories.clear_warning")
|
.leftside= t("layout.repositories.clear_warning")
|
||||||
.rightside= link_to t("layout.repositories.clear"), clear_platform_path(@platform), class: 'button', confirm: t('layout.repositories.clear_confirm'), method: :put
|
.rightside= link_to t("layout.repositories.clear"), clear_platform_path(@platform), class: 'button', data: { confirm: t('layout.repositories.clear_confirm') }, method: :put
|
||||||
.both
|
.both
|
||||||
|
|
|
@ -9,5 +9,5 @@
|
||||||
%td= pbl.human_status
|
%td= pbl.human_status
|
||||||
%td= link_to(nil, pbl.container_path) unless pbl.project
|
%td= link_to(nil, pbl.container_path) unless pbl.project
|
||||||
%td= link_to pbl.product.name, platform_product_path(platform, product)
|
%td= link_to pbl.product.name, platform_product_path(platform, product)
|
||||||
%td= link_to image_tag('x.png'), platform_product_product_build_list_path(platform, product, pbl), method: :delete, confirm: t("layout.confirm") if can?(:destroy, pbl) && pbl.can_destroy? && !pbl.project
|
%td= link_to image_tag('x.png'), platform_product_product_build_list_path(platform, product, pbl), method: :delete, data: { confirm: t("layout.confirm") } if can?(:destroy, pbl) && pbl.can_destroy? && !pbl.project
|
||||||
= datetime_moment pbl.updated_at, tag: :td
|
= datetime_moment pbl.updated_at, tag: :td
|
|
@ -32,7 +32,7 @@
|
||||||
- if can?(:cancel, pbl)
|
- if can?(:cancel, pbl)
|
||||||
= link_to t("layout.build_lists.cancel"),
|
= link_to t("layout.build_lists.cancel"),
|
||||||
cancel_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl),
|
cancel_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl),
|
||||||
method: :put, confirm: t("layout.confirm"), class: 'button',
|
method: :put, data: { confirm: t("layout.confirm") }, class: 'button',
|
||||||
'ng-show' => 'pbl.can_cancel'
|
'ng-show' => 'pbl.can_cancel'
|
||||||
.both
|
.both
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -10,5 +10,5 @@
|
||||||
= link_to product.name, platform_product_path(@platform, product)
|
= link_to product.name, platform_product_path(@platform, product)
|
||||||
%td.buttons
|
%td.buttons
|
||||||
- if can? :destroy, product
|
- if can? :destroy, product
|
||||||
= link_to platform_product_path(@platform, product), method: :delete, confirm: t("layout.products.confirm_delete") do
|
= link_to platform_product_path(@platform, product), method: :delete, data: { confirm: t("layout.products.confirm_delete") } do
|
||||||
%span.delete
|
%span.delete
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
- if can? :update, @product
|
- if can? :update, @product
|
||||||
= link_to image_tag("code.png", alt: t("layout.edit")) + " " + t("layout.edit"), edit_platform_product_path(@platform, @product), class: "button"
|
= link_to image_tag("code.png", alt: t("layout.edit")) + " " + t("layout.edit"), edit_platform_product_path(@platform, @product), class: "button"
|
||||||
- if can? :destroy, @product
|
- if can? :destroy, @product
|
||||||
= link_to image_tag("x.png", alt: t("layout.delete")) + " " + t("layout.delete"), platform_product_path(@platform, @product), method: "delete", class: "button", confirm: t("layout.products.confirm_delete")
|
= link_to image_tag("x.png", alt: t("layout.delete")) + " " + t("layout.delete"), platform_product_path(@platform, @product), method: "delete", class: "button", data: { confirm: t("layout.products.confirm_delete") }
|
||||||
- if can?(:create, @product.product_build_lists.build)
|
- if can?(:create, @product.product_build_lists.build)
|
||||||
= link_to t("layout.products.build"), new_platform_product_product_build_list_path(@platform, @product), class: "button"
|
= link_to t("layout.products.build"), new_platform_product_product_build_list_path(@platform, @product), class: "button"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
if can? :remove_project, @repository
|
if can? :remove_project, @repository
|
||||||
link_to(
|
link_to(
|
||||||
remove_project_platform_repository_path(@platform, @repository, project_id: pr.id),
|
remove_project_platform_repository_path(@platform, @repository, project_id: pr.id),
|
||||||
method: :delete, confirm: t("layout.confirm")) do
|
method: :delete, data: { confirm: t("layout.confirm") }) do
|
||||||
content_tag(:span, " ".html_safe, class: 'delete')
|
content_tag(:span, " ".html_safe, class: 'delete')
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
.leftlist= t('layout.repositories.regenerate_metadata')
|
.leftlist= t('layout.repositories.regenerate_metadata')
|
||||||
.rightlist
|
.rightlist
|
||||||
= select_tag :build_for_platform_id, options_from_collection_for_select(Platform.main, :id, :name) if @platform.personal?
|
= select_tag :build_for_platform_id, options_from_collection_for_select(Platform.main, :id, :name) if @platform.personal?
|
||||||
= f.submit t('layout.repositories.regenerate_metadata'), confirm: t('layout.confirm')
|
= f.submit t('layout.repositories.regenerate_metadata'), data: { confirm: t('layout.confirm') }
|
||||||
.both
|
.both
|
||||||
|
|
||||||
- if @repository.repository_statuses.present?
|
- if @repository.repository_statuses.present?
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
- path = sync_lock_file_platform_repository_path(@platform, @repository)
|
- path = sync_lock_file_platform_repository_path(@platform, @repository)
|
||||||
= form_for @repository, url: path, html: { class: :form, method: :put } do |f|
|
= form_for @repository, url: path, html: { class: :form, method: :put } do |f|
|
||||||
.leftlist= t('layout.repositories.sync_lock_file_info')
|
.leftlist= t('layout.repositories.sync_lock_file_info')
|
||||||
.rightlist= f.submit label, confirm: t('layout.confirm')
|
.rightlist= f.submit label, data: { confirm: t('layout.confirm') }
|
||||||
.both
|
.both
|
||||||
.hr
|
.hr
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
- if can? :update, @repository
|
- if can? :update, @repository
|
||||||
= link_to image_tag("code.png", alt: t("layout.edit")) + " " + t("layout.edit"), edit_platform_repository_path(@platform, @repository), class: "button"
|
= link_to image_tag("code.png", alt: t("layout.edit")) + " " + t("layout.edit"), edit_platform_repository_path(@platform, @repository), class: "button"
|
||||||
- if can? :destroy, @repository
|
- if can? :destroy, @repository
|
||||||
= link_to image_tag("x.png", alt: t("layout.delete")) + " " + t("layout.delete"), platform_repository_path(@platform, @repository), method: "delete", class: "button", confirm: t("layout.repositories.confirm_delete")
|
= link_to image_tag("x.png", alt: t("layout.delete")) + " " + t("layout.delete"), platform_repository_path(@platform, @repository), method: "delete", class: "button", data: { confirm: t("layout.repositories.confirm_delete") }
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
%h3.fix= t("layout.projects.list_header")
|
%h3.fix= t("layout.projects.list_header")
|
||||||
|
|
|
@ -38,4 +38,4 @@
|
||||||
= link_to t('layout.tokens.withdraw'),
|
= link_to t('layout.tokens.withdraw'),
|
||||||
withdraw_platform_token_path(@platform, @token),
|
withdraw_platform_token_path(@platform, @token),
|
||||||
method: :post, class: 'button',
|
method: :post, class: 'button',
|
||||||
confirm: t('layout.tokens.withdraw_confirm')
|
data: { confirm: t('layout.tokens.withdraw_confirm') }
|
||||||
|
|
|
@ -172,31 +172,31 @@
|
||||||
|
|
||||||
- if can?(:cancel, @build_list)
|
- if can?(:cancel, @build_list)
|
||||||
= link_to t("layout.build_lists.cancel"), cancel_build_list_path(@build_list),
|
= link_to t("layout.build_lists.cancel"), cancel_build_list_path(@build_list),
|
||||||
method: :put, confirm: t("layout.confirm"), class: 'button',
|
method: :put, data: { confirm: t("layout.confirm") }, class: 'button',
|
||||||
'ng-show' => 'build_list.can_cancel'
|
'ng-show' => 'build_list.can_cancel'
|
||||||
= submit_tag t('layout.publish_again'),
|
= submit_tag t('layout.publish_again'),
|
||||||
confirm: t("layout.publish_again_warning"),
|
data: { confirm: t("layout.publish_again_warning") },
|
||||||
name: 'publish',
|
name: 'publish',
|
||||||
'ng-show' => "build_list.can_publish && build_list.status == #{BuildList::BUILD_PUBLISHED}"
|
'ng-show' => "build_list.can_publish && build_list.status == #{BuildList::BUILD_PUBLISHED}"
|
||||||
= submit_tag t("layout.publish"),
|
= submit_tag t("layout.publish"),
|
||||||
confirm: t('layout.build_lists.tests_failed'), name: 'publish',
|
data: { confirm: t('layout.build_lists.tests_failed') }, name: 'publish',
|
||||||
'ng-show' => "build_list.can_publish && build_list.can_publish_in_future && build_list.extra_build_lists_published && build_list.status == #{BuildList::TESTS_FAILED}"
|
'ng-show' => "build_list.can_publish && build_list.can_publish_in_future && build_list.extra_build_lists_published && build_list.status == #{BuildList::TESTS_FAILED}"
|
||||||
= submit_tag t("layout.publish"),
|
= submit_tag t("layout.publish"),
|
||||||
confirm: t('layout.confirm'), name: 'publish',
|
data: { confirm: t('layout.confirm') }, name: 'publish',
|
||||||
'ng-show' => "build_list.can_publish && build_list.can_publish_in_future && build_list.extra_build_lists_published && build_list.status != #{BuildList::TESTS_FAILED} && build_list.status != #{BuildList::BUILD_PUBLISHED}"
|
'ng-show' => "build_list.can_publish && build_list.can_publish_in_future && build_list.extra_build_lists_published && build_list.status != #{BuildList::TESTS_FAILED} && build_list.status != #{BuildList::BUILD_PUBLISHED}"
|
||||||
= link_to t('layout.publish_into_testing'), publish_into_testing_build_list_path(@build_list),
|
= link_to t('layout.publish_into_testing'), publish_into_testing_build_list_path(@build_list),
|
||||||
method: :put, confirm: t("layout.confirm"),
|
method: :put, data: { confirm: t("layout.confirm") },
|
||||||
class: 'button',
|
class: 'button',
|
||||||
'ng-show' => 'build_list.can_publish_into_testing'
|
'ng-show' => 'build_list.can_publish_into_testing'
|
||||||
- if can?(:reject_publish, @build_list)
|
- if can?(:reject_publish, @build_list)
|
||||||
= link_to t('layout.reject_publish'), reject_publish_build_list_path(@build_list),
|
= link_to t('layout.reject_publish'), reject_publish_build_list_path(@build_list),
|
||||||
method: :put, confirm: t("layout.confirm"),
|
method: :put, data: { confirm: t("layout.confirm") },
|
||||||
class: 'button',
|
class: 'button',
|
||||||
'ng-show' => 'build_list.can_reject_publish'
|
'ng-show' => 'build_list.can_reject_publish'
|
||||||
- if can?(:create_container, @build_list)
|
- if can?(:create_container, @build_list)
|
||||||
= link_to t("layout.build_lists.create_container"),
|
= link_to t("layout.build_lists.create_container"),
|
||||||
create_container_build_list_path(@build_list),
|
create_container_build_list_path(@build_list),
|
||||||
method: :put, confirm: t("layout.confirm"),
|
method: :put, data: { confirm: t("layout.confirm") },
|
||||||
class: 'button',
|
class: 'button',
|
||||||
'ng-show' => 'build_list.can_create_container'
|
'ng-show' => 'build_list.can_create_container'
|
||||||
- if can? :create, @build_list
|
- if can? :create, @build_list
|
||||||
|
|
|
@ -22,5 +22,5 @@
|
||||||
.leftlist
|
.leftlist
|
||||||
.rightlist
|
.rightlist
|
||||||
= link_to t('layout.edit'), edit_project_hook_path(@project, hook), class: 'button'
|
= link_to t('layout.edit'), edit_project_hook_path(@project, hook), class: 'button'
|
||||||
= link_to t('layout.delete'), project_hook_path(@project, hook), method: :delete, confirm: t('layout.confirm'), class: 'button'
|
= link_to t('layout.delete'), project_hook_path(@project, hook), method: :delete, data: { confirm: t('layout.confirm') }, class: 'button'
|
||||||
.hr
|
.hr
|
||||||
|
|
|
@ -11,5 +11,5 @@
|
||||||
= t("layout.collaborators.role_names.#{current_user.best_role project}")
|
= t("layout.collaborators.role_names.#{current_user.best_role project}")
|
||||||
%td.td5
|
%td.td5
|
||||||
- unless project.owner == current_user or !alone_member
|
- unless project.owner == current_user or !alone_member
|
||||||
= link_to remove_user_project_path(project), method: :delete, confirm: t("layout.confirm") do
|
= link_to remove_user_project_path(project), method: :delete, data: { confirm: t("layout.confirm") } do
|
||||||
%span.delete
|
%span.delete
|
||||||
|
|
|
@ -33,6 +33,6 @@
|
||||||
|
|
||||||
.hr
|
.hr
|
||||||
.leftside= t("layout.projects.delete_warning")
|
.leftside= t("layout.projects.delete_warning")
|
||||||
.rightside= link_to t("layout.delete"), project_path(@project), method: :delete, confirm: t("layout.projects.confirm_delete"), class: 'button' if can? :destroy, @project
|
.rightside= link_to t("layout.delete"), project_path(@project), method: :delete, data: { confirm: t("layout.projects.confirm_delete") }, class: 'button' if can? :destroy, @project
|
||||||
.both
|
.both
|
||||||
|
|
||||||
|
|
|
@ -15,5 +15,5 @@
|
||||||
= datetime_moment date, tag: :span
|
= datetime_moment date, tag: :span
|
||||||
- unless action_name == 'preview' or cannot? :write, @project
|
- unless action_name == 'preview' or cannot? :write, @project
|
||||||
%p#delete-link
|
%p#delete-link
|
||||||
= link_to project_wiki_path(@project, escaped_name), method: :delete, confirm: t("layout.confirm") do
|
= link_to project_wiki_path(@project, escaped_name), method: :delete, data: { confirm: t("layout.confirm") } do
|
||||||
%span= t("wiki.delete_page")
|
%span= t("wiki.delete_page")
|
|
@ -23,7 +23,7 @@
|
||||||
.forimg= link_to user.fullname, user_path(user)
|
.forimg= link_to user.fullname, user_path(user)
|
||||||
- if can? :remove_member, editable_object
|
- if can? :remove_member, editable_object
|
||||||
%td.buttons
|
%td.buttons
|
||||||
= link_to "#{remove_member_path}?member_id=#{user.id}", method: :delete, confirm: t("layout.confirm") do
|
= link_to "#{remove_member_path}?member_id=#{user.id}", method: :delete, data: { confirm: t("layout.confirm") } do
|
||||||
%span.delete
|
%span.delete
|
||||||
- if can? :remove_members, editable_object
|
- if can? :remove_members, editable_object
|
||||||
= submit_tag t("layout.delete"), class: 'button', data: {'disable-with' => t('layout.processing')}
|
= submit_tag t("layout.delete"), class: 'button', data: {'disable-with' => t('layout.processing')}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
- @ssh_keys.each do |key|
|
- @ssh_keys.each do |key|
|
||||||
%tr
|
%tr
|
||||||
%td="#{key.name} (#{key.fingerprint})"
|
%td="#{key.name} (#{key.fingerprint})"
|
||||||
%td= link_to image_tag('x.png'), ssh_key_path(key), method: :delete, confirm: t('layout.confirm')
|
%td= link_to image_tag('x.png'), ssh_key_path(key), method: :delete, data: { confirm: t('layout.confirm') }
|
||||||
.both
|
.both
|
||||||
|
|
||||||
%h3.fix.bpadding10= t 'add_key'
|
%h3.fix.bpadding10= t 'add_key'
|
||||||
|
|
|
@ -209,7 +209,7 @@ module AbfWorker
|
||||||
select('MIN(updated_at) as min_updated_at, save_to_repository_id, build_for_platform_id').
|
select('MIN(updated_at) as min_updated_at, save_to_repository_id, build_for_platform_id').
|
||||||
where(new_core: true, status: (testing ? BuildList::BUILD_PUBLISH_INTO_TESTING : BuildList::BUILD_PUBLISH)).
|
where(new_core: true, status: (testing ? BuildList::BUILD_PUBLISH_INTO_TESTING : BuildList::BUILD_PUBLISH)).
|
||||||
group(:save_to_repository_id, :build_for_platform_id).
|
group(:save_to_repository_id, :build_for_platform_id).
|
||||||
order(:min_updated_at).
|
order('min_updated_at ASC').
|
||||||
limit(@workers_count * 2) # because some repos may be locked
|
limit(@workers_count * 2) # because some repos may be locked
|
||||||
|
|
||||||
locked_rep = RepositoryStatus.not_ready.joins(:platform).
|
locked_rep = RepositoryStatus.not_ready.joins(:platform).
|
||||||
|
@ -289,7 +289,7 @@ module AbfWorker
|
||||||
# Checks mirror sync status
|
# Checks mirror sync status
|
||||||
return false if save_to_repository.repo_lock_file_exists? || !save_to_repository.platform.ready?
|
return false if save_to_repository.repo_lock_file_exists? || !save_to_repository.platform.ready?
|
||||||
|
|
||||||
repository_status = save_to_repository.repository_statuses.find_or_create_by_platform_id(build_for_platform_id)
|
repository_status = save_to_repository.repository_statuses.find_or_create_by(platform_id: build_for_platform_id)
|
||||||
return false unless repository_status.publish
|
return false unless repository_status.publish
|
||||||
|
|
||||||
save_to_platform = save_to_repository.platform
|
save_to_platform = save_to_repository.platform
|
||||||
|
|
Loading…
Reference in New Issue