Skip to content

Commit 6484f34

Browse files
committed
Add Stripe pricing IDs and move public key to secrets
1 parent 5712f01 commit 6484f34

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

config/deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ env:
4040
- SECRET_KEY_BASE
4141
- STRIPE_SECRET_KEY
4242
- STRIPE_SIGNING_SECRET
43+
- STRIPE_PUBLIC_KEY
44+
- STRIPE_PRICE_DEV_MONTHLY
45+
- STRIPE_PRICE_TEAM_MONTHLY
4346
- SMTP_PASSWORD
4447
- ACTIVERABBIT_DATABASE_PASSWORD
4548
- PGHOST
@@ -61,8 +64,7 @@ env:
6164
# Sidekiq configuration
6265
SIDEKIQ_CONCURRENCY: 10
6366

64-
# Public keys (non-sensitive)
65-
STRIPE_PUBLIC_KEY: pk_live_your_stripe_public_key
67+
# Email configuration
6668
MAILER_FROM_EMAIL: noreply@your-domain.com
6769
ALERT_FROM_EMAIL: alerts@your-domain.com
6870
SMTP_HOST: smtp.your-provider.com

config/initializers/sidekiq_cron.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# }
1717
# }) if defined?(Sidekiq::Cron)
1818

19-
if defined?(Sidekiq::Cron) && ENV["REDIS_URL"].present? && !ActiveModel::Type::Boolean.new.cast(ENV["DISABLE_SIDEKIQ_CRON"])
19+
if defined?(Sidekiq::Cron) && ENV["REDIS_URL"].present? && !ActiveModel::Type::Boolean.new.cast(ENV["DISABLE_SIDEKIQ_CRON"]) && !Rails.env.test?
2020
jobs = {
2121
"report_usage_daily" => {
2222
"cron" => "0 1 * * *",

spec/requests/api_events_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,26 @@
4545
post '/api/v1/events/performance', params: body, headers: headers
4646
expect(response).to have_http_status(:unprocessable_entity)
4747
end
48+
49+
it 'accepts controller/action details from metadata' do
50+
body = {
51+
name: 'controller.action',
52+
duration_ms: 87.5,
53+
metadata: {
54+
controller: 'HomeController',
55+
action: 'index',
56+
method: 'GET',
57+
path: '/home',
58+
db_runtime: 12.3,
59+
view_runtime: 4.2
60+
}
61+
}.to_json
62+
63+
post '/api/v1/events/performance', params: body, headers: headers
64+
expect(response).to have_http_status(:created)
65+
json = JSON.parse(response.body)
66+
expect(json['status']).to eq('created')
67+
end
4868
end
4969

5070
describe 'POST /api/v1/events/batch' do

0 commit comments

Comments
 (0)