gem 'pkg-config', '~> 1.3'
gem 'puma', '~> 3.11'
-gem 'rails', '~> 5.2.0'
+gem 'rails', '~> 5.2.1'
gem 'hamlit-rails', '~> 0.2'
gem 'pg', '~> 1.0'
GEM
remote: https://rubygems.org/
specs:
- actioncable (5.2.0)
- actionpack (= 5.2.0)
+ actioncable (5.2.1)
+ actionpack (= 5.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailer (5.2.0)
- actionpack (= 5.2.0)
- actionview (= 5.2.0)
- activejob (= 5.2.0)
+ actionmailer (5.2.1)
+ actionpack (= 5.2.1)
+ actionview (= 5.2.1)
+ activejob (= 5.2.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (5.2.0)
- actionview (= 5.2.0)
- activesupport (= 5.2.0)
+ actionpack (5.2.1)
+ actionview (= 5.2.1)
+ activesupport (= 5.2.1)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.2.0)
- activesupport (= 5.2.0)
+ actionview (5.2.1)
+ activesupport (= 5.2.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
active_record_query_trace (1.5.4)
- activejob (5.2.0)
- activesupport (= 5.2.0)
+ activejob (5.2.1)
+ activesupport (= 5.2.1)
globalid (>= 0.3.6)
- activemodel (5.2.0)
- activesupport (= 5.2.0)
- activerecord (5.2.0)
- activemodel (= 5.2.0)
- activesupport (= 5.2.0)
+ activemodel (5.2.1)
+ activesupport (= 5.2.1)
+ activerecord (5.2.1)
+ activemodel (= 5.2.1)
+ activesupport (= 5.2.1)
arel (>= 9.0)
- activestorage (5.2.0)
- actionpack (= 5.2.0)
- activerecord (= 5.2.0)
+ activestorage (5.2.1)
+ actionpack (= 5.2.1)
+ activerecord (= 5.2.1)
marcel (~> 0.3.1)
- activesupport (5.2.0)
+ activesupport (5.2.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
httplog (1.0.2)
colorize (~> 0.8)
rack (>= 1.0)
- i18n (1.0.1)
+ i18n (1.1.0)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.21)
activesupport (>= 4.0.2)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (4.2.0)
- nio4r (2.3.0)
- nokogiri (1.8.2)
+ nio4r (2.3.1)
+ nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
nokogumbo (1.5.0)
nokogiri
puma (3.11.4)
pundit (1.1.0)
activesupport (>= 3.0.0)
- rack (2.0.4)
+ rack (2.0.5)
rack-attack (5.2.0)
rack
rack-cors (1.0.2)
rack
rack-proxy (0.6.4)
rack
- rack-test (1.0.0)
+ rack-test (1.1.0)
rack (>= 1.0, < 3)
- rails (5.2.0)
- actioncable (= 5.2.0)
- actionmailer (= 5.2.0)
- actionpack (= 5.2.0)
- actionview (= 5.2.0)
- activejob (= 5.2.0)
- activemodel (= 5.2.0)
- activerecord (= 5.2.0)
- activestorage (= 5.2.0)
- activesupport (= 5.2.0)
+ rails (5.2.1)
+ actioncable (= 5.2.1)
+ actionmailer (= 5.2.1)
+ actionpack (= 5.2.1)
+ actionview (= 5.2.1)
+ activejob (= 5.2.1)
+ activemodel (= 5.2.1)
+ activerecord (= 5.2.1)
+ activestorage (= 5.2.1)
+ activesupport (= 5.2.1)
bundler (>= 1.3.0)
- railties (= 5.2.0)
+ railties (= 5.2.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
railties (>= 5.0, < 6)
rails-settings-cached (0.6.6)
rails (>= 4.2.0)
- railties (5.2.0)
- actionpack (= 5.2.0)
- activesupport (= 5.2.0)
+ railties (5.2.1)
+ actionpack (= 5.2.1)
+ activesupport (= 5.2.1)
method_source
rake (>= 0.8.7)
- thor (>= 0.18.1, < 2.0)
+ thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (12.3.1)
rb-fsevent (0.10.3)
pundit (~> 1.1)
rack-attack (~> 5.2)
rack-cors (~> 1.0)
- rails (~> 5.2.0)
+ rails (~> 5.2.1)
rails-controller-testing (~> 1.0)
rails-i18n (~> 5.1)
rails-settings-cached (~> 0.6)
ruby 2.5.0p0
BUNDLED WITH
- 1.16.2
+ 1.16.3
describe 'POST #update' do
context 'with valid post data' do
before do
- request.env['RAW_POST_DATA'] = File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml'))
- post :update, params: { id: account.id }
+ post :update, params: { id: account.id }, body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml'))
end
it 'contains XML in the request body' do
context 'with empty post data' do
before do
- request.env['RAW_POST_DATA'] = ''
- post :update, params: { id: account.id }
+ post :update, params: { id: account.id }, body: ''
end
it 'returns http client error' do
service = double(call: false)
allow(VerifySalmonService).to receive(:new).and_return(service)
- request.env['RAW_POST_DATA'] = File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml'))
- post :update, params: { id: account.id }
+ post :update, params: { id: account.id }, body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml'))
end
it 'returns http client error' do
stub_request(:any, "https://mastodon.social/users/Gargron").to_return(status: 404)
request.env['HTTP_X_HUB_SIGNATURE'] = "sha1=#{OpenSSL::HMAC.hexdigest('sha1', 'abc', feed)}"
- request.env['RAW_POST_DATA'] = feed
- post :update, params: { id: account.id }
+ post :update, params: { id: account.id }, body: feed
end
it 'returns http success' do
end
it 'returns nil when body has been tampered' do
- request.headers['RAW_POST_DATA'] = 'doo doo doo'
+ post :success, body: 'doo doo doo'
expect(controller.signed_request_account).to be_nil
end
end