eunomia_gen 0.1.0 → 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: 53072ce6f110e4e2c4750839e4cd632831b102a4b1d22cc407cbb681be6a1c28
4
- data.tar.gz: b9cf7bcb05f3c5fb4b8db1bebc8f04d6a35b52bfb5520d3ef87b7756812b8675
3
+ metadata.gz: ce3812f21ae68491bad7b999532be18d0143842ed6d8a39b81843ec504594f5d
4
+ data.tar.gz: e951235481722af38a3519ccd188a56d78ea48c5060e4c10e8cac62b7f427151
5
5
  SHA512:
6
- metadata.gz: e3ef8833a30649a1666f2328b131ebbf59e20137e1afed01d24ae2687b040aa26c706e3e97b0b522e77e997bf1a5eef5a56ccb6405fd4961474e644bb309e5dc
7
- data.tar.gz: 161a8d306af2e98859663126a4e35889c417e80f66377329b2d3d30ef59f17033d9f031c7f5368b574dee7f3d21f0011252964f7b6540424ea434142aee160e6
6
+ metadata.gz: f433f2fa2f1d3ffafd4c3ce4416c03409a8c6128870086f805d7a9b92b72f8ffdba46ab8cf57189f379f04604fcd7436a05b268cb37a96ee0f2143053011b0d6
7
+ data.tar.gz: 6a14ec1008753b70930ca35f5ee67cc792f69b06b6412765993f97366446c194e4f1a49156b6ef5533ed03334da7eee1e6c3a059c5a0c843416a9de2c195ad6f
data/README.md CHANGED
@@ -11,15 +11,13 @@ is set up using a series of rules, it seemed appropriate.
11
11
 
12
12
  ## Installation
13
13
 
14
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
15
-
16
14
  Install the gem and add to the application's Gemfile by executing:
17
15
 
18
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
16
+ $ bundle add eunomia_gen
19
17
 
20
18
  If bundler is not being used to manage dependencies, install the gem by executing:
21
19
 
22
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
20
+ $ gem install eunomia_gen
23
21
 
24
22
  ## Usage
25
23
 
data/lib/eunomia/item.rb CHANGED
@@ -45,6 +45,7 @@ module Eunomia
45
45
  segments.each { |seg| result.append(seg.generate(request)) }
46
46
  result.apply(alts, functions, locale: request.alt_key)
47
47
  result.merge_meta(meta)
48
+ result.add_tags_as_meta(tags)
48
49
  result
49
50
  end
50
51
  end
@@ -55,6 +55,14 @@ module Eunomia
55
55
  end
56
56
  end
57
57
 
58
+ def add_tags_as_meta(tags)
59
+ tags.each do |tag|
60
+ arr = tag.split(':')
61
+ @meta[arr[0]] << arr[1] if arr.length > 1
62
+ end
63
+ end
64
+
65
+
58
66
  def apply_translations(alts, locale: nil)
59
67
  arr = to_s.split(/\s+/)
60
68
  arr = arr.map do |segment|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eunomia
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eunomia_gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - G Palmer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-11 00:00:00.000000000 Z
11
+ date: 2024-09-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Create random string with a focus on RPGs similar to fantasynamegenerators.com
14
14
  email:
@@ -54,14 +54,14 @@ files:
54
54
  - lib/eunomia/store.rb
55
55
  - lib/eunomia/version.rb
56
56
  - sig/eunomia_gen.rbs
57
- homepage: https://github.com/palmergs/eunomia_gen
57
+ homepage: https://github.com/palmergs/eunomia-gen
58
58
  licenses:
59
59
  - MIT
60
60
  metadata:
61
61
  allowed_push_host: https://rubygems.org
62
- homepage_uri: https://github.com/palmergs/eunomia_gen
63
- source_code_uri: https://github.com/palmergs/eunomia_gen
64
- changelog_uri: https://github.com/palmergs/eunomia_gen/CHANGELOG.md
62
+ homepage_uri: https://github.com/palmergs/eunomia-gen
63
+ source_code_uri: https://github.com/palmergs/eunomia-gen
64
+ changelog_uri: https://github.com/palmergs/eunomia-gen/CHANGELOG.md
65
65
  rubygems_mfa_required: 'true'
66
66
  post_install_message:
67
67
  rdoc_options: []