Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SUSE/Portus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.1.1
Choose a base ref
...
head repository: SUSE/Portus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 1,051 changed files with 51,931 additions and 15,035 deletions.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
["env", { "modules": false }]
],
"plugins": [
"lodash",
"transform-object-rest-spread"
],
"env": {
"test": {
"plugins": ["istanbul"]
}
}
}
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -4,3 +4,5 @@ vagrant
packaging
log/*
.DS_Store
.bundle/config
config/config-local.yml
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MACHINE_FQDN=172.17.0.1
REGISTRY_PORT=5000
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/builds/
/coverage/
/coverage-javascript/
/node_modules/
/public/
/tmp/
/vendor/
41 changes: 41 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"env": {
"jquery": true,
"browser": true,
"es6": true
},
"extends": "airbnb-base",
"globals": {
"Bloodhound": false,
"layout_resizer": false
},
"plugins": [
"import",
"html"
],
"settings": {
"import/resolver": {
"webpack": {
"config": "./config/webpack.js"
}
}
},
"rules": {
"camelcase": 0,
"func-names": 0,
"prefer-arrow-callback": 0,
"no-var": 0,
"prefer-template": 0,
"no-unused-vars": [2, {
"args": "all",
"argsIgnorePattern": "^_"
}],
"object-shorthand": 0,
"no-plusplus": 0,
"no-void": 0,
"import/extensions": ["error", "always", {
"js": "never",
"vue": "never"
}]
}
}
40 changes: 40 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
### Description

Check out the `CONTRIBUTING.md` file for some considerations before submitting a
new issue.

### Steps to reproduce

1. First I did this...
2. Then that...
3. And this happened!

- **Expected behavior**: I expected this to happen!
- **Actual behavior**: But this happened...

Providing logs of the moment when the issue has happened would also be
useful. If you are in production, you might want to set the `PORTUS_LOG_LEVEL`
to `debug` to get a more verbose log.

### Deployment information

**Deployment method**: how have you deployed Portus? Are you using one of the
[examples](https://github.com/SUSE/Portus/tree/master/examples) as a base? If
possible, could you paste your configuration? (don't forget to strip passwords
or other sensitive data!)

**Configuration**:

You can get this information like this:

- In bare metal execute: `bundle exec rake portus:info`.
- In a container:
- Using the development `docker-compose.yml` file: `docker exec -it <container-id> bundle exec rake portus:info`.
- Using the [production image](https://hub.docker.com/r/opensuse/portus/): `docker exec -it <container-id> portusctl exec rake portus:info`.

```yml
CONFIG HERE
```

**Portus version**: with commit if possible. You can get this info too with the
above commands.
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Summary

Provide a general description of the changes in your pull request. If this pull
request fixes a known issue, please tag it as well (e.g.: `Fixes #1`). Check the
`CONTRIBUTING.md` file for more information.

Thanks for contributing to Portus!
31 changes: 31 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 90

# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7

# Issues with these labels will never be considered stale
exemptLabels:
- blocked
- breaking change
- discussing
- junior job
- feature
- enhancement
- documentation

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true

# Label to use when marking an issue as stale
staleLabel: stale

# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Thanks for all your contributions!
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,14 +2,18 @@
/bundle
/**/*.swp
/log/*
/*.log
/tmp
/.nyc_output
/.vagrant
/coverage
/public/assets
/config/config-local.yml
/compose/registry/config.yml
/bin/portus
/docker-compose.yml
/bin/integration/init
/docker-compose.overlay.yml
/spec/integration/fixtures/config.yml
/spec/integration/fixtures/data
/node_modules
/webpack-report
/db/schema.rb
121 changes: 94 additions & 27 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,108 @@
AllCops:
TargetRubyVersion: 2.5
TargetRailsVersion: 5.2

DisplayCopNames: true
DisplayStyleGuide: false

Exclude:
# Files that are out of our control and that are not excluded in the
# default config of rubocop.
- db/schema.rb
- db/schema.mysql.rb
- db/schema.postgresql.rb
- db/migrate/*
- vendor/**/*

inherit_from:
- ./config/rubocop-suse.yml
#
# Layout
#

# TODO: (mssola) only the LDAP class and portusctl require this.
# This is a remnant of old SUSE-style alignment for hashes, The table format
# looks more human readable.
Layout/AlignHash:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table

#
# Metrics
#

# The default is just too small.
Metrics/AbcSize:
Max: 30

# We will skip it for tests, the Grape API and Rake tasks.
Metrics/BlockLength:
Exclude:
- spec/**/*
- lib/api/**/*
- lib/tasks/**/*

# Some classes (e.g. API) are either too difficult to modularize in a reasonable
# (readable) manner, or are intentionally fat (e.g. some models). Let's leave
# out these kinds of classes from this cop.
Metrics/ClassLength:
Max: 180
Exclude:
- app/models/**/*
- lib/api/**/*

# The default is just too small. A limit of 100 looks reasonable and many other
# projects (including inside of SUSE) are also using this value.
Metrics/LineLength:
Max: 100

# TODO: (mssola) Some methods are offending this cop. In the SUSE's style guide
# the approach is to use Rubocop's default value. In the near future I will
# fix this.
# NOTE: this could be further trimmed down but some refactorings will have to be
# done.
Metrics/MethodLength:
Max: 252
Max: 20

# It's convenient to mix both. This is something that SUSE's style guide does
# not specify, so we take the approach that we were following already.
Style/ClassAndModuleChildren:
#
# Rails
#

Rails:
Enabled: true

Rails/SkipsModelValidations:
Enabled: false

# NOTE: (mssola) This would be nice, but there are too many errors on this for
# now and it's not urgent. I will fix this in the near future.
#
# Style
#

# It's not needed to add documentation for obvious modules or classes. The main
# idea is that documentation will be asked during the review process if needed.
Style/Documentation:
Enabled: false

# NOTE: (mssola) In versions of Ruby higher than 2.1.x, we get
# Lint/ShadowedException in some cases where in 2.1.x it complains if we remove
# such guards. Therefore, we have to disable this cop until we update the
# version of Ruby to be officially supported.
Lint/UnneededDisable:
# This forces us to create a new object for no real reason.
Style/MultipleComparison:
Enabled: false

Rails:
Enabled: true
# This is a common SUSE configuration value: the performance difference between
# single and double quotes is no longer there, and so it's better to be
# consistent and force only double quotes.
Style/StringLiterals:
EnforcedStyle: double_quotes

AllCops:
Exclude:
# Files that are out of our control and that are not excluded in the
# default config of rubocop.
- db/schema.rb
- db/migrate/*
- vendor/**/*
# Same as Style/StringLiterals.
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes

# There are some false positives (e.g. "module ::Module", in which we want to
# make sure there are no clashes or misunderstandings). Therefore, we just
# disable this cop.
Style/ClassAndModuleChildren:
Enabled: false

#
# Naming
#

# The default minimum length is 3, which is too long for good names like
# "js". Variables with only one letter are usually disallowed, but there are
# some names which are easy to understand (e.g. convention).
Naming/UncommunicativeMethodParamName:
MinNameLength: 2
AllowedNames: [_, n]
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.2
2.6.2
Loading