Skip to content

Commit

Permalink
Use https where possible (#8026)
Browse files Browse the repository at this point in the history
* Use https whenever possible

Also:
- Fix a link to a blog post returning a 404. Using a redirect found in
  webarchive
- Use example domain name in specs and generators. Helps to prevent
  information disclosure or other attacks (attackers may register
  domains used in generator to collect clicks)

* Remove links to the live demo

The link does not work and Heroku does not offer a free tier anymore
  • Loading branch information
tagliala committed Jul 24, 2023
1 parent 55cb323 commit 040ab70
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 38 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -586,7 +586,7 @@ _No changes_.

* Prevents access to formats that the user not permitted to see. [#4867] by [@Fivell] and [@timoschilling]
* Prevents potential DOS attack via Ruby symbols. [#1926] by [@seanlinsley]
* [this isn't an issue for those using Ruby >= 2.2](http://rubykaigi.org/2014/presentation/S-NarihiroNakamura)
* [this isn't an issue for those using Ruby >= 2.2](https://rubykaigi.org/2014/presentation/S-NarihiroNakamura)

### Bug Fixes

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -175,11 +175,11 @@ Maintainers need to do the following to push out a release:
* Run `bin/rake release` from the target branch once the PR is merged.

[chandler]: https://github.com/mattbrictson/chandler#2-configure-credentials
[Stack Overflow]: http://stackoverflow.com/questions/tagged/activeadmin
[Stack Overflow]: https://stackoverflow.com/questions/tagged/activeadmin
[new issue]: https://github.com/activeadmin/activeadmin/issues/new
[fork Active Admin]: https://help.github.com/articles/fork-a-repo
[make a pull request]: https://help.github.com/articles/creating-a-pull-request
[git rebasing]: http://git-scm.com/book/en/Git-Branching-Rebasing
[git rebasing]: https://git-scm.com/book/en/Git-Branching-Rebasing
[interactive rebase]: https://help.github.com/en/github/using-git/about-git-rebase
[shortcut reference links]: https://github.github.com/gfm/#shortcut-reference-link
[Rollup]: https://rollupjs.org/guide/en/#quick-start
Expand Down
12 changes: 5 additions & 7 deletions README.md
Expand Up @@ -18,7 +18,6 @@ creating elegant backends for website administration.
## Getting started

* Check out [the docs][docs].
* Try the [live demo][demo].
* The [wiki] includes links to tutorials, articles and sample projects.

## For enterprise
Expand Down Expand Up @@ -91,23 +90,22 @@ Thanks to [Open Collective][opencollective contributors] and all our Open Collec
[Kaminari]: https://github.com/kaminari/kaminari
[Ransack]: https://github.com/activerecord-hackery/ransack

[rubygems_badge]: http://img.shields.io/gem/v/activeadmin.svg
[rubygems_badge]: https://img.shields.io/gem/v/activeadmin.svg
[rubygems]: https://rubygems.org/gems/activeadmin
[actions_badge]: https://github.com/activeadmin/activeadmin/workflows/ci/badge.svg
[actions]: https://github.com/activeadmin/activeadmin/actions
[coverage_badge]: https://codecov.io/gh/activeadmin/activeadmin/branch/master/graph/badge.svg?token=NAjeBdkQXW
[coverage]: https://codecov.io/gh/activeadmin/activeadmin
[inch_badge]: http://inch-ci.org/github/activeadmin/activeadmin.svg?branch=master
[inch]: http://inch-ci.org/github/activeadmin/activeadmin
[inch_badge]: https://inch-ci.org/github/activeadmin/activeadmin.svg?branch=master
[inch]: https://inch-ci.org/github/activeadmin/activeadmin
[tidelift_badge]: https://tidelift.com/badges/github/activeadmin/activeadmin
[tidelift]: https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=readme
[tidelift_enterprise]: https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise
[tidelift_support]: https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=github&utm_content=support

[docs]: http://activeadmin.info/0-installation.html
[demo]: http://demo.activeadmin.info/admin
[docs]: https://activeadmin.info/0-installation.html
[wiki]: https://github.com/activeadmin/activeadmin/wiki
[stackoverflow]: http://stackoverflow.com/questions/tagged/activeadmin
[stackoverflow]: https://stackoverflow.com/questions/tagged/activeadmin
[contributing]: https://github.com/activeadmin/activeadmin/blob/master/CONTRIBUTING.md
[Liberapay]: https://liberapay.com/Active-Admin/donate
[Tidelift security contact]: https://tidelift.com/security
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/active_admin/ext/jquery-ui.js
@@ -1,7 +1,7 @@
// Short-circuits `_focusTabbable` to focus on the modal itself instead of
// elements inside the modal. Without this, if a datepicker is the first input,
// it'll immediately pop up when the modal opens.
// See this ticket for more info: http://bugs.jqueryui.com/ticket/4731
// See this ticket for more info: https://bugs.jqueryui.com/ticket/4731
$.ui.dialog.prototype._focusTabbable = function() {
this.uiDialog.focus();
};
2 changes: 1 addition & 1 deletion docs/0-installation.md
Expand Up @@ -16,7 +16,7 @@ gem 'draper'
gem 'pundit'
```

More accurately, it's a [Rails Engine](http://guides.rubyonrails.org/engines.html)
More accurately, it's a [Rails Engine](https://guides.rubyonrails.org/engines.html)
that can be injected into your existing Ruby on Rails application.

## Setting up Active Admin
Expand Down
4 changes: 2 additions & 2 deletions docs/1-general-configuration.md
Expand Up @@ -40,7 +40,7 @@ If you want, you can customize it.
config.site_title = "My Admin Site"
config.site_title_link = "/"
config.site_title_image = "site_image.png"
config.site_title_image = "http://www.google.com/images/logos/google_logo_41.png"
config.site_title_image = "https://www.google.com/images/logos/google_logo_41.png"
config.site_title_image = ->(context) { context.current_user.company.logo_url }
```

Expand Down Expand Up @@ -205,7 +205,7 @@ menu in the system; you can provide your own menu to be rendered in its place.
ActiveAdmin.setup do |config|
config.namespace :admin do |admin|
admin.build_menu :utility_navigation do |menu|
menu.add label: "ActiveAdmin.info", url: "http://www.activeadmin.info",
menu.add label: "ActiveAdmin.info", url: "https://www.activeadmin.info",
html_options: { target: :blank }
admin.add_current_user_to_menu menu
admin.add_logout_button_to_menu menu
Expand Down
2 changes: 1 addition & 1 deletion docs/14-gotchas.md
Expand Up @@ -23,7 +23,7 @@ session from being committed. Flash messages won't work and you will be unable t
use the session for storing anything.

For more information see [the following
post](http://www.intridea.com/blog/2013/3/20/rails-assets-prefix-may-disable-your-session).
post](https://www.mobomo.com/2013/03/rails-assets-prefix-may-disable-your-session/).

## Helpers

Expand Down
6 changes: 3 additions & 3 deletions docs/2-resource-customization.md
Expand Up @@ -288,14 +288,14 @@ config.namespace :admin do |admin|

menu.add label: "Sites" do |sites|
sites.add label: "Google",
url: "http://google.com",
url: "https://google.com",
html_options: { target: :blank }

sites.add label: "Facebook",
url: "http://facebook.com"
url: "https://facebook.com"

sites.add label: "Github",
url: "http://github.com"
url: "https://github.com"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion docs/5-forms.md
Expand Up @@ -154,7 +154,7 @@ in the list.
## Datepicker

ActiveAdmin offers the `datepicker` input, which uses the [jQuery UI
datepicker](http://jqueryui.com/datepicker/). The datepicker input accepts any
datepicker](https://jqueryui.com/datepicker/). The datepicker input accepts any
of the options available to the standard jQueryUI Datepicker. For example:

```ruby
Expand Down
4 changes: 2 additions & 2 deletions docs/_includes/footer.html
@@ -1,8 +1,8 @@
<p id="footer">
<div class="left">
Copyright 2011 <a href="http://gregbell.ca/">Greg Bell</a> and <a href="http://www.versapay.com/">VersaPay</a>
Copyright 2011 <a href="http://gregbell.ca/">Greg Bell</a> and <a href="https://www.versapay.com/">VersaPay</a>
</div>
<div class="right">
<a href="http://twitter.com/share" class="twitter-share-button">Tweet</a></p>
<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a></p>
</div>
</p>
3 changes: 1 addition & 2 deletions docs/_includes/top-menu.html
Expand Up @@ -3,8 +3,7 @@ <h1><a href="{{ site.baseurl }}/index.html"><span>Active Admin</span></a></h1>

<div id="nav">
<a href="{{ site.baseurl }}/documentation.html">Documentation</a>
<a href="http://demo.activeadmin.info/admin">Try It Now!</a>
<a href="http://github.com/activeadmin/activeadmin">Get the Code</a>
<a href="https://github.com/activeadmin/activeadmin">Get the Code</a>
</div>

<div id="tidelift">
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Expand Up @@ -212,10 +212,10 @@ <h3>
</div>

<h2 class="getting-started-heading">
3 Ways to Get Started:
2 Ways to Get Started:
</h2>
<p class="getting-started">
<a href="http://demo.activeadmin.info/admin">Check Out the Live Demo</a> <a href="{{ site.baseurl }}/documentation.html">Read The Documentation</a> <a href="http://github.com/activeadmin/activeadmin">Visit the Git Repository</a>
<a href="{{ site.baseurl }}/documentation.html">Read The Documentation</a> <a href="https://github.com/activeadmin/activeadmin">Visit the Git Repository</a>
</p>
</div>{% include footer.html %}
</div>
Expand Down
12 changes: 6 additions & 6 deletions features/site_title.feature
Expand Up @@ -22,21 +22,21 @@ Feature: Site title
Scenario: Set the site title image
Given a configuration of:
"""
ActiveAdmin.application.site_title_image = "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
ActiveAdmin.application.site_title_image = "https://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
"""
When I am on the dashboard
And I should not see the site title "My Great Site"
And I should see the site title image "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
And I should see the site title image "https://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"

Scenario: Set the site title image with link
Given a configuration of:
"""
ActiveAdmin.application.site_title_link = "http://www.google.com"
ActiveAdmin.application.site_title_image = "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
ActiveAdmin.application.site_title_link = "https://www.google.com"
ActiveAdmin.application.site_title_image = "https://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
"""
When I am on the dashboard
And I should see the site title image "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
And I should see the site title image linked to "http://www.google.com"
And I should see the site title image "https://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
And I should see the site title image linked to "https://www.google.com"

Scenario: Set the site title to a proc
Given a configuration of:
Expand Down
Expand Up @@ -249,7 +249,7 @@ ActiveAdmin.setup do |config|
#
# config.namespace :admin do |admin|
# admin.build_menu :utility_navigation do |menu|
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
# menu.add label: "My Great Website", url: "https://mygreatwebsite.example.com", html_options: { target: :blank }
# admin.add_logout_button_to_menu menu
# end
# end
Expand All @@ -258,7 +258,7 @@ ActiveAdmin.setup do |config|
#
# config.namespace :admin do |admin|
# admin.build_menu :default do |menu|
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
# menu.add label: "My Great Website", url: "https://mygreatwebsite.example.com", html_options: { target: :blank }
# end
# end

Expand Down
8 changes: 4 additions & 4 deletions spec/unit/application_spec.rb
Expand Up @@ -31,17 +31,17 @@
end

it "should set the site's title link" do
application.site_title_link = "http://www.mygreatsite.com"
expect(application.site_title_link).to eq "http://www.mygreatsite.com"
application.site_title_link = "https://mygreatsite.example.com"
expect(application.site_title_link).to eq "https://mygreatsite.example.com"
end

it "should store the site's title image" do
expect(application.site_title_image).to eq ""
end

it "should set the site's title image" do
application.site_title_image = "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
expect(application.site_title_image).to eq "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
application.site_title_image = "https://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
expect(application.site_title_image).to eq "https://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
end

it "should store the site's favicon" do
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/namespace_spec.rb
Expand Up @@ -109,7 +109,7 @@
let(:namespace) { ActiveAdmin::Namespace.new(application, :admin) }
let(:menu) do
namespace.build_menu :utility_navigation do |menu|
menu.add label: "ActiveAdmin.info", url: "http://www.activeadmin.info", html_options: { target: :blank }
menu.add label: "ActiveAdmin.info", url: "https://www.activeadmin.info", html_options: { target: :blank }
namespace.add_logout_button_to_menu menu, 1, class: "matt"
end
namespace.fetch_menu(:utility_navigation)
Expand Down

0 comments on commit 040ab70

Please sign in to comment.