diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | web/.rubocop.yml | 20 | ||||
-rw-r--r-- | web/app.rb | 9 | ||||
-rw-r--r-- | web/db/migrations/001_base_schema.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/002_add_revision.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/003_add_identifier.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/004_add_gem_version.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/005_add_build_table.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/006_add_build_logs.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/007_add_amd64_keyword.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/008_add_tested_check.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/009_add_deps.rb | 2 | ||||
-rw-r--r-- | web/db/migrations/010_add_r22_target.rb | 2 | ||||
-rw-r--r-- | web/lib/aws.rb | 2 | ||||
-rw-r--r-- | web/lib/ci.rb | 2 | ||||
-rw-r--r-- | web/lib/packages.rb | 6 |
16 files changed, 30 insertions, 30 deletions
@@ -6,7 +6,6 @@ gentoo-x86/ logs/ ruby-overlay/ web/.bundle/ -web/.rubocop.yml web/ci-logs/ !web/ci-logs/.keep web/var/log/*.log diff --git a/web/.rubocop.yml b/web/.rubocop.yml new file mode 100644 index 0000000..fee096c --- /dev/null +++ b/web/.rubocop.yml @@ -0,0 +1,20 @@ +Metrics/AbcSize: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/LineLength: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Style/Documentation: + Enabled: false +Style/IndentArray: + Enabled: false +Style/IndentHash: + Enabled: false +Style/IndentationWidth: + Enabled: false +Style/Tab: + Enabled: false @@ -18,7 +18,7 @@ class RubyStats < Sinatra::Base end get '/ruby_targets' do - packages = Package.order{[category, lower(name), version, revision]}.to_hash_groups(:identifier) + packages = Package.order { [category, lower(name), version, revision] }.to_hash_groups(:identifier) erb :ruby_targets, locals: { packages: packages } end @@ -53,10 +53,11 @@ class RubyStats < Sinatra::Base ruby_2_2_amd64 = Package.where(r22_target: 'ruby22', amd64_keyword: 'amd64').count ruby_2_2__amd64 = Package.where(r22_target: 'ruby22', amd64_keyword: '~amd64').count - # Outdated Gems - uptodate = []; Package.distinct(:category, :name).reverse_order(:category, :name, :version).exclude(gem_version: 'nil').each { |p| uptodate << p if p[:version] >= p[:gem_version] } - outdated = []; Package.distinct(:category, :name).reverse_order(:category, :name, :version).exclude(gem_version: 'nil').each { |p| outdated << p if p[:version] < p[:gem_version] } + uptodate = [] + outdated = [] + Package.distinct(:category, :name).reverse_order(:category, :name, :version).exclude(gem_version: 'nil').each { |p| uptodate << p if p[:version] >= p[:gem_version] } + Package.distinct(:category, :name).reverse_order(:category, :name, :version).exclude(gem_version: 'nil').each { |p| outdated << p if p[:version] < p[:gem_version] } # Build Status succeeded = Build.distinct(:package_id).order(:package_id, Sequel.desc(:time)).where(result: 'succeeded').count diff --git a/web/db/migrations/001_base_schema.rb b/web/db/migrations/001_base_schema.rb index 1667dcf..4f1f393 100644 --- a/web/db/migrations/001_base_schema.rb +++ b/web/db/migrations/001_base_schema.rb @@ -1,5 +1,4 @@ Sequel.migration do - change do create_table :packages do primary_key :id @@ -12,5 +11,4 @@ Sequel.migration do String :r21_target end end - end diff --git a/web/db/migrations/002_add_revision.rb b/web/db/migrations/002_add_revision.rb index 7d645bb..215cc16 100644 --- a/web/db/migrations/002_add_revision.rb +++ b/web/db/migrations/002_add_revision.rb @@ -1,7 +1,5 @@ Sequel.migration do - change do add_column :packages, :revision, String end - end diff --git a/web/db/migrations/003_add_identifier.rb b/web/db/migrations/003_add_identifier.rb index 0e24eae..ad14030 100644 --- a/web/db/migrations/003_add_identifier.rb +++ b/web/db/migrations/003_add_identifier.rb @@ -1,7 +1,5 @@ Sequel.migration do - change do add_column :packages, :identifier, String end - end diff --git a/web/db/migrations/004_add_gem_version.rb b/web/db/migrations/004_add_gem_version.rb index 80b8b27..d660dec 100644 --- a/web/db/migrations/004_add_gem_version.rb +++ b/web/db/migrations/004_add_gem_version.rb @@ -1,7 +1,5 @@ Sequel.migration do - change do add_column :packages, :gem_version, String end - end diff --git a/web/db/migrations/005_add_build_table.rb b/web/db/migrations/005_add_build_table.rb index 887b0d9..923ad55 100644 --- a/web/db/migrations/005_add_build_table.rb +++ b/web/db/migrations/005_add_build_table.rb @@ -1,5 +1,4 @@ Sequel.migration do - change do create_table :builds do primary_key :id @@ -8,5 +7,4 @@ Sequel.migration do String :result end end - end diff --git a/web/db/migrations/006_add_build_logs.rb b/web/db/migrations/006_add_build_logs.rb index 7b53947..a9a583c 100644 --- a/web/db/migrations/006_add_build_logs.rb +++ b/web/db/migrations/006_add_build_logs.rb @@ -1,10 +1,8 @@ Sequel.migration do - change do add_column :builds, :emerge_info, String add_column :builds, :emerge_pqv, String add_column :builds, :build_log, String add_column :builds, :environment, String end - end diff --git a/web/db/migrations/007_add_amd64_keyword.rb b/web/db/migrations/007_add_amd64_keyword.rb index af83257..e34b361 100644 --- a/web/db/migrations/007_add_amd64_keyword.rb +++ b/web/db/migrations/007_add_amd64_keyword.rb @@ -1,7 +1,5 @@ Sequel.migration do - change do add_column :packages, :amd64_keyword, String end - end diff --git a/web/db/migrations/008_add_tested_check.rb b/web/db/migrations/008_add_tested_check.rb index 1e89496..a0222dc 100644 --- a/web/db/migrations/008_add_tested_check.rb +++ b/web/db/migrations/008_add_tested_check.rb @@ -1,7 +1,5 @@ Sequel.migration do - change do add_column :packages, :tested, TrueClass end - end diff --git a/web/db/migrations/009_add_deps.rb b/web/db/migrations/009_add_deps.rb index bc82126..c41989e 100644 --- a/web/db/migrations/009_add_deps.rb +++ b/web/db/migrations/009_add_deps.rb @@ -1,7 +1,5 @@ Sequel.migration do - change do add_column :packages, :dependencies, String end - end diff --git a/web/db/migrations/010_add_r22_target.rb b/web/db/migrations/010_add_r22_target.rb index 751fe8d..22ff300 100644 --- a/web/db/migrations/010_add_r22_target.rb +++ b/web/db/migrations/010_add_r22_target.rb @@ -1,7 +1,5 @@ Sequel.migration do - change do add_column :packages, :r22_target, String end - end diff --git a/web/lib/aws.rb b/web/lib/aws.rb index 70dec04..be6f850 100644 --- a/web/lib/aws.rb +++ b/web/lib/aws.rb @@ -36,7 +36,7 @@ def start_instance retry end - return instance, key_pair + [instance, key_pair] end def delete_instance(instance) diff --git a/web/lib/ci.rb b/web/lib/ci.rb index 10e86b0..846318f 100644 --- a/web/lib/ci.rb +++ b/web/lib/ci.rb @@ -23,7 +23,7 @@ def run_ci(num_of_packages, provisioner) :dependencies, "#{package[:category]}/#{package[:name]} %", "% #{package[:category]}/#{package[:name]} %", - "% #{package[:category]}/#{package[:name]}", + "% #{package[:category]}/#{package[:name]}" )).each do |rdep| packages << rdep[:identifier] end diff --git a/web/lib/packages.rb b/web/lib/packages.rb index 13599f8..cd18160 100644 --- a/web/lib/packages.rb +++ b/web/lib/packages.rb @@ -5,8 +5,8 @@ def update_packages identifier = category + '/' + name + '-' + version + (revision == 'r0' ? '' : "-#{revision}") gem_version = Gems.info(name)['version'] gem_version = 'nil' if gem_version.nil? - #ebuild = "/usr/portage/#{category}/#{name}/#{identifier.split('/')[1]}.ebuild" - #ebuild_hash = Digest::MD5.hexdigest(File.read(ebuild)) + # ebuild = "/usr/portage/#{category}/#{name}/#{identifier.split('/')[1]}.ebuild" + # ebuild_hash = Digest::MD5.hexdigest(File.read(ebuild)) Package.find_or_create( category: category, name: name, @@ -19,7 +19,7 @@ def update_packages r19_target: r19_target, r20_target: r20_target, r21_target: r21_target, - r22_target: r22_target, + r22_target: r22_target ) end |