easy_yaml 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +4 -2
- data/easy_yaml.gemspec +1 -0
- data/lib/easy_yaml/version.rb +1 -1
- data/lib/easy_yaml/yaml_loader.rb +2 -1
- metadata +17 -3
- data/.github/workflows/greetings.yml +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c383e9b33763471721e5a72ff3a3b6587329c9e52ec0deebe82509204cf926d5
|
4
|
+
data.tar.gz: 28096295ff8c6a88d4e199560f45f567868603f1982291a08357b772f78169e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 209c1952eb1e2098f8671abd4e4144b3cf052f46c91585c6c94c69742896da4da8f879bfdab901a02171e5cf52bbf8d77aed645ae0479754d8c1394d17dd635d
|
7
|
+
data.tar.gz: 4ec7ddcd56b8e13c3ccd3a807038356ae81c5d1e18066a9e6501dcfd3cdc1c5105ee17ddb3f454841a62ec657ff0c96f74da4a41ca299d4b52609003085ed10c
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Master
|
2
|
+
|
3
|
+
## 0.2.0 / 2020-04-10
|
4
|
+
|
5
|
+
- Fixes
|
6
|
+
- [#2](https://github.com/hoverinc/easy_yaml/pull/2) Resolve paths relative to the current path, by [@jfahrer](https://github.com/jfahrer)
|
7
|
+
> This allows the gem to be used outside of Rails. Without this change relative paths to a yaml file are expanded to the path the gem is installed in.
|
8
|
+
|
9
|
+
## 0.1.0 / 2020-02-28
|
10
|
+
|
11
|
+
- EasyYAML's Birthday!
|
12
|
+
|
13
|
+
- Features
|
14
|
+
- Read a YAML file, evaluate ERB in it, and parse it as YAML. All in one step.
|
15
|
+
- `EasyYAML.load path/to/file.yml`
|
16
|
+
- Optionally disable any of the three opinionated defaults:
|
17
|
+
- `allow_aliases: false` to not follow/expand YAML aliases
|
18
|
+
- `allow_erb: false` to not evaluate ERB in the file
|
19
|
+
- `relative_to_rails_root: false` to not prefix the file lookup path with `Rails.root` (useful if you're using `EasyYAML` outside of a Rails app).
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
easy_yaml (0.
|
4
|
+
easy_yaml (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
ast (2.4.0)
|
10
|
+
byebug (11.1.1)
|
10
11
|
diff-lcs (1.3)
|
11
12
|
jaro_winkler (1.5.4)
|
12
13
|
parallel (1.19.1)
|
@@ -44,10 +45,11 @@ PLATFORMS
|
|
44
45
|
|
45
46
|
DEPENDENCIES
|
46
47
|
bundler (~> 2.0)
|
48
|
+
byebug
|
47
49
|
easy_yaml!
|
48
50
|
rake (~> 13.0)
|
49
51
|
rspec (~> 3.0)
|
50
52
|
rubocop
|
51
53
|
|
52
54
|
BUNDLED WITH
|
53
|
-
2.
|
55
|
+
2.1.4
|
data/easy_yaml.gemspec
CHANGED
data/lib/easy_yaml/version.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'yaml'
|
2
|
+
require 'pathname'
|
2
3
|
require 'erb'
|
3
4
|
|
4
5
|
module EasyYAML
|
@@ -29,7 +30,7 @@ module EasyYAML
|
|
29
30
|
end
|
30
31
|
|
31
32
|
def file_path
|
32
|
-
Pathname.new File.expand_path(yaml_file_path,
|
33
|
+
Pathname.new File.expand_path(yaml_file_path, Dir.pwd)
|
33
34
|
end
|
34
35
|
|
35
36
|
def yaml_file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_yaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Becker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: byebug
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: 'EasyYAML reads a file from a path and uses YAML.safe_load to safely
|
70
84
|
load its contents and optionally works with Rails.root '
|
71
85
|
email:
|
@@ -74,12 +88,12 @@ executables: []
|
|
74
88
|
extensions: []
|
75
89
|
extra_rdoc_files: []
|
76
90
|
files:
|
77
|
-
- ".github/workflows/greetings.yml"
|
78
91
|
- ".github/workflows/linter.yml"
|
79
92
|
- ".github/workflows/test.yml"
|
80
93
|
- ".gitignore"
|
81
94
|
- ".rspec"
|
82
95
|
- ".rubocop.yml"
|
96
|
+
- CHANGELOG.md
|
83
97
|
- CODE_OF_CONDUCT.md
|
84
98
|
- Gemfile
|
85
99
|
- Gemfile.lock
|
@@ -1,15 +0,0 @@
|
|
1
|
-
name: Greetings
|
2
|
-
|
3
|
-
on:
|
4
|
-
- pull_request
|
5
|
-
- issues
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
greeting:
|
9
|
-
runs-on: ubuntu-latest
|
10
|
-
steps:
|
11
|
-
- uses: actions/first-interaction@v1
|
12
|
-
with:
|
13
|
-
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
14
|
-
issue-message: "Thank you for creating your first issue on this repo! 🎉"
|
15
|
-
pr-message: "Thank you for creating your first pull request on this repo! 🎉"
|