tiny_serializer 2.0.2 → 2.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b3f2930aab86eaf43af0326633d4698fdd4f1e51
4
- data.tar.gz: 297b7d9fb72d0075853448ec056e7ea596c2e4fd
2
+ SHA256:
3
+ metadata.gz: f8b7b819fb9b7fff1b8108431e84fd6ef2b1c25446622b6fff24494a385c18de
4
+ data.tar.gz: e81698b39cc4abc52c8fde6fdb4f0e3263bccb12f41628ea6e958f1ece36276d
5
5
  SHA512:
6
- metadata.gz: 6c3ab366f4a4e5bcabc111d78ad10eae27ce23c23f54d2f009963b09005adae9dfcbb534755352ba7750923db7e099cdf297f6f1e8c9177df98ffc9cc4ae86bf
7
- data.tar.gz: 959b2a9e76f0303615dab63a52cb52a76b3861362832530139e196e583b91bdc9c1110bd90b1fc9e76c99c18da0fb6dc182296b3059d865dc7d6c44cfcfebbda
6
+ metadata.gz: fc41de259e53ab6a5fab14a2c9477c424be108fbab4b5b3790089348f274ec12822abc96c1af51d93c8d1878a2d5ebd3a089626c576a22afebfd67d3a6171f2d
7
+ data.tar.gz: 236c8a0f47d29f173143f4949f66a92371c49cd6689c479a06ec564845b368f03e1002870a9b559377093510518ec317f212814a7d1acd5bdb652180a2f76aa3
data/.editorconfig ADDED
@@ -0,0 +1,13 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 2
10
+
11
+ [Makefile]
12
+ indent_style = tab
13
+ indent_size = 4
data/.rspec CHANGED
@@ -1 +0,0 @@
1
- --require spec_helper
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.5
1
+ 2.5.3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # SimpleSerializer Change Log
2
2
 
3
+ ## 2.1.0
4
+
5
+ * Pass options through correctly when using .serialize class method.
6
+ * Add tests for RailsExtensions.
7
+ * Add .editorconfig.
8
+
3
9
  ## 2.0.2
4
10
 
5
11
  * Fix major incorrect require statement.
data/Gemfile.lock CHANGED
@@ -1,18 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tiny_serializer (2.0.2)
4
+ tiny_serializer (2.1.0)
5
5
  activesupport (>= 4.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (5.2.1)
10
+ activesupport (5.2.1.1)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 0.7, < 2)
13
13
  minitest (~> 5.1)
14
14
  tzinfo (~> 1.1)
15
- concurrent-ruby (1.0.5)
15
+ concurrent-ruby (1.1.3)
16
16
  diff-lcs (1.3)
17
17
  i18n (1.1.1)
18
18
  concurrent-ruby (~> 1.0)
@@ -50,7 +50,7 @@ require "active_support/core_ext/class/attribute"
50
50
  class TinySerializer
51
51
  extend DSL
52
52
 
53
- if defined?(Rails)
53
+ if defined?(::Rails)
54
54
  require "tiny_serializer/rails_extensions"
55
55
  prepend RailsExtensions
56
56
  end
@@ -121,8 +121,8 @@ class TinySerializer
121
121
  # The same as:
122
122
  #
123
123
  # TinySerializer.new(object).serializable_hash
124
- def serialize(object)
125
- new(object).serializable_hash
124
+ def serialize(object, options = {})
125
+ new(object, options).serializable_hash
126
126
  end
127
127
 
128
128
  # Same as #serialize, but raises ArgumentError if `collection`
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TinySerializer
4
- VERSION = "2.0.2"
4
+ VERSION = "2.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_serializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Makley
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-16 00:00:00.000000000 Z
11
+ date: 2018-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -73,6 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - ".editorconfig"
76
77
  - ".gitignore"
77
78
  - ".idea/vcs.xml"
78
79
  - ".rspec"
@@ -112,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  version: '0'
113
114
  requirements: []
114
115
  rubyforge_project:
115
- rubygems_version: 2.6.14.3
116
+ rubygems_version: 2.7.6
116
117
  signing_key:
117
118
  specification_version: 4
118
119
  summary: Tiny Ruby JSON Serialization DSL