constantin 0.2.0 → 0.3.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
2
  SHA256:
3
- metadata.gz: 28ec6588be165154e41c0f8cee071c676c73903c8fc569f36f370e927a6c44d8
4
- data.tar.gz: 92e6c7c92196884b0b5ab0481177e4e174f924e9fe76bde75849cacb1f4fcec3
3
+ metadata.gz: b9348a560ada2d1ca5c0dd6371c7317a92f4ca5af4f4f5c01f69911c31208c9a
4
+ data.tar.gz: 0645f8f6ce5795403e2729f624953c77056f522b84c8da8c2122c6c2ebfa48a5
5
5
  SHA512:
6
- metadata.gz: '0458425451c65bb60617ef13177a8d9da37fbf6d867494885fc2973704590c36b8069d7097744f4c5c3e42a9a042659cf6a689d7868949f8db42599659c5d7ec'
7
- data.tar.gz: cfcf185ea0b030941a46adad951b64a31fa481e60a778946316b4094641a06c61df31ec7f26bd829f51a2fb33371e842c335f3ca2f30cf3b4f8bc9d1d5db821f
6
+ metadata.gz: e80ae057f5a2fbe56159a3f92b4ad8f5057e3d900fc0c4ddebf97cbca058d77ae8575bd820ab1d00214ef916c8c8c2e25e59f6e0c2988cc1f5128d8647560006
7
+ data.tar.gz: b9ffd555cb5a234569552a24f0646fdcbfa5f368ce117a710c907f79203b5a8696f82c942d6ff24c1b06214e4ec0b5ab070b0cafb28c49bfca2a8aa3fd0e6901
data/README.md CHANGED
@@ -20,6 +20,10 @@ And then execute:
20
20
  class Country < Constantin::Option
21
21
  define_options 'US', 'PH', 'JP'
22
22
  define_options { NZ: "New Zealand"}
23
+
24
+ define_option_group 'ASIA' do
25
+ [PH, JP]
26
+ end
23
27
  end
24
28
 
25
29
  Country::ALL
@@ -28,8 +32,11 @@ Country::ALL
28
32
  Country.constants
29
33
  => [:US, :PH, :JP, :NZ]
30
34
 
31
- Country::US
32
- => 'US'
35
+ Country::NZ
36
+ => 'New Zealand'
37
+
38
+ Country::ASIA
39
+ => ['PH','JP']
33
40
  ```
34
41
 
35
42
  Validate field in model against constants
@@ -43,7 +50,7 @@ user.address = "US"
43
50
  user.valid?
44
51
  => true
45
52
 
46
- user.address = "NZ"
53
+ user.address = "America"
47
54
  user.valid?
48
55
  => false
49
56
  ```
data/bin/console CHANGED
File without changes
data/bin/setup CHANGED
File without changes
data/constantin.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- spec.add_dependency "activesupport", "~> 6.0.0"
30
+ spec.add_dependency "activesupport", "~> 6.1.3"
31
31
 
32
32
  spec.add_development_dependency "bundler", "~> 2.0"
33
33
  spec.add_development_dependency "rake", ">= 12.3.3"
@@ -1,3 +1,3 @@
1
1
  module Constantin
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constantin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jude_cali
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-03 00:00:00.000000000 Z
11
+ date: 2021-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 6.0.0
19
+ version: 6.1.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 6.0.0
26
+ version: 6.1.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubygems_version: 3.1.2
114
+ rubygems_version: 3.2.15
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Handy way to handle constants.