substring_counter 1.0.1 → 1.0.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 +14 -5
- data/lib/substring_counter/version.rb +1 -1
- data/substring_counter.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59af823d7546536de78f9f496ebd56de72cf995d
|
4
|
+
data.tar.gz: 96d8eaaf7eb61b4022c3726d97abab3ccfbcdc92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ad4af01fddc5abd1c039ae9f9d4c12cc8597b2f37ba6c8cd400bb1a33885232f39b715f691cabd6a3aef273479dd21ab4986a39d582f410bb1d7fa23eee567f
|
7
|
+
data.tar.gz: 158d38b9a71dccfc3e1d6eb74011418292b3550a7029a1365de3ae852e275258f299652c759f151fb5441418e58ddde19722b2145995e2017f10aac951804ed3
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# SubstringCounter
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This is simple ruby gem for counting number of occurances in string.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,18 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
Counting occurances of single keyword
|
24
|
+
|
25
|
+
2.3.1 :002 > 'string'.count_occurances('in')
|
26
|
+
=> 1
|
27
|
+
|
28
|
+
Counting occurances of multiple keywords
|
29
|
+
|
30
|
+
2.3.1 :003 > 'string with repeated substrings'.count_occurances('ing', 'string', 'sub')
|
31
|
+
=> {"ing"=>2, "string"=>2, "sub"=>1}
|
32
|
+
|
33
|
+
|
34
|
+
|
26
35
|
|
27
36
|
## Development
|
28
37
|
|
@@ -32,7 +41,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
41
|
|
33
42
|
## Contributing
|
34
43
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
44
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/GaneshNavale/substring_counter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
45
|
|
37
46
|
## License
|
38
47
|
|
data/substring_counter.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Ganesh Navale"]
|
10
10
|
spec.email = ["navaleganesh2011@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{This is an extension of the String class in Ruby to check number of occurances of
|
12
|
+
spec.summary = %q{This is an extension of the String class in Ruby to check number of occurances of substring in an given string}
|
13
13
|
spec.homepage = "https://github.com/GaneshNavale/substring_counter"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: substring_counter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ganesh Navale
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -97,5 +97,5 @@ rubygems_version: 2.6.14
|
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: This is an extension of the String class in Ruby to check number of occurances
|
100
|
-
of
|
100
|
+
of substring in an given string
|
101
101
|
test_files: []
|