mutils 0.2.33 → 0.2.34

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 543e19d14e1efe1b83a3feaef69cb6c363ed0002b7a4c33773490264a9b63af7
4
- data.tar.gz: f042884675f443890c68f46f482395275b43606756a028c2d7ed67f1f2c91dff
3
+ metadata.gz: cc2bb3522e87ab43ab73fd33c293f037a362be1711c72e426302ad4895f77965
4
+ data.tar.gz: 775f6b17dcf6599d9d9e5ed851a18c4d9db769abd80398835430a5e58dcc98e3
5
5
  SHA512:
6
- metadata.gz: 1a6c9faf321ebbb9d352f6e2d618017e9b4f0678ebbd35b3282315177980ae20f09c28a353e88c877ad5f11f43b8f74aac060e408d6396877d54c7bae43fcb47
7
- data.tar.gz: 7aa232e2f9cefe635fbd4fc3b3d9064d586eb8d85b0460476ff5482acb24953df9ddfd381f100006e62189caf1f53377c2bb80bac9ae014d23ce7eb454b8be51
6
+ metadata.gz: 6e1103228cb1d0fcf5236812825f240ba1df2bd8f7f8c25a8655906a2a5edab161c5d300b29d44163cdb47570f8272a0bbddcb1ca2e6cee1431d009d9bbf5b3b
7
+ data.tar.gz: 1c0a90e7dd51811384aa2c8078c888950e6227a301f4283300846b3770fbe204ff5b115d02dfad6ae8b4ac2e134119758d640fd7bea7e32f2003d59f62e718e9
@@ -9,19 +9,20 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
 
11
11
  steps:
12
- - uses: actions/checkout@master
13
- - name: Set up Ruby 2.6
14
- uses: actions/setup-ruby@v1
15
- with:
16
- version: 2.6.x
12
+ - uses: actions/checkout@master
13
+ - name: Set up Ruby 2.6
14
+ uses: actions/setup-ruby@v1
15
+ with:
16
+ ruby-version: 2.6.x
17
+
18
+ - name: Publish to RubyGems
19
+ run: |
20
+ mkdir -p $HOME/.gem
21
+ touch $HOME/.gem/credentials
22
+ chmod 0600 $HOME/.gem/credentials
23
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
24
+ gem build *.gemspec
25
+ gem push *.gem
26
+ env:
27
+ GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
17
28
 
18
- - name: Publish to RubyGems
19
- run: |
20
- mkdir -p $HOME/.gem
21
- touch $HOME/.gem/credentials
22
- chmod 0600 $HOME/.gem/credentials
23
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
24
- gem build *.gemspec
25
- gem push *.gem
26
- env:
27
- GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mutils (0.2.33)
4
+ mutils (0.2.34)
5
5
  activesupport (>= 4.2)
6
6
 
7
7
  GEM
@@ -29,9 +29,17 @@ module Mutils
29
29
  end
30
30
  end
31
31
 
32
+ def attribute(method_name, always_include = false)
33
+ add_single_attribute(method_name, always_include, 'attribute')
34
+ end
35
+
32
36
  def custom_method(method_name, always_include = false)
37
+ add_single_attribute(method_name, always_include, 'method')
38
+ end
39
+
40
+ def add_single_attribute(method_name, always_include, type)
33
41
  self.attributes_to_serialize = {} if attributes_to_serialize.nil?
34
- value = { method: true, always_include: always_include }
42
+ value = { method: type == 'method', always_include: always_include }
35
43
  attributes_to_serialize[method_name] = value
36
44
  end
37
45
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mutils
4
- VERSION = '0.2.33'
4
+ VERSION = '0.2.34'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.33
4
+ version: 0.2.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nitesh Purohit
@@ -156,7 +156,7 @@ licenses:
156
156
  - MIT
157
157
  metadata:
158
158
  bug_tracker_uri: https://github.com/niteshpurohit/mutils/issues
159
- source_code_uri: https://github.com/niteshpurohit/mutils/tree/v0.2.33
159
+ source_code_uri: https://github.com/niteshpurohit/mutils/tree/v0.2.34
160
160
  post_install_message:
161
161
  rdoc_options: []
162
162
  require_paths: