active_model_serializer_plus 1.0.0

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.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +3 -0
  3. data/Appraisals +3 -0
  4. data/CHANGELOG.md +11 -0
  5. data/LICENSE.md +22 -0
  6. data/README.md +142 -0
  7. data/Rakefile +7 -0
  8. data/active_model_serializer_plus.gemspec +37 -0
  9. data/gemfiles/rails_4.2.gemfile +7 -0
  10. data/lib/active_model_serializer_plus.rb +4 -0
  11. data/lib/active_model_serializer_plus/assignment.rb +64 -0
  12. data/lib/active_model_serializer_plus/railtie.rb +7 -0
  13. data/lib/active_model_serializer_plus/translations.rb +218 -0
  14. data/lib/active_model_serializer_plus/version.rb +6 -0
  15. data/test/active_model_serializer_plus/active_model_serializer_plus_test.rb +10 -0
  16. data/test/active_model_serializer_plus/assignment_test.rb +64 -0
  17. data/test/active_model_serializer_plus/translations_test.rb +260 -0
  18. data/test/app/rails_4.2/Rakefile +6 -0
  19. data/test/app/rails_4.2/app/assets/javascripts/application.js +16 -0
  20. data/test/app/rails_4.2/app/assets/stylesheets/application.css +15 -0
  21. data/test/app/rails_4.2/app/controllers/application_controller.rb +5 -0
  22. data/test/app/rails_4.2/app/helpers/application_helper.rb +2 -0
  23. data/test/app/rails_4.2/app/views/layouts/application.html.erb +14 -0
  24. data/test/app/rails_4.2/bin/bundle +3 -0
  25. data/test/app/rails_4.2/bin/rails +8 -0
  26. data/test/app/rails_4.2/bin/rake +8 -0
  27. data/test/app/rails_4.2/bin/setup +29 -0
  28. data/test/app/rails_4.2/bin/spring +15 -0
  29. data/test/app/rails_4.2/config.ru +4 -0
  30. data/test/app/rails_4.2/config/application.rb +26 -0
  31. data/test/app/rails_4.2/config/boot.rb +3 -0
  32. data/test/app/rails_4.2/config/database.yml +25 -0
  33. data/test/app/rails_4.2/config/environment.rb +5 -0
  34. data/test/app/rails_4.2/config/environments/development.rb +41 -0
  35. data/test/app/rails_4.2/config/environments/production.rb +79 -0
  36. data/test/app/rails_4.2/config/environments/test.rb +42 -0
  37. data/test/app/rails_4.2/config/initializers/assets.rb +11 -0
  38. data/test/app/rails_4.2/config/initializers/backtrace_silencers.rb +7 -0
  39. data/test/app/rails_4.2/config/initializers/cookies_serializer.rb +3 -0
  40. data/test/app/rails_4.2/config/initializers/filter_parameter_logging.rb +4 -0
  41. data/test/app/rails_4.2/config/initializers/inflections.rb +16 -0
  42. data/test/app/rails_4.2/config/initializers/mime_types.rb +4 -0
  43. data/test/app/rails_4.2/config/initializers/session_store.rb +3 -0
  44. data/test/app/rails_4.2/config/initializers/wrap_parameters.rb +14 -0
  45. data/test/app/rails_4.2/config/locales/en.yml +23 -0
  46. data/test/app/rails_4.2/config/routes.rb +56 -0
  47. data/test/app/rails_4.2/config/secrets.yml +22 -0
  48. data/test/app/rails_4.2/db/schema.rb +0 -0
  49. data/test/app/rails_4.2/db/seeds.rb +7 -0
  50. data/test/app/rails_4.2/public/404.html +67 -0
  51. data/test/app/rails_4.2/public/422.html +67 -0
  52. data/test/app/rails_4.2/public/500.html +66 -0
  53. data/test/app/rails_4.2/public/favicon.ico +0 -0
  54. data/test/app/rails_4.2/public/robots.txt +5 -0
  55. data/test/test_helper.rb +20 -0
  56. metadata +259 -0
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
@@ -0,0 +1,20 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+
3
+ ##
4
+ # Load Rails dummy application based on gemfile name substituted by Appraisal
5
+ #
6
+ if ENV["APPRAISAL_INITIALIZED"] || ENV["TRAVIS"]
7
+ app_name = Pathname.new(ENV['BUNDLE_GEMFILE']).basename.sub('.gemfile', '')
8
+ else
9
+ app_name = 'rails_4.2'
10
+ end
11
+
12
+ require File.expand_path("../../test/app/#{app_name}/config/environment", __FILE__)
13
+ APP_RAKEFILE = File.expand_path("../../test/app/#{app_name}/Rakefile", __FILE__)
14
+
15
+ require 'rails/test_help'
16
+
17
+ class ActiveSupport::TestCase
18
+
19
+ # Add more helper methods to be used by all tests here...
20
+ end
metadata ADDED
@@ -0,0 +1,259 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: active_model_serializer_plus
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Todd Knarr
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activemodel
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '4.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.7'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.7'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: yard
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'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '5'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5'
97
+ - !ruby/object:Gem::Dependency
98
+ name: appraisal
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: sqlite3
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1'
125
+ description: Adds methods for automatic deserialization from standard JSON and XML,
126
+ and a variant implementation of serialization/deserialization for XML.
127
+ email: tknarr@silverglass.org
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files:
131
+ - README.md
132
+ - CHANGELOG.md
133
+ - LICENSE.md
134
+ - ".yardopts"
135
+ files:
136
+ - ".yardopts"
137
+ - Appraisals
138
+ - CHANGELOG.md
139
+ - LICENSE.md
140
+ - README.md
141
+ - Rakefile
142
+ - active_model_serializer_plus.gemspec
143
+ - gemfiles/rails_4.2.gemfile
144
+ - lib/active_model_serializer_plus.rb
145
+ - lib/active_model_serializer_plus/assignment.rb
146
+ - lib/active_model_serializer_plus/railtie.rb
147
+ - lib/active_model_serializer_plus/translations.rb
148
+ - lib/active_model_serializer_plus/version.rb
149
+ - test/active_model_serializer_plus/active_model_serializer_plus_test.rb
150
+ - test/active_model_serializer_plus/assignment_test.rb
151
+ - test/active_model_serializer_plus/translations_test.rb
152
+ - test/app/rails_4.2/Rakefile
153
+ - test/app/rails_4.2/app/assets/javascripts/application.js
154
+ - test/app/rails_4.2/app/assets/stylesheets/application.css
155
+ - test/app/rails_4.2/app/controllers/application_controller.rb
156
+ - test/app/rails_4.2/app/helpers/application_helper.rb
157
+ - test/app/rails_4.2/app/views/layouts/application.html.erb
158
+ - test/app/rails_4.2/bin/bundle
159
+ - test/app/rails_4.2/bin/rails
160
+ - test/app/rails_4.2/bin/rake
161
+ - test/app/rails_4.2/bin/setup
162
+ - test/app/rails_4.2/bin/spring
163
+ - test/app/rails_4.2/config.ru
164
+ - test/app/rails_4.2/config/application.rb
165
+ - test/app/rails_4.2/config/boot.rb
166
+ - test/app/rails_4.2/config/database.yml
167
+ - test/app/rails_4.2/config/environment.rb
168
+ - test/app/rails_4.2/config/environments/development.rb
169
+ - test/app/rails_4.2/config/environments/production.rb
170
+ - test/app/rails_4.2/config/environments/test.rb
171
+ - test/app/rails_4.2/config/initializers/assets.rb
172
+ - test/app/rails_4.2/config/initializers/backtrace_silencers.rb
173
+ - test/app/rails_4.2/config/initializers/cookies_serializer.rb
174
+ - test/app/rails_4.2/config/initializers/filter_parameter_logging.rb
175
+ - test/app/rails_4.2/config/initializers/inflections.rb
176
+ - test/app/rails_4.2/config/initializers/mime_types.rb
177
+ - test/app/rails_4.2/config/initializers/session_store.rb
178
+ - test/app/rails_4.2/config/initializers/wrap_parameters.rb
179
+ - test/app/rails_4.2/config/locales/en.yml
180
+ - test/app/rails_4.2/config/routes.rb
181
+ - test/app/rails_4.2/config/secrets.yml
182
+ - test/app/rails_4.2/db/schema.rb
183
+ - test/app/rails_4.2/db/seeds.rb
184
+ - test/app/rails_4.2/public/404.html
185
+ - test/app/rails_4.2/public/422.html
186
+ - test/app/rails_4.2/public/500.html
187
+ - test/app/rails_4.2/public/favicon.ico
188
+ - test/app/rails_4.2/public/robots.txt
189
+ - test/test_helper.rb
190
+ homepage: https://github.com/tknarr/active_model_serializer_plus
191
+ licenses:
192
+ - MIT
193
+ metadata: {}
194
+ post_install_message:
195
+ rdoc_options: []
196
+ require_paths:
197
+ - lib
198
+ required_ruby_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ required_rubygems_version: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ requirements: []
209
+ rubyforge_project:
210
+ rubygems_version: 2.2.2
211
+ signing_key:
212
+ specification_version: 4
213
+ summary: Enhanced serialization/deserialization support for ActiveModel classes.
214
+ test_files:
215
+ - test/active_model_serializer_plus/active_model_serializer_plus_test.rb
216
+ - test/active_model_serializer_plus/assignment_test.rb
217
+ - test/active_model_serializer_plus/translations_test.rb
218
+ - test/app/rails_4.2/Rakefile
219
+ - test/app/rails_4.2/app/assets/javascripts/application.js
220
+ - test/app/rails_4.2/app/assets/stylesheets/application.css
221
+ - test/app/rails_4.2/app/controllers/application_controller.rb
222
+ - test/app/rails_4.2/app/helpers/application_helper.rb
223
+ - test/app/rails_4.2/app/views/layouts/application.html.erb
224
+ - test/app/rails_4.2/bin/bundle
225
+ - test/app/rails_4.2/bin/rails
226
+ - test/app/rails_4.2/bin/rake
227
+ - test/app/rails_4.2/bin/setup
228
+ - test/app/rails_4.2/bin/spring
229
+ - test/app/rails_4.2/config/application.rb
230
+ - test/app/rails_4.2/config/boot.rb
231
+ - test/app/rails_4.2/config/database.yml
232
+ - test/app/rails_4.2/config/environment.rb
233
+ - test/app/rails_4.2/config/environments/development.rb
234
+ - test/app/rails_4.2/config/environments/production.rb
235
+ - test/app/rails_4.2/config/environments/test.rb
236
+ - test/app/rails_4.2/config/initializers/assets.rb
237
+ - test/app/rails_4.2/config/initializers/backtrace_silencers.rb
238
+ - test/app/rails_4.2/config/initializers/cookies_serializer.rb
239
+ - test/app/rails_4.2/config/initializers/filter_parameter_logging.rb
240
+ - test/app/rails_4.2/config/initializers/inflections.rb
241
+ - test/app/rails_4.2/config/initializers/mime_types.rb
242
+ - test/app/rails_4.2/config/initializers/session_store.rb
243
+ - test/app/rails_4.2/config/initializers/wrap_parameters.rb
244
+ - test/app/rails_4.2/config/locales/en.yml
245
+ - test/app/rails_4.2/config/routes.rb
246
+ - test/app/rails_4.2/config/secrets.yml
247
+ - test/app/rails_4.2/config.ru
248
+ - test/app/rails_4.2/db/schema.rb
249
+ - test/app/rails_4.2/db/seeds.rb
250
+ - test/app/rails_4.2/public/404.html
251
+ - test/app/rails_4.2/public/422.html
252
+ - test/app/rails_4.2/public/500.html
253
+ - test/app/rails_4.2/public/favicon.ico
254
+ - test/app/rails_4.2/public/robots.txt
255
+ - test/test_helper.rb
256
+ - gemfiles/rails_4.2.gemfile
257
+ - Rakefile
258
+ - Appraisals
259
+ has_rdoc: