- Extend available locales in the application to include:
- Portuguese (Brazil)
- Croatian
- Persian
- German
- Spanish
- French
- Italian
- Turkish
- Russian
- Ukrainian
- Polish
- Create new locale files for each language with appropriate translations.
- Update existing locale files to include new languages.
This update enhances the application's accessibility by supporting a wider range of languages, allowing users from different regions to interact with the application in their native language.
- Introduce default, short, and long date formats
- Enhance date representation for better user experience
This update allows the application to display dates in multiple formats,
including a default format of 'YYYY-MM-DD', a short format of
'"MMM DD"', and a long format of '"Month DD, YYYY"'. This
improves localization support and user interface flexibility.
- Refactor generate_sitemap method to support locale
- Add setup_sitemap_config method for configuration
- Implement sitemap generation for default and localized paths
This update enhances the sitemap generation process by supporting
multiple languages. Users can now access a sitemap with language
prefixes, improving SEO and usability for different locales.
Additionally, error handling has been improved to log specific
errors related to locale generation.
- Introduced `TranslatableName` module to allow for
localized names for `Country` and `Region` models.
- Updated views to display `localized_name` instead of
`name` for improved internationalization.
- Refactored JSON serialization for `translations` attribute.
- Enhanced localization support by adding new languages:
Japanese and Korean, with updated locale files.
- Removed outdated English and Chinese locales for countries
and regions to clean up the codebase.
- Implement locale extraction and fallback mechanism
- Add translation files for English and Chinese
- Update views to use translated strings for various UI elements
This commit introduces support for multiple languages in the application, enhancing accessibility for users. It includes a fallback mechanism for locales and updates to the user interface to display translated content.
- Introduce RssController to handle RSS feed requests
- Add a new route for the RSS feed
- Implement RSS feed view to display weather art
- Update application layout to include RSS feed link
- Set content type for RSS responses
This commit adds an RSS feed feature that allows users to
subscribe to updates on daily AI-generated weather art.
The feed includes the latest weather art and relevant
metadata, enhancing user engagement and accessibility.
- Update SitemapsController to use MinIO credentials
- Modify RefreshSitemapWorker to adapt to MinIO settings
- Change AWS configuration in initializers and storage files
- Add MinIO credentials to credentials.yml.enc
This commit transitions the application from using AWS S3 to MinIO for
storage. It updates all relevant configurations and ensures that the
application can now interact with MinIO seamlessly, including
support for both production and development environments.
The commit updates the sitemap host to point to the production environment.
This is needed so that the sitemap links will point to the correct domain, and the
production environment needs to point to a specific host. The sitemap now uses
the correct host url, and this is the correct config for the current state.
- Modified the host name in the sitemap configuration to support the new domain.
- This commit changes the hostname, and updates the sitemap to reflect the correct host.
- This is done to reflect the correct host on the production server.
- Added the new `public/sitemaps` directory to .gitignore to avoid commits related to this
directory, and updates the .gitignore.
- Add formatted_current_time method to City model.
- Modify BatchGenerateWeatherArtsWorker to check local time.
- Update Sidekiq scheduler to run every hour.
This commit improves the weather art generation by considering
local time for image generation and increasing the frequency
of batch processing for testing purposes. The new method
provides formatted time information for each city. This change
ensures that images are generated during daylight hours.
- Replace OpenLayers with Mapbox GL for map rendering.
- Update CSS for map styling and control visibility.
- Integrate weather art into map popups.
- Add Mapbox token to credentials.yml.enc
This commit replaces the existing OpenLayers map implementation
with Mapbox GL. It also adjusts the styling and adds a
weather art display to the map popup, which enhances the
user experience. The necessary changes include modifying
stylesheets, JavaScript controllers, view templates, and
updating the credentials file. The motivation is to enhance
map rendering performance and user experience.
- Implement MapController for displaying city maps
- Add map rendering in the city show view
- Include weather arts in the city show controller
- Update asset pipeline to include Leaflet CSS and JS
This commit introduces a map feature that allows users to view
geographical information related to cities. The map is integrated
with weather arts data, enhancing the overall functionality of
the city show page.
- Include 'rack-mini-profiler' gem in Gemfile
- Update Gemfile.lock with the new dependency
- Create initializer for rack-mini-profiler in development
This addition allows for performance monitoring within the
application during development, which can help identify
and address performance issues more effectively.
- Include associated city and image attachment in popular,
random, latest, and featured arts queries to enhance data
accessibility and performance.
- This modification reduces N+1 query issues by eager-loading
associations, leading to improved query performance when
accessing related data.
- Changed description for the 'batch_generate_weather' job from
'Generate weather arts every 2 hours' to 'Batch Generate weather
arts'.
- This change provides a more concise description of the job's
purpose without altering its functionality.
- Update menu labels for cities, countries, and regions
- Introduce new entities for states and subregions in Admin Panel
- Implement admin authentication for weather art generation
- Modify application controller to check for admin user
- Refactor view to display admin panel based on user permissions
- Update routes to include weather art generation action
These changes enhance the admin interface for better management of cities
and related entities. The new admin checks ensure that only authorized users
can generate weather art, improving security and functionality.
- Update development database URL to use a fallback
if no URL is provided in credentials.
- Modify production SMTP password retrieval to use
dig method for more robust access.
These changes allow for smoother local development and
ensure that the production environment correctly
accesses the SMTP password, enhancing overall stability.
- Implemented a new admin panel that allows administrators to view
statistics and manage weather art. The panel includes:
- A card displaying total images and today's images
- Buttons to generate new art and edit the city
- Added `admin?` helper method to check if the current user is an
administrator.
- Updated database configuration to use safer credentials lookup
method `dig` for development database URL instead of the
previous method, improving reliability in accessing nested
credentials.
- Adjusted the spacing in the 'unlock_keys' configuration
- Ensured uniform spacing around array elements
This change does not affect the functionality of the unlock
keys in Devise but improves the consistency of the code
formatting to enhance readability.
- Updated confirmation, password, unlock, and session views to use a
card-based layout for improved visual appeal.
- Added responsive design features to ensure compatibility across devices.
- Enhanced usability by providing clear placeholders in form fields.
These changes improve the user experience during account recovery and
management processes. The design promotes a modern interface while
maintaining functionality.
- Integrate Devise for user authentication
- Create User model and necessary views
- Implement email confirmation and password reset functionality
- Add routing for user sign-up and login
- Customize error messages display
This commit initiates user authentication in the application
using the Devise gem. It includes user registration, login,
password reset, and email confirmation features. Additionally,
the necessary views and mailer templates are included to
support these functionalities. This enhances the security
and usability of the application by allowing users to create
accounts and manage their passwords effectively.
- Include 'devise' gem for user management
- Update database access URLs in configurations
- Refactor schema types from bigint to integer for resource and author IDs
- Enhance geo synchronization by updating region and subregion handling
These changes are aimed at improving the user management functionality while ensuring efficient data handling and connections for production environment.
- Implement previous and next weather art navigation
- Update weather arts controller to fetch adjacent weather arts
- Modify show view to include navigation links
This update enhances the user experience by allowing users to
navigate through weather arts seamlessly. The previous and
next buttons improve accessibility, providing a smoother
browsing experience. The implementation also accounts for
situations where no adjacent weather arts exist, ensuring
clarity for users.
- Integrate Ahoy gem for tracking user events and visits
- Create models for Ahoy events and visits
- Implement admin interfaces for managing events and visits
- Add background job for cleaning up old analytics data
- Update application controller and other relevant controllers to track specific actions
This commit implements a comprehensive event tracking system that logs user interactions
within the application. Additionally, it includes mechanisms for managing and
cleaning historical visit and event data, ensuring efficient data handling.
- Create SitemapsController to serve sitemaps
- Configure AWS S3 storage for sitemaps
- Update routes to include sitemap paths
- Add SitemapsHelper module
- Configure SitemapGenerator with AWS adapter
- Update storage configurations for AWS
This feature adds sitemap functionality to the application, enabling search engines to discover and index its content more efficiently. It includes configuration for AWS S3 storage to host the sitemaps and updates the application's routes to serve them.
- Removed conditional check for production environment in
the initializer to ensure the sitemap refresh worker
always runs at startup.
- Renamed Sidekiq configuration file from sidekiq.yml to
sidekiq_scheduler.yml to better reflect its purpose.
These changes streamline the initialization process
for scheduled tasks and enhance the clarity of the
configuration files used in the project.
- Add error handling when scheduling the RefreshSitemapWorker in
production.
- Log successful scheduling and errors for improved diagnostics.
This change ensures that any issues with scheduling the worker are
logged and can be addressed promptly, enhancing the reliability of
the application in production.
- Update the condition to check for 'RAILS_BUILD' environment variable
- Allow RefreshSitemapWorker to run in development/test environments
This change clarifies the logic for executing the sitemap refresh worker by
inverting the condition to allow it to run when 'RAILS_BUILD' is not set,
ensuring proper functionality during development and testing phases.
- Change the condition to prevent sitemap refresh in production when
`RAILS_BUILD` is set.
- Ensures that the task only runs in development or non-production
environments, avoiding potential conflicts or wasted resources.
This change helps to streamline the initialization process and enhances
performance by not triggering unnecessary background tasks.
- Modified the schedule_tasks.rb initializer to only run RefreshSitemapWorker.perform_async unless RAILS_BUILD environment variable is set
This change optimizes the build process by preventing unnecessary sitemap refreshes during build time, thus improving overall project performance.
- Change stats div to be responsive
- Adjust coordinates display format for better readability
This update enhances the layout of the city show view by making
it more responsive and improving the display of weather and
geographical data. Additionally, the startup task for
refreshing the sitemap is now consistently executed,
removing unnecessary complexity.
- Update schedule tasks to use Sidekiq and Redis
- Improve task scheduling with caching
- Remove unnecessary code and error handling
This change enhances the reliability and performance of the startup task, leveraging the power of Sidekiq and Redis for background job processing and caching. The improvements ensure a smoother and more efficient application startup experience.
This commit adds a newline at the end of the 'schedule_tasks.rb' file to comply with the standard coding practices. Proper file formatting helps in maintaining code consistency across the project.
- Updated schedule_tasks.rb to include RAILS_BUILD check
- Improved application startup behavior in development mode
This change ensures the startup task does not run unnecessarily in development environment, reducing application startup time and resources usage.
- Schedule RefreshSitemapWorker after initialization
- Implement error handling for scheduling task
- Use Rails cache to prevent multiple tasks running simultaneously
This commit introduces a mechanism that schedules the
RefreshSitemapWorker to run once after the application starts
in production. It ensures that the task does not run
multiple times concurrently by using a cache key.
Error handling is included to log any failures
in scheduling the task, improving overall reliability.
- update default host in sitemap generator
- refresh sitemap on worker with new host
These changes allow the sitemap to be correctly generated for different environments and to handle the new host correctly, which was the motivation behind this update. No other side effects are expected.
- Ensure consistent use of double quotes for strings in the
Gemfile and sitemap configuration files.
- Add spaces for better readability in array declarations
within the RefreshSitemapWorker.
These changes improve the readability of the code without
changing any functionality. Adhering to a consistent coding
style helps maintainability and team collaboration.
- Introduced `SeoConcern` module to handle SEO meta tags
- Integrated `meta-tags` gem for customizable meta tags
- Created `RefreshSitemapWorker` to automate sitemap updates
- Added relevant meta tags in controllers for weather art and cities
- Configured sitemap generation settings
These changes improve the SEO of the application by ensuring that
pages have appropriate meta tags. Additionally, a sitemap is now
generated and refreshed daily, enhancing site visibility to search
engines.
- Update route for Sidekiq web interface from '/sidekiq'
to '/admin/tasks'
This change improves the coherence of the application's routing
by placing the Sidekiq interface under a more descriptive
namespace. It consolidates admin-related tasks under a common
path, enhancing the organization of the routing structure.
- Adjust spacing around the quotes in the Gemfile
- Standardize spacing in the arts_controller for improved readability
- Modify routes file for consistent array formatting
These changes enhance the consistency of code style across the project without altering any functionality or behavior.
- Introduce ArtsController with index action
- Create index view for displaying weather arts
- Implement Kaminari for pagination functionality
- Add necessary routes for accessing arts
- Update Gemfile to include Kaminari gem
- Create views for pagination controls
This implementation enhances the Weather Arts Gallery, allowing users to view and navigate through a collection of AI-generated weather arts easily. Pagination controls have been added to improve usability.
- Removed unnecessary queue configurations from Sidekiq configuration
- Added 'whenever' gem and its necessary dependencies for adding cron jobs
- Updated Docker workflow to cache Docker layers using actions/cache
This update improves the efficiency of CI/CD pipelines by caching Docker layers, which will help in reducing the time taken for the build process. Additionally, the changes in the Gemfile and the config/sidekiq.yml configuration will enable the project to run cron jobs for tasks like generating weather arts.
- Enable dynamic scheduling only if the schedule file exists
- Update the sidekiq.yml to include a new job for batch generation
- Define a cron schedule for the new job to run every 2 hours
This update allows Sidekiq to conditionally enable its scheduler and
introduces a new job that processes weather art batches every two
hours. The change enhances the job management and scheduling
dynamics in the application.
- Comment out previous queue adapter setting for Solid Queue
- Set Active Job queue adapter to Sidekiq for better performance
This change updates the Active Job queue adapter from Solid Queue to
Sidekiq. This adjustment is intended to improve job processing
performance and reliability in production environments. The previous
adapter setting will be retained as a comment for reference.
- Renamed `BatchGenerateWeatherArtsJob` to `BatchGenerateWeatherArtsWorker`
- Renamed `GenerateWeatherArtJob` to `GenerateWeatherArtWorker`
- Updated Sidekiq configuration to set Redis URL and logger level
- Modified `sidekiq.yml` to use the new worker class names and added queue configurations
These changes help in aligning the class names with their purpose as
workers in Sidekiq, while also ensuring better configuration for
Redis and logging.