legion-exceptions 0.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +65 -114
- data/.rubocop.yml +3 -19
- data/Gemfile +2 -0
- data/Rakefile +3 -0
- data/bitbucket-pipelines.yml +13 -31
- data/legion-exceptions.gemspec +6 -5
- data/lib/legion/exceptions.rb +7 -3
- data/lib/legion/exceptions/handled_task.rb +8 -0
- data/lib/legion/exceptions/invalidjson.rb +0 -1
- data/lib/legion/exceptions/missing_argument.rb +8 -0
- data/lib/legion/exceptions/version.rb +3 -1
- data/lib/legion/exceptions/wrongtype.rb +8 -2
- data/lib/legion/exceptions/wrongtypes/array.rb +1 -2
- data/lib/legion/exceptions/wrongtypes/hash.rb +1 -2
- data/lib/legion/exceptions/wrongtypes/integer.rb +1 -2
- data/lib/legion/exceptions/wrongtypes/nil.rb +1 -2
- data/lib/legion/exceptions/wrongtypes/string.rb +1 -2
- data/sonar-project.properties +12 -0
- metadata +18 -32
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/legion/exceptions/missingargument.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ef9fe947bbf4ca2e18c20a774b76d1a03694d87050a235583274a0eef7af78fe
|
4
|
+
data.tar.gz: 675a16d08b4e430ef8843ab59861e5f7d6e4526a60f46bf40b1ba8af20483be1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9c7df54ddda8ffddde3943b1cbc08725e32d74ac6e4e8724c566ff7e5b4259caa0fd3bc954b12086fdc9973525823a9da5a7bec860e82051237d0ca27856401
|
7
|
+
data.tar.gz: e30c8cc119426cd73d2689fe63864f405d307e418afd400fcce3557eb7cc0fbba6cd2a0dff901c4d8cdc61cf2f48ed2aa9f4483409ae63ec26d614a38274ab53
|
data/.circleci/config.yml
CHANGED
@@ -1,91 +1,56 @@
|
|
1
|
-
version: 2
|
1
|
+
version: 2.1
|
2
|
+
orbs:
|
3
|
+
ruby: circleci/ruby@0.2.1
|
4
|
+
sonarcloud: sonarsource/sonarcloud@1.0.1
|
5
|
+
|
2
6
|
jobs:
|
3
7
|
"rubocop":
|
4
8
|
docker:
|
5
|
-
- image: circleci/ruby:2.
|
9
|
+
- image: circleci/ruby:2.7-node
|
6
10
|
steps:
|
7
11
|
- checkout
|
8
|
-
-
|
12
|
+
- ruby/load-cache
|
13
|
+
- ruby/install-deps
|
9
14
|
- run:
|
10
15
|
name: Run Rubocop
|
11
|
-
command: rubocop
|
12
|
-
-
|
13
|
-
|
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":
|
16
|
+
command: bundle exec rubocop
|
17
|
+
- ruby/save-cache
|
18
|
+
"ruby-two-five":
|
43
19
|
docker:
|
44
|
-
- image: circleci/ruby:2.
|
20
|
+
- image: circleci/ruby:2.5
|
45
21
|
steps:
|
46
22
|
- checkout
|
47
|
-
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
path: test-results
|
56
|
-
|
57
|
-
"ruby-2.3":
|
23
|
+
- ruby/load-cache
|
24
|
+
- run:
|
25
|
+
name: update bundler
|
26
|
+
command: gem update bundler
|
27
|
+
- ruby/install-deps
|
28
|
+
- ruby/run-tests
|
29
|
+
- ruby/save-cache
|
30
|
+
"ruby-two-six":
|
58
31
|
docker:
|
59
|
-
- image: circleci/ruby:2.
|
32
|
+
- image: circleci/ruby:2.6
|
60
33
|
steps:
|
61
34
|
- checkout
|
62
|
-
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
path: test-results
|
71
|
-
|
72
|
-
"ruby-2.4":
|
35
|
+
- ruby/load-cache
|
36
|
+
- run:
|
37
|
+
name: update bundler
|
38
|
+
command: gem update bundler
|
39
|
+
- ruby/install-deps
|
40
|
+
- ruby/run-tests
|
41
|
+
- ruby/save-cache
|
42
|
+
"ruby-two-seven":
|
73
43
|
docker:
|
74
|
-
- image: circleci/ruby:2.
|
44
|
+
- image: circleci/ruby:2.7
|
75
45
|
steps:
|
76
46
|
- checkout
|
77
|
-
-
|
78
|
-
|
79
|
-
|
80
|
-
-
|
81
|
-
|
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":
|
47
|
+
- ruby/load-cache
|
48
|
+
- ruby/install-deps
|
49
|
+
- ruby/run-tests
|
50
|
+
- ruby/save-cache
|
51
|
+
"jruby-nine-two":
|
87
52
|
docker:
|
88
|
-
- image: circleci/
|
53
|
+
- image: circleci/jruby:9.2-jre
|
89
54
|
steps:
|
90
55
|
- checkout
|
91
56
|
- run:
|
@@ -97,9 +62,10 @@ jobs:
|
|
97
62
|
when: always
|
98
63
|
- store_test_results:
|
99
64
|
path: test-results
|
100
|
-
|
65
|
+
- sonarcloud/scan
|
66
|
+
"jruby-nine-two-e":
|
101
67
|
docker:
|
102
|
-
- image: circleci/
|
68
|
+
- image: circleci/jruby:9.2.11-jre
|
103
69
|
steps:
|
104
70
|
- checkout
|
105
71
|
- run:
|
@@ -111,57 +77,42 @@ jobs:
|
|
111
77
|
when: always
|
112
78
|
- store_test_results:
|
113
79
|
path: test-results
|
114
|
-
"
|
80
|
+
"sonarcloud":
|
115
81
|
docker:
|
116
|
-
- image: circleci/
|
82
|
+
- image: circleci/ruby:2.7
|
117
83
|
steps:
|
118
84
|
- checkout
|
85
|
+
- ruby/load-cache
|
86
|
+
- ruby/install-deps
|
87
|
+
- ruby/run-tests
|
119
88
|
- run:
|
120
|
-
name:
|
121
|
-
command: bundle
|
122
|
-
-
|
123
|
-
|
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
|
89
|
+
name: Run Rubocop
|
90
|
+
command: bundle exec rubocop --format=json --out=rubocop-result.json
|
91
|
+
- sonarcloud/scan
|
92
|
+
- ruby/save-cache
|
128
93
|
|
129
94
|
workflows:
|
130
95
|
version: 2
|
131
|
-
|
96
|
+
rubocop-rspec:
|
132
97
|
jobs:
|
133
98
|
- rubocop
|
134
|
-
|
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:
|
99
|
+
- ruby-two-five:
|
147
100
|
requires:
|
148
101
|
- rubocop
|
149
|
-
- ruby-
|
102
|
+
- ruby-two-six:
|
103
|
+
requires:
|
104
|
+
- ruby-two-five
|
105
|
+
- ruby-two-seven:
|
106
|
+
requires:
|
107
|
+
- ruby-two-five
|
108
|
+
- sonarcloud:
|
109
|
+
requires:
|
110
|
+
- ruby-two-seven
|
111
|
+
- ruby-two-six
|
112
|
+
- jruby-nine-two:
|
150
113
|
requires:
|
151
|
-
- ruby-
|
152
|
-
|
153
|
-
|
154
|
-
only: /\bdevelop\b|\bmaster\b/
|
155
|
-
- ruby-2.6:
|
114
|
+
- ruby-two-seven
|
115
|
+
- ruby-two-six
|
116
|
+
- jruby-nine-two-e:
|
156
117
|
requires:
|
157
|
-
-
|
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
|
118
|
+
- jruby-nine-two
|
data/.rubocop.yml
CHANGED
@@ -1,25 +1,9 @@
|
|
1
|
-
|
1
|
+
Layout/LineLength:
|
2
2
|
Max: 120
|
3
|
-
Metrics/MethodLength:
|
4
|
-
Max: 30
|
5
|
-
Metrics/ClassLength:
|
6
|
-
Max: 1500
|
7
|
-
Metrics/BlockLength:
|
8
|
-
Max: 50
|
9
3
|
Layout/SpaceAroundEqualsInParameterDefault:
|
10
4
|
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
5
|
Style/Documentation:
|
19
6
|
Enabled: false
|
20
7
|
AllCops:
|
21
|
-
TargetRubyVersion: 2.
|
22
|
-
|
23
|
-
Enabled: false
|
24
|
-
Naming/FileName:
|
25
|
-
Enabled: false
|
8
|
+
TargetRubyVersion: 2.5
|
9
|
+
NewCops: enable
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bitbucket-pipelines.yml
CHANGED
@@ -1,35 +1,17 @@
|
|
1
|
-
image: ruby:2.
|
1
|
+
image: ruby:2.7.0
|
2
2
|
|
3
3
|
pipelines:
|
4
4
|
branches:
|
5
5
|
master:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
6
|
+
- step:
|
7
|
+
name: Push to RubyGems
|
8
|
+
deployment: RubyGems
|
9
|
+
script:
|
10
|
+
- gem install bundler gem-release rake rspec
|
11
|
+
- bundle install
|
12
|
+
- rake build
|
13
|
+
- mkdir .gem
|
14
|
+
- (umask 077 ; echo $gem_creds | base64 --decode > .gem/credentials)
|
15
|
+
- gem release
|
16
|
+
artifacts:
|
17
|
+
- pkg/**
|
data/legion-exceptions.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require 'legion/exceptions/version'
|
@@ -12,19 +14,18 @@ Gem::Specification.new do |spec|
|
|
12
14
|
spec.description = 'All of the different Legion Exceptions'
|
13
15
|
spec.homepage = 'https://bitbucket.org/legion-io/legion-exceptions'
|
14
16
|
spec.license = 'MIT'
|
17
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
15
18
|
|
16
|
-
spec.files
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
20
|
f.match(%r{^(test|spec|features)/})
|
18
21
|
end
|
19
|
-
spec.bindir = 'exe'
|
20
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
23
|
spec.require_paths = ['lib']
|
22
24
|
|
23
|
-
spec.add_development_dependency 'bundler'
|
24
|
-
spec.add_development_dependency 'codecov', '~> 0'
|
25
|
+
spec.add_development_dependency 'bundler'
|
25
26
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
27
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
28
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0'
|
28
29
|
spec.add_development_dependency 'rubocop'
|
29
|
-
spec.add_development_dependency 'simplecov'
|
30
|
+
spec.add_development_dependency 'simplecov', '< 0.18.0'
|
30
31
|
end
|
data/lib/legion/exceptions.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'exceptions/version'
|
4
|
+
require_relative 'exceptions/handled_task'
|
5
|
+
require_relative 'exceptions/invalidjson'
|
6
|
+
require_relative 'exceptions/missing_argument'
|
7
|
+
require_relative 'exceptions/wrongtype'
|
2
8
|
|
3
9
|
module Legion
|
4
|
-
# Used for Legion Exceptions
|
5
10
|
module Exceptions
|
6
|
-
# Your code goes here...
|
7
11
|
end
|
8
12
|
end
|
@@ -1,8 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative 'wrongtypes/array'
|
4
|
+
require_relative 'wrongtypes/hash'
|
5
|
+
require_relative 'wrongtypes/integer'
|
6
|
+
require_relative 'wrongtypes/nil'
|
7
|
+
require_relative 'wrongtypes/string'
|
8
|
+
|
3
9
|
module Legion
|
4
10
|
module Exception
|
5
|
-
|
6
|
-
|
11
|
+
module WrongType
|
12
|
+
end
|
7
13
|
end
|
8
14
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
sonar.projectKey=legion-io_legion-exceptions
|
2
|
+
sonar.organization=legion-io
|
3
|
+
sonar.projectName=Legion::Exceptions
|
4
|
+
sonar.sources=.
|
5
|
+
sonar.exclusions=vendor/**
|
6
|
+
sonar.coverage.exclusions=spec/**
|
7
|
+
sonar.ruby.coverage.reportPath=coverage/.resultset.json
|
8
|
+
sonar.ruby.file.suffixes=rb,ruby
|
9
|
+
sonar.ruby.coverage.framework=RSpec
|
10
|
+
sonar.ruby.rubocopConfig=.rubocop.yml
|
11
|
+
sonar.ruby.rubocop.reportPath=rubocop-result.json
|
12
|
+
sonar.ruby.rubocop.filePath=.
|
metadata
CHANGED
@@ -1,41 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: legion-exceptions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esity
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
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
|
-
- - "~>"
|
17
|
+
- - ">="
|
32
18
|
- !ruby/object:Gem::Version
|
33
19
|
version: '0'
|
34
20
|
type: :development
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
|
-
- - "
|
24
|
+
- - ">="
|
39
25
|
- !ruby/object:Gem::Version
|
40
26
|
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
@@ -98,16 +84,16 @@ dependencies:
|
|
98
84
|
name: simplecov
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
|
-
- - "
|
87
|
+
- - "<"
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
89
|
+
version: 0.18.0
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
|
-
- - "
|
94
|
+
- - "<"
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
96
|
+
version: 0.18.0
|
111
97
|
description: All of the different Legion Exceptions
|
112
98
|
email:
|
113
99
|
- matthewdiverson@gmail.com
|
@@ -119,16 +105,16 @@ files:
|
|
119
105
|
- ".gitignore"
|
120
106
|
- ".rubocop.yml"
|
121
107
|
- Gemfile
|
108
|
+
- Gemfile.lock
|
122
109
|
- LICENSE.txt
|
123
110
|
- README.md
|
124
111
|
- Rakefile
|
125
|
-
- bin/console
|
126
|
-
- bin/setup
|
127
112
|
- bitbucket-pipelines.yml
|
128
113
|
- legion-exceptions.gemspec
|
129
114
|
- lib/legion/exceptions.rb
|
115
|
+
- lib/legion/exceptions/handled_task.rb
|
130
116
|
- lib/legion/exceptions/invalidjson.rb
|
131
|
-
- lib/legion/exceptions/
|
117
|
+
- lib/legion/exceptions/missing_argument.rb
|
132
118
|
- lib/legion/exceptions/version.rb
|
133
119
|
- lib/legion/exceptions/wrongtype.rb
|
134
120
|
- lib/legion/exceptions/wrongtypes/array.rb
|
@@ -136,11 +122,12 @@ files:
|
|
136
122
|
- lib/legion/exceptions/wrongtypes/integer.rb
|
137
123
|
- lib/legion/exceptions/wrongtypes/nil.rb
|
138
124
|
- lib/legion/exceptions/wrongtypes/string.rb
|
125
|
+
- sonar-project.properties
|
139
126
|
homepage: https://bitbucket.org/legion-io/legion-exceptions
|
140
127
|
licenses:
|
141
128
|
- MIT
|
142
129
|
metadata: {}
|
143
|
-
post_install_message:
|
130
|
+
post_install_message:
|
144
131
|
rdoc_options: []
|
145
132
|
require_paths:
|
146
133
|
- lib
|
@@ -148,16 +135,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
135
|
requirements:
|
149
136
|
- - ">="
|
150
137
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
138
|
+
version: 2.5.0
|
152
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
140
|
requirements:
|
154
141
|
- - ">="
|
155
142
|
- !ruby/object:Gem::Version
|
156
143
|
version: '0'
|
157
144
|
requirements: []
|
158
|
-
|
159
|
-
|
160
|
-
signing_key:
|
145
|
+
rubygems_version: 3.1.2
|
146
|
+
signing_key:
|
161
147
|
specification_version: 4
|
162
148
|
summary: Used to keep legion exceptions in one place
|
163
149
|
test_files: []
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
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
DELETED