develop #3

Merged
kbe merged 227 commits from develop into main 2025-09-16 14:35:23 +00:00
5 changed files with 50 additions and 17 deletions
Showing only changes of commit a43c47a5db - Show all commits

25
QWEN.md Normal file
View File

@@ -0,0 +1,25 @@
# Qwen Code Customization
## Project Context
- Working on a Ruby on Rails project named "aperonight"
- Using Docker for containerization
- Following Ruby version 3.1.0 (as indicated by .ruby-version)
- Using Bundler for gem management (Gemfile)
- Using Node.js for frontend assets (package.json likely present)
## Preferences
- Prefer to use Ruby and Rails conventions
- Follow Docker best practices for development environments
- Use standard Ruby/Rails project structure
- When creating new files, follow Rails conventions
- When modifying existing files, maintain consistency with current code style
- Use git for version control (as seen in .gitignore)
- Prefer to work with the project's existing toolchain (Bundler, etc.)
## Behavior
- When asked to make changes, first understand the context by examining relevant files
- When creating new files, ensure they follow project conventions
- When modifying files, preserve existing code style and patterns
- When implementing new features, suggest appropriate file locations and naming conventions
- When debugging, suggest using the project's existing test suite and development tools
- When suggesting changes, provide clear explanations of why the change is beneficial

View File

@@ -12,7 +12,7 @@
Les meilleures soirées, concerts et afterworks de Paris en un clic. Réservez vos places et vivez des expériences uniques. Les meilleures soirées, concerts et afterworks de Paris en un clic. Réservez vos places et vivez des expériences uniques.
</p> </p>
<div class="flex flex-col sm:flex-row gap-4 justify-center items-center"> <div class="flex flex-col sm:flex-row gap-4 justify-center items-center">
<%= link_to "Explorer les soirées", "#events", class: "bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white font-semibold py-4 px-8 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg" %> <%= link_to "Explorer les soirées", parties_path, class: "bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white font-semibold py-4 px-8 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg" %>
<%= link_to "Voir les concerts", "#", class: "bg-white border border-neutral-300 hover:border-purple-300 text-neutral-700 font-semibold py-4 px-8 rounded-full transition-all duration-300" %> <%= link_to "Voir les concerts", "#", class: "bg-white border border-neutral-300 hover:border-purple-300 text-neutral-700 font-semibold py-4 px-8 rounded-full transition-all duration-300" %>
</div> </div>
</div> </div>

View File

@@ -15,11 +15,11 @@
<%= party.start_time.strftime("%d/%m/%Y") %> <%= party.start_time.strftime("%d/%m/%Y") %>
</span> </span>
</div> </div>
<div class="mt-4"> <div class="mt-4">
<p class="text-gray-600 text-sm line-clamp-2"><%= party.description.truncate(100) %></p> <p class="text-gray-600 text-sm line-clamp-2"><%= party.description.truncate(100) %></p>
</div> </div>
<div class="mt-4 flex justify-between items-center"> <div class="mt-4 flex justify-between items-center">
<div> <div>
<% if party.ticket_types.any? %> <% if party.ticket_types.any? %>
@@ -30,14 +30,14 @@
<p class="text-sm text-gray-500">Pas de billets disponibles</p> <p class="text-sm text-gray-500">Pas de billets disponibles</p>
<% end %> <% end %>
</div> </div>
<%= link_to "Voir les détails", party_path(party), class: "inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded-full shadow-sm text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500" %> <%= link_to "Voir les détails", party_path(party.slug, party), class: "inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded-full shadow-sm text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500" %>
</div> </div>
</div> </div>
</div> </div>
<% end %> <% end %>
</div> </div>
<div class="mt-8"> <div class="mt-8">
<%= paginate @parties, theme: 'twitter_bootstrap' %> <%= paginate @parties, theme: 'twitter_bootstrap' %>
</div> </div>
@@ -49,4 +49,4 @@
<h3 class="mt-2 text-sm font-medium text-gray-900">Aucun événement disponible</h3> <h3 class="mt-2 text-sm font-medium text-gray-900">Aucun événement disponible</h3>
<p class="mt-1 text-sm text-gray-500">Il n'y a aucun événement à venir pour le moment.</p> <p class="mt-1 text-sm text-gray-500">Il n'y a aucun événement à venir pour le moment.</p>
</div> </div>
<% end %> <% end %>

View File

@@ -2,6 +2,7 @@
one: one:
name: Summer Party name: Summer Party
slug: summer-party
description: A great summer party with music and drinks description: A great summer party with music and drinks
state: published state: published
venue_name: Beach Club venue_name: Beach Club
@@ -12,10 +13,11 @@ one:
two: two:
name: Winter Gala name: Winter Gala
slug: winter-gala
description: An elegant winter gala for the holidays description: An elegant winter gala for the holidays
state: draft state: draft
venue_name: Grand Hotel venue_name: Grand Hotel
venue_address: 456 Park Avenue venue_address: 456 Park Avenue
latitude: 40.7589 latitude: 40.7589
longitude: -73.9851 longitude: -73.9851
user: two user: two

View File

@@ -69,13 +69,19 @@ class PartyTest < ActiveSupport::TestCase
assert_not party.save assert_not party.save
end end
test "should save valid party" do test "should not save party without slug" do
user = User.create!( party = Party.new(
email: "test@example.com", name: "Valid Party Name",
password: "password123", description: "Valid description for the party that is long enough",
password_confirmation: "password123" latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
venue_address: "123 Test Street"
) )
assert_not party.save
end
test "should not save party with slug less than 3 characters" do
party = Party.new( party = Party.new(
name: "Valid Party Name", name: "Valid Party Name",
description: "Valid description for the party that is long enough", description: "Valid description for the party that is long enough",
@@ -83,9 +89,9 @@ class PartyTest < ActiveSupport::TestCase
longitude: 2.3522, longitude: 2.3522,
venue_name: "Test Venue", venue_name: "Test Venue",
venue_address: "123 Test Street", venue_address: "123 Test Street",
user: user slug: "ab"
) )
assert party.save assert_not party.save
end end
# Test enum states # Test enum states
@@ -122,7 +128,7 @@ class PartyTest < ActiveSupport::TestCase
assert_equal :ticket_types, association.options[:through] assert_equal :ticket_types, association.options[:through]
end end
# Test scopes # Test scopes - using class methods directly to avoid DB connection issues
test "should respond to featured scope" do test "should respond to featured scope" do
assert_respond_to Party, :featured assert_respond_to Party, :featured
end end