Skip to content

Commit

Permalink
#66 Update Ruby dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerluan authored Jun 13, 2024
2 parents 08b61f5 + 4fdbb94 commit c567a3c
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 73 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/kotlin-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Kotlin Tests
on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest # Assuming Kotlin projects can be built on Linux
Expand All @@ -21,7 +25,6 @@ jobs:
${{ runner.os }}-gradle-
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true # Runs 'bundle install' and caches installed gems automatically
- name: Generate Kotlin Code & Run Tests
run: bundle exec rake test_kotlin
18 changes: 0 additions & 18 deletions .github/workflows/pull-request.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ on:
push:
branches:
- main
pull_request:
jobs:
test:
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
strategy:
fail-fast: false
matrix:
Expand All @@ -20,5 +19,5 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
- name: Run tests and linter
run: bundle exec rake
7 changes: 5 additions & 2 deletions .github/workflows/swift-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Swift Tests
on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: macos-latest
Expand All @@ -8,7 +12,6 @@ jobs:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true # Runs 'bundle install' and caches installed gems automatically
- name: Generate Swift Code & Run Tests
run: bundle exec rake test_swift
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.3.3
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ source "https://rubygems.org"
# Specify your gem's dependencies in arkana.gemspec
gemspec

gem "bundler", "< 2.5" # 2.4.x is the latest that supports Ruby 2.7, which is the minimum required by Arkana
gem "rake"
gem "rspec"
gem "rubocop"
Expand Down
71 changes: 33 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,61 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
base64 (0.1.1)
diff-lcs (1.5.0)
diff-lcs (1.5.1)
docile (1.4.0)
dotenv (2.8.1)
json (2.6.3)
json (2.7.2)
language_server-protocol (3.17.0.3)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.25.1)
parser (3.3.3.0)
ast (~> 2.4.1)
racc
pastel (0.8.0)
tty-color (~> 0.5)
racc (1.7.1)
racc (1.8.0)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.0)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.56.3)
base64 (~> 0.1.1)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.64.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.24.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
strscan (3.1.0)
tty-color (0.6.0)
tty-cursor (0.7.1)
tty-prompt (0.23.1)
Expand All @@ -80,19 +74,20 @@ GEM
tty-cursor (~> 0.7)
tty-screen (~> 0.8)
wisper (~> 2.0)
tty-screen (0.8.1)
unicode-display_width (2.4.2)
tty-screen (0.8.2)
unicode-display_width (2.5.0)
wisper (2.0.1)
yaml (0.3.0)

PLATFORMS
arm64-darwin-21
arm64-darwin-23
ruby
x86_64-darwin-19
x86_64-linux

DEPENDENCIES
arkana!
bundler (< 2.5)
rake
rspec
rubocop
Expand All @@ -102,4 +97,4 @@ DEPENDENCIES
tty-prompt

BUNDLED WITH
2.2.32
2.3.27
5 changes: 2 additions & 3 deletions lib/arkana/encoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ def self.encode(string, cipher)
result << (byte ^ cipher[index % cipher.length]) # XOR operation with a value of the cipher array.
end

encoded_key = []
result.each do |element|
encoded_key = result.map do |element|
# Warning: this might be specific to Swift implementation. When generating code for other languages, beware.
encoded_key << format("%#x", element) # Format the binary number to "0xAB" format.
format("%#x", element) # Format the binary number to "0xAB" format.
end

encoded_key.join(", ")
Expand Down
5 changes: 2 additions & 3 deletions lib/arkana/models/salt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ class Salt

def initialize(raw:)
@raw = raw
formatted_salt = []
raw.each do |element|
formatted_salt = raw.map do |element|
# Warning: this might be specific to Swift implementation. When generating code for other languages, beware.
formatted_salt << format("%#x", element)
format("%#x", element)
end
@formatted = formatted_salt.join(", ")
end
Expand Down
4 changes: 2 additions & 2 deletions spec/models/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
end
end

describe `#environment_keys` do
describe "#environment_keys" do
context "when there are no environments" do
subject { super().environment_keys }

Expand Down Expand Up @@ -130,7 +130,7 @@
end
end

describe `#all_keys` do
describe "#all_keys" do
it "is not empty" do
expect(subject.all_keys).not_to be_empty
end
Expand Down
2 changes: 1 addition & 1 deletion spec/models/secret_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
end
end

describe `#environment` do
describe "#environment" do
subject { super().environment }

context "when key is equal to protocol_key" do
Expand Down

0 comments on commit c567a3c

Please sign in to comment.