The Inbox: Monticello-tobe.724.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Monticello-tobe.724.mcz

commits-2
A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-tobe.724.mcz

==================== Summary ====================

Name: Monticello-tobe.724
Author: tobe
Time: 14 June 2020, 5:24:40.705825 pm
UUID: 2c269510-4a04-42a0-995a-d29adcc33fee
Ancestors: Monticello-mt.723

Allow mc http repositories to handle absolute paths

Monticello will collect all <a href=""> tags on the repository's webpage. It currently expects these to be relative to the URL of the website. Some third party sites that can host mcz files, however do not use relative, but absolute paths. An example of this are Github releases pages.

=============== Diff against Monticello-mt.723 ===============

Item was changed:
  ----- Method: MCHttpRepository>>urlForFileNamed: (in category 'accessing') -----
  urlForFileNamed: aString
+ " if we have an absolute path, take the base of the location and append the full path "
+ aString first = $/ ifTrue: [^ (location first: (location indexOf: $/ startingAt: 'https:// ' size)), aString].
+
  ^ self locationWithTrailingSlash, aString encodeForHTTP!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-tobe.724.mcz

Beckmann, Tom
Hey everyone!

With this change, you can add a Github releases page that hosts a mcz file to your Monticello Browser and it will pick the versions up correctly. I have tested some regular repos that I found by default in my image and they still worked. Does anyone know if this change could pose problems in some other setup?

Best,
Tom
________________________________________
From: Squeak-dev <[hidden email]> on behalf of [hidden email] <[hidden email]>
Sent: Sunday, June 14, 2020 5:24:54 PM
To: [hidden email]
Subject: [squeak-dev] The Inbox: Monticello-tobe.724.mcz

A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-tobe.724.mcz

==================== Summary ====================

Name: Monticello-tobe.724
Author: tobe
Time: 14 June 2020, 5:24:40.705825 pm
UUID: 2c269510-4a04-42a0-995a-d29adcc33fee
Ancestors: Monticello-mt.723

Allow mc http repositories to handle absolute paths

Monticello will collect all <a href=""> tags on the repository's webpage. It currently expects these to be relative to the URL of the website. Some third party sites that can host mcz files, however do not use relative, but absolute paths. An example of this are Github releases pages.

=============== Diff against Monticello-mt.723 ===============

Item was changed:
  ----- Method: MCHttpRepository>>urlForFileNamed: (in category 'accessing') -----
  urlForFileNamed: aString
+       " if we have an absolute path, take the base of the location and append the full path "
+       aString first = $/ ifTrue: [^ (location first: (location indexOf: $/ startingAt: 'https:// ' size)), aString].
+
        ^ self locationWithTrailingSlash, aString encodeForHTTP!



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-tobe.724.mcz

marcel.taeumel
Hi Tom,

can you give an example of such a GitHub release page with relative URLs?

Best,
Marcel

Am 14.06.2020 17:27:35 schrieb Beckmann, Tom <[hidden email]>:

Hey everyone!

With this change, you can add a Github releases page that hosts a mcz file to your Monticello Browser and it will pick the versions up correctly. I have tested some regular repos that I found by default in my image and they still worked. Does anyone know if this change could pose problems in some other setup?

Best,
Tom
________________________________________
From: Squeak-dev on behalf of [hidden email]
Sent: Sunday, June 14, 2020 5:24:54 PM
To: [hidden email]
Subject: [squeak-dev] The Inbox: Monticello-tobe.724.mcz

A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-tobe.724.mcz

==================== Summary ====================

Name: Monticello-tobe.724
Author: tobe
Time: 14 June 2020, 5:24:40.705825 pm
UUID: 2c269510-4a04-42a0-995a-d29adcc33fee
Ancestors: Monticello-mt.723

Allow mc http repositories to handle absolute paths

Monticello will collect all tags on the repository's webpage. It currently expects these to be relative to the URL of the website. Some third party sites that can host mcz files, however do not use relative, but absolute paths. An example of this are Github releases pages.

=============== Diff against Monticello-mt.723 ===============

Item was changed:
----- Method: MCHttpRepository>>urlForFileNamed: (in category 'accessing') -----
urlForFileNamed: aString
+ " if we have an absolute path, take the base of the location and append the full path "
+ aString first = $/ ifTrue: [^ (location first: (location indexOf: $/ startingAt: 'https:// ' size)), aString].
+
^ self locationWithTrailingSlash, aString encodeForHTTP!





Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-tobe.724.mcz

Beckmann, Tom
Hey Marcel,

ah relative URLs are actually the current default, absolute ones were not supported.

I abused a Github project of mine for testing purposes: by adding this URL to the Monticello Browser, you should be able to load the mcz I uploaded there: https://github.com/tom95/sandblocks/releases

Best,
Tom
________________________________________
From: Squeak-dev <[hidden email]> on behalf of Taeumel, Marcel
Sent: Sunday, June 14, 2020 5:31:34 PM
To: squeak-dev
Subject: Re: [squeak-dev] The Inbox: Monticello-tobe.724.mcz

Hi Tom,

can you give an example of such a GitHub release page with relative URLs?

Best,
Marcel

Am 14.06.2020 17:27:35 schrieb Beckmann, Tom <[hidden email]>:

Hey everyone!

With this change, you can add a Github releases page that hosts a mcz file to your Monticello Browser and it will pick the versions up correctly. I have tested some regular repos that I found by default in my image and they still worked. Does anyone know if this change could pose problems in some other setup?

Best,
Tom
________________________________________
From: Squeak-dev on behalf of [hidden email]
Sent: Sunday, June 14, 2020 5:24:54 PM
To: [hidden email]
Subject: [squeak-dev] The Inbox: Monticello-tobe.724.mcz

A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-tobe.724.mcz

==================== Summary ====================

Name: Monticello-tobe.724
Author: tobe
Time: 14 June 2020, 5:24:40.705825 pm
UUID: 2c269510-4a04-42a0-995a-d29adcc33fee
Ancestors: Monticello-mt.723

Allow mc http repositories to handle absolute paths

Monticello will collect all tags on the repository's webpage. It currently expects these to be relative to the URL of the website. Some third party sites that can host mcz files, however do not use relative, but absolute paths. An example of this are Github releases pages.

=============== Diff against Monticello-mt.723 ===============

Item was changed:
----- Method: MCHttpRepository>>urlForFileNamed: (in category 'accessing') -----
urlForFileNamed: aString
+ " if we have an absolute path, take the base of the location and append the full path "
+ aString first = $/ ifTrue: [^ (location first: (location indexOf: $/ startingAt: 'https:// ' size)), aString].
+
^ self locationWithTrailingSlash, aString encodeForHTTP!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-tobe.724.mcz

marcel.taeumel
Hi Tom,

I suggest subclassing MCHttpRepository to document the format of the GitHub release page. Then you could also fix those labels:



Best,
Marcel

Am 14.06.2020 18:08:02 schrieb Beckmann, Tom <[hidden email]>:

Hey Marcel,

ah relative URLs are actually the current default, absolute ones were not supported.

I abused a Github project of mine for testing purposes: by adding this URL to the Monticello Browser, you should be able to load the mcz I uploaded there: https://github.com/tom95/sandblocks/releases

Best,
Tom
________________________________________
From: Squeak-dev on behalf of Taeumel, Marcel
Sent: Sunday, June 14, 2020 5:31:34 PM
To: squeak-dev
Subject: Re: [squeak-dev] The Inbox: Monticello-tobe.724.mcz

Hi Tom,

can you give an example of such a GitHub release page with relative URLs?

Best,
Marcel

Am 14.06.2020 17:27:35 schrieb Beckmann, Tom :

Hey everyone!

With this change, you can add a Github releases page that hosts a mcz file to your Monticello Browser and it will pick the versions up correctly. I have tested some regular repos that I found by default in my image and they still worked. Does anyone know if this change could pose problems in some other setup?

Best,
Tom
________________________________________
From: Squeak-dev on behalf of [hidden email]
Sent: Sunday, June 14, 2020 5:24:54 PM
To: [hidden email]
Subject: [squeak-dev] The Inbox: Monticello-tobe.724.mcz

A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-tobe.724.mcz

==================== Summary ====================

Name: Monticello-tobe.724
Author: tobe
Time: 14 June 2020, 5:24:40.705825 pm
UUID: 2c269510-4a04-42a0-995a-d29adcc33fee
Ancestors: Monticello-mt.723

Allow mc http repositories to handle absolute paths

Monticello will collect all tags on the repository's webpage. It currently expects these to be relative to the URL of the website. Some third party sites that can host mcz files, however do not use relative, but absolute paths. An example of this are Github releases pages.

=============== Diff against Monticello-mt.723 ===============

Item was changed:
----- Method: MCHttpRepository>>urlForFileNamed: (in category 'accessing') -----
urlForFileNamed: aString
+ " if we have an absolute path, take the base of the location and append the full path "
+ aString first = $/ ifTrue: [^ (location first: (location indexOf: $/ startingAt: 'https:// ' size)), aString].
+
^ self locationWithTrailingSlash, aString encodeForHTTP!