just_enum 0.1.1 → 0.1.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: 5cda13c8af65bfa092be174ccfff8f703623bd4572424961ffc439573d663950
4
- data.tar.gz: 42e6ca5cc0d2fa7dcd07e863f45c113513bb0facbe8fc418e2ed67b64eb89233
3
+ metadata.gz: 0dbfa391f036b7fef3c3fe4f54e455b0218b6c0c0fb8c083748ab44ea37c604f
4
+ data.tar.gz: 61bf17fb9c2c46a97a167a2866c8d967373e8e09de3bf990922f1cb21779fccf
5
5
  SHA512:
6
- metadata.gz: 230aa3583beb46aa8c2ae6e39c07f6306a3b11bb0aff1501674094beebef6bddf3798cda7e9857f1ad6c5fb210eae0f6c3ad19425e3f512f01d636524e7f767f
7
- data.tar.gz: 73c066163a4afba2bba0a2d1ae28fa21087fd1436a5c6141c8ba9519acfe2e6c4257a4dead09fc606f29c212277f3dd64fdfa48c30ce169b09d29ddd06f4cccb
6
+ metadata.gz: 8ba3726161061b5de1d51b3e276d9bd37c9f82843415fbc74fff335d355ebb69914ab0adb4c4e2d331c340d6da8351d91ad56a7a7a8cab00e9abe388803dd9c7
7
+ data.tar.gz: 15473e3dc66fa305681744a5eb598bf14a4ffde5e8ff380e7fcd5617c7df5f94f033cbf89007375d4e988f2bdd80c984bd8ba1ce740a19ae83adf57a865ad5c1
data/README.md CHANGED
@@ -124,7 +124,7 @@ You can also omit the `extend` directive and use it in traditional way in constr
124
124
 
125
125
  ```ruby
126
126
  class ButtonPrimary
127
- def initialize(type, color, label)
127
+ def initialize
128
128
  @type = ButtonType.primary
129
129
  @color = Color.success
130
130
  @label = Labels.save
@@ -215,7 +215,7 @@ Or you can go one step further and encapsulate enums in static methods
215
215
  # frozen_string_literal: true
216
216
 
217
217
  class Button < ViewComponent::Base
218
- include Enums::ButtonType::Enum
218
+ include JustEnum::Enum
219
219
 
220
220
  class << self
221
221
  def primary(**args)
data/just_enum.gemspec CHANGED
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "lib/just_enum/version"
4
+ lib = File.expand_path('../lib', __FILE__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
6
 
5
7
  Gem::Specification.new do |spec|
6
8
  spec.name = "just_enum"
@@ -21,7 +23,6 @@ Gem::Specification.new do |spec|
21
23
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
24
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
23
25
  end
24
- spec.bindir = "exe"
25
26
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
26
27
  spec.require_paths = ["lib"]
27
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JustEnum
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafal Piekara
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-05 00:00:00.000000000 Z
11
+ date: 2022-01-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Module extends PORO classes in enums and generate helpers for other POROS
14
14
  using those enums
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
- rubygems_version: 3.1.4
57
+ rubygems_version: 3.2.32
58
58
  signing_key:
59
59
  specification_version: 4
60
60
  summary: Simple enum module extending Ruby with TypeScript like enums