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 +4 -4
- data/.github/workflows/test.yml +7 -1
- data/CHANGELOG +4 -0
- data/Gemfile.lock +2 -2
- data/gemfiles/rails52.gemfile.lock +2 -2
- data/gemfiles/rails60.gemfile.lock +2 -2
- data/gemfiles/rails61.gemfile.lock +2 -2
- data/lib/vanity/configuration.rb +1 -1
- data/lib/vanity/safe_yaml.rb +21 -0
- data/lib/vanity/version.rb +1 -1
- data/lib/vanity.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8f83fefb96f513266dcaeee34962d45439558e85637dccb59ef302cc335c5c0
|
4
|
+
data.tar.gz: 99981677b5954bad074d0697becca6fac12ce8a8b173332b57959139c96347ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06daf89c8bfc1cea5eccd77de8c12e42114823327ec25a6822ae3991f9b3e65d034a6e7e6bc4c5468c1ee5d256f73024d9eae402c05114ae2f9e3e9b746a5797
|
7
|
+
data.tar.gz: 8c103681a559c7270d763959fed1b0efa67ed524407d8af375bdda8572e3468070dede88639f4452bd3acf9b1721f1362c46db49460f62adb265e66cecdb958a
|
data/.github/workflows/test.yml
CHANGED
@@ -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
data/Gemfile.lock
CHANGED
data/lib/vanity/configuration.rb
CHANGED
@@ -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 =
|
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
|
data/lib/vanity/version.rb
CHANGED
data/lib/vanity.rb
CHANGED
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.
|
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-
|
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.
|
299
|
+
- Vanity 4.0.4
|
299
300
|
- "--main"
|
300
301
|
- README.md
|
301
302
|
- "--webcvs"
|