profile
viewpoint
Robb Kidd robbkidd Chef Software D.C. Metro, USA

habitat-sh/habitat 2219

Modern applications with built-in automation

OperationCode/operationcode_backend 64

This is the backend repo for the Operation Code website

chef-boneyard/inspec-aws-old 47

[Deprecated] This is integrated in InSpec 2.0 now

markolson/linkbot 26

pluggable ruby chatbot for slack (and others)

chef/dcob 3

A Github DCO bot - sets the status for each commit

nellshamrell/tf_supermarket_cluster 3

Terraform Config for spinning up a Chef Server, Supermarket Server, and configuring them together

chef-cft/inspec_cve_2019_15224 2

Example InSpec profile to detect presence of a malicious rest-client gem (CVE-2019-15224)

eeyun/RoRdit 2

Link aggregation web app similar with Reddit in Ruby on Rails

robbkidd/activerecord-netezza-adapter 2

ActiveRecord JDBC adapter for Netezza

robbkidd/activerecord-jdbc-adapter 1

ActiveRecord adapter for JDBC and JRuby.

PR opened markolson/linkbot

fix the display of !help

The whole ptr system went away during the Great Plugin Refactoring.

Linkbot::Plugin.plugins is now an array of plugin instances. Walk that collection and prioritize checking for help text first before checking whether the plugin has a handler.

Also, some plugins have multiline HEREDOCs for their help text, so chomp that last newline, eh?

+7 -4

0 comment

2 changed files

pr created time in 11 days

create barnchrobbkidd/linkbot

branch : robb/fix-help

created branch time in 11 days

PR opened markolson/linkbot

!image eats !gif

!gif maybe used to use Reddit, but now it's basically the same as !image with a parameter requesting animated images.

+10 -71

0 comment

2 changed files

pr created time in 11 days

create barnchrobbkidd/linkbot

branch : robb/image-eats-gif

created branch time in 11 days

push eventmarkolson/linkbot

Robb Kidd

commit sha 01baa0b5277cd60818afe5317edf35b20a5730b9

reorganize hab build plan Mostly to do with writing out the bundler config for the build to .bundle/config instead of environment variables. Also, don't pull in the Habitat core/bundler package anymore. Bundler is ...bundled... with Ruby now. If a different version of bundler is required, install a specific version with gem install during do_build() instead of relying on a Habitat package. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 6f2bb634d951fdd1e523e0f523128364c8bc3e94

install the bundler the project was bundled with Also remove dead commented code. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 19e98e56cd9cc04866d328b1ef3c6853209fd014

Merge pull request #102 from robbkidd/hab-plan-updates reorganize hab build plan

view details

push time in 11 days

PR merged markolson/linkbot

reorganize hab build plan

Mostly to do with writing out the bundler config for the build to .bundle/config instead of environment variables.

Also, don't pull in the Habitat core/bundler package anymore. Bundler is ...bundled... with Ruby now. If a different version of bundler is required, install a specific version with gem install during do_build() instead of relying on a Habitat package.

+38 -41

1 comment

2 changed files

robbkidd

pr closed time in 11 days

pull request commentmarkolson/linkbot

reorganize hab build plan

I'm the only one who currently cares about the code in this directory, so I APPROVE!

robbkidd

comment created time in 11 days

push eventrobbkidd/linkbot

Robb Kidd

commit sha 297a9cb5b8d34b2ae2d73a555ab2959a4845ca40

declare results var in a higher scope ... so that the rest of the method can use it, eh? Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 325c4371de61d53726a877ca4037685798aab1a8

youtube video ids often have dashes Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Bill Mill

commit sha 440b500fef706795a96afd751bc68384e3282dc6

Merge pull request #110 from robbkidd/robb/fix-the-fixes More fixes for !image and !youtube

view details

Robb Kidd

commit sha 01baa0b5277cd60818afe5317edf35b20a5730b9

reorganize hab build plan Mostly to do with writing out the bundler config for the build to .bundle/config instead of environment variables. Also, don't pull in the Habitat core/bundler package anymore. Bundler is ...bundled... with Ruby now. If a different version of bundler is required, install a specific version with gem install during do_build() instead of relying on a Habitat package. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 6f2bb634d951fdd1e523e0f523128364c8bc3e94

install the bundler the project was bundled with Also remove dead commented code. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in 11 days

Pull request review commentchef/omnibus-software

Move some more gem cleanup from chef/chef to all ruby projects

       CHANGES.md       CHANGES.txt       CODE_OF_CONDUCT.md+      Code-of-Conduct.md+      codecov.yml+      concourse       CONTRIBUTING.md       CONTRIBUTING.rdoc       CONTRIBUTORS.md-      Code-of-Conduct.md+      doc+      doc-api+      docker-compose.yml+      Dockerfile*+      docs+      donate.png+      ed25519.png

I guess I can live without a diagram of how ed25519 works.

eye roll

tas50

comment created time in 13 days

PR opened markolson/linkbot

More fixes for !image and !youtube
+3 -1

0 comment

2 changed files

pr created time in 14 days

push eventrobbkidd/linkbot

Robb Kidd

commit sha 1a1411088410bc3d68b21c74b97c61d46af148ad

declare results var in a higher scope ... so that the rest of the method can use it, eh? Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha d654b86c38ad55562f80ae6ca2d92273e3386317

youtube video ids often have dashes Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 7217a684e5e100f6fd6347808d995a069c01e7c6

install the bundler the project was bundled with Also remove dead commented code. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in 14 days

create barnchrobbkidd/linkbot

branch : robb/fix-the-fixes

created branch time in 14 days

push eventrobbkidd/linkbot

Robb Kidd

commit sha 8ba4259c110808bfead6369f5dcde4ed6803731f

update scanning for img urls There's a new regex in town. And by "new" I mean "it was changed forever ago." Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha cc774b5a152c76fb54b8043b697b2aff1fa292a2

update scanning for youtube video IDs Fixes the regex for finding video IDs in results. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 60c39119d2e2eca7f71c7532be53708cb4b493f4

use httparty to get things Because there ain't no party like a httparty, because a httparty don't stop. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 079df497a86e912b28653d83fc4a4c67585d258b

nix Ruby < 2.5 Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 1395deeb06fd174aeaa238b405c460d3a3c7fc9c

install sqlite3 for GitHub Actions Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha e48da5dd1b70b29ad0d56f29f2f01756838b5457

please don't kill other builds when one fails Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha f56fb3e68b22b41053b136d1d22291ddfc7dd3fc

let's use the modern bundler Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha bdf7d9efdaaeaca1314f9be176009edb637c138c

Merge pull request #109 from robbkidd/robb/fix-image-and-youtube fix !image and !youtube

view details

Robb Kidd

commit sha ac1bec2a1899f00a3b808003e625b2565c15b01a

reorganize hab build plan Mostly to do with writing out the bundler config for the build to .bundle/config instead of environment variables. Also, don't pull in the Habitat core/bundler package anymore. Bundler is ...bundled... with Ruby now. If a different version of bundler is required, install a specific version with gem install during do_build() instead of relying on a Habitat package. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in 14 days

PR merged markolson/linkbot

fix !image and !youtube

Liberally lifted from llimlllib/limbo.

+29 -16

2 comments

6 changed files

robbkidd

pr closed time in 14 days

delete branch robbkidd/linkbot

delete branch : robb/fix-image-and-youtube

delete time in 14 days

push eventmarkolson/linkbot

Robb Kidd

commit sha 8ba4259c110808bfead6369f5dcde4ed6803731f

update scanning for img urls There's a new regex in town. And by "new" I mean "it was changed forever ago." Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha cc774b5a152c76fb54b8043b697b2aff1fa292a2

update scanning for youtube video IDs Fixes the regex for finding video IDs in results. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 60c39119d2e2eca7f71c7532be53708cb4b493f4

use httparty to get things Because there ain't no party like a httparty, because a httparty don't stop. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 079df497a86e912b28653d83fc4a4c67585d258b

nix Ruby < 2.5 Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 1395deeb06fd174aeaa238b405c460d3a3c7fc9c

install sqlite3 for GitHub Actions Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha e48da5dd1b70b29ad0d56f29f2f01756838b5457

please don't kill other builds when one fails Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha f56fb3e68b22b41053b136d1d22291ddfc7dd3fc

let's use the modern bundler Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha bdf7d9efdaaeaca1314f9be176009edb637c138c

Merge pull request #109 from robbkidd/robb/fix-image-and-youtube fix !image and !youtube

view details

push time in 14 days

push eventrobbkidd/linkbot

Robb Kidd

commit sha f56fb3e68b22b41053b136d1d22291ddfc7dd3fc

let's use the modern bundler Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in 14 days

push eventrobbkidd/linkbot

Robb Kidd

commit sha 079df497a86e912b28653d83fc4a4c67585d258b

nix Ruby < 2.5 Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 1395deeb06fd174aeaa238b405c460d3a3c7fc9c

install sqlite3 for GitHub Actions Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha e48da5dd1b70b29ad0d56f29f2f01756838b5457

please don't kill other builds when one fails Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in 14 days

pull request commentmarkolson/linkbot

fix !image and !youtube

Should we not use it? I'm kinda just cargo-culting there to be more consistent with web retrievals.

robbkidd

comment created time in 14 days

PR opened markolson/linkbot

fix !image and !youtube

Liberally lifted from llimlllib/limbo.

+17 -11

0 comment

3 changed files

pr created time in 14 days

create barnchrobbkidd/linkbot

branch : robb/fix-image-and-youtube

created branch time in 14 days

pull request commentchef/supermarket

Change log directory mode to use an attribute

In a re-review, I think I like the option of a smaller change: update the hard-coded permission from from '0700' to '0740' and document that any user that needs read access to the logs should be added to the supermarket group.

Anyone opposed? I'm happy to do the work or help someone do the work to close out this issue!

moutons

comment created time in 14 days

issue commentchef/supermarket

Nginx version bump ( > 1.17.7) due to CVE-2019-20372

It's pretty much "as needed" for various values of "needed." At the moment, with this particular vulnerability of a dependency not exposed by a Supermarket install, I'd estimate this update would happen as part of the next "every other month" maintenance release, next scheduled for early September.

bryanmartin-okta

comment created time in 15 days

issue commentchef/supermarket

Nginx version bump ( > 1.17.7) due to CVE-2019-20372

Supermarket's omnibus build—the thing that produces the RPM—gets its version of nginx from chef/omnibus-software. Adding a newer version to the list of recognized nginx versions and updating the default version is the next step to getting a newer nginx included within Supermarket.

bryanmartin-okta

comment created time in 15 days

issue commentchef/supermarket

Nginx version bump ( > 1.17.7) due to CVE-2019-20372

More investigation for prioritization efforts:

Supermarket's nginx configuration—primary config, web app config—does not contain any error_page directives. I conclude from this that Supermarket does not expose this particular vulnerability.

bryanmartin-okta

comment created time in 15 days

issue commentchef/supermarket

Nginx version bump ( > 1.17.7) due to CVE-2019-20372

Hi, @bryanmartin-okta! Thanks for opening the issue.

From CVE-2019-20372:

NGINX before 1.17.7, with certain error_page configurations, allows HTTP request smuggling, as demonstrated by the ability of an attacker to read unauthorized web pages in environments where NGINX is being fronted by a load balancer.

Was the audit finding a detection of the older nginx version number? Or did the audit find that Supermarket's configuration of nginx error pages was vulnerable to this request smuggling?

bryanmartin-okta

comment created time in 15 days

PR closed chef/chef

🚧 WIP 🛑 Blocked: refactor Linux hab plan, add testing! (based on lessons from Windows plan) Aspect: Packaging Platform: Linux Status: Waiting on Contributor

From lessons learned on #8900

Lots of things changing in here. Let's take them in a possibly weird order.

do_prepare()

Move all the settng of build environment ..uh.. settings into the prepare function. Notable things:

  • GEM_HOME is set to a vendor directory under pkg_prefix so that all gem installs (regardless of bundle install or gem install) will be installed there. Expect to see all gems shipped with chef-client under this directory.
  • Multiple bundle config --local commands. These are executed in a subshell after changing directory to the CACHE_PATH so that the bundler configuration will be written out to a .bundle/config file there. bundle commands will be run from this location later, so these settings become effective for the duration of the build and obviate the need for a _bundle helper function.

pkg_bin_dirs=()

Add the vendor/bin directory (remember, vendor/ is where gems get installed, so the binstubs created by the installation will appear here in vendor/bin/) to the PATH of this package's runtime environment because there are commands in there people sometimes want to run. They won't be fast and they might end up with conflicts with gems installed by the user or by downstream pacakges because they haven't been appbundled.

do_setup_environment()

These are environment variables we'll want set to these defaults at runtime.

  • GEM_PATH gets this package's gem installation directory pushed onto it making the gems available at runtime regardless of whether bundle exe is used.
  • APPBUNDLER_ALLOW_RVM is a flag looked for by the binstubs generated by appbundler. Setting this to "true" has nothing to do with RVM and everything to do with asking the appbundled binstub to not wipe out the carefully constructed GEM_PATH from this package and any possible others that "publish" to the runtime environment that gems are available within.
  • SSL_CERT_FILE - trust the CA cert package from core, by default, but downstream packages can override this if they like with something custom.

do_build()

Life is simpler in the build function now. Build environment is all setup, so here we:

  • bundle install to retrieve dependencies based on the Gemfile+.lock
  • run the rake install for the project which builds and installs the gems whose source are in this repo (chef, chef-bin, chef-config)
  • for any gem installed via a git reference, we change to the source directory and rake install it, too, to install it like any other gem

This results in a clean collection of all the required gems installed like normal gems under "vendor/gems." With that directory on the GEM_PATH, we don't need to care about whether the gems were installed by path reference or via git.

do_install()

OK. I fibbed about not needing to tell bundler anything else. For install, we're going to generate the appbundled binstubs that lockdown the versions of gems required by particular commands. appbundler uses the project's Gemfile+lock to determine those version, so while we're in the "install" directory (pkg_prefix), we tell bundler that the Gemfile to work with is over in CACHE_PATH. Then we iterate over the names of gems we want appbundled binstubs for in this package. Those will land in pkg_prefix/bin/.

Note: there's nothing to copy here during install because all the gem install actions were targeting pkg_prefix/vendor so what we would copy is here already.

do_after()

Stuff to make the package smaller.

  • We don't need the cached .gem artifacts.
  • We don't need the cache of git repos retrieved by bundler (those gems are installed at this point like any other gem.)
  • We don't need to ship the gem API documentation. (I imagine we could change our minds about this later.)
  • We don't need the spec tests for all the gems ... except for our own chef gem which, for Reasons, we keep the spec suite around for post-build functional testing.

pkg_deps()

Ruby comes with a version of bundler that works at the moment. We don't have to risk conflicts between the version of Ruby this package depends on and the version of Ruby core/bundler was built against.

+143 -628

3 comments

5 changed files

robbkidd

pr closed time in 25 days

pull request commentchef/chef

🚧 WIP 🛑 Blocked: refactor Linux hab plan, add testing! (based on lessons from Windows plan)

Closing in favor of #10102! The parts of this that are worth saving were reapplied there to a more up-to-date mainline

robbkidd

comment created time in 25 days

Pull request review commentchef/chef

WIP: Test and Promote Habitat builds on Linux

 steps:   expeditor:     executor:       docker:++- label: ":habicat: Linux plan"+  commands:+    - sudo ./scripts/ci/install-hab.sh 'x86_64-linux'+    - sudo ./scripts/ci/verify-plan.sh+  expeditor:+    executor:+      linux:+        privileged: true+        single-use: true++- label: ":habicat: Linux plan (kernel2)"+  commands:+    - sudo ./scripts/ci/install-hab.sh 'x86_64-linux-kernel2'+    - sudo ./scripts/ci/verify-plan.sh+  expeditor:+    executor:+      linux:+        privileged: true+        single-use: true++- label: ":habicat: Windows plan"+  commands:+    - ./scripts/ci/verify-plan.ps1

Could add a ./scripts/ci/install-hab.ps1 and extract the hab installation from verify-plan.ps1 so this test steps looks like the other 2 Linux ones.

christopher-snapp

comment created time in 25 days

Pull request review commentchef/chef

WIP: Test and Promote Habitat builds on Linux

+#!/usr/bin/env bash++set -euo pipefail++export CHEF_LICENSE="accept-no-persist"+export HAB_LICENSE="accept-no-persist"++project_root="$(git rev-parse --show-toplevel)"+pkg_ident="$1"++# print error message followed by usage and exit+error () {+  local message="$1"++  echo -e "\nERROR: ${message}\n" >&2++  exit 1+}++[[ -n "$pkg_ident" ]] || error 'no hab package identity provided'++cd "${project_root}"++echo "--- :mag_right: Testing ${pkg_ident} executables"+for executable in 'chef-client' 'ohai' 'chef-shell' 'chef-apply' 'knife' 'chef-solo'; do+	echo -en "\t$executable = "+  pkg_ident="$pkg_ident" hab pkg exec ${pkg_ident} "${executable}" --version || error "${executable} failed to execute properly"

To fully replace the specs omitted below (i.e. --tag ~executables), this should check that the version number output from the commands matches the version portion of $pkg_ident.

christopher-snapp

comment created time in 25 days

Pull request review commentchef/chef

WIP: Test and Promote Habitat builds on Linux

+#!/usr/bin/env bash++set -euo pipefail++export CHEF_LICENSE="accept-no-persist"+export HAB_LICENSE="accept-no-persist"++project_root="$(git rev-parse --show-toplevel)"+pkg_ident="$1"++# print error message followed by usage and exit+error () {+  local message="$1"++  echo -e "\nERROR: ${message}\n" >&2++  exit 1+}++[[ -n "$pkg_ident" ]] || error 'no hab package identity provided'++cd "${project_root}"++echo "--- :mag_right: Testing ${pkg_ident} executables"+for executable in 'chef-client' 'ohai' 'chef-shell' 'chef-apply' 'knife' 'chef-solo'; do+	echo -en "\t$executable = "+  pkg_ident="$pkg_ident" hab pkg exec ${pkg_ident} "${executable}" --version || error "${executable} failed to execute properly"+done++echo "--- :mag_right: Testing ${pkg_ident} functionality"+pkg_ident="$pkg_ident" hab pkg exec ${pkg_ident} rspec --format progress --tag ~executables spec/functional || error 'failures during rspec tests'

👍

And we talked about changing all of them to --format documentation to match what's in omnibus/omnibus-test.sh.

christopher-snapp

comment created time in 25 days

Pull request review commenthabitat-sh/core-plans

[scaffolding-ruby] Added support for Rails6 apps

 _detect_rails42_app() {     return 0   else     return 1-  fi+fi

I believe this is an incorrect unindent.

username-is-already-taken2

comment created time in 25 days

Pull request review commenthabitat-sh/core-plans

[scaffolding-ruby] Added support for Rails6 apps

 _detect_rails5_app() {     return 1   fi }+_detect_rails6_app() {+  if _has_gem railties && _compare_gem railties \+      --greater-than-eq 6.0.0 --less-than 6.1.0; then

Rails' versioning is not quite the Semantic Versioning you would expect. It uses a "shifted version of semver." Rails maintenance policy warns that changes in what we would call the minor version (the Y in X.Y.Z) means, "[n]ew features, may contain API changes (Serve as major versions of Semver)." So, yea, there can be surprising changes going from Rails 6.0 to 6.1.

username-is-already-taken2

comment created time in 25 days

release chef/supermarket

3.3.26

released time in a month

push eventrobbkidd/linkbot

Robb Kidd

commit sha cf9094868b85d15bf3ed17ee13ef6816c7ccfb4b

please don't kill other builds when one fails Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in a month

push eventrobbkidd/linkbot

Robb Kidd

commit sha 066418ddfbc9fbf0056de37c2737e2586df547c1

install sqlite3 for GitHub Actions Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in a month

push eventrobbkidd/linkbot

Robb Kidd

commit sha 9f0b53d79249be6cfa50ad37bd6461090a9dbc3f

nix Ruby < 2.5 Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in a month

push eventrobbkidd/linkbot

Robb Kidd

commit sha 2ac4dba76aa78f28822a5d4c7e2343ff1045a8c8

nix Ruby < 2.5 Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in a month

push eventchef/supermarket

dependabot[bot]

commit sha ac915f8ef6e0f319d0174b6626e2cb1aa41ea3e5

Bump rack from 2.2.2 to 2.2.3 in /omnibus Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com>

view details

Robb Kidd

commit sha 0eb5b19d8f66d99903195dfdf8e2a1b46f2f689d

Merge pull request #1868 from chef/dependabot/bundler/omnibus/rack-2.2.3 Bump rack from 2.2.2 to 2.2.3 in /omnibus

view details

push time in a month

PR merged chef/supermarket

Bump rack from 2.2.2 to 2.2.3 in /omnibus Aspect: Security dependencies

Bumps rack from 2.2.2 to 2.2.3. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rack/rack/blob/master/CHANGELOG.md">rack's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <p>All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference <a href="https://keepachangelog.com/en/1.0.0/">Keep A Changelog</a>.</p> <h2>[3.0.0] - Unreleased</h2> <h3>Changed</h3> <ul> <li>BREAKING CHANGE: Require <code>status</code> to be an Integer. (<a href="https://github-redirect.dependabot.com/rack/rack/pull/1662">#1662</a>, <a href="https://github.com/olleolleolle">@olleolleolle</a>)</li> <li>Relax validations around <code>Rack::Request#host</code> and <code>Rack::Request#hostname</code>. (<a href="https://github-redirect.dependabot.com/rack/rack/issues/1606">#1606</a>, <a href="https://github.com/pvande">@pvande</a>)</li> <li>Removed antiquated handlers: FCGI, LSWS, SCGI, Thin. (<a href="https://github-redirect.dependabot.com/rack/rack/pull/1658">#1658</a>, <a href="https://github.com/ioquatix">@ioquatix</a>)</li> <li>Removed options from <code>Rack::Builder.parse_file</code> and <code>Rack::Builder.load_file</code>. (<a href="https://github-redirect.dependabot.com/rack/rack/pull/1663">#1663</a>, <a href="https://github.com/ioquatix">@ioquatix</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Fix using Rack::Session::Cookie with coder: Rack::Session::Cookie::Base64::{JSON,Zip}. (<a href="https://github-redirect.dependabot.com/rack/rack/issues/1666">#1666</a>, <a href="https://github.com/jeremyevans">@jeremyevans</a>)</li> <li>Avoid NoMethodError when accessing Rack::Session::Cookie without requiring delegate first. (<a href="https://github-redirect.dependabot.com/rack/rack/issues/1610">#1610</a>, <a href="https://github.com/onigra">@onigra</a>)</li> <li>Handle cookies with values that end in '=' (<a href="https://github-redirect.dependabot.com/rack/rack/pull/1645">#1645</a>, <a href="https://github.com/lukaso">@lukaso</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rack/rack/commit/1741c580d71cfca8e541e96cc372305c8892ee74"><code>1741c58</code></a> bump version</li> <li><a href="https://github.com/rack/rack/commit/5ccca4722668083732ea2d35c56565fcc25312f8"><code>5ccca47</code></a> When parsing cookies, only decode the values</li> <li>See full diff in <a href="https://github.com/rack/rack/compare/v2.2.2...2.2.3">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in a month

push eventrobbkidd/linkbot

Robb Kidd

commit sha 4c566fd2affdfc8ad679ad0d8c9fb3d03ad157d4

let's use the modern bundler Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in a month

PR merged chef/supermarket

Rails 5.0 -> 5.1 -> 5.2 upgrade; adoption of ChefStyle Aspect: Security Type: Chore

Description

The goal is a supported Rails version, at least for security updates this round, and getting other dependencies up-to-date as seems appropriate.

TODO

  • [x] apply ChefStyle
  • [x] switch-over to as many Rails 5.0 new defaults as possible
  • [x] update to Rails 5.1
  • [x] update to Rails 5.2
  • [x] write tests around the new dependent: (:destroy|:nullify|:restrict_with_exception) logic in Group and User
  • [x] test omnibus install

Punting Into The Future

  • switch-over to as many Rails 5.1 new defaults as possible
  • switch-over to as many Rails 5.2 new defaults as possible

Related Issue

...

Types of changes

<!--- What types of changes does your code introduce? Put an x in all the boxes that apply: -->

  • ~Bug fix (non-breaking change which fixes an issue)~
  • ~New feature (non-breaking change which adds functionality)~
  • ~Breaking change (fix or feature that would cause existing functionality to change)~
  • [x] Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

<!--- Go over all the following points, and put an x in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

  • [x] I have read the CONTRIBUTING document.
  • [x] I have run the pre-merge tests locally and they pass.
  • ~I have updated the documentation accordingly.~
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.
  • [x] All commits have been signed-off for the Developer Certificate of Origin.
+7274 -7140

0 comment

565 changed files

robbkidd

pr closed time in a month

push eventchef/supermarket

Robb Kidd

commit sha 297c075672c2d3eb7b48ec9a114c19f0400ed370

upgrade shoulda-matchers to resolve deprecation The version we were using was quite old and suffered a deprecation warning in later Ruby 2.6 about BigDecimal.new() vs BigDecimal(). Moving to Ruby 2.7 required an upgrade. This change takes should-matchers to its latest version. Review of changes: * validate_uniqueness_of: - CookbookVersion's spec was updated to match the case-insensitive uniqueness of the model. The scope on the constraint also needed updating to resolve an outstanding issue in the matcher.[1] - Tool's spec was updated to match the case-insensitive uniqueness of the model. * spec_helper was updated with a configuration for Should::Matchers as documented in the backward-incompatible changes notes for the 3.0.0 major release.[2] * supported_platform_spec was updated to use a factory-built subject so that the validation specs would operate with a valid starting object. Changed all test instance creations to use the factory instead of the model directly. * system_email_spec was updated to use a factory-built subject so that the validation specs would operate with a valid starting object. [1] https://github.com/thoughtbot/shoulda-matchers/issues/814#issuecomment-612943953 [2] https://github.com/thoughtbot/shoulda-matchers/blob/master/CHANGELOG.md#300---2015-10-01 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1ee0224eaa01d12a76e6c0c8c2a221931e620065

update ffi-libarchive to resolve dep warnings > warning: rb_safe_level will be removed in Ruby 3.0 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 098211fe976c91bd30f5d2b0447b6139bb55dfdb

update utf8-cleaner to resolve dep warning > URI.unescape is obsolete Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1d707ac62c76cb07f868221bdda8ecdce3ba1ef6

update jbuilder to resolve dep warning > Capturing the given block using Proc.new is deprecated; use `&block` > instead Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 3a98afbe3ac2c5dcbf922ec7df64ade79790ef7e

update fieri engine to Rails 5.1 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e6ec49354fa24fe334e335bd1941ada3c4dcffa6

remove <5.0 config defaults In preparation for 5.0->5.1, remove these config settings that guarded defaults from Rails 4. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 773c483c1eaac803f041a89af0d6a260313c04df

upgrade rails to 5.1 and run app:update Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 8768c06b9128a70e9fcf68377dff21cf6cf1e65b

fix new belongs_to required association Rails 5.1 changes the belongs_to association to default to requiring the other end of the relationship to exist. This change updates some of the belongs_to associations to be optional where appropriate. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1c032c2e10ee09cfaf238711f025a4e5437ef5f3

fix record creation dependencies in factories A cookbook must exist before a cookbook_version can be saved. * cookbook_version: make the association to cookbook explicit so that the factory will create the parent cookbook if necessary * cookbook: instantiate but not yet save cookbook versions when creating a cookbook. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha d2804634fae37c4dd6d4dda177148a1e5578542e

fix a file reader left at the end of the file contents Having read the contents of the tarball file, it needed to be rewound so that using it again in the test POST didn't result in an empty file being processed in the test environment. This appeared to only be a problem in the tests. Not 100% positive of the change in Rails or the test framework that this behavior changed, but I suspect the same file object instance was being passed from the spec and into the application during testing. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 7abfa51979447f2e0878eb6017a01a5846b1b719

set URL options for the application as well as mailer This lets all of the application stack know how to compute full URLs back to itself. This might obviate the need for Supermarket::Host.full_url Start tracking the .env.test file to set things in the test environment like things are set for production. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 02071266fe3007917d3d3e001782e1a9c596eaf4

use the expected URL path instead of getting fancy with URL helpers Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 88bb57cf795c436c59e19c0f6fcf426159b93816

upgrade some mixlib and some debuggers * upgrade mixlib-authentication - not much changed, but let's keep up to date * upgrade chef - dependency of mixlib-auth * swap out byebug for pry-byebug for more better debugging Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha aec877e6753902d142c689100d856aa1c217db29

update fieri engine to Rails 5.2 Most of these changes are the result of running 'rake app:update' on the dummy Rails app inside the specs for the fieri engine. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a6a6ff6757fcf178db9e68a00186ebf4d4420ab1

adopt ChefStyle linting Updates Rakefiles to have 'spec' and 'link' tasks that run as default. Updates Travis to run that default rake task. Travis config also updated to resolve some of their validations (os and distro, name of redis, sudo does nothing). Includes cookstyle so that dep-solving won't pick a Rubocop that won't work for a future cookstyle quality metric. Include rubocop-rails ... because this is a Rails app. The gone-by-the-wayside maintainers rake task needed to have its default task move inside the namespace or else it messes up the true default. Signed-off-by: Robb Kidd <rkidd@chef.io> fixup! adopt ChefStyle linting

view details

Robb Kidd

commit sha 1b7586be8fc93057cabf245e02a99db2330b916d

appease ChefStyle: The Double-Quotification of Supermarket Style/StringLiterals: > Prefer double-quoted strings unless you need single quotes to avoid > extra backslashes for escaping. Style/StringLiteralsInInterpolation: > Prefer double-quoted strings inside interpolations. Bonus! appease RubocopRails: Rails/FilePath > Please use Rails.root.join('path/to') instead. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 42471df786db989ae24dc430af0ced312b699303

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ba7487b5ceddd00e7c1a82203c63dd5370c1658c

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ad3622411abe8f093e22472b4c83448028634949

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ab91b9811065bdbebfd3bb1d9a296c0ecbeaeb9f

appease RubocopRails: Rails/HttpStatus > Prefer :bad_request over 400 to define HTTP status code. > Prefer :unauthorized over 401 to define HTTP status code. OK. Also rearranged the error hash for JSON rendering in ApplicationController to make the whitespace less awkward. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventrobbkidd/linkbot

Robb Kidd

commit sha 54ab1ad5879b724cfa9277fa3a904844684bca7d

update some gems * stock_quote 1.x disappeared, so use something newer. Something newer now requires an API key, so hack that in I guess. * activesupport forced to be newer than 5.1.0 because updating stock_quote caused bundler to resolve to an activesupport 3.x * a new eventmachine came in and barked about the C extension being missing, so move the em/pure_ruby line in the slack connector to before the slack client library is loaded so that the eventmachine use inside it knows to use the Ruby implementation. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha f1341bccd11c70f5406fe08a1cfaf4b1a0c400c5

fix fail: failpictures.com is using TLS now Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 23f850ced38be7c5641988f802e90c7c0410f41e

Merge pull request #101 from robbkidd/update-some-gems updatin' gems & fixin' some plugins

view details

Robb Kidd

commit sha 746c4a1d19771888333dd298a59de6cf4b2f8347

let's try GitHub Actions, eh? Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 0f58c396b1f982f0fb0f172709cd1596fa82c8dc

Merge pull request #108 from robbkidd/github-actions-por-favor let's try GitHub Actions, eh?

view details

Robb Kidd

commit sha 7f32ec1414d53e3f64f1ff8e486b18f15cf10bc8

reorganize hab build plan Mostly to do with writing out the bundler config for the build to .bundle/config instead of environment variables. Also, don't pull in the Habitat core/bundler package anymore. Bundler is ...bundled... with Ruby now. If a different version of bundler is required, install a specific version with gem install during do_build() instead of relying on a Habitat package. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in a month

delete branch robbkidd/linkbot

delete branch : github-actions-por-favor

delete time in a month

push eventmarkolson/linkbot

Robb Kidd

commit sha 746c4a1d19771888333dd298a59de6cf4b2f8347

let's try GitHub Actions, eh? Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 0f58c396b1f982f0fb0f172709cd1596fa82c8dc

Merge pull request #108 from robbkidd/github-actions-por-favor let's try GitHub Actions, eh?

view details

push time in a month

PR merged markolson/linkbot

let's try GitHub Actions, eh?

¯_(ツ)_/¯

+27 -0

0 comment

1 changed file

robbkidd

pr closed time in a month

PR opened markolson/linkbot

let's try GitHub Actions, eh?

¯_(ツ)_/¯

+27 -0

0 comment

1 changed file

pr created time in a month

create barnchrobbkidd/linkbot

branch : github-actions-por-favor

created branch time in a month

delete branch robbkidd/linkbot

delete branch : update-some-gems

delete time in a month

push eventmarkolson/linkbot

Robb Kidd

commit sha 54ab1ad5879b724cfa9277fa3a904844684bca7d

update some gems * stock_quote 1.x disappeared, so use something newer. Something newer now requires an API key, so hack that in I guess. * activesupport forced to be newer than 5.1.0 because updating stock_quote caused bundler to resolve to an activesupport 3.x * a new eventmachine came in and barked about the C extension being missing, so move the em/pure_ruby line in the slack connector to before the slack client library is loaded so that the eventmachine use inside it knows to use the Ruby implementation. Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha f1341bccd11c70f5406fe08a1cfaf4b1a0c400c5

fix fail: failpictures.com is using TLS now Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 23f850ced38be7c5641988f802e90c7c0410f41e

Merge pull request #101 from robbkidd/update-some-gems updatin' gems & fixin' some plugins

view details

push time in a month

PR merged markolson/linkbot

updatin' gems & fixin' some plugins
  • stock_quote 1.x disappeared, so use something newer. Something newer now requires an API key, so hack that in I guess.

  • activesupport forced to be newer than 5.1.0 because updating stock_quote caused bundler to resolve to an activesupport 3.x

  • a new eventmachine came in and barked about the C extension being missing, so move the em/pure_ruby line in the slack connector to before the slack client library is loaded so that the eventmachine use inside it knows to use the Ruby implementation.

  • failpictures switched over to TLS, so we gotta use HTTPS for the URL scheme.

+60 -52

1 comment

5 changed files

robbkidd

pr closed time in a month

pull request commentmarkolson/linkbot

updatin' gems & fixin' some plugins

Waiting for gargantuan builds to complete and test.

Compiling!

robbkidd

comment created time in a month

PR opened markolson/linkbot

reorganize hab build plan

Mostly to do with writing out the bundler config for the build to .bundle/config instead of environment variables.

Also, don't pull in the Habitat core/bundler package anymore. Bundler is ...bundled... with Ruby now. If a different version of bundler is required, install a specific version with gem install during do_build() instead of relying on a Habitat package.

+38 -41

0 comment

2 changed files

pr created time in a month

create barnchrobbkidd/linkbot

branch : hab-plan-updates

created branch time in a month

PR opened markolson/linkbot

updatin' gems & fixin' some plugins
  • stock_quote 1.x disappeared, so use something newer. Something newer now requires an API key, so hack that in I guess.

  • activesupport forced to be newer than 5.1.0 because updating stock_quote caused bundler to resolve to an activesupport 3.x

  • a new eventmachine came in and barked about the C extension being missing, so move the em/pure_ruby line in the slack connector to before the slack client library is loaded so that the eventmachine use inside it knows to use the Ruby implementation.

  • failpictures switched over to TLS, so we gotta use HTTPS for the URL scheme.

+60 -52

0 comment

5 changed files

pr created time in a month

push eventrobbkidd/linkbot

Robb Kidd

commit sha f1341bccd11c70f5406fe08a1cfaf4b1a0c400c5

fix fail: failpictures.com is using TLS now Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 8ac62cdec72b6fa279fcdee53483e465c6ab8ced

new CtlCommandHelper method for rails commands `console` and `make-admin` commands were failing on some platforms as a result of HOME not being set to a directory to which the command could write. Both need the same preamble setup to get the stars in the correct alignment for Rails commands to succeed, so the preamble moved to the existing helper class. Add a HOME entry to that preamble. `quality-metrics` needed the same treatment. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 487324d85e1d299bbb858ac5ad04dfd0e8f1bca8

new CtlCommandHelper method for rails commands `console` and `make-admin` commands were failing on some platforms as a result of HOME not being set to a directory to which the command could write. Both need the same preamble setup to get the stars in the correct alignment for Rails commands to succeed, so the preamble moved to the existing helper class. Add a HOME entry to that preamble. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

create barnchrobbkidd/linkbot

branch : update-some-gems

created branch time in a month

push eventchef/supermarket

Robb Kidd

commit sha 5e651da3f1ffb702aa5bd59e8b59ad1818ad7731

stop redirecting test output to a file Nothing displays the results in that file any more. Better to see the test results appear in the build output log. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

Pull request review commentTerrastories/terrastories

Allowing online image and video uploads to S3

 local:   root: "/media"  # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)-# amazon:-#   service: S3-#   access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>-#   secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>-#   region: us-east-1-#   bucket: your_own_bucket+amazon:+  service: S3+  access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>+  secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>+  region: "us-east-2"+  bucket: "terrastories-demo"

Region and bucket should maybe be configurable through ENV.fetch("ENV_VAR", "a_sensible_default"). But they aren't secrets, so they don't need to go through encrypted credentials.

mirandawang

comment created time in a month

Pull request review commentTerrastories/terrastories

Allowing online image and video uploads to S3

 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)  require 'bundler/setup' # Set up gems listed in the Gemfile.-require 'bootsnap/setup' # Speed up boot time by caching expensive operations.+# require 'bootsnap/setup' # Speed up boot time by caching expensive operations.

I am 👍 on omitting bootsnap for the time being. bootsnap is a caching mechanism to speed up start times. As a cache, it introduces all of the weirdnesses of caching when it is not clear that Terrastories has a problem bootsnap caching solves.

mirandawang

comment created time in a month

push eventchef/supermarket

Robb Kidd

commit sha f08d526a70b7a2a6bcd634dcd910b0b7c452beb0

move build dir owner fix to only debianesque Apparently this directory ownership fix only needs to be applied to the Ubuntu builder in the kitchen environment. Moved it because it would error on RHELish hosts. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a13ab00226db323afbf32b8b10e71294249ef3cf

add new platform versions to test and release matrices Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 0a778acf37c5e58b1eb9da8798046c031c529d7b

appease RubocopRails: Rails/HasManyOrHasOneDependent > Specify a :dependent option.[1][2] Yep. This is another round of telling the ORM what to do with dependent records caused by tossing out the previous .rubocop_todo.yml. Here's the reasoning behind the dependent actions chosen: * Group - destroy dependent records - group_members :: a join table between Group and User, so when a Group is destroyed, the record for a User's membership in the Group should be destroyed as well. - group_resources :: a join table between Group and a thing the Group had access to, so when a Group is destroyed, the record for Group access to a thing should be destroyed as well * User - destroy dependent records - accounts :: a child table for associating a User with "accounts" in other systems (e.g. Chef Server, GitHub). Deleting a User is rare, disabling is preferred, but when destroyed, these records about their accounts should be destroyed as well. - collaborators :: a better name would be "collaborations," this is a join table linking a user with things they can change. When the User is destroyed, it is appropriate to destroy their access to things. - cookbook_followers :: a join table linking a user to the cookbooks they follow. If the User is destroyed, it is appropriate to destroy their subscriptions. - email_preferences :: If a User is destroyed, we don't care about what types of emails they would like to receive. - group_members :: As above with Group, this is a link table for the membership of a user in a group. Destroy that association when a user is destroyed. * User - nullify dependent records - cookbook_versions :: This records the user who uploaded a particular version of a cookbook. When a CookbookVersion.user_id is null, the system will default to using the Owner (the parent Cookbook.user_id) instead. So this one is safe to nullify. * User - raise an exception if dependent records are present - owned_cookbooks :: Supermarket has no concept of a cookbook that is not owned by a user. Ownership should be transferred to another user before a user record can be destroyed. - tools :: Similarly, a Tool must be owned by a user. The association may need to be changed from the Rails console, but this association must exist and be resolved before destroying a user. - initiated_ownership_transfer_requests :: Both cases where a user is associated with an ownership transfer request (as the transferring owner or the new recipient) are cause for a pause. As above with ownership of a Cookbook or Tool, ownership of a thing must be reconciled before destroying a User. OwnershipTransferRequests can be destroyed individually from the Rails console as part of reconciliation to unblock user deletion. [1] https://docs.rubocop.org/rubocop-rails/cops_rails.html#railshasmanyorhasonedependent [2] See Options -> :dependent for has_many. https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 9e49ce3424690c2b96d40724dc39dbf54a9c44b1

appease RubocopRails: Rails/UniqueValidationWithoutIndex, Part 1 > Uniqueness validation should be with a unique index. Agreed. But ... - Cookbook has a unique index on lowercase_name, so name's uniqueness is covered. - Tool, same deal, but added a validation to the model for lowercase_name so that it's more clear that name is covered. - Group ... I'm punting on with a rubocop:todo. Group does not already have a lowercase_name field and the Collaboration Groups feature it supports is onprem only, so we don't have good test data from the wild to judge the impact of adding a database constraint. Opting to live with without for the moment. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 172a7721dcf4919b69ae965dacd1219e6f0867a3

annotate existing migrations with legacy Rails version number Rails 5.0 introduced a Migration API.[1] ActiveRecord::Migration classes are Rails version specific. Rails 5.0 was pretty forgiving about migration classes that didn't have a version annotation. Rails 5.1 is not. These changes are in preparation for new migrations to be added and so only touch existing files. Incidentally, it is `rake db:migrate` that reeeeally wants these old migration classes to declare for which Rails version they were written. `rails db:migrate` seemed to accept them just fine. But we rake everywhere, so let's add the annotations to keep up with the framework. [1] https://github.com/rails/rails/pull/21538 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 9bd582e330eaa13af20859e53c0b01c660fc52e5

appease RubocopRails: Rails/UniqueValidationWithoutIndex, Part 2 > Uniqueness validation should be with a unique index. Agreed. These database validations should be safe for us to add so long after the fact. - group_members gets a unique index on user_id + group_id to match the model validation - quality_metrics gets a unique index on name. Supermarket creates these records through seeds, so the names are stable or some onprem admin has been up to hijinks. - system_emails gets a unique index on name. These are also created via seeds, so the hijinks rule applies here, too. * schema.rb Holy cats! Rails decided to tinker a lot with the schema dump output. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ea8ab616f7e4cef2ae85e01bb0d1252cfcd5699e

upgrade Supermarket to Rails 5.2 Just the gems. More work to do, yea? Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 70f7808c6151cf4c3afeaa0a2063c32a62b736e4

rename "index" scopes on Cookbook and Tool Got an error after upgrade: You tried to define a scope named "index" on the model "Cookbook", but ActiveRecord::Relation already defined an instance method with the same name. (ArgumentError) "index" is now a basically-reserved method on ActiveRecord::Relation, so we'll need different names for these scopes. Opted to name them after their query shape instead of after their call sites (index action in API controllers). Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e73a7f253128b6b34704b9b99dba757c2fa73e98

resolve dep warning: use the successful? predicate > DEPRECATION WARNING: The success? predicate is deprecated and will be > removed in Rails 6.0. Please use successful? as provided by > Rack::Response::Helpers. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 94211b8a6f2d933707a3cb74aa2735e5f6f91214

resolve order() SQL injection warnings Upgrade pg_search gem to support Rails 5.2. Resolves deprecation warnings about needing Arel.sql objects when passing parameters to search queries.[1] Cookbook's ordered_by scope mostly needed some refactoring to use Arel.sql objects instead of bare strings in the reorder() method. Moved the hash for mapping of order options to order strings to a constant and gave the default "alphabetical by name" a name. Update to return Arel.sql objects. [1] Released in v2.1.2 https://github.com/Casecommons/pg_search/commit/31ad3adf831c1971214c732665b58f1c716f226f Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha bf4425b7339c14410b771bc192214d055c22dc1b

apply some of rake app:update changes * bin gets a little simpler by using __dir__ for relative paths * bootsnap got added, but I don't want to deal with caching right now, so commented out its load in boot.rb * ActionCable (not used by Supermarket) figures out where Redis is by default now. * ActiveStorage defaults accepted, but for the moment, unused. We're still in Paperclip land. * content_security_policy and new_framework_defaults_5_2 need review. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 22a24bf8574941bc272110031647364082dcd578

fixup! appease RubocopRails: Rails/HasManyOrHasOneDependent

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha a6a6ff6757fcf178db9e68a00186ebf4d4420ab1

adopt ChefStyle linting Updates Rakefiles to have 'spec' and 'link' tasks that run as default. Updates Travis to run that default rake task. Travis config also updated to resolve some of their validations (os and distro, name of redis, sudo does nothing). Includes cookstyle so that dep-solving won't pick a Rubocop that won't work for a future cookstyle quality metric. Include rubocop-rails ... because this is a Rails app. The gone-by-the-wayside maintainers rake task needed to have its default task move inside the namespace or else it messes up the true default. Signed-off-by: Robb Kidd <rkidd@chef.io> fixup! adopt ChefStyle linting

view details

Robb Kidd

commit sha 1b7586be8fc93057cabf245e02a99db2330b916d

appease ChefStyle: The Double-Quotification of Supermarket Style/StringLiterals: > Prefer double-quoted strings unless you need single quotes to avoid > extra backslashes for escaping. Style/StringLiteralsInInterpolation: > Prefer double-quoted strings inside interpolations. Bonus! appease RubocopRails: Rails/FilePath > Please use Rails.root.join('path/to') instead. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 42471df786db989ae24dc430af0ced312b699303

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ba7487b5ceddd00e7c1a82203c63dd5370c1658c

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ad3622411abe8f093e22472b4c83448028634949

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ab91b9811065bdbebfd3bb1d9a296c0ecbeaeb9f

appease RubocopRails: Rails/HttpStatus > Prefer :bad_request over 400 to define HTTP status code. > Prefer :unauthorized over 401 to define HTTP status code. OK. Also rearranged the error hash for JSON rendering in ApplicationController to make the whitespace less awkward. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 5db0c93a51118d5ec82e787cb70585e23ecc4942

appease ChefStyle: Style/RedundantBegin > Redundant begin block detected. It's true. You don't need to wrap an ensure method contents in begin..end. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha fb29f16523ae20b73cc117bd0f6362a506cf400d

appease ChefStyle: Style/SymbolArray > Use %i or %I for an array of symbols. No. So we'll enforce bracketed array of actual symbols. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e47b1df90b6da3b2b109483010a9af6efae96b55

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 255d27c0d9e820418b838c6defbc24e152a4e8f0

appease ChefStyle: Layout/MultilineOperationIndentation ChefStyle has: > Use 4 (not 12) spaces for indenting a condition in an if statement > spanning multiple lines. And that looks weird to me. So, switching up enforced style to: > Align the operands of a condition in an if statement spanning multiple > lines. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 6aad4c25292984d7cf4898c9c8f07a6b949ad548

update redis-rack to quiet warning about double rake Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 907ed56a12909429a22fdb47f7cf909540597f19

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 58f2d62370a0f5c7018ea40b752a3e85c049a458

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 4eee12ac49cb32b4cf81502e71fc987d41baa953

appease ChefStyle: Layout/MultilineMethodCallIndentation > Use X (not Y) spaces for indenting an expression spanning multiple lines. OK. Opted to clean up some of these by bringing the first dotted method down to a second line so that the entire call chain would be indented. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 58a8e0fb33957789ddf73d299c232d6cbb7ed864

appease ChefStyle: Style/TrailingCommaInArrayLiteral > Put a comma after the last item of a multiline array. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha cb6ec22099d6abd0640346e5a2f213652f4de5e7

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha f3d587e84076030bb06e56e8dfc9e3db60fcd625

appease RubocopRails: Rails/ActiveRecordAliases > Use update instead of update_attributes. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha f21d138c6b17ca1843d2cadca7595a1e29a17589

appease RubocopRails: Rails/SkipsModelValidations > This cop checks for the use of methods which skip validations[1] Allowed incrementing counters and touching date fields across the application. Allowed the two uses of update_all() in QualityMetric because those are very simple records at the moment. Calls to update_attributes() were replaced with update(). [1] https://guides.rubyonrails.org/active_record_validations.html#skipping-validations Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 0a593f069f8b9570c199f281b9c65e6d157575a5

appease ChefStyle: Style/RegexpLiteral > Use %r around regular expression. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 361312e19de2fb4bd4a3aa252607e4e1360d376a

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha d54651ef5b1b7d2bde91e78c9ad1b5e601711609

apply some of rake app:update changes * bin gets a little simpler by using __dir__ for relative paths * bootsnap got added, but I don't want to deal with caching right now, so commented out its load in boot.rb * ActionCable (not used by Supermarket) figures out where Redis is by default now. * ActiveStorage defaults accepted, but for the moment, unused. We're still in Paperclip land. * content_security_policy and new_framework_defaults_5_2 need review. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 56d4cc354bce0edb03aab12450663b9969d45f29

apply some of rake app:update changes * bin gets a little simpler by using __dir__ for relative paths * bootsnap got added, but I don't want to deal with caching right now, so commented out its load in boot.rb * ActionCable (not used by Supermarket) figures out where Redis is by default now. * ActiveStorage defaults accepted, but for the moment, unused. We're still in Paperclip land. * content_security_policy and new_framework_defaults_5_2 need review. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 8c8287cd458225bc929f37fcbcc2820aa1666dd6

apply some of rake app:update changes * bin gets a little simpler by using __dir__ for relative paths * bootsnap got added, but I don't want to deal with caching right now, so commented out its load in boot.rb * ActionCable (not used by Supermarket) figures out where Redis is by default now. * ActiveStorage defaults accepted, but for the moment, unused. We're still in Paperclip land. * content_security_policy and new_framework_defaults_5_2 need review. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 440f79fa153c1b0388a83051c676a09fd0d7a4d0

appease RubocopRails: Rails/HasManyOrHasOneDependent > Specify a :dependent option.[1][2] Yep. This is another round of telling the ORM what to do with dependent records caused by tossing out the previous .rubocop_todo.yml. Here's the reasoning behind the dependent actions chosen: * Group - destroy dependent records - group_members :: a join table between Group and User, so when a Group is destroyed, the record for a User's membership in the Group should be destroyed as well. - group_resources :: a join table between Group and a thing the Group had access to, so when a Group is destroyed, the record for Group access to a thing should be destroyed as well * User - destroy dependent records - accounts :: a child table for associating a User with "accounts" in other systems (e.g. Chef Server, GitHub). Deleting a User is rare, disabling is preferred, but when destroyed, these records about their accounts should be destroyed as well. - collaborators :: a better name would be "collaborations," this is a join table linking a user with things they can change. When the User is destroyed, it is appropriate to destroy their access to things. - cookbook_followers :: a join table linking a user to the cookbooks they follow. If the User is destroyed, it is appropriate to destroy their subscriptions. - email_preferences :: If a User is destroyed, we don't care about what types of emails they would like to receive. - group_members :: As above with Group, this is a link table for the membership of a user in a group. Destroy that association when a user is destroyed. * User - nullify dependent records - cookbook_versions :: This records the user who uploaded a particular version of a cookbook. When a CookbookVersion.user_id is null, the system will default to using the Owner (the parent Cookbook.user_id) instead. So this one is safe to nullify. * User - raise an exception if dependent records are present - owned_cookbooks :: Supermarket has no concept of a cookbook that is not owned by a user. Ownership should be transferred to another user before a user record can be destroyed. - tools :: Similarly, a Tool must be owned by a user. The association may need to be changed from the Rails console, but this association must exist and be resolved before destroying a user. - initiated_ownership_transfer_requests :: Both cases where a user is associated with an ownership transfer request (as the transferring owner or the new recipient) are cause for a pause. As above with ownership of a Cookbook or Tool, ownership of a thing must be reconciled before destroying a User. OwnershipTransferRequests can be destroyed individually from the Rails console as part of reconciliation to unblock user deletion. [1] https://docs.rubocop.org/rubocop-rails/cops_rails.html#railshasmanyorhasonedependent [2] See Options -> :dependent for has_many. https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ceda6e4595b769bee615be046f43782b4b816757

appease RubocopRails: Rails/UniqueValidationWithoutIndex, Part 1 > Uniqueness validation should be with a unique index. Agreed. But ... - Cookbook has a unique index on lowercase_name, so name's uniqueness is covered. - Tool, same deal, but added a validation to the model for lowercase_name so that it's more clear that name is covered. - Group ... I'm punting on with a rubocop:todo. Group does not already have a lowercase_name field and the Collaboration Groups feature it supports is onprem only, so we don't have good test data from the wild to judge the impact of adding a database constraint. Opting to live with without for the moment. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha be782446e3363a795980752eee3b1db0feb8b34c

annotate existing migrations with legacy Rails version number Rails 5.0 introduced a Migration API.[1] ActiveRecord::Migration classes are Rails version specific. Rails 5.0 was pretty forgiving about migration classes that didn't have a version annotation. Rails 5.1 is not. These changes are in preparation for new migrations to be added and so only touch existing files. Incidentally, it is `rake db:migrate` that reeeeally wants these old migration classes to declare for which Rails version they were written. `rails db:migrate` seemed to accept them just fine. But we rake everywhere, so let's add the annotations to keep up with the framework. [1] https://github.com/rails/rails/pull/21538 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha d6e595e9ffea6287666ab5f495e0fecf9b1b3435

appease RubocopRails: Rails/UniqueValidationWithoutIndex, Part 2 > Uniqueness validation should be with a unique index. Agreed. These database validations should be safe for us to add so long after the fact. - group_members gets a unique index on user_id + group_id to match the model validation - quality_metrics gets a unique index on name. Supermarket creates these records through seeds, so the names are stable or some onprem admin has been up to hijinks. - system_emails gets a unique index on name. These are also created via seeds, so the hijinks rule applies here, too. * schema.rb Holy cats! Rails decided to tinker a lot with the schema dump output. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha fed732fefe73feb420d1321c196fa75408f760b5

upgrade Supermarket to Rails 5.2 Just the gems. More work to do, yea? Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a88af7efbde21e50357631bb9a3dbbb742797dae

rename "index" scopes on Cookbook and Tool Got an error after upgrade: You tried to define a scope named "index" on the model "Cookbook", but ActiveRecord::Relation already defined an instance method with the same name. (ArgumentError) "index" is now a basically-reserved method on ActiveRecord::Relation, so we'll need different names for these scopes. Opted to name them after their query shape instead of after their call sites (index action in API controllers). Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha c5296d20fbb251a1bee9ff836718b8dc0d90daf0

resolve dep warning: use the successful? predicate > DEPRECATION WARNING: The success? predicate is deprecated and will be > removed in Rails 6.0. Please use successful? as provided by > Rack::Response::Helpers. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 97a73dbefc3b58d420f47bc56718111f4124ed30

resolve order() SQL injection warnings Upgrade pg_search gem to support Rails 5.2. Resolves deprecation warnings about needing Arel.sql objects when passing parameters to search queries.[1] Cookbook's ordered_by scope mostly needed some refactoring to use Arel.sql objects instead of bare strings in the reorder() method. Moved the hash for mapping of order options to order strings to a constant and gave the default "alphabetical by name" a name. Update to return Arel.sql objects. [1] Released in v2.1.2 https://github.com/Casecommons/pg_search/commit/31ad3adf831c1971214c732665b58f1c716f226f Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

Pull request review commentchef/supermarket

🚧 SupaWIP: upgrade all the things

   context 'associations' do     it { should belong_to(:resourceable) }     it { should belong_to(:user) }-    it { should belong_to(:group) }+    it { should belong_to(:group).optional }

❤️

robbkidd

comment created time in a month

issue openedchef/supermarket

deprecation resolution: change over to form_with

Over on #1867:

Also I know form_for and form_tag have been soft-deprecated as of 5.1 for form_with. (i.e. it won't cry out at us but they aren't mentioned in current documentation. But there's no harm keeping them around for now.

I only know that because I got drafted into rewriting those docs

created time in a month

push eventchef/supermarket

Robb Kidd

commit sha 4d46cfbe81f629f5f2858f83e817ce3569bc0a3c

resolve order() SQL injection warnings Upgrade pg_search gem to support Rails 5.2. Resolves deprecation warnings about needing Arel.sql objects when passing parameters to search queries.[1] Cookbook's ordered_by scope mostly needed some refactoring to use Arel.sql objects instead of bare strings in the reorder() method. Moved the hash for mapping of order options to order strings to a constant and gave the default "alphabetical by name" a name. Update to return Arel.sql objects. [1] Released in v2.1.2 https://github.com/Casecommons/pg_search/commit/31ad3adf831c1971214c732665b58f1c716f226f Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha db81ddc3c6f1d4871b2a07164911d14fc5e4272e

resolve order() SQL injection warnings Upgrade pg_search gem to support Rails 5.2. Resolves deprecation warnings about needing Arel.sql objects when passing parameters to search queries.[1] Cookbook's ordered_by scope mostly needed some refactoring to use Arel.sql objects instead of bare strings in the reorder() method. Moved the hash for mapping of order options to order strings to a constant and gave the default "alphabetical by name" a name. Update to return Arel.sql objects. [1] Released in v2.1.2 https://github.com/Casecommons/pg_search/commit/31ad3adf831c1971214c732665b58f1c716f226f Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 57fce2d290a6ac586be3a81faf6a9b4368b6d899

upgrade Supermarket to Rails 5.2 Just the gems. More work to do, yea? Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 46f1c31046cea7a7d615c8198f57dc9203a9c6c0

rename "index" scopes on Cookbook and Tool Got an error after upgrade: You tried to define a scope named "index" on the model "Cookbook", but ActiveRecord::Relation already defined an instance method with the same name. (ArgumentError) "index" is now a basically-reserved method on ActiveRecord::Relation, so we'll need different names for these scopes. Opted to name them after their query shape instead of after their call sites (index action in API controllers). Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 2bdd8b606d833d5d43d293db6fc028678c20df7c

resolve dep warning: use the successful? predicate > DEPRECATION WARNING: The success? predicate is deprecated and will be > removed in Rails 6.0. Please use successful? as provided by > Rack::Response::Helpers. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 82bf343628a324ff7045beaf2c12bb9b9194693a

upgrade pg_search gem to support Rails 5.2 Resolves deprecation warnings about needing Arel.sql objects when passing parameters to search queries.[1] [1] Released in v2.1.2 https://github.com/Casecommons/pg_search/commit/31ad3adf831c1971214c732665b58f1c716f226f Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha ef3cdc1357694695e01c6d776022b6208aaf4720

appease RubocopRails: Rails/UniqueValidationWithoutIndex, Part 2 > Uniqueness validation should be with a unique index. Agreed. These database validations should be safe for us to add so long after the fact. - group_members gets a unique index on user_id + group_id to match the model validation - quality_metrics gets a unique index on name. Supermarket creates these records through seeds, so the names are stable or some onprem admin has been up to hijinks. - system_emails gets a unique index on name. These are also created via seeds, so the hijinks rule applies here, too. * schema.rb Holy cats! Rails decided to tinker a lot with the schema dump output. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 4eb72a0dc35cc9bb98694a5424845455da159acc

update spec to allow running by itself This spec uses a helper method. When run with the entire suite, something else (probably the vcr_helper) was loading the helper. When run by itself or only along with the feature specs, this would fail because the helper method wasn't defined. So, include the helper that defines that method so the spec can run on its lonesome. This is only a little dirty. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e77b464569590da5f8fb13ba2569a8c5a036634d

appease RubocopRails: Rails/OutputSafety > Tagging a string as html safe may be a security risk. Indeed. OK. * adoption_helper :: Replace an <i> tag written as a string including interpolation with the Rails tag.i helper and the safe concat method. * cookbooks_helper :: Yea, about that foodcritic_info helper. We stopped using it back in 2016.[1] No need to keep it around. * users_helper :: Replace string interpolation with safe_join'ing. TODO: * markdown_helper :: By far the worst. Needs fixing. Pending changing out the markdown renderer for one that does it GitHub-style. [1] https://github.com/chef/supermarket/commit/01ee7cec5ce8792f2ad076e9c5d7e7e9c4e08348#diff-e2c45cb4fcb83a952aa6d44726607f26L123-R127 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 524c4af515da7f9a382598e32dceec14b2f2bb32

appease RubocopRails: Rails/HasManyOrHasOneDependent > Specify a :dependent option.[1][2] Yep. This is another round of telling the ORM what to do with dependent records caused by tossing out the previous .rubocop_todo.yml. Here's the reasoning behind the dependent actions chosen: * Group - destroy dependent records - group_members :: a join table between Group and User, so when a Group is destroyed, the record for a User's membership in the Group should be destroyed as well. - group_resources :: a join table between Group and a thing the Group had access to, so when a Group is destroyed, the record for Group access to a thing should be destroyed as well * User - destroy dependent records - accounts :: a child table for associating a User with "accounts" in other systems (e.g. Chef Server, GitHub). Deleting a User is rare, disabling is preferred, but when destroyed, these records about their accounts should be destroyed as well. - collaborators :: a better name would be "collaborations," this is a join table linking a user with things they can change. When the User is destroyed, it is appropriate to destroy their access to things. - cookbook_followers :: a join table linking a user to the cookbooks they follow. If the User is destroyed, it is appropriate to destroy their subscriptions. - email_preferences :: If a User is destroyed, we don't care about what types of emails they would like to receive. - group_members :: As above with Group, this is a link table for the membership of a user in a group. Destroy that association when a user is destroyed. * User - nullify dependent records - cookbook_versions :: This records the user who uploaded a particular version of a cookbook. When a CookbookVersion.user_id is null, the system will default to using the Owner (the parent Cookbook.user_id) instead. So this one is safe to nullify. * User - raise an exception if dependent records are present - owned_cookbooks :: Supermarket has no concept of a cookbook that is not owned by a user. Ownership should be transferred to another user before a user record can be destroyed. - tools :: Similarly, a Tool must be owned by a user. The association may need to be changed from the Rails console, but this association must exist and be resolved before destroying a user. - initiated_ownership_transfer_requests :: Both cases where a user is associated with an ownership transfer request (as the transferring owner or the new recipient) are cause for a pause. As above with ownership of a Cookbook or Tool, ownership of a thing must be reconciled before destroying a User. OwnershipTransferRequests can be destroyed individually from the Rails console as part of reconciliation to unblock user deletion. [1] https://docs.rubocop.org/rubocop-rails/cops_rails.html#railshasmanyorhasonedependent [2] https://guides.rubyonrails.org/association_basics.html#has-many-association-reference Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ed9f2ddf28bd5db6f87aa74dd1a876524fc32259

appease RubocopRails: Rails/UniqueValidationWithoutIndex, Part 1 > Uniqueness validation should be with a unique index. Agreed. But ... - Cookbook has a unique index on lowercase_name, so name's uniqueness is covered. - Tool, same deal, but added a validation to the model for lowercase_name so that it's more clear that name is covered. - Group ... I'm punting on with a rubocop:todo. Group does not already have a lowercase_name field and the Collaboration Groups feature it supports is onprem only, so we don't have good test data from the wild to judge the impact of adding a database constraint. Opting to live with without for the moment. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 4589a167ce7001e3da59446d737342892410e388

annotate existing migrations with legacy Rails version number Rails 5.0 introduced a Migration API.[1] ActiveRecord::Migration classes are Rails version specific. Rails 5.0 was pretty forgiving about migration classes that didn't have a version annotation. Rails 5.1 is not. These changes are in preparation for new migrations to be added and so only touch existing files. Incidentally, it is `rake db:migrate` that reeeeally wants these old migration classes to declare for which Rails version they were written. `rails db:migrate` seemed to accept them just fine. But we rake everywhere, so let's add the annotations to keep up with the framework. [1] https://github.com/rails/rails/pull/21538 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 5d8476c40c8de43e95e2991ba5c0d121f3fd37cf

appease RubocopRails: Rails/UniqueValidationWithoutIndex, Part 2 > Uniqueness validation should be with a unique index. Agreed. These database validations should be safe for us to add so long after the fact. - group_members gets a unique index on user_id + group_id to make the model validation - quality_metrics gets a unique index on name. Supermarket creates these records through seeds, so the names are stable or some onprem admin has been up to hijinks. - system_emails gets a unique index on name. These are also created via seeds, so the hijinks rule applies here, too. * schema.rb Holy cats! Rails decided to tinker a lot with the schema dump output. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 30208a17051edb1778bb3122339b562cf40488e7

adopt ChefStyle linting Updates Rakefiles to have 'spec' and 'link' tasks that run as default. Updates Travis to run that default rake task. Travis config also updated to resolve some of their validations (os and distro, name of redis, sudo does nothing). Includes cookstyle so that dep-solving won't pick a Rubocop that won't work for a future cookstyle quality metric. Include rubocop-rails ... because this is a Rails app. The gone-by-the-wayside maintainers rake task needed to have its default task move inside the namespace or else it messes up the true default. Signed-off-by: Robb Kidd <rkidd@chef.io> fixup! adopt ChefStyle linting

view details

Robb Kidd

commit sha c4dd4c45c7c0ad0bd5c94ac31b8aa4d8e61ce5a1

appease ChefStyle: The Double-Quotification of Supermarket Style/StringLiterals: > Prefer double-quoted strings unless you need single quotes to avoid > extra backslashes for escaping. Style/StringLiteralsInInterpolation: > Prefer double-quoted strings inside interpolations. Bonus! appease RubocopRails: Rails/FilePath > Please use Rails.root.join('path/to') instead. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 86b75677aee0cf79c0b53a533d07de14edbaad26

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha c4df20536c49e4c9babc056adb4c96c1dbf4b930

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 2917a2a5761f5b9460795ee3383ab5212f4c1555

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha f29210426267d241a078364f64d2adee723d34f4

appease RubocopRails: Rails/HttpStatus > Prefer :bad_request over 400 to define HTTP status code. > Prefer :unauthorized over 401 to define HTTP status code. OK. Also rearranged the error hash for JSON rendering in ApplicationController to make the whitespace less awkward. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e601da20d15efb89687ea7ec06d04f0a7c4f5f51

appease ChefStyle: Style/RedundantBegin > Redundant begin block detected. It's true. You don't need to wrap an ensure method contents in begin..end. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 192b027584c4f5d4c548d8e096857ee32eca9945

appease ChefStyle: Style/SymbolArray > Use %i or %I for an array of symbols. No. So we'll enforce bracketed array of actual symbols. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1c89ada3d6efa03e04f39bcf0893746d169bc027

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 33417a17321942cd21fe962723c0a70f056a58b7

appease ChefStyle: Layout/MultilineOperationIndentation ChefStyle has: > Use 4 (not 12) spaces for indenting a condition in an if statement > spanning multiple lines. And that looks weird to me. So, switching up enforced style to: > Align the operands of a condition in an if statement spanning multiple > lines. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha fc9a4edbbaa2dcb19ad8be085387d60d62d929ae

update redis-rack to quiet warning about double rake Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 096a5adb7e1b16b60d79864e43d4e79a1f6f9a84

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 6ad7d7ef1f3d3370000eee6a17d4d6ebe6911b84

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha fe2fb7f9d041f343225d97f0685022dc5852d294

appease ChefStyle: Layout/MultilineMethodCallIndentation > Use X (not Y) spaces for indenting an expression spanning multiple lines. OK. Opted to clean up some of these by bringing the first dotted method down to a second line so that the entire call chain would be indented. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha b6fef84c37f3789a2cbdb0f044b862cf351a79b9

appease ChefStyle: Style/TrailingCommaInArrayLiteral > Put a comma after the last item of a multiline array. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha b61c575a565775df15eeb8e3de8946990f5bd37f

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 790e711c26f486505876ba3a72953e63a7ee6d04

appease RubocopRails: Rails/ActiveRecordAliases > Use update instead of update_attributes. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ffdea921397d157affcf768f94b1723e4627b527

appease RubocopRails: Rails/SkipsModelValidations > This cop checks for the use of methods which skip validations[1] Allowed incrementing counters and touching date fields across the application. Allowed the two uses of update_all() in QualityMetric because those are very simple records at the moment. Calls to update_attributes() were replaced with update(). [1] https://guides.rubyonrails.org/active_record_validations.html#skipping-validations Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 21899a9a91bd1d319cc2984aeb1c8e62a3c2cc87

appease ChefStyle: Style/RegexpLiteral > Use %r around regular expression. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 4c42a9ad1c1b6c9295d838589b779c1de219b38c

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 637a5eb620d3b02d0e5650d3dde03ec71433000c

fixup! adopt ChefStyle linting

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha ebfc51eda2bd4d0cbef02a0647cfa3d746383414

appease RubocopRails: Rails/ContentTag > Use tag instead of content_tag. Use content_tag() when the tag type is a variable. Otherwise, use tag.type(). Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e08061267a3bc1e352a7d860726a54eb4aece522

appease RubocopRails: Rails/ApplicationController > Controllers should subclass ApplicationController. Sure. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ffa17595843529db08fd93bcae645ddeaa447b36

appease RubocopRails: Rails/ApplicationMailer > Mailers should subclass ApplicationMailer. OK. But we needed to add an ApplicationMailer. :D Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a9b61c2bca95d7a9237fdfd829629c3e1b348ee4

appease RubocopRails: Rails/RedundantAllowNil > allow_nil is redundant when allow_blank has the same value. Makes sense. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ca8ff6f7896875de93b0faf58500482b40cc25ce

appease RubocopRails: Rails/HttpStatus > Prefer :created over 201 to define HTTP status code. > Prefer :gone over 410 to define HTTP status code. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 3dc8904d53ed47959c9b605dd0e9e802d18a0535

appease RubocopRails: Rails/RedundantForeignKey > Specifying the default value for foreign_key is redundant. Apparently I didn't have to specify these foreign keys back when RubocopRails barked about missing inverse relationships? Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 1f1ee21da3169e4cf1b0596c9f9ecb20e968a9f4

appease ChefStyle: Lint/NonLocalExitFromIterator > Non-local exit from iterator, without return value. next, break, > Array#find, Array#any?, etc. is preferred. OK. The return in the middle of a controller action was weird. Opted to break the loop, update the flash of success based on the presence of the flash of failure, and let the action's standard redirect_to exit handle the situation. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 5f0c4e582c4209ecfaf1578b31e264a02d6764c6

appease ChefStyle: Style/MutableConstant > Freeze mutable objects assigned to constants. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 7b597ca20fef5c0899a63e57e9a528fb60f77cf5

appease ChefStyle: Layout/BlockAlignment Turn it off for this admittedly weird block. Otherwise Rubocop puts the "end" way over on column 16. Nope nope nope. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 7e69ef99a6fda2e08c9a76c33285d2373e215768

appease ChefStyle: Lint/Loop > Use Kernel#loop with break rather than begin/end/until(or while). Okeydoke. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha c8f23e55594bce418eb0d8acd6765caa1246671f

appease ChefStyle: Style/RedundantBegin > Redundant begin block detected. Yep. Don't need 'em when rescue/ensuring whole blocks. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha cfd9a3d11f4855d030009e2ab4384c630683d593

appease ChefStyle: Style/SignalException > Always use raise to signal exceptions. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e50d95ba221c2b09fd67df9bef0f11e5aceed570

appease ChefStyle: Style/NumericPredicate > Use x == 0 instead of x.zero?. > Use x > 0 instead of x.positive?. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 2d75b31345b9895dbbe7505a51650dd4583637e5

appease ChefStyle: Style/RegexpLiteral > Use %r around regular expression. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 91e649c5d8588d7d40d311b41c3e82c68a856f72

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 6dbf1b86b461477bc7af6ea2b24ebbbfb9b12a23

appease ChefStyle: Lint/UselessAssignment Exclude config.rb because it is essentially a collection of what appear to be useless assignments. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a2fae7ec6e178827b37e055b5cb037c5aeee5416

appease RubocopRails: Rails/RakeEnvironment > Include :environment task as a dependency for all Rake tasks. Mostly this removes krufty rake tasks. * MAINTAINERS file are no longer ... maintained here in the repo, so the tasks for managing them can be removed. * TRAVIS tasks are used for travis any more. * SPEC::ALL has moved to the main Rakefile as the default task. The "javascripts" and "setup" tasks are also out of date, but let's keep them around with the best of intentions to correct them. Neither sets of tasks need the Rails environment loaded as a dependency, so set this cop to exclude them. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 2eb9a8e0a0a3d0897524654a74f1d979bd829773

appease ChefStyle: The Double-Quotification of Supermarket Style/StringLiterals: > Prefer double-quoted strings unless you need single quotes to avoid > extra backslashes for escaping. Style/StringLiteralsInInterpolation: > Prefer double-quoted strings inside interpolations. Bonus! appease RubocopRails: Rails/FilePath > Please use Rails.root.join('path/to') instead. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 829142e3e2b3701c08e93d98b7ec4a49a9c50ba9

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 72c43292167b291e9eef26fff08f52c71107664a

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha c1dd668fb5eabf10c5b3b6e4a5be9f39b19eae25

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha f122cddb5a2d52d648b0f5333b42faae35dcdde3

appease RubocopRails: Rails/HttpStatus > Prefer :bad_request over 400 to define HTTP status code. > Prefer :unauthorized over 401 to define HTTP status code. OK. Also rearranged the error hash for JSON rendering in ApplicationController to make the whitespace less awkward. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha d6383294ac403cce8bc9e3f6c105fb5d333d547b

appease ChefStyle: Style/RedundantBegin > Redundant begin block detected. It's true. You don't need to wrap an ensure method contents in begin..end. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 454344966d4c343244e9d80a3bdefee10b80a5b5

appease ChefStyle: Style/SymbolArray > Use %i or %I for an array of symbols. No. So we'll enforce bracketed array of actual symbols. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 8b6e6bc1cc9a81fb8ca894613be7d6d5db698040

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 66e89310e295274012c6b4d27accb512f8a51481

appease ChefStyle: Layout/MultilineOperationIndentation ChefStyle has: > Use 4 (not 12) spaces for indenting a condition in an if statement > spanning multiple lines. And that looks weird to me. So, switching up enforced style to: > Align the operands of a condition in an if statement spanning multiple > lines. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha d299055d40078ff6cdd8601abd81df92dfd2d4c4

update redis-rack to quiet warning about double rake Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 8cbd548b41017fae285089257e2e38b708e2589d

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 413094cf76470349d225673542512fecd1c45597

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 258f0b126634bcb91db2cf4f69ef1a272df3c06a

appease ChefStyle: Layout/MultilineMethodCallIndentation > Use X (not Y) spaces for indenting an expression spanning multiple lines. OK. Opted to clean up some of these by bringing the first dotted method down to a second line so that the entire call chain would be indented. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 0e54ba7a35e6cd5b5b56022612fe71670c2897c1

appease ChefStyle: Style/TrailingCommaInArrayLiteral > Put a comma after the last item of a multiline array. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 961f89b968c530950023319f68e4de11570dcc91

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 86fce0be25c97ef25590ae720785780f5a1cd0cb

appease RubocopRails: Rails/ActiveRecordAliases > Use update instead of update_attributes. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 7595b8c32fe79a044627df4c3c953d35f476a7ce

appease RubocopRails: Rails/SkipsModelValidations > This cop checks for the use of methods which skip validations[1] Allowed incrementing counters and touching date fields across the application. Allowed the two uses of update_all() in QualityMetric because those are very simple records at the moment. Calls to update_attributes() were replaced with update(). [1] https://guides.rubyonrails.org/active_record_validations.html#skipping-validations Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha d1d6cba45f3f3fb41a50281c0e5e36bc321bfbc5

appease RubocopRails: Rails/ActiveRecordAliases > Use update instead of update_attributes. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 56bfaf0696adb4b05999054a3d0de3bd8e2b24fc

appease RubocopRails: Rails/SkipsModelValidations > This cop checks for the use of methods which skip validations[1] Allowed incrementing counters and touching date fields across the application. Allowed the two uses of update_all() in QualityMetric because those are very simple records at the moment. Calls to update_attributes() were replaced with update(). [1] https://guides.rubyonrails.org/active_record_validations.html#skipping-validations Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha b553696523b9158c5759a574f934016159f90406

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 4298ea564033c704f2c9ab19ce715bd322f42f68

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 312d2a27479267df457ce338a5053f7e769404fd

appease ChefStyle: Layout/MultilineMethodCallIndentation > Use X (not Y) spaces for indenting an expression spanning multiple lines. OK. Opted to clean up some of these by bringing the first dotted method down to a second line so that the entire call chain would be indented. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1411eabf72dac9708142ce369c9952892d4b0f3d

appease ChefStyle: Style/TrailingCommaInArrayLiteral > Put a comma after the last item of a multiline array. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 5b8b9057105bd3bf4073682f86a5cf98360fdd9d

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha be12556dc6466bb1607e8fe0b4ba24cda592b304

appease ChefStyle: The Double-Quotification of Fieri Style/StringLiterals: > Prefer double-quoted strings unless you need single quotes to avoid > extra backslashes for escaping. Style/StringLiteralsInInterpolation: > Prefer double-quoted strings inside interpolations. Bonus! appease RubocopRails: Rails/FilePath > Please use Rails.root.join('path/to') instead. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 777414c4e2f6c8e4a5e5f08b7660e4506f2a0577

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha c423227ddcb94d64cb8b76a66a8d92f4de989466

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha f23bb43f5c40c3b2aaac968b33d2eb840c1cc866

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a2576aa3105a37a73954b46b245aee1dd2c8853e

appease RubocopRails: Rails/HttpStatus > Prefer :bad_request over 400 to define HTTP status code. > Prefer :unauthorized over 401 to define HTTP status code. OK. Also rearranged the error hash for JSON rendering in ApplicationController to make the whitespace less awkward. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 3f254d98dc69782838da7ea98adbb1efcca71a46

appease ChefStyle: Style/RedundantBegin > Redundant begin block detected. It's true. You don't need to wrap an ensure method contents in begin..end. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha df5f06e0c1ab63baecd3b45cbe4377bddd64455d

appease ChefStyle: Style/SymbolArray > Use %i or %I for an array of symbols. No. So we'll enforce bracketed array of actual symbols. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 127b7b8830ed7d3ca1f9873c757ba142da32a8ce

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 9e57b2d40f73d62a1119e574c06a505a8f883bc6

appease ChefStyle: Layout/MultilineOperationIndentation ChefStyle has: > Use 4 (not 12) spaces for indenting a condition in an if statement > spanning multiple lines. And that looks weird to me. So, switching up enforced style to: > Align the operands of a condition in an if statement spanning multiple > lines. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ae8a6e6e36da4e80f3bf618479556d0397d44dc3

update redis-rack to quiet warning about double rake Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha d21e63282209a5956bfc37bef983babad59a5b2c

adopt ChefStyle linting Updates Rakefiles to have 'spec' and 'link' tasks that run as default. Updates Travis to run that default rake task. Includes cookstyle so that dep-solving won't pick a Rubocop that won't work for a future cookstyle quality metric. Include rubocop-rails ... because this is a Rails app. The gone-by-the-wayside maintainers rake task needed to have its default task move inside the namespace or else it messes up the true default. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 2f6867215401dcefa7a47fbcfa1adbd6dee36efd

appease ChefStyle: The Double-Quotification of Fieri Style/StringLiterals: > Prefer double-quoted strings unless you need single quotes to avoid > extra backslashes for escaping. Style/StringLiteralsInInterpolation: > Prefer double-quoted strings inside interpolations. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1174cc2229bdd11d2d50070fe2b6e5be28c0f1f1

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1acf2238d87142568b1d49a9cc09992cfc4c7ef0

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 7f8c11f80e1530daa226700f60199fd6ebba0da0

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha b65c2e89887f6fea2de1065615acfc79935f8706

appease RubocopRails: Rails/HttpStatus > Prefer :bad_request over 400 to define HTTP status code. > Prefer :unauthorized over 401 to define HTTP status code. OK. Also rearranged the error hash for JSON rendering in ApplicationController to make the whitespace less awkward. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ff26bac3d97d0b65aa77a6d74f237587b91b0834

appease ChefStyle: Style/RedundantBegin > Redundant begin block detected. It's true. You don't need to wrap an ensure method contents in begin..end. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a97f0c3dd01b9ecf6af68435d25e8292b3d7aea4

appease ChefStyle: Style/SymbolArray > Use %i or %I for an array of symbols. No. So we'll enforce bracketed array of actual symbols. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha f3833e29264e7ac6239094799be76d7b5965aee5

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 57d1df1ee08abd042f8e81997db9475c87dea509

appease ChefStyle: Layout/MultilineOperationIndentation ChefStyle has: > Use 4 (not 12) spaces for indenting a condition in an if statement > spanning multiple lines. And that looks weird to me. So, switching up enforced style to: > Align the operands of a condition in an if statement spanning multiple > lines. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 315ab0c7738355483158e1a695ead96d7b194719

appease RubocopRails: Rails/FilePath > Please use Rails.root.join('path/to') instead. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 5be06b0b85a0dfda34463ba9b3d2ec41878a6bcc

update redis-rack to quiet warning about double rake Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 028823af28a6891c880228bc4acb0b832f1f3795

adopt ChefStyle linting Includes cookstyle so that dep-solving won't pick a Rubocop that won't work for a future cookstyle quality metric. Include rubocop-rails ... because this is a Rails app. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a7c6b1c23301964acfe8f6f24a4b87da3f28ab75

appease ChefStyle: The Double-Quotification of Fieri Style/StringLiterals: > Prefer double-quoted strings unless you need single quotes to avoid > extra backslashes for escaping. Style/StringLiteralsInInterpolation: > Prefer double-quoted strings inside interpolations. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha ab73f6a7470a00830abb50a15abc17ed57e3a55e

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 8e5145b58c4b96fbb7dd919138b5e3e25290b4bf

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 037c331291b0c0964e214c7ba4270c7f10002cab

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha d42248cfb07bbbf850301a8e9035a4673cb53177

appease RubocopRails: Rails/HttpStatus > Prefer :bad_request over 400 to define HTTP status code. > Prefer :unauthorized over 401 to define HTTP status code. OK. Also rearranged the error hash for JSON rendering in ApplicationController to make the whitespace less awkward. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 0cddaffa1aac2ea1c2eebbe7091f14472e9c53e4

appease RubocopRails: Rails/RakeEnvironment > Include :environment task as a dependency for all Rake tasks. Sure, but we'll exclude these tasks because they do not require the Rails application be loaded or tasks they depend on already depend on environment. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 2c12668a0dbacdf477f1251d01421ff55e26f604

appease ChefStyle: Style/RedundantBegin > Redundant begin block detected. It's true. You don't need to wrap an ensure method contents in begin..end. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 82fda6eb80c6b343b335407e4edfd5941f75f49d

appease ChefStyle: Style/SymbolArray > Use %i or %I for an array of symbols. No. So we'll enforce bracketed array of actual symbols. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha d938520178c0cd34ecb140232a89d9d01b520a59

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 34756ffc994da5c2bd9a276eede257aa7b341b7e

appease ChefStyle: Layout/MultilineOperationIndentation ChefStyle has: > Use 4 (not 12) spaces for indenting a condition in an if statement > spanning multiple lines. And that looks weird to me. So, switching up enforced style to: > Align the operands of a condition in an if statement spanning multiple > lines. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 77b1f2e58eba0cefd3311fd93229d4c484faf8bb

appease RubocopRails: Rails/FilePath > Please use Rails.root.join('path/to') instead. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha aec877e6753902d142c689100d856aa1c217db29

update fieri engine to Rails 5.2 Most of these changes are the result of running 'rake app:update' on the dummy Rails app inside the specs for the fieri engine. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha d81a99f63187f94e8f937fabbca3a9afa22bdfb7

adopt ChefStyle linting Includes cookstyle so that dep-solving won't pick a Rubocop that won't work for a future cookstyle quality metric. Include rubocop-rails ... because this is a Rails app. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 61d05b07cf91bebaeb7300cfcd95cfdbae8766a4

appease ChefStyle: The Double-Quotification of Fieri Style/StringLiterals: > Prefer double-quoted strings unless you need single quotes to avoid > extra backslashes for escaping. Style/StringLiteralsInInterpolation: > Prefer double-quoted strings inside interpolations. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha a34a48cf38907a89ae008f436fbc7c1ac4f4f6b1

appease ChefStyle: Layout/DotPosition > Place the . on the next line, together with the method name. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 0e8896acef0246fe9e590b7392e3b2bc4b716b08

appease ChefStyle: Style/TrailingCommaInHashLiteral > Put a comma after the last item of a multiline hash. OK Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 83ef34078419565356e400209e7249f4a7c5ed5b

appease ChefStyle: Layout/EmptyLineAfterGuardClause > Add empty line after guard clause. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 14a72cf58524f98fa3a4eb585bb8f6c83c9f7f5d

appease RubocopRails: Rails/HttpStatus > Prefer :bad_request over 400 to define HTTP status code. > Prefer :unauthorized over 401 to define HTTP status code. OK. Also rearranged the error hash for JSON rendering in ApplicationController to make the whitespace less awkward. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 55a3d3c389def46346613664a7defc1ebf934b9e

appease RubocopRails: Rails/RakeEnvironment > Include :environment task as a dependency for all Rake tasks. Sure, but we'll exclude these tasks because they do not require the Rails application be loaded or tasks they depend on already depend on environment. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 89e4941381cc2f769b0111d36fb049b3f415b1f0

appease ChefStyle: Style/RedundantBegin > Redundant begin block detected. It's true. You don't need to wrap an ensure method contents in begin..end. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 553467e94041a418b343c6e2fc616003c48957b9

appease ChefStyle: Style/SymbolArray > Use %i or %I for an array of symbols. No. So we'll enforce bracketed array of actual symbols. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 0b7a2ec8a73edf2db464c85f228e3f52108911c4

appease ChefStyle: Style/PercentLiteralDelimiters > %w-literals should be delimited by { and }. ... OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 8bcdfb35093dee26a80fdcdd084d4e1c39971de8

appease ChefStyle: Layout/MultilineOperationIndentation ChefStyle has: > Use 4 (not 12) spaces for indenting a condition in an if statement > spanning multiple lines. And that looks weird to me. So, switching up enforced style to: > Align the operands of a condition in an if statement spanning multiple > lines. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 355124edd9173b86a7213deaec47a03e63edee95

appease ChefStyle: Style/SignalException > Always use raise to signal exceptions. M'kay. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e5842677c6a738f2a328d86e9a390a0962382b65

appease RubocopRails: Rails/FilePath > Please use Rails.root.join('path/to') instead. OK. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha 297c075672c2d3eb7b48ec9a114c19f0400ed370

upgrade shoulda-matchers to resolve deprecation The version we were using was quite old and suffered a deprecation warning in later Ruby 2.6 about BigDecimal.new() vs BigDecimal(). Moving to Ruby 2.7 required an upgrade. This change takes should-matchers to its latest version. Review of changes: * validate_uniqueness_of: - CookbookVersion's spec was updated to match the case-insensitive uniqueness of the model. The scope on the constraint also needed updating to resolve an outstanding issue in the matcher.[1] - Tool's spec was updated to match the case-insensitive uniqueness of the model. * spec_helper was updated with a configuration for Should::Matchers as documented in the backward-incompatible changes notes for the 3.0.0 major release.[2] * supported_platform_spec was updated to use a factory-built subject so that the validation specs would operate with a valid starting object. Changed all test instance creations to use the factory instead of the model directly. * system_email_spec was updated to use a factory-built subject so that the validation specs would operate with a valid starting object. [1] https://github.com/thoughtbot/shoulda-matchers/issues/814#issuecomment-612943953 [2] https://github.com/thoughtbot/shoulda-matchers/blob/master/CHANGELOG.md#300---2015-10-01 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1ee0224eaa01d12a76e6c0c8c2a221931e620065

update ffi-libarchive to resolve dep warnings > warning: rb_safe_level will be removed in Ruby 3.0 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 098211fe976c91bd30f5d2b0447b6139bb55dfdb

update utf8-cleaner to resolve dep warning > URI.unescape is obsolete Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1d707ac62c76cb07f868221bdda8ecdce3ba1ef6

update jbuilder to resolve dep warning > Capturing the given block using Proc.new is deprecated; use `&block` > instead Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 3a98afbe3ac2c5dcbf922ec7df64ade79790ef7e

update fieri engine to Rails 5.1 Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha e6ec49354fa24fe334e335bd1941ada3c4dcffa6

remove <5.0 config defaults In preparation for 5.0->5.1, remove these config settings that guarded defaults from Rails 4. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 773c483c1eaac803f041a89af0d6a260313c04df

upgrade rails to 5.1 and run app:update Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 8768c06b9128a70e9fcf68377dff21cf6cf1e65b

fix new belongs_to required association Rails 5.1 changes the belongs_to association to default to requiring the other end of the relationship to exist. This change updates some of the belongs_to associations to be optional where appropriate. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 1c032c2e10ee09cfaf238711f025a4e5437ef5f3

fix record creation dependencies in factories A cookbook must exist before a cookbook_version can be saved. * cookbook_version: make the association to cookbook explicit so that the factory will create the parent cookbook if necessary * cookbook: instantiate but not yet save cookbook versions when creating a cookbook. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha d2804634fae37c4dd6d4dda177148a1e5578542e

fix a file reader left at the end of the file contents Having read the contents of the tarball file, it needed to be rewound so that using it again in the test POST didn't result in an empty file being processed in the test environment. This appeared to only be a problem in the tests. Not 100% positive of the change in Rails or the test framework that this behavior changed, but I suspect the same file object instance was being passed from the spec and into the application during testing. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 7abfa51979447f2e0878eb6017a01a5846b1b719

set URL options for the application as well as mailer This lets all of the application stack know how to compute full URLs back to itself. This might obviate the need for Supermarket::Host.full_url Start tracking the .env.test file to set things in the test environment like things are set for production. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 02071266fe3007917d3d3e001782e1a9c596eaf4

use the expected URL path instead of getting fancy with URL helpers Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 88bb57cf795c436c59e19c0f6fcf426159b93816

upgrade some mixlib and some debuggers * upgrade mixlib-authentication - not much changed, but let's keep up to date * upgrade chef - dependency of mixlib-auth * swap out byebug for pry-byebug for more better debugging Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

push eventchef/supermarket

Robb Kidd

commit sha cfdf46c93bb4e885e6140739e846d48169b55293

set URL options for the application as well as mailer This lets all of the application stack know how to compute full URLs back to itself. This might obviate the need for Supermarket::Host.full_url Start tracking the .env.test file to set things in the test environment like things are set for production. Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 5837debe0e89660a74cd9d8a42053c0fddd6401e

use the expected URL path instead of getting fancy with URL helpers Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

Robb Kidd

commit sha 356b6a59f280ad3afaa117f866841467ff8d12ed

upgrade some mixlib and some debuggers * upgrade mixlib-authentication - not much changed, but let's keep up to date * upgrade chef - dependency of mixlib-auth * swap out byebug for pry-byebug for more better debugging Signed-off-by: Robb Kidd <rkidd@chef.io>

view details

push time in a month

PR opened chef/supermarket

🚧 SupaWIP: upgrade all the things Type: Chore

Description

🚧 In progress, with a goal of a supported Rails version and up-to-date dependencies.

Related Issue

...

Types of changes

<!--- What types of changes does your code introduce? Put an x in all the boxes that apply: -->

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [x] Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

<!--- Go over all the following points, and put an x in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

  • [ ] I have read the CONTRIBUTING document.
  • [ ] I have run the pre-merge tests locally and they pass.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.
  • [ ] All commits have been signed-off for the Developer Certificate of Origin.
+414 -288

0 comment

35 changed files

pr created time in a month

create barnchchef/supermarket

branch : robb/upgrade-all-the-things

created branch time in a month

Pull request review commenttest-kitchen/kitchen-google

updated to support custom images for extra disks

 def boot_disk_source_image         @boot_disk_source ||= image_url       end -      def image_url-        return "projects/#{image_project}/global/images/#{image_name}" if image_exist?+      def image_url(image = image_name)+        return "projects/#{image_project}/global/images/#{image}" if image_exist?(image)

This change breaks in the tests because image_exist? currently does not accept a parameter.

SAPDanJoe

comment created time in 2 months

Pull request review commenttest-kitchen/kitchen-google

updated to support custom images for extra disks

 def generate_server_name        def create_disks(server_name)         disks = []-         config[:disks].each do |disk_name, disk_config|           unique_disk_name = "#{server_name}-#{disk_name}"           if disk_config[:boot]             disk = create_local_disk(unique_disk_name, disk_config)             disks.unshift(disk)-          elsif disk_config[:disk_type] == "local-ssd"+          elsif (disk_config[:disk_type] == "local-ssd") | disk_config[:custom_image]

Content Warning: nit-picking

<details><summary>Nit Picked for discussion purposes, probably OK to ignore</summary> I would expect the double-pipe || "logical or" operator here to be lazy about evaluating the statement if the left-hand side is true. The single-pipe | "or" operator evaluates both sides always.

Did you have a preference for the always-or over the lazy-or? </details>

SAPDanJoe

comment created time in 2 months

push eventSAPDanJoe/kitchen-google

Tim Smith

commit sha 62cd92861f1fcd99c9f77a6a1e216c0eb10a068f

migrate testing to Github Actions, turn off Travis Also stop consuming chefstyle from master. Also also, remove Ruby 2.3 from testing matrix because: * it's old and unsupported * it's unavailable in the setup-ruby Action because it's old and unsupported Signed-off-by: Tim Smith <tsmith@chef.io> Signed-off-by: Robb Kidd <robb@thekidds.org>

view details

Robb Kidd

commit sha 59592045f9e5a1a4f33e0c2995803236ae3924dc

Merge pull request #78 from test-kitchen/actions Migrate testing to Github Actions

view details

Dan-Joe Lopez

commit sha 2d18fde5d25098e140f484473eebb0de451f9e5e

updated to support custom images for extra disks

view details

push time in 2 months

more