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 +4 -4
- data/README.md +2 -2
- data/just_enum.gemspec +2 -1
- data/lib/just_enum/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dbfa391f036b7fef3c3fe4f54e455b0218b6c0c0fb8c083748ab44ea37c604f
|
4
|
+
data.tar.gz: 61bf17fb9c2c46a97a167a2866c8d967373e8e09de3bf990922f1cb21779fccf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
data/lib/just_enum/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafal Piekara
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
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.
|
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
|