simple_text_reformatter 1.0.0 → 1.0.1

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: b1cdecb865ec3ad420e8dd7671055f786bdbdfc1794c795715934ec85b3497c2
4
- data.tar.gz: c04852ad23cc95b2844c0c019a38c6e7837c5eb17c8ce8b70010f9bf96c1481c
3
+ metadata.gz: b33414914245577f2379cab589207addfb06a6c795171fb5fb8a36f6dab864ad
4
+ data.tar.gz: bee312d64fb84d9ead645395763e4bbe827bc5fa103ade7bd9e5938bc3c1f28c
5
5
  SHA512:
6
- metadata.gz: 436d0b7d0311402a69905706aeb8ce1c0c1c09c1f8831ad413fd3d346f06752e830c20bae0dcf7e81cbac3b9358e184e0871fc04ee6f00e4b02d046d014580e1
7
- data.tar.gz: 17fb9da92814df57ffe9390d3a376784d5197d1adecac3a12b85fef0989f74b01d65fde4fce89dc60eba82c7cd896e01261f752fbd369423115cf57c495d869f
6
+ metadata.gz: e928ff26086eba0b933cf2f48a1dc4a06633bf8f268661f08885fc55f11939ee373a4350b78a62257501c55aa72b80a091e464c06fd62f22a1ed3cad29a0f795
7
+ data.tar.gz: 56622ecc2488f8b6712f6d12f396c7566614a83dbfb70da267ffb15e6efc9812675f35ce9caf60d327ad71f1d4427ac5d0e5bb86c0e5ce0900730ffa5ae0aac4
data/README.md CHANGED
@@ -1,43 +1,17 @@
1
1
  # SimpleTextReformatter
2
2
 
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/simple_text_reformatter`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'simple_text_reformatter'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install simple_text_reformatter
3
+ This was a gem I created to be a pure ruby way of __very__ simple reformatting of text, I built it so I could use it in a different project, but feel free to use it wherever you want.
22
4
 
23
5
  ## Usage
24
6
 
25
- TODO: Write usage instructions here
7
+ As I need them I will continue to add more reformat types to this gem, but for now it does an extremely simple phone number reformatting. To use this you just need to call:
26
8
 
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/simple_text_reformatter. 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
-
37
- ## License
38
-
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
9
+ ```
10
+ SimpleTextReformatter.format_as_phone_number('1234567890')
11
+ ```
42
12
 
43
- Everyone interacting in the SimpleTextReformatter project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/simple_text_reformatter/blob/master/CODE_OF_CONDUCT.md).
13
+ This follows a few basic rules:
14
+ * The Phone Number will reformat to `(123) 456-7890`
15
+ * If a region code (really just '1' for now) is passed in it will get chopped off: `"11234567890" => "(123) 456-7890"`
16
+ * Any additional numbers passed after will be included as an extension: `"12345678901234" => "(123) 456-7890 x1234" `
17
+ * Any nondigits passed in will be excluded
@@ -1,5 +1,3 @@
1
- require 'pry'
2
-
3
1
  module SimpleTextReformatter
4
2
  class PhoneNumberFormatter
5
3
  def initialize(base_phone_number_string)
@@ -1,3 +1,3 @@
1
1
  module SimpleTextReformatter
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_text_reformatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliott Young