-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buying an album #2
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We'll use FactoryBot instead of fixtures.
I'd like to use friendly URLs for artists and albums, so that they are more search engine friendly and shareable. For example: https://jam.coop/albums/the-white-album Rather than https://jam.coop/albums/1 I've added the `friendly_id` gem[1] to achieve this. I removed the CreateFriendlyIdSlugs migration that was added as part of the installation for now - this allows slug histories to be versioned if, for example, the album title changes. Since we don't have any interface for changing the title yet, I haven't included this additional complexity. [1] https://github.com/norman/friendly_id
I had to provide a default artist_id in the migration to add artist_id to albums to keep rubocop happy, since I used `null: false`. We don't currently have any data in the production database, so it seems fine to provide a default id.
We don't want two artists to have the same slug, but it's ok for two different artists to have albums with the same title (and therefore the same slug).
I followed the ActiveStorage setup as per the documentaion[1]. Currently only a local storage option is configured but I'll add S3 soon. The tests seem to pass fine in the github action but before installing libvips I saw /home/runner/work/music-coop/music-coop/vendor/bundle/ruby/3.2.0/gems/ruby-vips-2.1.4/lib/vips.rb:51: warning: already initialized constant GLib::G_FREE which I also saw locally, so I've ensured that this library is installed in CI and added installation instructions to the README. [1] https://edgeguides.rubyonrails.org/active_storage_overview.html
I've created two S3 buckets under the GFR account `jam-coop-images-development` and `jam-coop-images-production`. I created two AWS users with API key-only access `jam-coop-development` and `jam-coop-production`. The access key and secret for both those users have been added to development.yml.enc and production.yml.enc. The development user can be used to test things out in the development environment by setting `config.active_storage.service` to `:amazon`.
chrislo
force-pushed
the
buying-an-album
branch
from
August 17, 2023 19:30
8a8bfc6
to
72629f6
Compare
This didn't work for me at first, I was seeing __NSCFConstantString initialize] may have been in progress in another thread when fork() was called in the server log on my (M2) mac. I had to set export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES in my .zshrc and restart the server[1]. [1] https://dev.to/wusher/active-storage-variants-failing-locally-1glm
I've created new buckets in S3 to match this rename. I considered storing images separately from other objects (such as audio files) but I'm not sure we need that extra complexity at the moment. A single bucket for each environment should work for now.
chrislo
added a commit
that referenced
this pull request
Dec 15, 2023
I've updated the previous newsletter text. We should be able to send this with: Interest.where(email_confirmed: true).each do |user| BroadcastMailer.newsletter(user).deliver_now end
chrislo
added a commit
that referenced
this pull request
Dec 15, 2023
I sent a test copy to myself and spotted a few fixes (subject line, punctuation and some incorrect markup).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.