find_vowels 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: '08ed1679c3c4d96a048c44abe9f407ca2a81797758cf4221a1cad5df260172cf'
4
- data.tar.gz: 4924b8f894edca36150020e059f0628dcebf785e7687f09aca6fcdf28efb9e55
3
+ metadata.gz: 8d8d2e5df190cddf08b0f5c92eebb0770f6d396998d186554d6071b51cd5505a
4
+ data.tar.gz: 1c3c17fb3e9b146813946e98e946bfc957da757277fb8795152ec63e7c70ddb0
5
5
  SHA512:
6
- metadata.gz: eedfa1e2026326f0253ea6f58da4601034b677d26c4c683b3941021f2a5f75a2a4251b3d08869961fa5e728c7bc0357697aa6e1fc71060b97e4957ac2f5a0d38
7
- data.tar.gz: dd4d96920f2b09898998247f24efe2abdba74977ef150d3ff02bbe9ce57acfb5c51c44c554c5fe83b0d50b0f291cedaaa9f565f82ce3fd65a82a1bdd318415ac
6
+ metadata.gz: a269dcf783d780f58beabf8ba269da75e15d87202943892c19ae9b82a6e91e4badf9aca5e6160e5d6c2af4c6c783cc3c939d2d624c705c2ea3ef6607372f7ac7
7
+ data.tar.gz: ba423286a255291b8c88e47bfa6c96d273b7cb43c6ed0dea396dabff1382dd1a584c704c3cd27ebcf896e447a1f96220965a9163d0aa7c27154ff72b55249f1c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
- ## [Unreleased]
1
+ ## [Released]
2
2
 
3
- ## [0.1.0] - 2025-02-03
3
+ ## [0.1.0] - 2025-02-04
4
4
 
5
5
  - Initial release
6
+
7
+ - New feature vowels is added to find vowels in string.
8
+
9
+ ## [Released]
10
+
11
+ ## [0.1.1] - 2025-02-04
12
+
13
+ - First update
14
+
15
+ - Added a feture to find uniq vowels in string.
16
+
17
+
18
+ ## [Released]
19
+
20
+ ## [0.1.2] - 2025-02-04
21
+
22
+ - Second update
23
+
24
+ - Added a feture to find vowels count in string.
data/README.md CHANGED
@@ -1,27 +1,34 @@
1
- # FindVowels
1
+ # Find Vowels
2
2
 
3
3
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/find_vowels`. To experiment with that code, run `bin/console` for an interactive prompt.
4
4
 
5
5
  ## Installation
6
6
 
7
- 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.
8
-
9
7
  Install the gem and add to the application's Gemfile by executing:
10
8
 
11
9
  ```bash
12
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
10
+ bundle add find_vowels
13
11
  ```
14
12
 
15
13
  If bundler is not being used to manage dependencies, install the gem by executing:
16
14
 
17
15
  ```bash
18
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
16
+ gem install find_vowels
19
17
  ```
20
18
 
21
19
  ## Usage
22
-
23
- TODO: Write usage instructions here
24
-
20
+ To use install it by adding it in gemfile like `gem "find_vowels"` , then run bundle install.
21
+ It is very simple to use. It returns the array of vowels present in the string.
22
+
23
+ ## Example
24
+ sentance = "I am a ruby on rails developer"
25
+ vowels_list = sentance.vowels // returns array of vowels present in sentance
26
+ puts vowels_list // prints ['a', 'a', 'u', 'o', 'a', 'i', 'e', 'e', 'o', 'e']
27
+ uniq_list = sentance.uniq_vowels // returns array of uniq vowels present in sentance
28
+ puts uniq_list // prints ['a', 'u', 'o', 'i', 'e']
29
+ count = sentance.vowels_count // returns the hash of vowels count
30
+ puts count // prints { "a" => 3, "u" => 1, "o" => 2, "i" => 1, "e" => 3 }
31
+
25
32
  ## Development
26
33
 
27
34
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -38,4 +45,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
38
45
 
39
46
  ## Code of Conduct
40
47
 
41
- Everyone interacting in the FindVowels project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Brajesh970/find_vowels/blob/master/CODE_OF_CONDUCT.md).
48
+ Everyone interacting in the Find Vowels project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Brajesh970/find_vowels/blob/master/CODE_OF_CONDUCT.md).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FindVowels
4
- VERSION = "0.1.0"
4
+ VERSION = '0.1.2'
5
5
  end
data/lib/find_vowels.rb CHANGED
@@ -9,5 +9,14 @@ module FindVowels
9
9
  def vowels
10
10
  scan(/[aeiou]/i)
11
11
  end
12
+
13
+ def uniq_vowels
14
+ scan(/[aeiou]/i).uniq
15
+ end
16
+
17
+ def vowels_count
18
+ arr = scan(/[aeiou]/i)
19
+ arr.each_with_object(Hash.new(0)) { |e, hash| hash[e] += 1 }
20
+ end
12
21
  end
13
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: find_vowels
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
  - Brajesh970
@@ -32,7 +32,7 @@ metadata:
32
32
  allowed_push_host: https://rubygems.org
33
33
  homepage_uri: https://github.com/Brajesh970/find_vowels
34
34
  source_code_uri: https://github.com/Brajesh970/find_vowels
35
- changelog_uri: https://github.com/Brajesh970/find_vowels/blob/master/CODE_OF_CONDUCT.md
35
+ changelog_uri: https://github.com/Brajesh970/find_vowels/blob/master/CHANGELOG.md
36
36
  rdoc_options: []
37
37
  require_paths:
38
38
  - lib
@@ -49,5 +49,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  requirements: []
50
50
  rubygems_version: 3.6.2
51
51
  specification_version: 4
52
- summary: This is gem to find vowels in string
52
+ summary: This is gem to find vowels and there count in string
53
53
  test_files: []