soup 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Rakefile +1 -2
- data/lib/soup/backends/file_backend.rb +9 -1
- metadata +7 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 5ea571cb9ae5b07d025e31c315c06a92b71e2936658b2dbe042265c059f65842
|
|
4
|
+
data.tar.gz: ad9a2668b3cf7d38441fcc58086cd8c66a2e6147b39e9ea8d2d0893fe82cbc24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a0e04f599cbe280fbfaae811be3f58ba306208f449c0bd5ab489292f36c18fb22a84de7dc05022f2ace1d9f09170520944a87cc21d4cb2582a6be62f8ff47a6
|
|
7
|
+
data.tar.gz: 253e19590bf532d22bb7bb4a001cb607192254259f41937dcf7386c100d452c34755c240187e521d556bd9990dab5696fff93cef7534b95251c3dc75fef1963b
|
data/Rakefile
CHANGED
|
@@ -7,7 +7,6 @@ task :default => :test
|
|
|
7
7
|
require "rake/testtask"
|
|
8
8
|
Rake::TestTask.new do |t|
|
|
9
9
|
t.libs << "test"
|
|
10
|
-
t.ruby_opts << "-rubygems"
|
|
11
10
|
t.test_files = FileList["test/**/*_test.rb"]
|
|
12
11
|
t.verbose = true
|
|
13
12
|
end
|
|
@@ -21,7 +20,7 @@ spec = Gem::Specification.new do |s|
|
|
|
21
20
|
|
|
22
21
|
# Change these as appropriate
|
|
23
22
|
s.name = "soup"
|
|
24
|
-
s.version = "1.0.
|
|
23
|
+
s.version = "1.0.15"
|
|
25
24
|
s.summary = "A super-simple data store"
|
|
26
25
|
s.author = "James Adam"
|
|
27
26
|
s.email = "james@lazyatom.com"
|
|
@@ -60,7 +60,7 @@ class Soup
|
|
|
60
60
|
default_attributes = {:name => name, :updated_at => file.mtime, :created_at => file.mtime}
|
|
61
61
|
if attribute_start = data.index("\n:")
|
|
62
62
|
content = data[0, attribute_start].strip
|
|
63
|
-
attributes = default_attributes.merge(
|
|
63
|
+
attributes = default_attributes.merge(load_from_yaml(data[attribute_start, data.length]))
|
|
64
64
|
else
|
|
65
65
|
content = data
|
|
66
66
|
attributes = default_attributes
|
|
@@ -82,6 +82,14 @@ class Soup
|
|
|
82
82
|
def snip_paths
|
|
83
83
|
Dir[File.join(@base_path, "*")].select { |s| File.file?(s) }
|
|
84
84
|
end
|
|
85
|
+
|
|
86
|
+
def load_from_yaml(yaml)
|
|
87
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1')
|
|
88
|
+
YAML.load(yaml, permitted_classes: [Time, Symbol])
|
|
89
|
+
else
|
|
90
|
+
YAML.load(yaml)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
85
93
|
end
|
|
86
94
|
end
|
|
87
95
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: soup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Adam
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-06-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: kintama
|
|
@@ -38,7 +38,7 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
-
description:
|
|
41
|
+
description:
|
|
42
42
|
email: james@lazyatom.com
|
|
43
43
|
executables: []
|
|
44
44
|
extensions: []
|
|
@@ -68,7 +68,7 @@ files:
|
|
|
68
68
|
homepage: http://lazyatom.com
|
|
69
69
|
licenses: []
|
|
70
70
|
metadata: {}
|
|
71
|
-
post_install_message:
|
|
71
|
+
post_install_message:
|
|
72
72
|
rdoc_options:
|
|
73
73
|
- "--main"
|
|
74
74
|
- README
|
|
@@ -85,9 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
85
85
|
- !ruby/object:Gem::Version
|
|
86
86
|
version: '0'
|
|
87
87
|
requirements: []
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
signing_key:
|
|
88
|
+
rubygems_version: 3.1.6
|
|
89
|
+
signing_key:
|
|
91
90
|
specification_version: 4
|
|
92
91
|
summary: A super-simple data store
|
|
93
92
|
test_files: []
|