Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatability with symbol-fstring #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ gemspec
gem 'rubyzip'

gem 'activeresource', git: 'https://github.com/basecamp/activeresource.git'

gem 'symbol-fstring', require: 'fstring/all'
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ GEM
rubyzip (2.3.2)
sqlite3 (1.6.3-arm64-darwin)
sqlite3 (1.6.3-x86_64-linux)
symbol-fstring (1.0.2)
thor (1.2.2)
timeout (0.4.0)
tzinfo (2.0.6)
Expand All @@ -210,6 +211,7 @@ GEM

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-linux

DEPENDENCIES
Expand All @@ -227,6 +229,7 @@ DEPENDENCIES
rubocop-rails
rubyzip
sqlite3
symbol-fstring

BUNDLED WITH
2.3.22
6 changes: 6 additions & 0 deletions test/auditing_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ class AuditingTest < ActiveSupport::TestCase
assert_not Console1984::Command.last.sensitive?
end

test "commands in protected mode on namespaced objects are not flagged as sensitive" do
@console.execute "puts ::Namespaced::Thing.last.name"

assert_not Console1984::Command.last.sensitive?, @console.output
end

test "commands in unprotected mode are justified and flagged as sensitive" do
assert_difference -> { Console1984::SensitiveAccess.count }, +1 do
type_when_prompted "I need to fix encoding issue with Message 123456" do
Expand Down
6 changes: 6 additions & 0 deletions test/dummy/app/models/namespaced/thing.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

class Namespaced::Thing < ApplicationRecord
self.table_name = "people"
encrypts :name
end