+++ /dev/null
-service_name: travis-ci
directory: "/"
schedule:
interval: "daily"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
--- /dev/null
+name: Lint
+on:
+ - push
+ - pull_request
+env:
+ os: ubuntu-20.04
+ ruby: 2.7
+jobs:
+ rubocop:
+ name: RuboCop
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+ - name: Setup ruby
+ uses: actions/setup-ruby@v1.1.2
+ with:
+ ruby-version: ${{ env.ruby }}
+ - name: Cache gems
+ uses: actions/cache@v2
+ with:
+ path: vendor/bundle
+ key: bundle-${{ env.os }}-${{ env.ruby }}-${{ hashFiles('Gemfile.lock') }}
+ restore-keys: |
+ bundle-${{ env.os }}-${{ env.ruby }}-
+ - name: Install gems
+ run: |
+ gem install bundler
+ bundle config set deployment true
+ bundle install --jobs 4 --retry 3
+ - name: Run rubocop
+ run: bundle exec rubocop --format fuubar
+ erblint:
+ name: ERB Lint
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+ - name: Setup ruby
+ uses: actions/setup-ruby@v1.1.2
+ with:
+ ruby-version: ${{ env.ruby }}
+ - name: Cache gems
+ uses: actions/cache@v2
+ with:
+ path: vendor/bundle
+ key: bundle-${{ env.os }}-${{ env.ruby }}-${{ hashFiles('Gemfile.lock') }}
+ restore-keys: |
+ bundle-${{ env.os }}-${{ env.ruby }}-
+ - name: Install gems
+ run: |
+ gem install bundler
+ bundle config set deployment true
+ bundle install --jobs 4 --retry 3
+ - name: Run erblint
+ run: bundle exec erblint .
+ eslint:
+ name: ESLint
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+ - name: Setup ruby
+ uses: actions/setup-ruby@v1.1.2
+ with:
+ ruby-version: ${{ env.ruby }}
+ - name: Cache gems
+ uses: actions/cache@v2
+ with:
+ path: vendor/bundle
+ key: bundle-${{ env.os }}-${{ env.ruby }}-${{ hashFiles('Gemfile.lock') }}
+ restore-keys: |
+ bundle-${{ env.os }}-${{ env.ruby }}-
+ - name: Cache node modules
+ uses: actions/cache@v1
+ with:
+ path: node_modules
+ key: yarn-${{ env.os }}-${{ hashFiles('yarn.lock') }}
+ restore-keys: |
+ yarn-${{ env.os }}-
+ - name: Install gems
+ run: |
+ gem install bundler
+ bundle config set deployment true
+ bundle install --jobs 4 --retry 3
+ - name: Install node modules
+ run: bundle exec rake yarn:install
+ - name: Create dummy database configuration
+ run: cp config/example.database.yml config/database.yml
+ - name: Run eslint
+ run: bundle exec rake eslint
+ brakeman:
+ name: Brakeman
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+ - name: Setup ruby
+ uses: actions/setup-ruby@v1.1.2
+ with:
+ ruby-version: ${{ env.ruby }}
+ - name: Cache gems
+ uses: actions/cache@v2
+ with:
+ path: vendor/bundle
+ key: bundle-${{ env.os }}-${{ env.ruby }}-${{ hashFiles('Gemfile.lock') }}
+ restore-keys: |
+ bundle-${{ env.os }}-${{ env.ruby }}-
+ - name: Install gems
+ run: |
+ gem install bundler
+ bundle config set deployment true
+ bundle install --jobs 4 --retry 3
+ - name: Run brakeman
+ run: bundle exec brakeman -q
--- /dev/null
+name: Tests
+on:
+ - push
+ - pull_request
+jobs:
+ test:
+ name: Ubuntu ${{ matrix.ubuntu }}, Ruby ${{ matrix.ruby }}
+ strategy:
+ matrix:
+ ubuntu: [18.04, 20.04]
+ ruby: [2.5, 2.7]
+ runs-on: ubuntu-${{ matrix.ubuntu }}
+ env:
+ RAILS_ENV: test
+ OPENSTREETMAP_MEMCACHE_SERVERS: 127.0.0.1
+ steps:
+ - name: Checkout source
+ uses: actions/checkout@v1
+ - name: Setup ruby
+ uses: actions/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ - name: Cache gems
+ uses: actions/cache@v1
+ with:
+ path: vendor/bundle
+ key: bundle-ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}-${{ hashFiles('Gemfile.lock') }}
+ restore-keys: |
+ bundle-ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}-
+ - name: Cache node modules
+ uses: actions/cache@v1
+ with:
+ path: node_modules
+ key: yarn-ubuntu-${{ matrix.ubuntu }}-${{ hashFiles('yarn.lock') }}
+ restore-keys: |
+ yarn-ubuntu-${{ matrix.ubuntu }}-
+ - name: Install packages
+ run: |
+ sudo apt-get -yqq update
+ sudo apt-get -yqq install memcached
+ - name: Install gems
+ run: |
+ gem install bundler
+ bundle config set deployment true
+ bundle install --jobs 4 --retry 3
+ - name: Create database
+ run: |
+ sudo systemctl start postgresql
+ sudo -u postgres createuser -s $(id -un)
+ createdb openstreetmap
+ psql -c "CREATE EXTENSION btree_gist" openstreetmap
+ psql -f db/functions/functions.sql openstreetmap
+ - name: Configure rails
+ run: |
+ cp config/github.database.yml config/database.yml
+ cp config/example.storage.yml config/storage.yml
+ touch config/settings.local.yml
+ - name: Populate database
+ run: |
+ sed -f script/normalise-structure db/structure.sql > db/structure.expected
+ bundle exec rake db:migrate
+ sed -f script/normalise-structure db/structure.sql > db/structure.actual
+ diff -uw db/structure.expected db/structure.actual
+ - name: Export javascript strings
+ run: bundle exec rake i18n:js:export
+ - name: Install node modules
+ run: bundle exec rake yarn:install
+ - name: Run tests
+ run: bundle exec rake test:db
+ - name: Report completion to Coveralls
+ uses: coverallsapp/github-action@v1.1.2
+ with:
+ github-token: ${{ secrets.github_token }}
+ flag-name: ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}
+ parallel: true
+ finish:
+ name: Finalise
+ needs: test
+ runs-on: ubuntu-latest
+ steps:
+ - name: Report completion to Coveralls
+ uses: coverallsapp/github-action@v1.1.2
+ with:
+ github-token: ${{ secrets.github_token }}
+ parallel-finished: true
+++ /dev/null
-dist: bionic
-language: ruby
-rvm:
- - 2.7.0
-cache:
- - bundler
-addons:
- postgresql: 9.5
- apt:
- packages:
- - firefox-geckodriver
- - libarchive-dev
- - libgd-dev
- - libffi-dev
- - libbz2-dev
-services:
- - memcached
-before_script:
- - sed -e 's/ IMMUTABLE / /' -e "/^--/d" db/structure.sql > db/structure.expected
- - psql -U postgres -c "CREATE DATABASE openstreetmap"
- - psql -U postgres -c "CREATE EXTENSION btree_gist" openstreetmap
- - psql -U postgres -f db/functions/functions.sql openstreetmap
- - cp config/travis.database.yml config/database.yml
- - cp config/example.storage.yml config/storage.yml
- - touch config/settings.local.yml
- - echo -e "---\nmemcache_servers:\n - 127.0.0.1" > config/settings/test.local.yml
- - bundle exec rake db:migrate
- - bundle exec rake i18n:js:export
- - bundle exec rake yarn:install
-script:
- - bundle exec rubocop -f fuubar
- - bundle exec rake eslint
- - bundle exec erblint .
- - bundle exec brakeman -q
- - bundle exec rake db:structure:dump
- - sed -e "/idle_in_transaction_session_timeout/d" -e 's/ IMMUTABLE / /' -e "/^--/d" db/structure.sql > db/structure.actual
- - diff -uw db/structure.expected db/structure.actual
- - bundle exec rake test:db
group :test do
gem "brakeman"
gem "capybara", ">= 2.15"
- gem "coveralls", :require => false
gem "erb_lint", :require => false
gem "factory_bot_rails"
gem "minitest", "~> 5.1"
gem "rubocop-performance"
gem "rubocop-rails"
gem "selenium-webdriver"
+ gem "simplecov", :require => false
+ gem "simplecov-lcov", :require => false
gem "webmock"
end
config (2.2.3)
deep_merge (~> 1.2, >= 1.2.1)
dry-validation (~> 1.0, >= 1.0.0)
- coveralls (0.8.23)
- json (>= 1.8, < 3)
- simplecov (~> 0.16.1)
- term-ansicolor (~> 1.3)
- thor (>= 0.19.4, < 2.0)
- tins (~> 1.6)
crack (0.4.4)
crass (1.0.6)
dalli (2.7.11)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
+ simplecov-lcov (0.8.0)
smart_properties (1.15.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
sprockets (>= 3.0.0)
strong_migrations (0.7.3)
activerecord (>= 5)
- sync (0.5.0)
- term-ansicolor (1.7.1)
- tins (~> 1.0)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
- tins (1.26.0)
- sync
tzinfo (1.2.8)
thread_safe (~> 0.1)
uglifier (4.2.0)
capybara (>= 2.15)
composite_primary_keys (~> 12.0.0)
config
- coveralls
dalli
delayed_job_active_record
dynamic_form
sassc-rails
secure_headers
selenium-webdriver
+ simplecov
+ simplecov-lcov
strong_migrations
uglifier (>= 1.3.0)
validates_email_format_of (>= 1.5.1)
# "The Rails Port"
-[![Build Status](https://travis-ci.org/openstreetmap/openstreetmap-website.svg?branch=master)](https://travis-ci.org/openstreetmap/openstreetmap-website)
+[![Lint](https://github.com/openstreetmap/openstreetmap-website/workflows/Lint/badge.svg?branch=master&event=push)](https://github.com/openstreetmap/openstreetmap-website/actions?query=workflow%3ALint%20branch%3Amaster%20event%3Apush)
+[![Tests](https://github.com/openstreetmap/openstreetmap-website/workflows/Tests/badge.svg?branch=master&event=push)](https://github.com/openstreetmap/openstreetmap-website/actions?query=workflow%3ATests%20branch%3Amaster%20event%3Apush)
[![Coverage Status](https://coveralls.io/repos/openstreetmap/openstreetmap-website/badge.svg?branch=master)](https://coveralls.io/r/openstreetmap/openstreetmap-website?branch=master)
This is The Rails Port, the [Ruby on Rails](http://rubyonrails.org/)
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#231f20;}.b{fill:#fff;}</style></defs><rect class="a" width="36" height="36"/><path class="b" d="M19.15,19.33a1.73,1.73,0,1,0,1.72-1.83,1.76,1.76,0,0,0-1.72,1.83Zm9,3.64H26V13.33h2.18Zm3.44-11.45.73-2.32L27.7,7.75,24.5,17.94a4.25,4.25,0,0,1,.25,1.39,3.77,3.77,0,0,1-3.88,3.84,3.79,3.79,0,0,1-2.43-.8l-.62,2.69L22,26l-.78,2.47,4.61,1.45,1.44-4.6,4.09.49.37-3.13a1.46,1.46,0,0,1-2.39-1.11,1.45,1.45,0,0,1,2.62-.85l1.08-9Zm-20.5,8.1h2l-1-3.36Zm9.79-4.14a3.69,3.69,0,0,1,3.57,2.32l2.22-9.7L22,7l-.41,1.8-.86-.56-5.42,8.3,1.79-5.69L12.44,9.42l-1.23,3.91h1.85L16.82,23h-2.6l-.47-1.4H10.41L9.9,23H7.32l3.21-8.14,2.28-8.65L8.14,5,3,24.46l4.35,1.15-1.26,4,4.61,1.45,1.7-5.39,1.88,1.23,3.44-5.27A4.07,4.07,0,0,1,17,19.33a3.77,3.77,0,0,1,3.87-3.85"/></svg>
\ No newline at end of file
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#1877f2;}.b{fill:#fff;}</style></defs><rect class="a" width="36" height="36"/><path class="b" d="M25,23.2,25.8,18h-5V14.62a2.61,2.61,0,0,1,2.94-2.81H26V7.38A27.8,27.8,0,0,0,22,7c-4.12,0-6.8,2.49-6.8,7v4H10.62v5.2h4.57V36h5.62V23.2Z"/></svg>
\ No newline at end of file
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#191717;}.b{fill:#fff;fill-rule:evenodd;}</style></defs><rect class="a" width="36" height="36"/><path class="b" d="M18,4a14,14,0,0,0-4.41,27.23c.7.13.93-.3.93-.66V28.23c-3.88.85-4.66-1.86-4.66-1.86a3.78,3.78,0,0,0-1.57-2.05c-1.26-.87.11-.85.11-.85a2.92,2.92,0,0,1,2.13,1.45,3,3,0,0,0,4,1.17h0a3,3,0,0,1,.89-1.87c-3.11-.35-6.37-1.55-6.37-6.91a5.43,5.43,0,0,1,1.43-3.72,5.06,5.06,0,0,1,.14-3.73s1.17-.37,3.85,1.43a13.2,13.2,0,0,1,7,0c2.67-1.85,3.85-1.46,3.85-1.46a5.09,5.09,0,0,1,.14,3.74,5.44,5.44,0,0,1,1.44,3.72c0,5.36-3.28,6.52-6.38,6.89a3.37,3.37,0,0,1,.94,2.56v3.83c0,.45.26.81.93.67A14,14,0,0,0,18,4Z"/></svg>
\ No newline at end of file
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#fff;}.b{fill:#4285f4;}.b,.c,.d,.e{fill-rule:evenodd;}.c{fill:#34a853;}.d{fill:#fbbc05;}.e{fill:#ea4335;}.f{fill:none;}</style></defs><rect class="a" width="36" height="36"/><path class="b" d="M31.44,18.31a16.07,16.07,0,0,0-.26-2.85H18v5.41h7.54a6.44,6.44,0,0,1-2.8,4.22v3.5h4.52A13.63,13.63,0,0,0,31.44,18.3Z"/><path class="c" d="M18,32a13.28,13.28,0,0,0,9.26-3.4l-4.52-3.5a8.42,8.42,0,0,1-11.65-2.51,8.28,8.28,0,0,1-.92-1.92H5.51V24.3A14,14,0,0,0,18,32Z"/><path class="d" d="M10.17,20.66a8.22,8.22,0,0,1,0-5.32V11.71H5.5a14.06,14.06,0,0,0,0,12.58Z"/><path class="e" d="M18,9.56a7.63,7.63,0,0,1,5.36,2.1l4-4A13.45,13.45,0,0,0,18,4,14,14,0,0,0,5.49,11.71l4.67,3.63A8.33,8.33,0,0,1,18,9.51Z"/><path class="f" d="M4,4H32V32H4Z"/></svg>
\ No newline at end of file
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#fff;}.b{fill-rule:evenodd;}</style></defs><rect class="a" width="36" height="36"/><path class="b" d="M33,8.82a.47.47,0,0,1-.1.3.31.31,0,0,1-.22.13,2.81,2.81,0,0,0-1.62.63,5.89,5.89,0,0,0-1.29,2.06L23,27.28c0,.15-.17.22-.37.22a.41.41,0,0,1-.38-.22l-3.82-8-4.39,8a.41.41,0,0,1-.37.22.37.37,0,0,1-.39-.22L6.55,11.94a5.41,5.41,0,0,0-1.32-2,3.6,3.6,0,0,0-1.93-.7.27.27,0,0,1-.21-.12A.38.38,0,0,1,3,8.88c0-.25.07-.38.21-.38.6,0,1.22,0,1.87.08s1.18.08,1.71.08,1.19,0,1.93-.08,1.45-.08,2-.08c.14,0,.21.13.21.38s0,.37-.13.37a2.71,2.71,0,0,0-1.41.45,1.22,1.22,0,0,0-.51,1,2.11,2.11,0,0,0,.21.8L14.67,24l3.14-5.93-2.93-6.13a7.84,7.84,0,0,0-1.29-2.11,2.56,2.56,0,0,0-1.54-.58.24.24,0,0,1-.18-.12.44.44,0,0,1-.08-.25c0-.25.06-.38.18-.38a16.22,16.22,0,0,1,1.64.08,12.58,12.58,0,0,0,1.54.08,16.71,16.71,0,0,0,1.69-.08c.62-.05,1.22-.08,1.82-.08.14,0,.21.13.21.38s0,.37-.13.37c-1.19.08-1.79.42-1.79,1a3.21,3.21,0,0,0,.42,1.24l1.93,3.93,1.92-3.59a2.88,2.88,0,0,0,.41-1.28c0-.82-.6-1.26-1.79-1.31-.11,0-.16-.13-.16-.37a.48.48,0,0,1,.07-.26c.06-.08.11-.12.17-.12.42,0,.95,0,1.57.08s1.09.08,1.47.08.68,0,1.21-.07,1.25-.09,1.7-.09c.11,0,.16.11.16.32s-.1.43-.29.43a3.35,3.35,0,0,0-1.68.57,7.38,7.38,0,0,0-1.58,2.12l-2.56,4.75,3.47,7.07,5.12-11.92a3.2,3.2,0,0,0,.27-1.2c0-.87-.6-1.34-1.79-1.39-.11,0-.16-.13-.16-.37s.08-.38.24-.38c.44,0,.95,0,1.55.08A12.92,12.92,0,0,0,30,8.66a11.78,11.78,0,0,0,1.36-.08c.54-.05,1-.08,1.44-.08C32.94,8.5,33,8.61,33,8.82Z"/></svg>
\ No newline at end of file
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#575352;}.b{fill:#f25022;}.c{fill:#7fba00;}.d{fill:#00a4ef;}.e{fill:#ffb900;}</style></defs><rect class="a" width="36" height="36"/><rect class="b" x="4" y="3.99" width="13.31" height="13.31"/><rect class="c" x="18.69" y="3.99" width="13.31" height="13.31"/><rect class="d" x="4" y="18.69" width="13.31" height="13.3"/><rect class="e" x="18.69" y="18.69" width="13.31" height="13.3"/></svg>
\ No newline at end of file
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#32373c;}.b{fill:#fff;}</style></defs><rect class="a" width="36" height="36"/><path class="b" d="M6,18a12,12,0,0,0,6.76,10.8L7,13.12A11.89,11.89,0,0,0,6,18Zm20.09-.6a6.38,6.38,0,0,0-1-3.32,5.48,5.48,0,0,1-1.21-2.8,2.08,2.08,0,0,1,2-2.13h.16A12,12,0,0,0,9.16,9.9,12.18,12.18,0,0,0,8,11.41h.76c1.26,0,3.2-.16,3.2-.16a.49.49,0,0,1,.39.59.48.48,0,0,1-.32.37s-.65.08-1.37.12l4.37,13,2.63-7.88-1.88-5.11a7.37,7.37,0,0,1-1.25-.12.5.5,0,0,1-.3-.64.52.52,0,0,1,.38-.32s2,.16,3.15.16,3.2-.13,3.2-.13a.5.5,0,0,1,.39.59.48.48,0,0,1-.32.37s-.64.08-1.37.12L24,25.26l1.23-3.93A14,14,0,0,0,26.1,17.4Zm-7.89,1.65-3.6,10.47a12,12,0,0,0,7.37-.2l-.09-.16Zm10.34-6.81a10.32,10.32,0,0,1,.08,1.24,11.35,11.35,0,0,1-.91,4.3L24.05,28.34A12,12,0,0,0,28.55,12.24Z"/><path class="b" d="M32.49,18A14.49,14.49,0,1,1,18,3.51,14.49,14.49,0,0,1,32.49,18ZM18,4.38A13.62,13.62,0,1,0,31.62,18h0A13.62,13.62,0,0,0,18,4.38Z"/></svg>
\ No newline at end of file
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><defs><style>.a{fill:#6001d2;}.b{fill:#fff;fill-rule:evenodd;}</style></defs><rect class="a" width="36" height="36"/><path class="b" d="M16.55,12.38l-3,7.22-3-7.22h-5l5.53,12.4-2,4.47H14l7.36-16.87ZM22.37,19a3,3,0,0,0-3.12,2.9,2.89,2.89,0,0,0,3,2.8,3,3,0,0,0,3.12-2.9,2.87,2.87,0,0,0-3-2.8M25.86,6.85,20.93,17.91h5.51L31.37,6.85Z"/></svg>
\ No newline at end of file
.diary-subscribe-buttons {
- position:relative;
+ position: relative;
top: -30px;
left: 130px;
}
#login_auth_buttons {
margin-bottom: 0;
-}
-#login_auth_buttons li {
- float: left;
- padding: $lineheight/4 $lineheight/2;
+ li {
+ float: left;
+ padding: $lineheight/4 $lineheight/2;
+ }
}
/* Rules for the account confirmation page */
def auth_button(name, provider, options = {})
link_to(
- image_tag("#{name}.png", :alt => t("users.login.auth_providers.#{name}.alt")),
+ image_tag("#{name}.svg", :alt => t("users.login.auth_providers.#{name}.alt"), :class => "rounded-lg"),
auth_path(options.merge(:provider => provider)),
:class => "auth_button",
:title => t("users.login.auth_providers.#{name}.title")
--- /dev/null
+test:
+ adapter: postgresql
+ database: openstreetmap
+ encoding: utf8
@tracksegs = 0
begin
- Archive::Reader.open_filename(@file).each_entry_with_data do |_entry, data|
- parse_file(XML::Reader.string(data), &block)
+ Archive::Reader.open_filename(@file).each_entry_with_data do |entry, data|
+ parse_file(XML::Reader.string(data), &block) if entry.regular?
end
rescue Archive::Error
io = ::File.open(@file)
--- /dev/null
+/^$/d
+/^--/d
+/^CREATE EXTENSION IF NOT EXISTS plpgsql /d
+/^COMMENT ON EXTENSION plpgsql /d
+/^SET default_with_oids /d
+/^SET default_table_access_method /d
+/^SET idle_in_transaction_session_timeout /d
+/^ AS integer$/d
+
+s/ IMMUTABLE / /
def test_auth_button
button = auth_button("google", "google")
- assert_equal("<a class=\"auth_button\" title=\"Login with Google\" href=\"/auth/google\"><img alt=\"Login with a Google OpenID\" src=\"/images/google.png\" /></a>", button)
+ assert_equal("<a class=\"auth_button\" title=\"Login with Google\" href=\"/auth/google\"><img alt=\"Login with a Google OpenID\" class=\"rounded-lg\" src=\"/images/google.svg\" /></a>", button)
button = auth_button("yahoo", "openid", :openid_url => "yahoo.com")
- assert_equal("<a class=\"auth_button\" title=\"Login with Yahoo\" href=\"/auth/openid?openid_url=yahoo\.com\"><img alt=\"Login with a Yahoo OpenID\" src=\"/images/yahoo.png\" /></a>", button)
+ assert_equal("<a class=\"auth_button\" title=\"Login with Yahoo\" href=\"/auth/openid?openid_url=yahoo\.com\"><img alt=\"Login with a Yahoo OpenID\" class=\"rounded-lg\" src=\"/images/yahoo.svg\" /></a>", button)
end
private
-require "coveralls"
-Coveralls.wear!("rails")
-
-# Override the simplecov output message, since it is mostly unwanted noise
-module SimpleCov
- module Formatter
- class HTMLFormatter
- def output_message(_result); end
+require "simplecov"
+require "simplecov-lcov"
+
+# Fix incompatibility of simplecov-lcov with older versions of simplecov that are not expresses in its gemspec.
+# https://github.com/fortissimo1997/simplecov-lcov/pull/25
+unless SimpleCov.respond_to?(:branch_coverage)
+ module SimpleCov
+ def self.branch_coverage?
+ false
end
end
end
-# Output both the local simplecov html and the coveralls report
-SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
- [SimpleCov::Formatter::HTMLFormatter,
- Coveralls::SimpleCov::Formatter]
+SimpleCov::Formatter::LcovFormatter.config do |config|
+ config.report_with_single_file = true
+ config.single_report_path = "coverage/lcov.info"
+end
+
+SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
+ [
+ SimpleCov::Formatter::HTMLFormatter,
+ SimpleCov::Formatter::LcovFormatter
+ ]
)
+SimpleCov.start("rails")
+
require "securerandom"
require "digest/sha1"