activeyaml 1.2.2 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_yaml/method_mapping.rb +1 -1
- data/lib/active_yaml/parser.rb +2 -2
- data/lib/active_yaml/version.rb +1 -1
- data/lib/active_yaml/yaml_hash.rb +1 -1
- data/lib/activeyaml.rb +3 -0
- metadata +6 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 742df6b961d0a74d200c0bcde208b87ac08f0ad203891f5ea95a7b6cb4266ec0
|
4
|
+
data.tar.gz: 994647f4de8e6f4fe8bf6e95a92099f2ce279460e3c050984c8d7ba167e94489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e73dcdbf2cd9615dadc02f95b3c91cf569e8d50697bd5862351b6ab1c8e3c3797bf2b52ee8274dd172c85f5e416007f03f9e7dd331478b1902d1dbbc83d55c88
|
7
|
+
data.tar.gz: b9b2977b868d5a1ff97351aaa92185812a05c48ce53a1b89f3ba956b2e5ba2eb9ec9d841c417619b1579118c6c2382cba9b8a708b7c54ce6b1aa09e88d1ccb36
|
@@ -6,7 +6,7 @@ module ActiveYaml
|
|
6
6
|
# A module containing methods that allow you to track method calls,
|
7
7
|
# and compare them with data from the YML file
|
8
8
|
module MethodMapping
|
9
|
-
def method_missing(method, *args, &)
|
9
|
+
def method_missing(method, *args, &block)
|
10
10
|
value = yaml_data[method.to_s]
|
11
11
|
|
12
12
|
if value
|
data/lib/active_yaml/parser.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'yaml'
|
4
4
|
|
5
5
|
module ActiveYaml
|
6
6
|
# The main parser of Yaml files, uses psych under the hood
|
7
7
|
class Parser
|
8
8
|
def self.parse(file_path)
|
9
|
-
|
9
|
+
YAML.safe_load_file(file_path)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/lib/active_yaml/version.rb
CHANGED
@@ -16,7 +16,7 @@ module ActiveYaml
|
|
16
16
|
|
17
17
|
# The main logic of this class is implemented in this method.
|
18
18
|
# Allows you to filter method calls and redirect them to a hash by key
|
19
|
-
def method_missing(method, *args, &)
|
19
|
+
def method_missing(method, *args, &block)
|
20
20
|
value = @hash[method.to_s]
|
21
21
|
|
22
22
|
if value
|
data/lib/activeyaml.rb
ADDED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeyaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Leonov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: psych
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '5.1'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '5.1'
|
11
|
+
date: 2024-02-26 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
27
13
|
description: framework for convenient and complete work with Yaml files
|
28
14
|
email: leonov7632@gmail.com
|
29
15
|
executables: []
|
@@ -37,6 +23,7 @@ files:
|
|
37
23
|
- lib/active_yaml/parser.rb
|
38
24
|
- lib/active_yaml/version.rb
|
39
25
|
- lib/active_yaml/yaml_hash.rb
|
26
|
+
- lib/activeyaml.rb
|
40
27
|
homepage: https://github.com/leonovk/activeyaml
|
41
28
|
licenses:
|
42
29
|
- MIT
|
@@ -52,14 +39,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
39
|
requirements:
|
53
40
|
- - ">="
|
54
41
|
- !ruby/object:Gem::Version
|
55
|
-
version: 3.
|
42
|
+
version: '3.0'
|
56
43
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
44
|
requirements:
|
58
45
|
- - ">="
|
59
46
|
- !ruby/object:Gem::Version
|
60
47
|
version: '0'
|
61
48
|
requirements: []
|
62
|
-
rubygems_version: 3.
|
49
|
+
rubygems_version: 3.5.3
|
63
50
|
signing_key:
|
64
51
|
specification_version: 4
|
65
52
|
summary: yaml object-relational mapping
|