jekyll-attendease 0.7.0 → 0.8.0a
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e0e13d48fa4c5e59e387024d9d8fb60a8360fe6
|
4
|
+
data.tar.gz: 6e35f3111b341c12d636ce71ff0f56d2af417c0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e684e798b18215438635007a1797f1a43af3b5d377b95d39b8443f214db7ff78c925da3795fb5000d25e7ed828a78bd81e6fbc12af974a4f70fbfdbf50523cd
|
7
|
+
data.tar.gz: 78a1dff91a772c5fb59610d855e47e45e166f82dbaf0b25e6c09faaf9b5474dae732d408937900652ea76647da4a17a438bec8ddeaa3a76a9d438760c3ced02c
|
data/lib/jekyll-attendease.rb
CHANGED
@@ -22,5 +22,6 @@ Liquid::Template.register_tag('attendease_analytics_ga_gtag', Jekyll::Attendeas
|
|
22
22
|
Liquid::Template.register_tag('attendease_analytics_facebook', Jekyll::AttendeasePlugin::AnalyticsFacebookPixelTag)
|
23
23
|
Liquid::Template.register_tag('attendease_analytics_linkedin', Jekyll::AttendeasePlugin::AnalyticsLinkedInTag)
|
24
24
|
Liquid::Template.register_tag('attendease_analytics_settings', Jekyll::AttendeasePlugin::AnalyticsSettingsTag)
|
25
|
+
Liquid::Template.register_tag('attendease_sentry', Jekyll::AttendeasePlugin::SentryTag)
|
25
26
|
|
26
27
|
Liquid::Template.register_filter(Jekyll::AttendeasePlugin::Filters)
|
@@ -388,6 +388,24 @@ _EOT
|
|
388
388
|
#{ analytic_ids.map { |k, v| " #{k}: #{v.to_json}" }.join(",\n")}
|
389
389
|
}
|
390
390
|
</script>
|
391
|
+
_EOT
|
392
|
+
script
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
class SentryTag < Liquid::Tag
|
397
|
+
def render(context)
|
398
|
+
require 'pry'
|
399
|
+
config = context.registers[:site].config['attendease']
|
400
|
+
sentry_enabled = config['features']['sentry']
|
401
|
+
sentry_client_version = config['sentry_client_version']
|
402
|
+
sentry_dsn = config['sentry_dsn']
|
403
|
+
|
404
|
+
return '' unless sentry_enabled
|
405
|
+
|
406
|
+
script = <<_EOT
|
407
|
+
<script src="https://browser.sentry-cdn.com/#{sentry_client_version}/bundle.min.js" crossorigin="anonymous"></script>
|
408
|
+
<script>try { Sentry.init({ dsn: '#{sentry_dsn}' });} catch (e) {}</script>
|
391
409
|
_EOT
|
392
410
|
script
|
393
411
|
end
|
@@ -160,6 +160,13 @@ RSpec.describe "Jekyll Attendease tags" do
|
|
160
160
|
it { is_expected.to match(/googleAnalyticsTrackingId: "google_analytics"/) }
|
161
161
|
it { is_expected.to match(/window.AnalyticsSettings = /) }
|
162
162
|
end
|
163
|
+
|
164
|
+
describe "{% attendease_sentry %}" do
|
165
|
+
subject { cms_render("{% attendease_sentry %}") }
|
166
|
+
|
167
|
+
it { is_expected.to match(/https:\/\/browser.sentry-cdn.com\/5.2.0\/bundle.min.js/) }
|
168
|
+
it { is_expected.to match(/dsn: 'https:\/\/foobar@sentry.io\/baz'/) }
|
169
|
+
end
|
163
170
|
end
|
164
171
|
|
165
172
|
def schedule_widget_data
|
data/spec/spec_helper.rb
CHANGED
@@ -90,7 +90,10 @@ RSpec.configure do |config|
|
|
90
90
|
'organization_url' => 'https://foobar.org/',
|
91
91
|
'organization_id' => 'batbaz',
|
92
92
|
'organization_name' => 'Foo Bar Widgets',
|
93
|
-
'available_portal_locales' => %w{ en fr it es de }
|
93
|
+
'available_portal_locales' => %w{ en fr it es de },
|
94
|
+
'features' => { 'sentry' => true },
|
95
|
+
'sentry_client_version' => '5.2.0',
|
96
|
+
'sentry_dsn' => 'https://foobar@sentry.io/baz'
|
94
97
|
}
|
95
98
|
}), overrides)
|
96
99
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-attendease
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0a
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Wood
|
@@ -234,12 +234,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
234
234
|
version: '0'
|
235
235
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
236
|
requirements:
|
237
|
-
- - "
|
237
|
+
- - ">"
|
238
238
|
- !ruby/object:Gem::Version
|
239
|
-
version:
|
239
|
+
version: 1.3.1
|
240
240
|
requirements: []
|
241
241
|
rubyforge_project:
|
242
|
-
rubygems_version: 2.2.
|
242
|
+
rubygems_version: 2.5.2.3
|
243
243
|
signing_key:
|
244
244
|
specification_version: 4
|
245
245
|
summary: Attendease event helper for Jekyll
|