optio 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +14 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +43 -0
  8. data/Rakefile +51 -0
  9. data/VERSION +1 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/docs/Optio.html +110 -0
  13. data/docs/Optio/Exceptions.html +96 -0
  14. data/docs/Optio/Exceptions/SwitchAlreadyExistsError.html +103 -0
  15. data/docs/Optio/Parser.html +486 -0
  16. data/docs/README_md.html +157 -0
  17. data/docs/created.rid +6 -0
  18. data/docs/css/fonts.css +167 -0
  19. data/docs/css/rdoc.css +590 -0
  20. data/docs/fonts/Lato-Light.ttf +0 -0
  21. data/docs/fonts/Lato-LightItalic.ttf +0 -0
  22. data/docs/fonts/Lato-Regular.ttf +0 -0
  23. data/docs/fonts/Lato-RegularItalic.ttf +0 -0
  24. data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
  25. data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
  26. data/docs/images/add.png +0 -0
  27. data/docs/images/arrow_up.png +0 -0
  28. data/docs/images/brick.png +0 -0
  29. data/docs/images/brick_link.png +0 -0
  30. data/docs/images/bug.png +0 -0
  31. data/docs/images/bullet_black.png +0 -0
  32. data/docs/images/bullet_toggle_minus.png +0 -0
  33. data/docs/images/bullet_toggle_plus.png +0 -0
  34. data/docs/images/date.png +0 -0
  35. data/docs/images/delete.png +0 -0
  36. data/docs/images/find.png +0 -0
  37. data/docs/images/loadingAnimation.gif +0 -0
  38. data/docs/images/macFFBgHack.png +0 -0
  39. data/docs/images/package.png +0 -0
  40. data/docs/images/page_green.png +0 -0
  41. data/docs/images/page_white_text.png +0 -0
  42. data/docs/images/page_white_width.png +0 -0
  43. data/docs/images/plugin.png +0 -0
  44. data/docs/images/ruby.png +0 -0
  45. data/docs/images/tag_blue.png +0 -0
  46. data/docs/images/tag_green.png +0 -0
  47. data/docs/images/transparent.png +0 -0
  48. data/docs/images/wrench.png +0 -0
  49. data/docs/images/wrench_orange.png +0 -0
  50. data/docs/images/zoom.png +0 -0
  51. data/docs/index.html +159 -0
  52. data/docs/js/darkfish.js +161 -0
  53. data/docs/js/jquery.js +4 -0
  54. data/docs/js/navigation.js +142 -0
  55. data/docs/js/navigation.js.gz +0 -0
  56. data/docs/js/search.js +109 -0
  57. data/docs/js/search_index.js +1 -0
  58. data/docs/js/search_index.js.gz +0 -0
  59. data/docs/js/searcher.js +229 -0
  60. data/docs/js/searcher.js.gz +0 -0
  61. data/docs/table_of_contents.html +115 -0
  62. data/exe/optio +10 -0
  63. data/lib/optio.rb +8 -0
  64. data/lib/optio/exceptions.rb +6 -0
  65. data/lib/optio/parser.rb +96 -0
  66. data/lib/optio/version.rb +3 -0
  67. data/optio.gemspec +27 -0
  68. metadata +153 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4c821cc770e1e3748a1e1d9e2c296415fbc32d22
4
+ data.tar.gz: 46799e0daacbf210a995adc4fa1a14cd7d33bbcd
5
+ SHA512:
6
+ metadata.gz: 39408c3c69ab03a324693ff17fe3375c49acaf9cdb53477a28d7cbe301602a7af2297e381ffbfb4911fc70439959f4102dab21b58ed19bb210b5f62ecd16e8df
7
+ data.tar.gz: f8ad86453a62dca500e2ee8aca62be913674fd8c7884d7ba59dc10ec25e7e1d1df1fa539661f70eef75db7b8e94a700660a8b399155bb7889262ef33ac2daf2c
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
@@ -0,0 +1,14 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.15.3
6
+ deploy:
7
+ provider: rubygems
8
+ api_key:
9
+ secure: qu+7jQH94x3GAXIQaNu0Hp1kcd8dq1a7C8rE//LT/eoE2DKFL5MdtAEltA2gOrTe2wceFO4GtFsRFZvLlOfFYdEzSAMc0gGF5bJMbd/Uetd+As3+Ip2TwcJdT7tVhKz2LsbB5wcN6VIf1qNOcB/sjSAvFvau5TtFW5vqpi6T9oRmtBMRLtsR6AbihRPK0usx2pVtr1zyam5MMIISwCPmeql6r4/PpBsJMXTfJdvOqWORor62S7eCUbkbr5YNx/35JZAY8zVcv9745itYLO0p3izQK+u4XlpHe7n1Qnbyq4cQySrJsZVTNX5hK4xiZHlLSvolrK0i4/V6r7ha6r+JCFayJW6shl//+ITE6i1PmoCXitxbI445fqHbS5BJZyx+Lo3s4tCM9sYbpNft9EvgeH2q8AfTLy2itMs8hcgTYAMOImG/B7pk+toi6Zh0R8exS1u+jbWc0F1KdWD9zAm7kmfOeu9tMdmr0h8tkUfNST8BvF14I5bzLCUvZaSIXDnku1BrphfoWVw+2ChAnATjF8iM7Z31q6VGU0qeOVyadlg8OkywPHvYhTKClJ0TiBQtxN3WMQvSIo5ZeFfKI+bzShV/3dQMfr6ASkZcibD4kDTXx52pXJx2MUFTHubk6DduJHYU5CFve9ArciI0mLrQyFDqn+iOxBD0gG5KSBmWHBU=
10
+ gem: optio
11
+ on:
12
+ tags: true
13
+ repo: amitizle/optio
14
+ branch: master
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at amit.goldberg@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in optio.gemspec
6
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Amit Goldberg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,43 @@
1
+ # Optio
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/optio`. 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 'optio'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install optio
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. 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]/optio. 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](http://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Optio project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/optio/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,51 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+ require 'rdoc/task'
4
+
5
+ def gem_version
6
+ major, minor, patch = Optio::VERSION.split('.').map {|i| i.to_i}
7
+ [major, minor, patch]
8
+ end
9
+
10
+ def bump_version(type = :minor)
11
+ curr_major, curr_minor, curr_patch = gem_version
12
+ new_version = case type
13
+ when :patch
14
+ [curr_major, curr_minor, curr_patch + 1]
15
+ when :minor
16
+ [curr_major, curr_minor + 1, 0]
17
+ when :major
18
+ [curr_major + 1, 0, 0]
19
+ end
20
+ puts "Old version: #{[curr_major, curr_minor, curr_patch].inspect}"
21
+ puts "New version: #{new_version.inspect}"
22
+ File.write('VERSION', new_version.join('.'))
23
+ end
24
+
25
+ Rake::TestTask.new(:test) do |t|
26
+ t.libs << 'test'
27
+ t.libs << 'lib'
28
+ t.test_files = FileList["test/**/*_test.rb"]
29
+ end
30
+
31
+ RDoc::Task.new(:docs) do |rdoc|
32
+ rdoc.main = 'README.md'
33
+ rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
34
+ rdoc.options << '--all'
35
+ rdoc.rdoc_dir = 'docs'
36
+ end
37
+
38
+ task :bump => 'bump:minor'
39
+ namespace :bump do
40
+ task :patch do
41
+ bump_version(:patch)
42
+ end
43
+ task :minor do
44
+ bump_version(:minor)
45
+ end
46
+ task :major do
47
+ bump_version(:major)
48
+ end
49
+ end
50
+
51
+ task :default => :test
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.0
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "optio"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,110 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Optio - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+ </nav>
64
+
65
+ <main role="main" aria-labelledby="module-Optio">
66
+ <h1 id="module-Optio" class="module">
67
+ module Optio
68
+ </h1>
69
+
70
+ <section class="description">
71
+
72
+ </section>
73
+
74
+
75
+
76
+
77
+ <section id="5Buntitled-5D" class="documentation-section">
78
+
79
+
80
+
81
+
82
+
83
+ <section class="constants-list">
84
+ <header>
85
+ <h3>Constants</h3>
86
+ </header>
87
+ <dl>
88
+
89
+ <dt id="VERSION">VERSION
90
+
91
+ <dd>
92
+
93
+
94
+ </dl>
95
+ </section>
96
+
97
+
98
+
99
+
100
+
101
+ </section>
102
+ </main>
103
+
104
+
105
+ <footer id="validator-badges" role="contentinfo">
106
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
107
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
108
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
109
+ </footer>
110
+
@@ -0,0 +1,96 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Optio::Exceptions - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/jquery.js"></script>
15
+ <script src="../js/darkfish.js"></script>
16
+
17
+ <link href="../css/fonts.css" rel="stylesheet">
18
+ <link href="../css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="../index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="../table_of_contents.html#pages">Pages</a>
32
+ <a href="../table_of_contents.html#classes">Classes</a>
33
+ <a href="../table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+ </nav>
64
+
65
+ <main role="main" aria-labelledby="module-Optio::Exceptions">
66
+ <h1 id="module-Optio::Exceptions" class="module">
67
+ module Optio::Exceptions
68
+ </h1>
69
+
70
+ <section class="description">
71
+
72
+ </section>
73
+
74
+
75
+
76
+
77
+ <section id="5Buntitled-5D" class="documentation-section">
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+ </section>
88
+ </main>
89
+
90
+
91
+ <footer id="validator-badges" role="contentinfo">
92
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
93
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
94
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
95
+ </footer>
96
+