array_attribute_handler 1.0.0 → 1.0.2

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
2
  SHA256:
3
- metadata.gz: 4732afc1a3741de5ad8e4e286e74e835494f94603e2f6f229b9c53aa478f19ad
4
- data.tar.gz: 5f40aae3a4a68044eeea99282de2daf3666876e45f6bf15c00da02958c6a2e8d
3
+ metadata.gz: 907dbfdd07139a1c83b29aa8b5087fac4e6fc6462b247438cef1b722d3d68ce8
4
+ data.tar.gz: 45270412b4c5a2ba426dd343c01185f9032c15ddef7092b3938abf2531ce8a16
5
5
  SHA512:
6
- metadata.gz: 220955b2f49d88ce5e518fcb52465ed883f826eacc4543dd3c65685c2112a627485aa53ed178eb4ba12e07136e8bfdd690d702512b67391705f01121dd30308a
7
- data.tar.gz: 2d1abe5e5b6e1af3275e0e7bb206503532b89f2ca6dfbfb240c5b33a20ed0c4ff6555c0ac91df473a9ce8b988186a3841d3eec9b067612373938ef55a6e0f876
6
+ metadata.gz: 7d1b69dee7d06e79bd48d6a7d632590b672ff10ac6e665b8bdbd70fdc63f8805a3ed160bb7f0978cecdabdbd9771bff36adbd1574cffa33a6743fb555a06599e
7
+ data.tar.gz: 0a17bb42247425b0e934ebbf37aa90f502f6861cc09f86fef82d66f896eed52b2e035dfd47b7f856392cb622df963c07f9c988f49e37f4b51403834e30e0d73a
data/.rubocop.yml CHANGED
@@ -11,3 +11,11 @@ Style/StringLiteralsInInterpolation:
11
11
 
12
12
  Layout/LineLength:
13
13
  Max: 120
14
+ Exclude:
15
+ - 'spec/**/*.rb'
16
+ - 'array_attribute_handler.gemspec'
17
+
18
+ Metrics/BlockLength:
19
+ Exclude:
20
+ - 'spec/**/*.rb'
21
+
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
1
8
  ## [Unreleased]
2
9
 
10
+ ## [1.0.2] - 2023-08-13
11
+
12
+ ### Fixed
13
+
14
+ - Resolve Rubocop offences preventing Github CI from processing.
15
+
16
+ ## [1.0.1] - 2023-08-13
17
+
18
+ ### Fixed
19
+
20
+ - Added support for x86_64-linux.
21
+
22
+ ## [1.0.0] - 2023-08-13
23
+
24
+ ### Added
25
+
26
+ - First release pushed to RubyGems.
27
+ - General functionality included.
28
+
3
29
  ## [0.1.0] - 2023-08-13
4
30
 
5
- - Initial release
31
+ ### Added
32
+
33
+ - Initial release.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- array_attribute_handler (1.0.0)
4
+ array_attribute_handler (1.0.2)
5
5
  activerecord (>= 6.0, < 7)
6
6
  activesupport (>= 6.0, < 7)
7
7
 
@@ -66,6 +66,7 @@ GEM
66
66
  parser (>= 3.2.1.0)
67
67
  ruby-progressbar (1.13.0)
68
68
  sqlite3 (1.6.3-arm64-darwin)
69
+ sqlite3 (1.6.3-x86_64-linux)
69
70
  tzinfo (2.0.6)
70
71
  concurrent-ruby (~> 1.0)
71
72
  unicode-display_width (2.4.2)
@@ -73,6 +74,7 @@ GEM
73
74
 
74
75
  PLATFORMS
75
76
  arm64-darwin-22
77
+ x86_64-linux
76
78
 
77
79
  DEPENDENCIES
78
80
  array_attribute_handler!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ArrayAttributeHandler
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
5
5
  end
@@ -3,6 +3,7 @@
3
3
  require_relative "array_attribute_handler/version"
4
4
  require "active_support/concern"
5
5
 
6
+ # Public: ArrayAttributeHandler is a module for handling array attributes.
6
7
  module ArrayAttributeHandler
7
8
  extend ActiveSupport::Concern
8
9
 
@@ -17,7 +18,6 @@ module ArrayAttributeHandler
17
18
  # Defaults to false.
18
19
  def handle_array_attribute(attribute_name, options = {})
19
20
  separator = options.fetch(:separator, "\n")
20
- combinator = separator + (options.fetch(:spaced_join, false) ? " " : "")
21
21
 
22
22
  # Public: Setter for the attribute.
23
23
  define_method("#{attribute_name}=") do |value|
@@ -26,7 +26,7 @@ module ArrayAttributeHandler
26
26
 
27
27
  # Public: Getter for the text representation of the attribute.
28
28
  define_method("#{attribute_name}_text") do
29
- send(attribute_name).join(combinator)
29
+ send(attribute_name).join(separator + (options.fetch(:spaced_join, false) ? " " : ""))
30
30
  end
31
31
 
32
32
  # Public: Setter for the text representation of the attribute.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: array_attribute_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jono Feist