Skip to content

Commit

Permalink
Antima/test rails7 omnibus build/infsus 59 (#2739)
Browse files Browse the repository at this point in the history
* Smriti/merge dependabot pr infus 173 (#2730)

* Bump capybara from 3.36.0 to 3.37.1 in /src/supermarket

Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.36.0 to 3.37.1.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](teamcapybara/capybara@3.36.0...3.37.1)

---
updated-dependencies:
- dependency-name: capybara
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump omnibus from `27c37fc` to `63be4f1` in /omnibus

Bumps [omnibus](https://github.com/chef/omnibus) from `27c37fc` to `63be4f1`.
- [Release notes](https://github.com/chef/omnibus/releases)
- [Commits](chef/omnibus@27c37fc...63be4f1)

---
updated-dependencies:
- dependency-name: omnibus
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump rails from 6.1.5.1 to 6.1.6 in /src/supermarket/engines/fieri

Bumps [rails](https://github.com/rails/rails) from 6.1.5.1 to 6.1.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](rails/rails@v6.1.5.1...v6.1.6)

---
updated-dependencies:
- dependency-name: rails
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump rails from 6.1.5.1 to 6.1.6 in /src/supermarket

Bumps [rails](https://github.com/rails/rails) from 6.1.5.1 to 6.1.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](rails/rails@v6.1.5.1...v6.1.6)

---
updated-dependencies:
- dependency-name: rails
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Merge conflicts resolved

Signed-off-by: smriti <sgarg@msystechnologies.com>

* Bump nokogiri from 1.13.5 to 1.13.6 in /src/supermarket

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.5 to 1.13.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.13.6/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.13.5...v1.13.6)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.1.29 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* upgraded bunder to '2.3.6' and ruby '3.0.2' and all gems in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgraded to ruby 3.1.0; made rubyracer gem conditional for mac

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* updated all reference of ruby 2.7.5 to 3.1.0; updated gems in fieri engine

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced therubyracer with mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using bundler version 2.3.6

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added net-smtp gem

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using 3.0.3 ruby as this is the latest supported ruby in omnibus-software

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Upgrading to ruby 3.1.0 and gem upgrades

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added net-smtp in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Rails upgrade 7.0.2

* upgrade to rails 7.0.1 gem; updated all gems

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* explicit require s3_config in initializer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgrade rails version to 7.0.2 in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* file path concatenation syntax fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Rails 7.0.2 upgrade completed with all configuration changes and schema.rb changes as per rails 7

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* lib utils path added in autoload paths in application config

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* missing template fix in render in spec

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Unit testcases fix

* Added json format responder for not_found cases in application controller

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* test view rendering spec fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced paperclip with kt-paperclip

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed cache_store to memory_store from null_store for test env

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Fix issue: Psych::DisallowedClass: Tried to load unspecified class: Time

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* explicitly specified the template name for render to fix: ActionView::MissingTemplate

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Specified template and format for render in specs

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added sprockets-rails in fieri.gemspec

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgraded kt-paperclip version to 7 and rails patch version upgrade to 7.0.2.2

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* lint errors fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* passing template_path in it_behave_like for shared example

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed unnecessary whitelisting of Time, Symbol in Psych; Changed delayed mailer implementaion: sending simple objects instead of compless objects in params of methods invoked in an async manner

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added back Time and Symbol in Psych whitelist

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* fixed mailer signature

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed complex atrributes and replaced with simple attributes

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced complex parameter to primitive datatype parameter for delayed mailer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* rolled back argument change for CollaboratorMailer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Gemfile cleanup

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using variable for template_path instead of string literal

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Omnibus build fix for ROR upgrade of supermarket to ruby 3 and rails 7 (#2612)

* added ruby in omnibus softwares for support of 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* disabling version condition as it's breaking for ruby 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added patch condition for ruby 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* going to ruby version 3.0.3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* remove ruby software definition as we can use omnibus software definition

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added mini_racer gem for precompilation

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced ruby 2.7 with 3.0.3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced mini racer with sprockets

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added mini_racer gem

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* lint error fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* chefspec issue fix by hash syntax correction

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* cookstyle linter error fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* check downgrading mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added nodejs-binary as omnibus dependency and removed mini_racer gem

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using nodejs instead of nodejs-binary as omnibus dependency

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed nodejs-binary version

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added back mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed patch version of ruby, just using 3.0 as version

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgraded mini racer from 0.3.1 to 0.4.0 in omnibus-supermarket cookbook

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* specified complete ruby version for cookbook testing workflow

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* specified patch version for ruby 3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed unnecessary freeze call

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added nodejs-binary back

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed mini_racer and exec js gem

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added gem lock

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using latest version of mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed version constraint for mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added mini_racer platforms specific

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added nodejs dependency for supermarket for js runtime

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added python software def as nodejs depends on it

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removing python dependency from nodejs

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed nodejs dependency

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added asset related gems in a group in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* migration file made compatible with ruby 3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* wrong number of arguments for index_exists? - fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed add_index statement to make it compatible with rails 7

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* gemfile cleanup

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed mini_racer from omnibus-software cookbook

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added retry statement for all the cookbook using runit cookbook

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed the source of runit cookbook

Signed-off-by: Rajesh Paul <rajesh.093038@gmail.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed unnecessary dependency

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Revert "added retry statement for all the cookbook using runit cookbook"

This reverts commit 9c661fd.

* Revert "changed the source of runit cookbook"

This reverts commit d2639b3.

* changed ruby version to 3.0

Signed-off-by: smriti <sgarg@msystechnologies.com>

* rebase with main.

Signed-off-by: antima-gupta <agupta@msystechnologies.com>

* Updated brakeman version to 5.0.4.

Signed-off-by: antima-gupta <agupta@msystechnologies.com>

* changed ruby version to 3.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed ruby version to 3.0 in github workflows

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* test changes

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

Co-authored-by: Smriti Garg <78783383+msys-sgarg@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chef Expeditor <chef-ci@chef.io>
Co-authored-by: Rajesh Paul <rajesh.093038@gmail.com>
Co-authored-by: antima-gupta <agupta@msystechnologies.com>
Co-authored-by: smriti <sgarg@msystechnologies.com>
  • Loading branch information
7 people committed May 16, 2022
1 parent ee9f710 commit c1d8403
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/brakeman-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '3.0.3'
ruby-version: '3.0'

- name: Setup Brakeman
env:
BRAKEMAN_VERSION: '4.10' # SARIF support is provided in Brakeman version 4.10+
BRAKEMAN_VERSION: '5.0.4' # SARIF support is provided in Brakeman version 4.10+
run: |
gem install brakeman --version $BRAKEMAN_VERSION
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up ruby 3.0.3
- name: Set up ruby 3.0
uses: ruby/setup-ruby@v1
with:
working-directory: src/supermarket
ruby-version: 3.0.3
ruby-version: 3.0
bundler-cache: true
- uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR
- name: create database schema
Expand Down Expand Up @@ -67,11 +67,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up ruby 3.0.3
- name: Set up ruby 3.0
uses: ruby/setup-ruby@v1
with:
working-directory: src/supermarket/engines/fieri
ruby-version: 3.0.3
ruby-version: 3.0
bundler-cache: true
- uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR
- name: run specs
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

#### Merged Pull Requests
- Added missing include runit service in nginx [#2735](https://github.com/chef/supermarket/pull/2735) ([saghoshprogress](https://github.com/saghoshprogress))
<!-- latest_release 5.1.29 -->
## [5.1.29](https://github.com/chef/supermarket/tree/5.1.29) (2022-05-13)

#### Merged Pull Requests
- Smriti/merge dependabot pr infus 173 [#2730](https://github.com/chef/supermarket/pull/2730) ([msys-sgarg](https://github.com/msys-sgarg))
<!-- latest_release -->

<!-- release_rollup since=5.1.18 -->
Expand Down
1 change: 0 additions & 1 deletion omnibus/cookbooks/omnibus-supermarket/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ gem 'chef', '~> 16.14'
gem 'chef-bin', '~> 16.14'
gem 'inspec-core'
gem 'inspec-core-bin'
gem 'mini_racer', '~> 0.3.1', platforms: :ruby

# gems for testing the build cookbooks
# once we get the ctl omnibus def using its own gemspec this whole file can die
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@
end

it 'checks that the S3 configuration is valid' do
expect(described_class).to receive(:audit_s3_config).with(some: 'stuff')
described_class.audit_config(some: 'stuff')
expect(described_class).to receive(:audit_s3_config).with({ some: 'stuff' })
described_class.audit_config({ some: 'stuff' })
end

it 'checks that the FIPS configuration is valid' do
expect(described_class).to receive(:audit_fips_config).with(some: 'stuff')
described_class.audit_config(some: 'stuff')
expect(described_class).to receive(:audit_fips_config).with({ some: 'stuff' })
described_class.audit_config({ some: 'stuff' })
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/supermarket/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Rails:
Enabled: true
AllCops:
NewCops: disable
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0.3
Exclude:
- db/**/*
- engines/**/*
Expand Down
8 changes: 5 additions & 3 deletions src/supermarket/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ gem "sentry-raven", require: false
gem "sitemap_generator"
gem "statsd-ruby"
gem "tomlrb"
gem "uglifier"
gem "unicorn"
gem "unicorn-rails"
gem "utf8-cleaner"
Expand All @@ -52,11 +51,14 @@ gem "yajl-ruby"
gem "tzinfo-data", "~> 1.2022"

gem "listen"

gem "cookstyle", "~> 7.32.1"
gem "kt-paperclip"
gem "net-smtp", require: false
gem "mini_racer"

group :asset do
gem "uglifier"
gem "execjs"
end

group :doc do
gem "yard", require: false
Expand Down
5 changes: 1 addition & 4 deletions src/supermarket/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ GEM
addressable (~> 2.0)
excon
http (>= 2.0, < 6.0)
libv8-node (16.10.0.0-x86_64-linux)
libyajl2 (2.1.0)
license-acceptance (2.1.13)
pastel (~> 0.7)
Expand Down Expand Up @@ -428,8 +427,6 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mini_mime (1.1.2)
mini_racer (0.6.2)
libv8-node (~> 16.10.0.0)
minitest (5.15.0)
mixlib-archive (1.1.7)
mixlib-log
Expand Down Expand Up @@ -829,6 +826,7 @@ DEPENDENCIES
ddtrace (= 1.0.0)
dotenv
dry-struct (~> 1.4)
execjs
factory_bot_rails
faker
ffi-libarchive
Expand All @@ -846,7 +844,6 @@ DEPENDENCIES
letter_opener_web (~> 2.0)
license_finder
listen
mini_racer
mixlib-authentication (~> 3.0)
net-smtp
nokogiri
Expand Down
2 changes: 1 addition & 1 deletion src/supermarket/config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rails.application.routes.draw do

# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
VERSION_PATTERN = /latest|([0-9_\-\.]+)/.freeze unless defined?(VERSION_PATTERN)
VERSION_PATTERN = /latest|([0-9_\-\.]+)/ unless defined?(VERSION_PATTERN)

mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
class EnsureNewGeneratedIndexesExist < ActiveRecord::Migration[4.2]
class EnsureNewGeneratedIndexesExist < ActiveRecord::Migration[6.1]
def up
maybe_add_index "accounts", ["uid"], name: "index_accounts_on_uid", using: :btree
maybe_add_index "accounts", ["username"], name: "index_accounts_on_username", using: :btree
end

def maybe_add_index(table, columns, opts)
unless index_exists?(table, columns, opts)
add_index table, columns, opts
end
add_index "accounts", ["uid"], name: "index_accounts_on_uid", using: :btree, if_not_exists: true
add_index "accounts", ["username"], name: "index_accounts_on_username", using: :btree, if_not_exists: true
end
end
2 changes: 1 addition & 1 deletion src/supermarket/engines/fieri/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Rails:
Enabled: true
AllCops:
NewCops: disable
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0.3
Exclude:
- db/**/*
- vendor/**/*
Expand Down

0 comments on commit c1d8403

Please sign in to comment.