History

Update Crystal documentation (0.31.0)

Oleksii Filonenko committed 7 years ago

Commit 84afa651 parent eda3a7f1 file · +8 −1Browse files

Unified · Split

lib/docs/scrapers/crystal.rb+8−1
@@ -1,7 +1,6 @@
1module Docs1module Docs
2 class Crystal < UrlScraper2 class Crystal < UrlScraper
3 self.type = 'crystal'3 self.type = 'crystal'
4 self.release = '0.30.1'
5 self.base_url = 'https://crystal-lang.org/'4 self.base_url = 'https://crystal-lang.org/'
6 self.root_path = "api/#{release}/index.html"5 self.root_path = "api/#{release}/index.html"
7 self.initial_paths = %w(docs/index.html)6 self.initial_paths = %w(docs/index.html)
@@ -35,6 +34,14 @@ module Docs · 27 unmodified lines
35 end34 end
36 }35 }
37 36
37 version '0.31' do
38 self.release = '0.31.0'
39 end
40
41 version '0.30' do
42 self.release = '0.30.1'
43 end
44
38 def get_latest_version(opts)45 def get_latest_version(opts)
39 body = fetch('https://crystal-lang.org/api', opts)46 body = fetch('https://crystal-lang.org/api', opts)
40 body.scan(/Crystal Docs ([0-9.]+)/)[0][0]47 body.scan(/Crystal Docs ([0-9.]+)/)[0][0]