legion-exceptions 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7a6e0a741f25de97c7c4bdb6f7892a59f35d864a
4
+ data.tar.gz: 54e900deca9df2dd3d338c545bed2598b539b246
5
+ SHA512:
6
+ metadata.gz: d7f910719a7e8a81ac5bc15ecc50ea25a12c04f178ee4704d9e9c318bdf822f0cf13449e348d4bfd228069d2d900e630e80d198c951967880456c7ef75a72131
7
+ data.tar.gz: 69a61451487746af5b771b0b476519d5d8613d7ecad2b592d86072d9b9d6dcd2fb4bf3a7fe75393282285618c269d85f2c2db980b4c6d5f1149aef300e73af4f
@@ -0,0 +1,167 @@
1
+ version: 2 # use CircleCI 2.0
2
+ jobs:
3
+ "rubocop":
4
+ docker:
5
+ - image: circleci/ruby:2.4-node
6
+ steps:
7
+ - checkout
8
+ - run: gem install rubocop
9
+ - run:
10
+ name: Run Rubocop
11
+ command: rubocop
12
+ - store_test_results:
13
+ path: test_results
14
+ "ruby-2.0":
15
+ docker:
16
+ - image: circleci/ruby:2.0
17
+ steps:
18
+ - checkout
19
+ - run:
20
+ name: Bundle Install
21
+ command: bundle install
22
+ - run:
23
+ name: Run RSpec
24
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
25
+ when: always
26
+ - store_test_results:
27
+ path: test-results
28
+ "ruby-2.1":
29
+ docker:
30
+ - image: circleci/ruby:2.1
31
+ steps:
32
+ - checkout
33
+ - run:
34
+ name: Bundle Install
35
+ command: bundle install
36
+ - run:
37
+ name: Run RSpec
38
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
39
+ when: always
40
+ - store_test_results:
41
+ path: test-results
42
+ "ruby-2.2":
43
+ docker:
44
+ - image: circleci/ruby:2.2
45
+ steps:
46
+ - checkout
47
+ - run:
48
+ name: Bundle Install
49
+ command: bundle install
50
+ - run:
51
+ name: Run RSpec
52
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
53
+ when: always
54
+ - store_test_results:
55
+ path: test-results
56
+
57
+ "ruby-2.3":
58
+ docker:
59
+ - image: circleci/ruby:2.3
60
+ steps:
61
+ - checkout
62
+ - run:
63
+ name: Bundle Install
64
+ command: bundle install
65
+ - run:
66
+ name: Run RSpec
67
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
68
+ when: always
69
+ - store_test_results:
70
+ path: test-results
71
+
72
+ "ruby-2.4":
73
+ docker:
74
+ - image: circleci/ruby:2.4-node
75
+ steps:
76
+ - checkout
77
+ - run:
78
+ name: Bundle Install
79
+ command: bundle install
80
+ - run:
81
+ name: Run RSpec
82
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
83
+ when: always
84
+ - store_test_results:
85
+ path: test-results
86
+ "ruby-2.5":
87
+ docker:
88
+ - image: circleci/ruby:2.5-node
89
+ steps:
90
+ - checkout
91
+ - run:
92
+ name: Bundle Install
93
+ command: bundle install
94
+ - run:
95
+ name: Run RSpec
96
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
97
+ when: always
98
+ - store_test_results:
99
+ path: test-results
100
+ "ruby-2.6":
101
+ docker:
102
+ - image: circleci/ruby:2.6-node
103
+ steps:
104
+ - checkout
105
+ - run:
106
+ name: Bundle Install
107
+ command: bundle install
108
+ - run:
109
+ name: Run RSpec
110
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
111
+ when: always
112
+ - store_test_results:
113
+ path: test-results
114
+ "jruby-9.2":
115
+ docker:
116
+ - image: circleci/jruby:9.2
117
+ steps:
118
+ - checkout
119
+ - run:
120
+ name: Bundle Install
121
+ command: bundle install
122
+ - run:
123
+ name: Run RSpec
124
+ command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
125
+ when: always
126
+ - store_test_results:
127
+ path: test-results
128
+
129
+ workflows:
130
+ version: 2
131
+ cop_rake_deploy:
132
+ jobs:
133
+ - rubocop
134
+ # - ruby-2.2:
135
+ # requires:
136
+ # - ruby-2.4
137
+ # filters:
138
+ # branches:
139
+ # only: /\bdevelop\b|\bmaster\b/
140
+ - ruby-2.3:
141
+ requires:
142
+ - ruby-2.4
143
+ filters:
144
+ branches:
145
+ only: /\bdevelop\b|\bmaster\b/
146
+ - ruby-2.4:
147
+ requires:
148
+ - rubocop
149
+ - ruby-2.5:
150
+ requires:
151
+ - ruby-2.4
152
+ filters:
153
+ branches:
154
+ only: /\bdevelop\b|\bmaster\b/
155
+ - ruby-2.6:
156
+ requires:
157
+ - ruby-2.4
158
+ filters:
159
+ branches:
160
+ only: /\bdevelop\b|\bmaster\b/
161
+ # - jruby-9.2:
162
+ # requires:
163
+ # - ruby-2.2
164
+ # - ruby-2.3
165
+ # - ruby-2.4
166
+ # - ruby-2.5
167
+ # - ruby-2.6
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /rspec/
11
+ /test-results/
12
+
13
+ # rspec failure tracking
14
+ .rspec_status
15
+
data/.rubocop.yml ADDED
@@ -0,0 +1,25 @@
1
+ Metrics/LineLength:
2
+ Max: 120
3
+ Metrics/MethodLength:
4
+ Max: 30
5
+ Metrics/ClassLength:
6
+ Max: 1500
7
+ Metrics/BlockLength:
8
+ Max: 50
9
+ Layout/SpaceAroundEqualsInParameterDefault:
10
+ EnforcedStyle: space
11
+ Style/SymbolArray:
12
+ Enabled: true
13
+ Layout/AlignHash:
14
+ EnforcedHashRocketStyle: table
15
+ EnforcedColonStyle: table
16
+ Style/HashSyntax:
17
+ EnforcedStyle: ruby19_no_mixed_keys
18
+ Style/Documentation:
19
+ Enabled: false
20
+ AllCops:
21
+ TargetRubyVersion: 2.2
22
+ Style/FrozenStringLiteralComment:
23
+ Enabled: false
24
+ Naming/FileName:
25
+ Enabled: false
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in legion-exceptions.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Esity
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.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Legion::Exceptions
2
+
3
+ ## Installation
4
+
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ gem 'legion-exceptions'
9
+ ```
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install legion-exceptions
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ 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.
26
+
27
+ 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).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://bitbucket.org/legion-io/legion-exceptions. 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.
32
+
33
+ ## License
34
+
35
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
36
+
37
+ ## Code of Conduct
38
+
39
+ Everyone interacting in the Legion::Exceptions project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/legion-exceptions/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'legion/exceptions'
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__)
data/bin/setup ADDED
@@ -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,35 @@
1
+ image: ruby:2.4.0
2
+
3
+ pipelines:
4
+ branches:
5
+ master:
6
+ - step:
7
+ caches:
8
+ - bundler
9
+ script:
10
+ - gem install bundle rubocop
11
+ - bundle install
12
+ - rubocop
13
+ - rake
14
+
15
+ - step:
16
+ name: Deploy to test gem server
17
+ deployment: production
18
+ trigger: manual
19
+ script:
20
+ - gem install bundle geminabox
21
+ - bundle install
22
+ - gem build legion-exceptions.gemspec
23
+ - gem inabox legion*.gem -g https://www.rubygems.org -o
24
+ default:
25
+ - step:
26
+ caches:
27
+ - bundler
28
+ script:
29
+ - gem install bundle rubocop
30
+ - bundle install
31
+ - rubocop
32
+ - rake
33
+ definitions:
34
+ caches:
35
+ bundler: vendor/bundle
@@ -0,0 +1,30 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'legion/exceptions/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'legion-exceptions'
7
+ spec.version = Legion::Exceptions::VERSION
8
+ spec.authors = ['Esity']
9
+ spec.email = ['matthewdiverson@gmail.com']
10
+
11
+ spec.summary = 'Used to keep legion exceptions in one place'
12
+ spec.description = 'All of the different Legion Exceptions'
13
+ spec.homepage = 'https://bitbucket.org/legion-io/legion-exceptions'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = 'exe'
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ['lib']
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1'
24
+ spec.add_development_dependency 'codecov', '~> 0'
25
+ spec.add_development_dependency 'rake', '~> 10.0'
26
+ spec.add_development_dependency 'rspec', '~> 3.0'
27
+ spec.add_development_dependency 'rspec_junit_formatter', '~> 0'
28
+ spec.add_development_dependency 'rubocop'
29
+ spec.add_development_dependency 'simplecov'
30
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Legion
4
+ module Exception
5
+ # Invalid JSON class
6
+ class InvalidJson < StandardError; end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Legion
4
+ module Exception
5
+ # Missing argument exception
6
+ class MissingArgument < StandardError; end
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ module Legion
2
+ module Exceptions
3
+ VERSION = '0.1.0'.freeze
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Legion
4
+ module Exception
5
+ # Wrongtype Exception
6
+ class WrongType < StandardError; end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Legion
4
+ module Exception
5
+ class WrongType
6
+ # This thing should be an array
7
+ class Array < TypeError
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Legion
4
+ module Exception
5
+ class WrongType
6
+ # This thing should be a hash
7
+ class Hash < TypeError
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Legion
4
+ module Exception
5
+ class WrongType
6
+ # This thing should be an int
7
+ class Integer < TypeError
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Legion
4
+ module Exception
5
+ class WrongType
6
+ # This thing should be an int
7
+ class Nil < TypeError
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Legion
4
+ module Exception
5
+ class WrongType
6
+ # This thing should be a string
7
+ class String < TypeError
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,8 @@
1
+ require 'legion/exceptions/version'
2
+
3
+ module Legion
4
+ # Used for Legion Exceptions
5
+ module Exceptions
6
+ # Your code goes here...
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,163 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: legion-exceptions
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Esity
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-01-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: codecov
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec_junit_formatter
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: All of the different Legion Exceptions
112
+ email:
113
+ - matthewdiverson@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".circleci/config.yml"
119
+ - ".gitignore"
120
+ - ".rubocop.yml"
121
+ - Gemfile
122
+ - LICENSE.txt
123
+ - README.md
124
+ - Rakefile
125
+ - bin/console
126
+ - bin/setup
127
+ - bitbucket-pipelines.yml
128
+ - legion-exceptions.gemspec
129
+ - lib/legion/exceptions.rb
130
+ - lib/legion/exceptions/invalidjson.rb
131
+ - lib/legion/exceptions/missingargument.rb
132
+ - lib/legion/exceptions/version.rb
133
+ - lib/legion/exceptions/wrongtype.rb
134
+ - lib/legion/exceptions/wrongtypes/array.rb
135
+ - lib/legion/exceptions/wrongtypes/hash.rb
136
+ - lib/legion/exceptions/wrongtypes/integer.rb
137
+ - lib/legion/exceptions/wrongtypes/nil.rb
138
+ - lib/legion/exceptions/wrongtypes/string.rb
139
+ homepage: https://bitbucket.org/legion-io/legion-exceptions
140
+ licenses:
141
+ - MIT
142
+ metadata: {}
143
+ post_install_message:
144
+ rdoc_options: []
145
+ require_paths:
146
+ - lib
147
+ required_ruby_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ required_rubygems_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ requirements: []
158
+ rubyforge_project:
159
+ rubygems_version: 2.6.12
160
+ signing_key:
161
+ specification_version: 4
162
+ summary: Used to keep legion exceptions in one place
163
+ test_files: []