ds_node 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 +5 -5
- data/.gitignore +1 -0
- data/ds_node.gemspec +3 -2
- data/lib/ds_node/ds_resource.rb +3 -2
- data/lib/ds_node/version.rb +1 -1
- metadata +25 -14
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a873b37b20a39dfc94d7364ae0c6e0536fb346285ef9758a366c28ceec4454ff
|
4
|
+
data.tar.gz: 4f19e2b63978fe2841a5d1bcac194b8ffe7749e3c28259f0b408a4220bb2705e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b448e492b840069bfca6d11369e2472783de9c2b2cd6c20589b8ee2481d87a605d5206ea74691a3e0c8cf5d561b718b0df8e168032f18e01694f52bd66bc901
|
7
|
+
data.tar.gz: f7e78ab2b6f57681cf60424fb0affd945b23cd72383a0a7b0435e800bd00daa3ddad42a087af9576db15224171d98787cac86a9f539eb118ed33d468d1b5f90a
|
data/.gitignore
CHANGED
data/ds_node.gemspec
CHANGED
@@ -21,10 +21,11 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
23
|
spec.add_dependency "activerecord"
|
24
|
+
spec.add_dependency "active_record-json_associations"
|
24
25
|
spec.add_dependency "mime-types"
|
25
26
|
|
26
|
-
spec.add_development_dependency "bundler"
|
27
|
-
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency "bundler"
|
28
|
+
spec.add_development_dependency "rake"
|
28
29
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
30
|
spec.add_development_dependency "database_cleaner"
|
30
31
|
spec.add_development_dependency "sqlite3"
|
data/lib/ds_node/ds_resource.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "active_record"
|
2
|
+
require "active_record/json_associations"
|
2
3
|
|
3
4
|
module DSNode
|
4
5
|
module DSResource
|
@@ -29,7 +30,7 @@ module DSNode
|
|
29
30
|
def ds_resource name, options = {}
|
30
31
|
should_validate = options.fetch(:validate, true)
|
31
32
|
|
32
|
-
belongs_to name, options.reverse_merge({
|
33
|
+
belongs_to name, **options.reverse_merge({
|
33
34
|
class_name: "DSNode::Resource",
|
34
35
|
required: false,
|
35
36
|
})
|
@@ -109,7 +110,7 @@ module DSNode
|
|
109
110
|
single_name = options.key?(:single_name) ? options.delete(:single_name) : name.to_s.singularize.to_sym
|
110
111
|
prevent_destroy_last = options.key?(:prevent_destroy_last) ? options.delete(:prevent_destroy_last) : false
|
111
112
|
|
112
|
-
belongs_to_many name, options.reverse_merge({
|
113
|
+
belongs_to_many name, **options.reverse_merge({
|
113
114
|
class_name: "DSNode::Resource",
|
114
115
|
})
|
115
116
|
|
data/lib/ds_node/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ds_node
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: active_record-json_associations
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: mime-types
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,30 +56,30 @@ dependencies:
|
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - "
|
59
|
+
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - "
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rspec
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,8 +131,6 @@ extra_rdoc_files: []
|
|
117
131
|
files:
|
118
132
|
- ".gitignore"
|
119
133
|
- ".rspec"
|
120
|
-
- ".ruby-gemset"
|
121
|
-
- ".ruby-version"
|
122
134
|
- ".travis.yml"
|
123
135
|
- Gemfile
|
124
136
|
- LICENSE.txt
|
@@ -153,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
165
|
- !ruby/object:Gem::Version
|
154
166
|
version: '0'
|
155
167
|
requirements: []
|
156
|
-
|
157
|
-
rubygems_version: 2.4.8
|
168
|
+
rubygems_version: 3.2.32
|
158
169
|
signing_key:
|
159
170
|
specification_version: 4
|
160
171
|
summary: Gem for interfacing with Downstream's DSNode
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ds_node
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.2.6
|