History

Merge pull request #1363 from MasterEnoc/dart

Update Dart version 2 to 2.10.4

Simon Legner committed 5 years ago

Commit d790c7a2 parents 57c5fc0 507990e2 files · +9 −2Browse files

Unified · Split

2 files
  1. docs/file-scrapers.md +6 −0
  2. lib/docs/scrapers/dart.rb +3 −2
docs/file-scrapers.md+6−0
@@ -20,6 +20,12 @@ Click the “API docs” link under the “Stable channel” header on · 19 unmodified lines
20https://www.dartlang.org/tools/sdk/archive. Rename the expanded ZIP to `dart~2`20https://www.dartlang.org/tools/sdk/archive. Rename the expanded ZIP to `dart~2`
21and put it in `/path/to/devdocs/docs/`21and put it in `/path/to/devdocs/docs/`
22 22
23Or run the following commands in your terminal:
24
25```sh
26curl https://storage.googleapis.com/dart-archive/channels/stable/release/$RELEASE/api-docs/dartdocs-gen-api-zip > dartApi.zip; \
27unzip dartApi.zip; mv gen-dartdocs docs/dart~$VERSION
28```
23## Django29## Django
24 30
25Go to https://docs.djangoproject.com/, select the version from the31Go to https://docs.djangoproject.com/, select the version from the
lib/docs/scrapers/dart.rb+3−2
@@ -21,7 +21,7 @@ module Docs · 20 unmodified lines
21 HTML21 HTML
22 22
23 version '2' do23 version '2' do
24 self.release = '2.5.0'24 self.release = '2.10.4'
25 self.base_url = "https://api.dart.dev/stable/#{release}/"25 self.base_url = "https://api.dart.dev/stable/#{release}/"
26 end26 end
27 27
@@ -31,9 +31,10 @@ module Docs · 3 unmodified lines
31 end31 end
32 32
33 def get_latest_version(opts)33 def get_latest_version(opts)
34 doc = fetch_doc('https://api.dartlang.org/', opts)34 doc = fetch_doc('https://api.dart.dev/', opts)
35 label = doc.at_css('footer > span').content.strip35 label = doc.at_css('footer > span').content.strip
36 label.sub(/Dart\s*/, '')36 label.sub(/Dart\s*/, '')
37 end37 end
38
38 end39 end
39end40end