activemodel-serializers-xml 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CONTRIBUTING.md +1 -1
- data/README.md +6 -2
- data/activemodel-serializers-xml.gemspec +5 -4
- data/lib/active_model/serializers/version.rb +1 -1
- data/lib/active_model/serializers/xml.rb +3 -2
- data/lib/active_model/serializers.rb +8 -4
- metadata +37 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2a819bbd978cfc2fb975ceb2a775c2dbb0113a5dadbf873b8a972b6bb55730ab
|
4
|
+
data.tar.gz: c2fec295a63123c234b7f7a3e7d9553d4b5b38bee0eed46d8c3a07bb8440694e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9dbac8752b0f469a1c179f012df3d7ce67294dd8a5ba12958bd0f63aa7c17b06ffd0491d75f2b3418ab9df6cf8ed19628338afd7b5b1497807353d0b6a2a097
|
7
|
+
data.tar.gz: d88f43dbbe82aea0ff83c21308ef04bb8814e21f9f8137d33ea314bf678173102bacb046cb981806b6e5386b982857c953985e2f67d761a2727fa612eeaa9dbc
|
data/CONTRIBUTING.md
CHANGED
@@ -7,7 +7,7 @@ ActiveModel::Serializers::Xml is work of [many contributors](https://github.com/
|
|
7
7
|
|
8
8
|
#### Fork the Project
|
9
9
|
|
10
|
-
Fork the [project on
|
10
|
+
Fork the [project on GitHub](https://github.com/rails/activemodel-serializers-xml) and check out your copy.
|
11
11
|
|
12
12
|
```
|
13
13
|
git clone https://github.com/contributor/activemodel-serializers-xml.git
|
data/README.md
CHANGED
@@ -12,11 +12,15 @@ gem 'activemodel-serializers-xml'
|
|
12
12
|
|
13
13
|
And then execute:
|
14
14
|
|
15
|
-
|
15
|
+
```
|
16
|
+
$ bundle
|
17
|
+
```
|
16
18
|
|
17
19
|
Or install it yourself as:
|
18
20
|
|
19
|
-
|
21
|
+
```
|
22
|
+
$ gem install activemodel-serializers-xml
|
23
|
+
```
|
20
24
|
|
21
25
|
## Usage
|
22
26
|
|
@@ -15,11 +15,12 @@ Gem::Specification.new do |spec|
|
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
|
-
spec.add_dependency "activesupport", "
|
19
|
-
spec.add_dependency "activemodel", "
|
18
|
+
spec.add_dependency "activesupport", ">= 5.0.0.a"
|
19
|
+
spec.add_dependency "activemodel", ">= 5.0.0.a"
|
20
20
|
spec.add_dependency "builder", "~> 3.1"
|
21
21
|
|
22
|
-
spec.add_development_dependency "rake"
|
23
|
-
spec.add_development_dependency "activerecord"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "activerecord"
|
24
24
|
spec.add_development_dependency "sqlite3"
|
25
|
+
spec.add_development_dependency "rexml"
|
25
26
|
end
|
@@ -107,9 +107,10 @@ module ActiveModel
|
|
107
107
|
|
108
108
|
def add_attributes_and_methods
|
109
109
|
serializable_collection.each do |attribute|
|
110
|
-
|
110
|
+
_options = options.except(:methods)
|
111
|
+
key = ActiveSupport::XmlMini.rename_key(attribute.name, _options)
|
111
112
|
ActiveSupport::XmlMini.to_tag(key, attribute.value,
|
112
|
-
|
113
|
+
_options.merge(attribute.decorations))
|
113
114
|
end
|
114
115
|
end
|
115
116
|
|
@@ -14,10 +14,14 @@ module ActiveModel
|
|
14
14
|
eager_autoload do
|
15
15
|
autoload :Xml
|
16
16
|
end
|
17
|
-
end
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
module EagerLoading
|
19
|
+
def eager_load!
|
20
|
+
super
|
21
|
+
ActiveModel::Serializers.eager_load!
|
22
|
+
end
|
23
|
+
end
|
22
24
|
end
|
25
|
+
|
26
|
+
extend Serializers::EagerLoading
|
23
27
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemodel-serializers-xml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rails team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.
|
19
|
+
version: 5.0.0.a
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.
|
26
|
+
version: 5.0.0.a
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activemodel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.
|
33
|
+
version: 5.0.0.a
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.
|
40
|
+
version: 5.0.0.a
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: builder
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,30 +56,30 @@ dependencies:
|
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activerecord
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sqlite3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,7 +94,21 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rexml
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description:
|
98
112
|
email:
|
99
113
|
- security@rubyonrails.com
|
100
114
|
executables: []
|
@@ -118,7 +132,7 @@ homepage: http://github.com/rails/activemodel-serializers-xml
|
|
118
132
|
licenses:
|
119
133
|
- MIT
|
120
134
|
metadata: {}
|
121
|
-
post_install_message:
|
135
|
+
post_install_message:
|
122
136
|
rdoc_options: []
|
123
137
|
require_paths:
|
124
138
|
- lib
|
@@ -133,9 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
147
|
- !ruby/object:Gem::Version
|
134
148
|
version: '0'
|
135
149
|
requirements: []
|
136
|
-
|
137
|
-
|
138
|
-
signing_key:
|
150
|
+
rubygems_version: 3.5.11
|
151
|
+
signing_key:
|
139
152
|
specification_version: 4
|
140
153
|
summary: XML serialization for your Active Model objects and Active Record models
|
141
154
|
- extracted from Rails
|