Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
075646c
remove quiet_assets gem; Deprecated gem and not work with Rails 5.
leonardow-unep-wcmc Jan 15, 2024
df9b841
replace protected_attributes with protected_attributes_continued for …
leonardow-unep-wcmc Jan 15, 2024
375cbd9
upgrade gem inherited_resources
leonardow-unep-wcmc Jan 15, 2024
a2434ff
upgrade ahoy to 2.2.1 from 1.6.1
leonardow-unep-wcmc Jan 15, 2024
1e1a8e0
release sprockets version lock. Rails 5 need sprockets 3+
leonardow-unep-wcmc Jan 15, 2024
11e1019
upgrade ember (broken)
leonardow-unep-wcmc Jan 15, 2024
57fb302
upgrade pg_search
leonardow-unep-wcmc Jan 15, 2024
995f592
upgrade groupdate gem
leonardow-unep-wcmc Jan 15, 2024
14ff1f4
clean up gemfile
leonardow-unep-wcmc Jan 15, 2024
7774b25
upgrade paper_trail to v5 latest
leonardow-unep-wcmc Jan 15, 2024
1916ae2
upgrade pg_search
leonardow-unep-wcmc Jan 15, 2024
a30061a
We use Sentient in User model, so don't relay on clerk's dependencies…
leonardow-unep-wcmc Jan 16, 2024
736ae76
add deprecated message for `update_attributes`
leonardow-unep-wcmc Jan 16, 2024
0e5f639
strong params (round 1)
leonardow-unep-wcmc Jan 17, 2024
539e879
Remove broken code
leonardow-unep-wcmc Jan 17, 2024
a1aaded
found include SentientUser and track_who_does_it in Clerk gem README,…
leonardow-unep-wcmc Jan 17, 2024
82c04aa
strong params (round 2)
leonardow-unep-wcmc Jan 17, 2024
7bc1606
quiet assets from rails log
leonardow-unep-wcmc Jan 18, 2024
3061263
strong params (round 3)
leonardow-unep-wcmc Jan 18, 2024
c0b1ad9
strong params (round 3) (missed)
leonardow-unep-wcmc Jan 18, 2024
d9c3591
strong params (round 4) add comments
leonardow-unep-wcmc Jan 18, 2024
fdb91a8
strong params (round 5), trace from model
leonardow-unep-wcmc Jan 18, 2024
561fe1b
update config for strong params, bugs fix, and fix rspec. (still got …
leonardow-unep-wcmc Jan 18, 2024
3bab736
bug fixes
leonardow-unep-wcmc Jan 18, 2024
b991d4f
upgrade paper_trail to 10.3.1 (was 5.2.3)
leonardow-unep-wcmc Jan 18, 2024
5105c1f
deps: fix specific versions of Ember (1.6.1) and Ember Data (0.14) cl…
pdl Jan 19, 2024
a20d0da
deps: add a comment to explain why ember versions don't match
pdl Jan 19, 2024
7789207
fix: assets with the plus symbol in the name were returning 404s
pdl Jan 19, 2024
54af37f
Merge pull request #961 from unepwcmc/chore/upgrade-gems-before-rails…
leonardow-unep-wcmc Jan 19, 2024
65ae7b7
remove gem Clerk, and reimplement it, to remove dependency. Clerk bro…
leonardow-unep-wcmc Jan 24, 2024
18aca4d
Merge branch 'upgrade/remove_clerk' into upgrade-gems-before-rails-5
pdl Jan 24, 2024
3dc4495
add more tests to help isolate the document citation touch issue
pdl Jan 24, 2024
8c310a9
in spec, refactor out @recent_time
pdl Jan 24, 2024
6b1d245
Add more detailed tests on behaviour of DocumentSearch
pdl Jan 24, 2024
0df258e
Remove gem Traco, migrate to Mobility. Traco breaks Rails 5.0 belongs…
leonardow-unep-wcmc Jan 24, 2024
2a7667e
re-implement Traco's locale_columns methods and admin helper.
leonardow-unep-wcmc Jan 25, 2024
74ac3fc
upgrade rails to 5.0.7.2; able to start the web server, but rspec fail.
leonardow-unep-wcmc Jan 18, 2024
fc96163
DEPRECATION WARNING: before_filter is deprecated and will be removed …
leonardow-unep-wcmc Jan 18, 2024
ca20bf3
rails app:update
leonardow-unep-wcmc Jan 19, 2024
dbd7ebf
https://guides.rubyonrails.org/v5.0/upgrading_ruby_on_rails.html#acti…
leonardow-unep-wcmc Jan 19, 2024
9d80430
Add version in migration class
leonardow-unep-wcmc Jan 19, 2024
6b0cc58
https://guides.rubyonrails.org/v5.0/upgrading_ruby_on_rails.html#rail…
leonardow-unep-wcmc Jan 19, 2024
2c2f75a
remove monkey patch, no longer needed for Arel 7
leonardow-unep-wcmc Jan 19, 2024
4156783
rails diff, and remove some old gems for development only
leonardow-unep-wcmc Jan 19, 2024
7e0d30c
DEPRECATION WARNING: after_filter is deprecated and will be removed i…
leonardow-unep-wcmc Jan 19, 2024
7e98d81
upgrade gems for rails 5
leonardow-unep-wcmc Jan 19, 2024
f126859
upgrade rspec
leonardow-unep-wcmc Jan 19, 2024
94049ec
upgrade sidekiq and related gems
leonardow-unep-wcmc Jan 19, 2024
f3d2dbb
type_cast_from_database
leonardow-unep-wcmc Jan 19, 2024
da79597
fix DEPRECATION WARNING
leonardow-unep-wcmc Jan 19, 2024
b58875d
fix DEPRECATION WARNING
leonardow-unep-wcmc Jan 19, 2024
46c8e90
fix rails 5 load lib issue (https://gist.github.com/maxivak/381f1e964…
leonardow-unep-wcmc Jan 19, 2024
b8489b9
add comment
leonardow-unep-wcmc Jan 19, 2024
af15a87
change "from_value" to "from_clause.value"
leonardow-unep-wcmc Jan 19, 2024
7f9cf28
https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19792/diffs
leonardow-unep-wcmc Jan 19, 2024
9fc3618
fix spec (strong params)
leonardow-unep-wcmc Jan 19, 2024
a4d172c
fix strong params to hash
leonardow-unep-wcmc Jan 19, 2024
38cd2f7
rename variables, more readable, and easier under byebug console
leonardow-unep-wcmc Jan 19, 2024
e841b6b
rollback part of 894a3e9bf49a4a7aa0e98954dbe12b4ea526c483
leonardow-unep-wcmc Jan 19, 2024
33acfc5
fix: strong params behaviour changed
leonardow-unep-wcmc Jan 19, 2024
e6482a8
fix carrierwave strange behaviour for test
leonardow-unep-wcmc Jan 19, 2024
b938396
bugs fix
leonardow-unep-wcmc Jan 19, 2024
62dcc20
matching_criteria is no longer a hash
leonardow-unep-wcmc Jan 22, 2024
21dbbc7
test status code of response instead of mock, and migrate away from D…
leonardow-unep-wcmc Jan 22, 2024
9e0d0ce
fix: two fixes for failing tests of NomenclatureChange::ReassignmentC…
pdl Jan 22, 2024
3af52b4
try to make in generic
leonardow-unep-wcmc Jan 22, 2024
2e90448
Revert "matching_criteria is no longer a hash"
pdl Jan 22, 2024
708a653
fix: since Rails 5 this test was inserting a json string instead of a…
pdl Jan 22, 2024
815f91a
fix: more instances of unnecessarily stringified JSON objects
pdl Jan 22, 2024
c67a103
DEPRECATION WARNING: Returning `false` in Active Record and Active Mo…
leonardow-unep-wcmc Jan 22, 2024
08e793c
latest rubocop and auto fix rspec style
leonardow-unep-wcmc Jan 22, 2024
6357b31
DEPRECATION WARNING: `xhr` and `xml_http_request` are deprecated and …
leonardow-unep-wcmc Jan 22, 2024
6cbffd9
No idea why putting @aru there, but look like what it want to do is r…
leonardow-unep-wcmc Jan 22, 2024
f8e7faa
FactoryGril to FactoryBot
leonardow-unep-wcmc Jan 22, 2024
57e91cb
DEPRECATION WARNING: Static attributes will be removed in FactoryBot …
leonardow-unep-wcmc Jan 22, 2024
1922a77
2.19.1 https://guides.rubyonrails.org/v5.0/upgrading_ruby_on_rails.ht…
leonardow-unep-wcmc Jan 23, 2024
268046a
remove new framework file
leonardow-unep-wcmc Jan 23, 2024
73aeac4
fix new default belongs_to loading issue
leonardow-unep-wcmc Jan 24, 2024
255b86d
remove redundant validation (now come with belongs_to)
leonardow-unep-wcmc Jan 24, 2024
e9da15e
bugs fix
leonardow-unep-wcmc Jan 24, 2024
b2357cf
ActiveRecord TaxonConcept `validates :rank_id, :presence => true` was…
leonardow-unep-wcmc Jan 24, 2024
be43b9d
add comments
leonardow-unep-wcmc Jan 24, 2024
9f551f3
changed to use belongs_to build-in validation
leonardow-unep-wcmc Jan 24, 2024
4df93ae
Update database_cleaner to fix the time travel issue in rspec. Also f…
leonardow-unep-wcmc Jan 25, 2024
8c79fdc
Upgrade Ruby to 2.6.10
leonardow-unep-wcmc Jan 24, 2024
cd29bb6
fix Gemfile.lock broken due to rebase
leonardow-unep-wcmc Jan 25, 2024
3269dca
Rails 5.1.7; Remove DBCleaner; Update application.secrets (https://gu…
leonardow-unep-wcmc Jan 24, 2024
34f3733
remove "old_cap"
leonardow-unep-wcmc Jan 23, 2024
f3ccce1
rails app:update
leonardow-unep-wcmc Jan 23, 2024
ff2f887
rails-diff
leonardow-unep-wcmc Jan 23, 2024
1272f0c
DEPRECATION WARNING: Passing a class to the `class_name` is deprecate…
leonardow-unep-wcmc Jan 23, 2024
3f9b910
migrate to 5.1 default
leonardow-unep-wcmc Jan 24, 2024
e5f2c41
Bring back Database Cleaner for now
leonardow-unep-wcmc Jan 25, 2024
8b54898
Upgrade 'pg' and 'database_cleaner' to latest version
leonardow-unep-wcmc Jan 25, 2024
247d4d4
Fix ActiveModel::Dirty DEPRECATION WARNING
leonardow-unep-wcmc Jan 25, 2024
06e223f
DEPRECATION WARNING: Passing string to be evaluated in :if and :unles…
leonardow-unep-wcmc Jan 25, 2024
2bd7eeb
add comment
leonardow-unep-wcmc Jan 25, 2024
d8bced2
update comments
leonardow-unep-wcmc Jan 25, 2024
e3feb3d
Upgrade Rails gem to 5.2.8.1
leonardow-unep-wcmc Jan 25, 2024
195f570
ActiveRecord::Relation already defined an instance method named "filt…
leonardow-unep-wcmc Jan 25, 2024
29f6ac9
rails app:update
leonardow-unep-wcmc Jan 25, 2024
2883b38
rails diff
leonardow-unep-wcmc Jan 25, 2024
c5d44f4
upgrade rspec gem
leonardow-unep-wcmc Jan 25, 2024
5f9d796
upgrade pg_search and strong_migration
leonardow-unep-wcmc Jan 25, 2024
691fc42
upgrade paper trail
leonardow-unep-wcmc Jan 25, 2024
6ee39ec
upgrade factory bot, with `FactoryBot.use_parent_strategy = false` to…
leonardow-unep-wcmc Jan 26, 2024
91e0b3e
Upgrade Ahoy, and update GDPR related config.
leonardow-unep-wcmc Jan 26, 2024
e84d5e5
DEPRECATION WARNING: Dangerous query method (method whose arguments a…
leonardow-unep-wcmc Jan 26, 2024
3ca18d5
fix cache not able to cache ActiveRecordRelation https://stackoverflo…
leonardow-unep-wcmc Jan 26, 2024
e0432e3
enable all rails 5.2 default
leonardow-unep-wcmc Jan 26, 2024
3b0ab0d
Upgrade and reconfig chartkick gem
leonardow-unep-wcmc Jan 26, 2024
ddb6428
Use Sidekiq to send Devise's emails
leonardow-unep-wcmc Jan 26, 2024
9f0fdf5
Rails 5.2 build-in redis store (https://github.com/redis-store/redis-…
leonardow-unep-wcmc Jan 26, 2024
c89a386
Upgrade Sidekiq to 7, get ready to migrate worker to active job
leonardow-unep-wcmc Jan 26, 2024
67e2ba9
https://stackoverflow.com/a/71326657/556780
leonardow-unep-wcmc Jan 29, 2024
ad94baa
DEPRECATION WARNING: Dangerous query method (method whose arguments a…
leonardow-unep-wcmc Jan 29, 2024
1498fab
No ES6 for assets precompile
leonardow-unep-wcmc Jan 29, 2024
7e25647
New docker container for cap deploy
leonardow-unep-wcmc Jan 29, 2024
9e88e34
Ruby 2.7
leonardow-unep-wcmc Jan 30, 2024
2c302c6
upgrade gems after ruby 2.7
leonardow-unep-wcmc Jan 30, 2024
a4cb0dc
goodbye whenever, welcome sidekiq-cron
leonardow-unep-wcmc Jan 30, 2024
0779695
remove whenever
leonardow-unep-wcmc Jan 30, 2024
7eaba6d
permit params for cache
leonardow-unep-wcmc Jan 30, 2024
361f2b7
fix rspec
leonardow-unep-wcmc Jan 31, 2024
6d4e1f7
Fix incorrect `head` when API with bad token.
leonardow-unep-wcmc Jan 31, 2024
9782df9
Fix bugs by code review
leonardow-unep-wcmc Jan 31, 2024
5c60363
DEPRECATION WARNING: The success? predicate is deprecated and will be…
leonardow-unep-wcmc Jan 31, 2024
0d9ee2a
downgrade papertail due to https://github.com/paper-trail-gem/paper_t…
leonardow-unep-wcmc Jan 31, 2024
1dfc473
strong param fix
leonardow-unep-wcmc Feb 2, 2024
6f4dfec
Rails 6.0; rails app:update + rails diff; able to start web server bu…
leonardow-unep-wcmc Jan 30, 2024
b89aa2c
rollback to classic autoloader for now
leonardow-unep-wcmc Jan 31, 2024
6184763
fix rspec for Rails 6
leonardow-unep-wcmc Jan 31, 2024
2419d93
fix rspec for Rails 6
leonardow-unep-wcmc Jan 31, 2024
624af4d
Time as_json now convert the value to String.
leonardow-unep-wcmc Jan 31, 2024
2cd90e8
DEPRECATION WARNING: update_attributes is deprecated and will be remo…
leonardow-unep-wcmc Jan 31, 2024
2f50a8f
fix environment (copy from production to staging)
leonardow-unep-wcmc Jan 31, 2024
6262531
enable 6.0 default
leonardow-unep-wcmc Jan 31, 2024
942df65
upgrade gems
leonardow-unep-wcmc Jan 31, 2024
067a37f
upgrade gems
leonardow-unep-wcmc Jan 31, 2024
524c85a
Classic to Zeitwerk (https://guides.rubyonrails.org/classic_to_zeitwe…
leonardow-unep-wcmc Feb 1, 2024
5b8b820
add Service/Serializers group in coverage page.
leonardow-unep-wcmc Feb 1, 2024
0bcd5a8
Upgrade gem to remove DEPRECATION WARNING
leonardow-unep-wcmc Feb 1, 2024
f5aede0
https://thoughtbot.com/blog/rails-6-warning-message-upgrade
leonardow-unep-wcmc Feb 1, 2024
95606b9
Ruby 3.0.6
leonardow-unep-wcmc Feb 1, 2024
bc7aa8e
update cap to support ruby 3
leonardow-unep-wcmc Feb 2, 2024
cc96ac6
Rails 6.1; app:update; rails diff
leonardow-unep-wcmc Feb 2, 2024
a191f33
Upgrade gems for Rails 6.1
leonardow-unep-wcmc Feb 2, 2024
68d4f49
fix rspec
leonardow-unep-wcmc Feb 2, 2024
7b1d8ca
chore: begin to test content of taxon_concepts API route
pdl Jan 12, 2024
60c8c96
fix: order() expects literals to be wrapped in Arel.sql
pdl Feb 2, 2024
e15dc9b
DEPRECATION WARNING: Enumerating ActiveModel::Errors as a hash has be…
leonardow-unep-wcmc Feb 2, 2024
4ede795
DEPRECATION WARNING: Calling `<<` to an ActiveModel::Errors message a…
leonardow-unep-wcmc Feb 2, 2024
ccb968c
DEPRECATION WARNING: connection_config is deprecated and will be remo…
leonardow-unep-wcmc Feb 2, 2024
8110f42
fix: wrap another two order clauses in an Arel.sql
pdl Feb 2, 2024
f934375
Upgrade Gems and add comments to gemfile
leonardow-unep-wcmc Feb 2, 2024
8f8bdea
fix ahoy config
leonardow-unep-wcmc Feb 3, 2024
9903b21
Remove rails-observers gem.
leonardow-unep-wcmc Feb 4, 2024
4732d37
break routes to multiple files
leonardow-unep-wcmc Feb 4, 2024
74dc591
update rubocop
leonardow-unep-wcmc Feb 4, 2024
eb4066e
Try fix Ahoy after upgrade to v5.0.2
leonardow-unep-wcmc Feb 4, 2024
78e23f7
enable 6.1 default
leonardow-unep-wcmc Feb 4, 2024
29a8474
add comment
leonardow-unep-wcmc Feb 4, 2024
c26ac07
Move TaxonConceptVersion to model, see if it can fix cap deploy (unin…
leonardow-unep-wcmc Feb 4, 2024
ab7a25b
rollback Sacc-rails gem
leonardow-unep-wcmc Feb 4, 2024
1b0f876
Rollback to jquery_ujs instead of rails-ujs which introduce in 5.1
leonardow-unep-wcmc Feb 5, 2024
1a2fb57
fix: another example of order where Arel::Sql is required to wrap lit…
pdl Feb 5, 2024
2baef35
ActiveRecord::UnknownAttributeReference
leonardow-unep-wcmc Feb 5, 2024
07c58b9
fix: split rebuild job into daily and weekly, as we only want to run …
pdl Feb 5, 2024
5ae569a
Fix rake task and bg job for rebuild
leonardow-unep-wcmc Feb 5, 2024
c480429
Rename `Sapi` module to `SapiModule` so it less chance to confuse wit…
leonardow-unep-wcmc Feb 5, 2024
e5f5dec
require sapi_module in initializers, after edge load in application.r…
leonardow-unep-wcmc Feb 5, 2024
935ebbd
fix: typo s/changable/changeable/g
pdl Feb 5, 2024
5b1ddf5
docs: summarise Changeable concern
pdl Feb 5, 2024
d968716
Try to fix SQL issue after upgrade
leonardow-unep-wcmc Feb 5, 2024
59fda57
Update gems
leonardow-unep-wcmc Feb 5, 2024
e585afb
Fix path, so it won't generate `/users/edit.1` where 1 is user id. Th…
leonardow-unep-wcmc Feb 5, 2024
708f278
Fix strong params
leonardow-unep-wcmc Feb 6, 2024
7c7d1e0
Strong migrations should not be enforced on legacy migrations
pdl Feb 7, 2024
2cce393
fix: delete_matched is now interpreted as a regexp
pdl Feb 7, 2024
b3fe0f9
build the cache in background through sidekiq, with unique job, to pr…
leonardow-unep-wcmc Feb 8, 2024
acf3ced
fix: sidekiq does not like symbols as args to perform_async, use JSON…
pdl Feb 8, 2024
835883e
feat: 409 makes more sense to me as this is an *anticipated* error, a…
pdl Feb 8, 2024
efdcb77
chore: add memcached image to dockerfile
pdl Feb 8, 2024
c12c6c4
chore: use memcached in development, staging, and production so that …
pdl Feb 8, 2024
0171806
fix: memcache does not support delete_matched
pdl Feb 8, 2024
485bd3c
fix strong params
leonardow-unep-wcmc Feb 8, 2024
f5e7831
fix ActionController::ParameterMissing
leonardow-unep-wcmc Feb 8, 2024
7b56fd6
bugs fix
leonardow-unep-wcmc Feb 9, 2024
fefabc8
bug fixes
leonardow-unep-wcmc Feb 11, 2024
ae85cd3
https://appsignal.com/wcmc/sites/56bdb6f5776f7253f3b05b02/exceptions/…
leonardow-unep-wcmc Feb 12, 2024
a5d4ff3
fix: remove extra argument in record.errors.add
pdl Feb 12, 2024
c4a8d6f
fix: another issue with json stringification/sql interpolation
pdl Feb 12, 2024
f0b10af
fix: geo_entity_ids is an array, which requires a different syntax on…
pdl Feb 12, 2024
f71973a
fix strong params
leonardow-unep-wcmc Feb 13, 2024
41fa2a6
fix strong params
leonardow-unep-wcmc Feb 13, 2024
bd84612
fix strong params
leonardow-unep-wcmc Feb 13, 2024
0797938
fix strong params (:output_ids)
leonardow-unep-wcmc Feb 13, 2024
2ae64f2
fix :hybrid_parents_ids, which should be an array in form
leonardow-unep-wcmc Feb 13, 2024
8ea079d
same as :hybrid_parents_ids in commit 079793832613559b737625b12bd6c53…
leonardow-unep-wcmc Feb 13, 2024
484b1ba
existing bug fixes. TaxonConcept#data DB column missing default value…
leonardow-unep-wcmc Feb 13, 2024
329c603
fix rspec
leonardow-unep-wcmc Feb 13, 2024
f880e7d
https://unep-wcmc.codebasehq.com/projects/species-rails-upgrade/ticke…
leonardow-unep-wcmc Feb 14, 2024
0bb700f
feat: suppress countries where species is extinct from checklist taxo…
pdl Feb 19, 2024
5f551a2
refactor: get non-extinct distributions using a single query
pdl Feb 19, 2024
f22c599
feat: retain order countries in checklist from the view
pdl Feb 22, 2024
8591f0b
feat: in CITES checklist, show countries tagged "extinct, reintroduced"
pdl Feb 23, 2024
370820b
fix: db:seed would not complete due to model validation.
pdl Mar 4, 2024
10522b1
fix: rebuild_cites_listing_changes_mview did not work after drop/recr…
pdl Mar 4, 2024
a4e3a73
fix: rails will now serialise hashes to JSONB correctly, and stringif…
pdl Mar 4, 2024
ae8cac9
fix: add a validation on Trade::ValidationError model to ensure JSON …
pdl Mar 4, 2024
e4693c2
fix: tests for Trade::ValidationRule should use hash, not string matc…
pdl Mar 5, 2024
94d20a5
fix: another instance of a string literal in JSONB matching_criteria …
pdl Mar 5, 2024
f8fe16d
chore: make deploy fewer commands; use cp rather than ln to avoid a p…
pdl Mar 4, 2024
2955493
fix: do not apply CSRF protection to CITES checklist downloads
pdl Mar 4, 2024
1d85c1e
fix: rework caching for purposes, sources, terms, units API controllers
pdl Mar 4, 2024
ef58f83
fix: we cannot cache renders, but we can cache model data
pdl Mar 5, 2024
aa1ed5b
chore: remove actionpack-action_caching and actionpack-page_caching
pdl Mar 4, 2024
cb21368
fix: param type checking for Taxon Concepts happens after split
pdl Mar 5, 2024
b414819
fix: a 500 error on submit of taxon listing change
pdl Mar 5, 2024
ed08e82
fix: another listing change 500 when adding geo entities
pdl Mar 5, 2024
18df8f6
fix: taxon listing changes - pull through exclusions from controller
pdl Mar 5, 2024
f09ebe5
fix: specifying inverse_of fixes a "[relation] must exist" bug
pdl Mar 5, 2024
fb59ba7
fix: /admin/eu_implementing_regulations was rendering raw template code
pdl Mar 5, 2024
3c3a3af
docs: easiest to start a deploy shell from outside docker
pdl Mar 5, 2024
6a30018
fix: trade monitoring tool - filtering by country id was broken
pdl Mar 7, 2024
f99be0c
fix: wrong number of arguments for CSV.read
pdl Mar 7, 2024
3fe0632
fix: hash annotations are assumed to be mostly numeric
pdl Mar 7, 2024
101bfc0
fix: do not use setter where behaviour depends on multiple attributes
pdl Mar 11, 2024
1888f5a
chore: have dockerised db use same WAL settings as staging db
pdl Mar 11, 2024
77ec4f3
fix: raise a better error before rebuild_designation_listing_changes_…
pdl Mar 11, 2024
7ea6c23
chore: add a little more logging to Trade::RebuildComplianceMviews
pdl Mar 12, 2024
4d2de12
fix: another sql literal in order() clause
pdl Mar 12, 2024
be8ff31
fix: strong params for checklist download index
pdl Mar 13, 2024
7d7c553
fix: checklist has its own param sanitisation method - use that over …
pdl Mar 13, 2024
660945f
refactor: also use checklist params for history
pdl Mar 13, 2024
c7df549
fix: checklist history CSV did not contain taxon ids
pdl Mar 13, 2024
1c8b528
fix: for checklist downloads ID manual entries pdf
pdl Mar 13, 2024
727ec61
fix: my own stupidity
pdl Mar 13, 2024
8de7b56
chore: do not swallow exceptions; re-raise them
pdl Mar 13, 2024
71c383f
fix: PDFKit now requires enable_local_file_access to read local files
pdl Mar 13, 2024
5167365
chore: replace tabs with spaces in cites trade js
pdl Mar 13, 2024
bac0601
chore: fix more whitespace issuesin cites trade js
pdl Mar 13, 2024
773d662
fix: trim_decimal_zero still needs coercing to text, because ActiveRe…
pdl Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark the yarn lockfile as having been generated.
yarn.lock linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
23 changes: 20 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,28 @@
/.bundle

# Ignore all logfiles and tempfiles.
/coverage
/rdoc
/log/*
/tmp/*
!/log/.keep
/tmp
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

/coverage
/rdoc
/private
/public/system
/public/downloads/*.pdf
Expand Down
41 changes: 18 additions & 23 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
inherit_from: .rubocop_todo.yml
# inherit_from: .rubocop_todo.yml
require:
- rubocop-rails
- rubocop-rspec

Rails:
Enabled: true
AllCops:
TargetRubyVersion: 2.2
TargetRubyVersion: 3.0.6
TargetRailsVersion: 6.0
Exclude:
- 'lib/tasks/bbgem.rake'
- 'db/schema.rb'
Expand All @@ -12,35 +18,24 @@ Style/StringLiterals:

# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: outdent, indent
Style/AccessModifierIndentation:
Layout/AccessModifierIndentation:
EnforcedStyle: indent

# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Style/IndentArray:
EnforcedStyle: consistent

# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Style/IndentHash:
EnforcedStyle: consistent

# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: normal, rails
Style/IndentationConsistency:
Layout/IndentationConsistency:
EnforcedStyle: normal
Exclude:
- 'db/migrate/*'
- 'config/initializers/normalise_blank_values.rb'

# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: symmetrical, new_line, same_line
Style/MultilineArrayBraceLayout:
Layout/MultilineArrayBraceLayout:
EnforcedStyle: symmetrical

# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: symmetrical, new_line, same_line
Style/MultilineHashBraceLayout:
Layout/MultilineHashBraceLayout:
EnforcedStyle: symmetrical

# Configuration parameters: EnforcedStyle, SupportedStyles.
Expand All @@ -53,33 +48,33 @@ Style/AndOr:
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: leading, trailing
Style/DotPosition:
Layout/DotPosition:
EnforcedStyle: trailing

# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Style/ExtraSpacing:
Layout/ExtraSpacing:
AllowForAlignment: true
Exclude:
- 'db/migrate/*'

# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
Style/FirstParameterIndentation:
Layout/FirstParameterIndentation:
Enabled: true

# Configuration parameters: Width.
Style/IndentationWidth:
Layout/IndentationWidth:
Exclude:
- 'db/migrate/*'

# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
# SupportedStyles: space, no_space
Style/SpaceInsideHashLiteralBraces:
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: space
EnforcedStyleForEmptyBraces: no_space

# Configuration parameters: AllowForAlignment.
Style/SpaceAroundOperators:
Layout/SpaceAroundOperators:
AllowForAlignment: true

# Configuration parameters: AllowIfMethodIsEmpty.
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.9
3.0.6
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cache: bundler
bundler_args: --without development production staging
sudo: false
rvm:
- 2.5.9
- 3.0.6
addons:
postgresql: 9.4
code_climate:
Expand Down
7 changes: 3 additions & 4 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'capistrano/setup'
require 'capistrano/deploy'


require "capistrano/scm/git"
require 'capistrano/scm/git'
install_plugin Capistrano::SCM::Git


Expand All @@ -34,10 +34,9 @@ require 'capistrano/rails/migrations'
require 'capistrano/passenger'
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
require 'capistrano/maintenance'
require 'whenever/capistrano'
require 'capistrano/local_precompile'
require 'capistrano/sidekiq'


install_plugin Capistrano::Sidekiq
install_plugin Capistrano::Sidekiq::Systemd

Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
30 changes: 0 additions & 30 deletions Capfile.old

This file was deleted.

10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile
FROM ruby:2.5.9
FROM ruby:3.0.6

# Rails and SAPI has some additional dependencies, e.g. rake requires a JS
# runtime, so attempt to get these from apt, where possible
Expand All @@ -14,12 +14,12 @@ RUN apt-get update && apt-get install -y --force-yes \
RUN mkdir /SAPI
WORKDIR /SAPI

COPY Gemfile /SAPI/Gemfile
COPY Gemfile.lock /SAPI/Gemfile.lock
# COPY Gemfile /SAPI/Gemfile
# COPY Gemfile.lock /SAPI/Gemfile.lock
RUN gem install bundler -v 1.17.3
RUN bundle install
# RUN bundle install

COPY . /SAPI
# COPY . /SAPI

EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]
50 changes: 50 additions & 0 deletions Dockerfile.cap-deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Dockerfile
FROM ruby:3.0.6

ENV DEBIAN_FRONTEND=noninteractive
# Rails and SAPI has some additional dependencies, e.g. rake requires a JS
# runtime, so attempt to get these from apt, where possible
RUN apt-get update && apt-get install -y --force-yes \
# For ruby?
libsodium-dev libgmp3-dev \
# For RVM
gnupg procps curl libssl-dev \
# For assets local_precompile (cap deploy)
rsync nodejs \
# gems
libpq-dev postgresql-client

RUN mkdir /SAPI
WORKDIR /SAPI

# https://stackoverflow.com/questions/43612927/how-to-correctly-install-rvm-in-docker
RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN curl -sSL https://get.rvm.io | bash -s
RUN /bin/bash -l -c ". /etc/profile.d/rvm.sh && rvm install 3.0.6"
# RVM installed in multi-user mode. However cap assume rvm is installed in single user mode.
# Create a soft link to fake it.
RUN mkdir -p ~/.rvm/bin && ln -s /usr/local/rvm/bin/rvm ~/.rvm/bin/rvm

COPY Gemfile /SAPI/Gemfile
COPY Gemfile.lock /SAPI/Gemfile.lock

ENV BUNDLE_SILENCE_ROOT_WARNING=1
RUN /bin/bash -c "source /etc/profile.d/rvm.sh \
&& gem install bundler:1.17.3 \
&& bundle"

ENTRYPOINT ["/bin/bash", "-l"]

##########################################
## Run the following in container
##########################################
# /bin/bash --rcfile cap-deploy-shell.sh
# [Enter your passphrase]
# root@commit:/SAPI$ CAP_BRANCH=<branch> cap staging deploy
#
##########################################
# Alternatively, from outside docker
##########################################
# docker exec -it sapi-cap-deploy /bin/bash --rcfile cap-deploy-shell.sh
# [Enter your passphrase]
# root@commit:/SAPI# CAP_BRANCH=<branch> cap staging deploy
Loading