fix some rubocop warnings
the last one will be fixed with the next rubocop release
This commit is contained in:
parent
1ee03a1e66
commit
eabe1135ee
7 changed files with 10 additions and 12 deletions
4
Gemfile
4
Gemfile
|
|
@ -32,8 +32,8 @@ end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
# rspec formatter
|
# rspec formatter
|
||||||
gem "fuubar", "2.0.0", require: false
|
gem "fuubar", "2.0.0", require: false
|
||||||
gem "nyan-cat-formatter", require: false
|
gem "nyan-cat-formatter", require: false
|
||||||
|
|
||||||
# test coverage
|
# test coverage
|
||||||
gem "simplecov", "0.10.0", require: false
|
gem "simplecov", "0.10.0", require: false
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ Gem::Specification.new do |s|
|
||||||
s.description = "A rails engine that adds the diaspora* federation protocol to a rails app"
|
s.description = "A rails engine that adds the diaspora* federation protocol to a rails app"
|
||||||
s.license = "AGPL 3.0 - http://www.gnu.org/licenses/agpl-3.0.html"
|
s.license = "AGPL 3.0 - http://www.gnu.org/licenses/agpl-3.0.html"
|
||||||
|
|
||||||
s.files = Dir["app/**/*", "config/routes.rb", "lib/diaspora_federation/{engine,rails}.rb",
|
s.files = Dir["app/**/*", "config/routes.rb", "lib/diaspora_federation/{engine,rails}.rb",
|
||||||
"LICENSE", "README.md"]
|
"LICENSE", "README.md"]
|
||||||
|
|
||||||
s.required_ruby_version = "~> 2.0"
|
s.required_ruby_version = "~> 2.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
||||||
"among the various installations of Diaspora*"
|
"among the various installations of Diaspora*"
|
||||||
s.license = "AGPL 3.0 - http://www.gnu.org/licenses/agpl-3.0.html"
|
s.license = "AGPL 3.0 - http://www.gnu.org/licenses/agpl-3.0.html"
|
||||||
|
|
||||||
s.files = Dir["lib/**/*", "LICENSE", "README.md"] - Dir["lib/diaspora_federation/{engine,rails}.rb"]
|
s.files = Dir["lib/**/*", "LICENSE", "README.md"] - Dir["lib/diaspora_federation/{engine,rails}.rb"]
|
||||||
|
|
||||||
s.required_ruby_version = "~> 2.0"
|
s.required_ruby_version = "~> 2.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ module DiasporaFederation
|
||||||
links = data[:links]
|
links = data[:links]
|
||||||
|
|
||||||
# TODO: remove! public key is deprecated in webfinger
|
# TODO: remove! public key is deprecated in webfinger
|
||||||
public_key = parse_link(links, REL_PUBKEY)
|
public_key = parse_link(links, REL_PUBKEY)
|
||||||
|
|
||||||
new(
|
new(
|
||||||
acct_uri: data[:subject],
|
acct_uri: data[:subject],
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,7 @@ FactoryGirl.define do
|
||||||
diaspora_id
|
diaspora_id
|
||||||
url "http://localhost:3000/"
|
url "http://localhost:3000/"
|
||||||
serialized_public_key { generate(:public_key) }
|
serialized_public_key { generate(:public_key) }
|
||||||
after(:create) do |u|
|
after(:create, &:save)
|
||||||
u.save
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :webfinger, class: DiasporaFederation::Discovery::WebFinger do
|
factory :webfinger, class: DiasporaFederation::Discovery::WebFinger do
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ module DiasporaFederation
|
||||||
|
|
||||||
%i(hcard_url profile_url atom_url).each do |prop|
|
%i(hcard_url profile_url atom_url).each do |prop|
|
||||||
describe "##{prop}" do
|
describe "##{prop}" do
|
||||||
it_behaves_like "a url validator without path" do
|
it_behaves_like "a url validator without path" do
|
||||||
let(:property) { prop }
|
let(:property) { prop }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ class Person < ActiveRecord::Base
|
||||||
def atom_url; "#{url}public/#{nickname}.atom" end
|
def atom_url; "#{url}public/#{nickname}.atom" end
|
||||||
def salmon_url; "#{url}receive/users/#{guid}" end
|
def salmon_url; "#{url}receive/users/#{guid}" end
|
||||||
|
|
||||||
def nickname; diaspora_id.split("@")[0] end
|
def nickname; diaspora_id.split("@")[0] end
|
||||||
|
|
||||||
def photo_default_url; "#{url}assets/user/default.png" end
|
def photo_default_url; "#{url}assets/user/default.png" end
|
||||||
|
|
||||||
def searchable; true end
|
def searchable; true end
|
||||||
def full_name; "Dummy User" end
|
def full_name; "Dummy User" end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue