vanity 4.0.3 → 4.0.4

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
  SHA256:
3
- metadata.gz: b5e8b922f6a9f768a2f7daa807d71bd62dd54bb0fe1b56f7d0ed34e7c4055e55
4
- data.tar.gz: 5d6e5caaf7b916df714d3c2f5deec50e1b930543d969d99cfac1f20f851ff936
3
+ metadata.gz: a8f83fefb96f513266dcaeee34962d45439558e85637dccb59ef302cc335c5c0
4
+ data.tar.gz: 99981677b5954bad074d0697becca6fac12ce8a8b173332b57959139c96347ff
5
5
  SHA512:
6
- metadata.gz: 1508bb0b7e94de3dccb2a6d3d8ff58fcb8fcb4ebb6e1c59a68e44239f4981235eb67814e1f472d5b0f4b969bbc9a89904c5e21a4e1bf3bc13633247aa2174524
7
- data.tar.gz: cbdbda091b0fbf68b7fd9c848513748e13a3fc82857f56016e12290122b4bb0dbb49ff08b02a038803c33e3ff1d916c238b0472dc9b1563d8f2dc1eee6da5dd8
6
+ metadata.gz: 06daf89c8bfc1cea5eccd77de8c12e42114823327ec25a6822ae3991f9b3e65d034a6e7e6bc4c5468c1ee5d256f73024d9eae402c05114ae2f9e3e9b746a5797
7
+ data.tar.gz: 8c103681a559c7270d763959fed1b0efa67ed524407d8af375bdda8572e3468070dede88639f4452bd3acf9b1721f1362c46db49460f62adb265e66cecdb958a
@@ -24,6 +24,9 @@ jobs:
24
24
  matrix:
25
25
  ruby:
26
26
  - 2.5
27
+ - 2.6
28
+ - 2.7
29
+ - "3.0"
27
30
  # - jruby-9.2.20.1
28
31
  db:
29
32
  - mongodb
@@ -33,6 +36,9 @@ jobs:
33
36
  - gemfiles/rails52.gemfile
34
37
  - gemfiles/rails60.gemfile
35
38
  - gemfiles/rails61.gemfile
39
+ exclude:
40
+ - ruby: "3.0"
41
+ gemfile: gemfiles/rails52.gemfile
36
42
 
37
43
  env:
38
44
  DB: ${{ matrix.db }}
@@ -40,11 +46,11 @@ jobs:
40
46
  steps:
41
47
  - name: Checkout code
42
48
  uses: actions/checkout@v2
43
-
44
49
  - name: Set up Ruby
45
50
  uses: ruby/setup-ruby@v1
46
51
  with:
47
52
  ruby-version: ${{ matrix.ruby }}
53
+ rubygems: latest
48
54
  bundler-cache: true
49
55
  - name: Info
50
56
  run: bundle env
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  CHANGELOG
2
2
 
3
+ == 4.0.4 (2022-11-28)
4
+
5
+ * Support Psych 4 safe_load (@mcg)
6
+
3
7
  == 4.0.3 (2022-07-27)
4
8
 
5
9
  * Fix Vanity::Rails::Helpers#vanity_js for Rails 6 (@ariel-codes)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vanity (4.0.3)
4
+ vanity (4.0.4)
5
5
  i18n
6
6
 
7
7
  GEM
@@ -184,4 +184,4 @@ DEPENDENCIES
184
184
  yard
185
185
 
186
186
  BUNDLED WITH
187
- 1.17.3
187
+ 2.3.26
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (4.0.3)
10
+ vanity (4.0.4)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -316,4 +316,4 @@ DEPENDENCIES
316
316
  yard
317
317
 
318
318
  BUNDLED WITH
319
- 1.17.3
319
+ 2.3.26
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (4.0.3)
10
+ vanity (4.0.4)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -332,4 +332,4 @@ DEPENDENCIES
332
332
  yard
333
333
 
334
334
  BUNDLED WITH
335
- 1.17.3
335
+ 2.3.26
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (4.0.3)
10
+ vanity (4.0.4)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -335,4 +335,4 @@ DEPENDENCIES
335
335
  yard
336
336
 
337
337
  BUNDLED WITH
338
- 1.17.3
338
+ 2.3.26
@@ -213,7 +213,7 @@ module Vanity
213
213
  file_path = File.join(config_path, file_name)
214
214
 
215
215
  if File.exist?(file_path) # rubocop:todo Style/GuardClause
216
- config = YAML.safe_load(ERB.new(File.read(file_path)).result, [], [], true)
216
+ config = SafeYAML.load(ERB.new(File.read(file_path)).result)
217
217
  config ||= {}
218
218
  params_for_environment = config[environment.to_s]
219
219
 
@@ -0,0 +1,21 @@
1
+ require "yaml"
2
+
3
+ module Vanity
4
+ module SafeYAML
5
+ begin
6
+ YAML.safe_load("---", permitted_classes: [])
7
+ rescue ArgumentError
8
+ SUPPORTS_PERMITTED_CLASSES = false
9
+ else
10
+ SUPPORTS_PERMITTED_CLASSES = true
11
+ end
12
+
13
+ def self.load(payload)
14
+ if SUPPORTS_PERMITTED_CLASSES
15
+ YAML.safe_load(payload, permitted_classes: [], permitted_symbols: [], aliases: true)
16
+ else
17
+ YAML.safe_load(payload, [], [], true)
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,5 +1,5 @@
1
1
  module Vanity
2
- VERSION = "4.0.3"
2
+ VERSION = "4.0.4"
3
3
 
4
4
  module Version
5
5
  version = VERSION.to_s.split(".").map { |i| i.to_i }
data/lib/vanity.rb CHANGED
@@ -17,6 +17,7 @@ module Vanity
17
17
  end
18
18
 
19
19
  require "vanity/version"
20
+ require "vanity/safe_yaml"
20
21
  # Metrics
21
22
  require "vanity/metric/base"
22
23
  require "vanity/metric/active_record"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Assaf Arkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-27 00:00:00.000000000 Z
11
+ date: 2022-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -211,6 +211,7 @@ files:
211
211
  - lib/vanity/metric/google_analytics.rb
212
212
  - lib/vanity/metric/remote.rb
213
213
  - lib/vanity/playground.rb
214
+ - lib/vanity/safe_yaml.rb
214
215
  - lib/vanity/templates.rb
215
216
  - lib/vanity/templates/_ab_test.erb
216
217
  - lib/vanity/templates/_experiment.erb
@@ -295,7 +296,7 @@ metadata:
295
296
  post_install_message: To get started run vanity --help
296
297
  rdoc_options:
297
298
  - "--title"
298
- - Vanity 4.0.3
299
+ - Vanity 4.0.4
299
300
  - "--main"
300
301
  - README.md
301
302
  - "--webcvs"