Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit 3cafa3d

Browse files
committed
Initial commit
Signed-off-by: Rocco, Marco <[email protected]>
1 parent 20bcd1d commit 3cafa3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2400
-1
lines changed

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
4+
/coverage/
5+
/doc/
6+
/pkg/
7+
/spec/reports/
8+
/tmp/
9+
.idea/*
10+
.idea
11+
/.idea/workspace.xml
12+
*.iml
13+
*.xml
14+
*.gem
15+
/sonar-scanner-3.3.0.1492/
16+
publishSonar.sh
17+
/.scannerwork/
18+
/Gemfile.lock
19+
/generate.sh

.rspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--color
2+
--format documentation
3+
--backtrace
4+
--order random
5+
--warnings
6+
--require spec_helper

.rubocop.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
AllCops:
2+
TargetRubyVersion: 2.4.4
3+
DisplayCopNames: true
4+
5+
#
6+
# Metrics
7+
#
8+
9+
Metrics/AbcSize:
10+
Max: 25
11+
12+
Metrics/BlockLength:
13+
Enabled: false
14+
15+
Metrics/ClassLength:
16+
Max: 128
17+
18+
Metrics/LineLength:
19+
Max: 130
20+
21+
Metrics/MethodLength:
22+
CountComments: false
23+
Max: 50
24+
25+
Metrics/CyclomaticComplexity:
26+
Max: 15
27+
28+
Metrics/PerceivedComplexity:
29+
Max: 15
30+
31+
Metrics/ModuleLength:
32+
Max: 120
33+
34+
#
35+
# Naming
36+
#
37+
Naming/UncommunicativeMethodParamName:
38+
Enabled: false
39+
40+
#
41+
# Performance
42+
#
43+
Performance/UnfreezeString:
44+
Enabled: false
45+
46+
#
47+
# Style
48+
#
49+
Style/AccessModifierDeclarations:
50+
Enabled: false
51+
52+
Style/GlobalVars:
53+
Enabled: false
54+
55+
Style/SafeNavigation:
56+
Enabled: false
57+
58+
Style/StringLiterals:
59+
EnforcedStyle: single_quotes
60+
61+
Layout/IndentHash:
62+
IndentationWidth: 4
63+
64+
Layout/MultilineOperationIndentation:
65+
Enabled: false
66+
67+
Style/PercentLiteralDelimiters:
68+
PreferredDelimiters:
69+
'%i': '[]'
70+
'%w': '[]'
71+
'%W': '[]'
72+
73+
Style/Documentation:
74+
Enabled: false

.travis.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
language: ruby
2+
git:
3+
depth: false # "Shallow clone detected during the analysis"
4+
matrix:
5+
fast_finish: true
6+
include:
7+
# minimum supported versions
8+
- rvm: 2.4.4
9+
- rvm: truffleruby-1.0.0-rc11
10+
# latest releases
11+
- rvm: truffleruby
12+
- rvm: 2.4.6
13+
- rvm: 2.5.5
14+
- rvm: 2.6.3
15+
- rvm: ruby # latest stable release
16+
env:
17+
# Do not run analysis on PR (secure env variables like SONAR_TOKEN are not always available)
18+
- WITH_SONAR_ANALYSIS=$([ "$TRAVIS_PULL_REQUEST" = "false" ] && echo true || echo false)
19+
install:
20+
- bundle install --jobs=3 --retry=3
21+
- |
22+
test "$WITH_SONAR_ANALYSIS" = "true" \
23+
&& wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION.zip \
24+
&& unzip sonar-scanner-cli-$SONAR_SCANNER_VERSION.zip || echo 'Skipping Sonar Scanner installation'
25+
script:
26+
- gem build *.gemspec
27+
- gem install *.gem
28+
- rake test
29+
after_success:
30+
- |
31+
test "${WITH_SONAR_ANALYSIS}" = "true" && sonar-scanner-${SONAR_SCANNER_VERSION}/bin/sonar-scanner \
32+
-Dsonar.projectName=${SONAR_PROJECT_NAME} \
33+
-Dsonar.projectKey=${SONAR_PROJECT_KEY} \
34+
-Dsonar.organization=${SONAR_ORGANIZATION_KEY} \
35+
-Dsonar.sources=./lib \
36+
-Dsonar.tests=./test \
37+
-Dsonar.ruby.coverage.reportPaths=coverage/.resultset.json \
38+
-Dsonar.host.url=${SONAR_URL} \
39+
-Dsonar.login=${SONAR_TOKEN} || echo 'Skipping Sonar Scanner execution'

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
gemspec

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Mastercard
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 all
13+
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 THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)