web47sso 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
+ SHA256:
3
+ metadata.gz: 9933e2491afcc9cb9fded18d29ac79ee73e85540c72d6811f591b1a6a6bfe415
4
+ data.tar.gz: 40adae8697af0650575161bbd444b08f1394cbeeb338d9f19ef3d3d320a2bd55
5
+ SHA512:
6
+ metadata.gz: 6cf0fe682f8902c012a591eb003391c1870b617853a002944ed0f517491ff10f3683a2e8ba8bccde075278394d2317db51b1e250ce443cb9ae3100562832e850
7
+ data.tar.gz: 4f8a6ab23c352ad9af1aa8de21323fa31c613c7f14bab0908bdc982ff62bb9f01398c2de330920eca5dd2e8e8cdeb9d188ebcb2d1b1e85007eb174c6a0b24087
data/.bundle/config ADDED
@@ -0,0 +1,3 @@
1
+ ---
2
+ BUNDLE_PATH: "vendor"
3
+ BUNDLE_DEFAULT: "2.5.13"
@@ -0,0 +1,172 @@
1
+ #
2
+ # All-in-one
3
+ #
4
+ # This test configuration runs all tests in a single job.
5
+ #
6
+ version: 2.1
7
+
8
+ commands:
9
+ setup_environment:
10
+ description: Run the tests for a given directory in the test folder
11
+ steps:
12
+ - attach_workspace:
13
+ at: /tmp/workspace
14
+ - checkout
15
+ - restore_cache:
16
+ keys:
17
+ - app47-web-sso-gem-cache-v2-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile" }}
18
+ - run:
19
+ name: Version information
20
+ shell: /bin/bash -l
21
+ command: |
22
+ ruby --version;
23
+ gem --version;
24
+ bundle --version;
25
+ - run:
26
+ name: Setup environment
27
+ shell: /bin/bash -l
28
+ command: |
29
+ ulimit -n 2096;
30
+ mkdir -p ./log;
31
+ mkdir -p ./tmp;
32
+ bundle install;
33
+ - save_cache:
34
+ key: app47-web-sso-gem-cache-v2-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile" }}
35
+ paths:
36
+ - vendor
37
+ run_tests:
38
+ description: Run the test directory
39
+ parameters:
40
+ dir_name:
41
+ type: string
42
+ steps:
43
+ - run:
44
+ name: Wait for Redis Server
45
+ command: dockerize -wait tcp://localhost:6379 -timeout 1m
46
+ - run:
47
+ name: Wait for MongoDB Server
48
+ command: dockerize -wait tcp://localhost:27017 -timeout 1m
49
+ - run:
50
+ name: Run tests
51
+ shell: /bin/bash -l
52
+ command: bundle exec rails test test/<< parameters.dir_name >>
53
+ - run:
54
+ name: Copy coverage results
55
+ shell: /bin/bash -l
56
+ command: mv ./coverage/lcov/web47sso.lcov ./coverage/lcov/<< parameters.dir_name >>.lcov
57
+ - run:
58
+ name: Copy coverage results 2
59
+ shell: /bin/bash -l
60
+ command: mv ./coverage/.resultset.json ./coverage/lcov/<< parameters.dir_name >>.json
61
+ - persist_to_workspace:
62
+ root: ./coverage
63
+ paths:
64
+ - lcov
65
+
66
+ executors:
67
+ app47_executor:
68
+ docker:
69
+ - image: app47/ruby323:noble
70
+ environment:
71
+ ENV: CI
72
+ RACK_ENV: test
73
+ RAILS_ENV: test
74
+ COVERAGE: 1
75
+ RUBYOPT: W0
76
+ stack_executor:
77
+ docker:
78
+ - image: app47/ruby323:noble
79
+ - image: app47/redis7:noble
80
+ - image: app47/mongodb8:noble
81
+ environment:
82
+ ENV: CI
83
+ REDIS_URL: redis://localhost:6379
84
+ MONGO_URL: localhost:27017
85
+ RACK_ENV: test
86
+ RAILS_ENV: test
87
+ COVERAGE: 1
88
+ RUBYOPT: W0
89
+
90
+
91
+ jobs:
92
+ update_vendor_cache:
93
+ executor: app47_executor
94
+ resource_class: small
95
+ steps:
96
+ - setup_environment
97
+ controllers:
98
+ executor: stack_executor
99
+ resource_class: small
100
+ steps:
101
+ - setup_environment
102
+ - run_tests:
103
+ dir_name: controllers
104
+ models:
105
+ executor: stack_executor
106
+ resource_class: small
107
+ steps:
108
+ - setup_environment
109
+ - run_tests:
110
+ dir_name: models
111
+ jobs:
112
+ executor: stack_executor
113
+ resource_class: small
114
+ steps:
115
+ - setup_environment
116
+ - run_tests:
117
+ dir_name: jobs
118
+ report_to_codacy:
119
+ executor: app47_executor
120
+ resource_class: small
121
+ steps:
122
+ - attach_workspace:
123
+ at: /tmp/workspace
124
+ - setup_environment
125
+ - run:
126
+ name: Install coverage reporter and upload to codacy
127
+ shell: /bin/bash -l
128
+ command: |
129
+ wget https://coverage.codacy.com/get.sh -O codacy.sh
130
+ bundle exec ruby coverage_merge.rb
131
+ bash codacy.sh report -l Ruby -r ./coverage/final.lcov
132
+ push_to_ruby_gems:
133
+ executor: app47_executor
134
+ resource_class: small
135
+ steps:
136
+ - setup_environment
137
+ - run:
138
+ name: Push to RubyGems
139
+ shell: /bin/bash -lx
140
+ command: |
141
+ GEM_VERSION=$(grep 'VERSION = ' lib/web47sso/version.rb | awk -F "'" '{print $2}')
142
+ gem list -r -e web47sso
143
+ if gem list -r -e web47sso | grep "${GEM_VERSION}"; then
144
+ echo "Gem version ${GEM_VERSION} already exists on Rubygems. Skipping push."
145
+ else
146
+ echo "Gem version ${GEM_VERSION} not found on Rubygems. Proceeding with push."
147
+ gem build
148
+ gem push web47sso-"${GEM_VERSION}".gem
149
+ fi
150
+
151
+ workflows:
152
+ version: 2
153
+ build_and_test:
154
+ jobs:
155
+ - update_vendor_cache
156
+ - controllers:
157
+ requires:
158
+ - update_vendor_cache
159
+ - models:
160
+ requires:
161
+ - update_vendor_cache
162
+ - jobs:
163
+ requires:
164
+ - update_vendor_cache
165
+ - report_to_codacy:
166
+ requires:
167
+ - controllers
168
+ - models
169
+ - jobs
170
+ - push_to_ruby_gems:
171
+ requires:
172
+ - report_to_codacy
data/.gitignore ADDED
@@ -0,0 +1,59 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ # for a library or gem, you might want to ignore these files since the code is
42
+ # intended to run in multiple environments; otherwise, check them in:
43
+ # Gemfile.lock
44
+ # .ruby-version
45
+ # .ruby-gemset
46
+
47
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
48
+ .rvmrc
49
+
50
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
51
+ # .rubocop-https?--*
52
+ vendor/*
53
+ tmp/*
54
+ log
55
+ log/*
56
+ *.tmproj
57
+ *.json
58
+ .idea/*
59
+ test/fixtures/files/aws/ec2.yml
data/.rubocop.yml ADDED
@@ -0,0 +1,34 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'bin/**/*'
4
+ - 'config/**/*'
5
+ - 'test/**/*'
6
+ - 'lib/**/*'
7
+ - 'vendor/**/*'
8
+
9
+ Metrics/LineLength:
10
+ Max: 120
11
+
12
+ Metrics/ClassLength:
13
+ Max: 600
14
+
15
+ Metrics/ModuleLength:
16
+ Max: 600
17
+
18
+ Metrics/MethodLength:
19
+ Max: 40
20
+
21
+ Metrics/AbcSize:
22
+ Max: 40
23
+
24
+ Metrics/CyclomaticComplexity:
25
+ Max: 15
26
+
27
+ Metrics/PerceivedComplexity:
28
+ Max: 15
29
+
30
+ Metrics/MaxOptionalParameters:
31
+ Max: 8
32
+
33
+ Naming/RescuedExceptionsVariableName:
34
+ PreferredName: error
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.3
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.10
7
+ before_install: gem install bundler -v 1.17.2
@@ -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 chris@app47.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,5 @@
1
+ source "https://rubygems.org"
2
+ ruby '3.2.3'
3
+
4
+ # Specify your gem's dependencies in web47sso.gemspec
5
+ gemspec