cheesy-gallery 0.5.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +12 -0
- data/.gitignore +2 -0
- data/.travis.yml +1 -2
- data/CHANGELOG.md +11 -0
- data/README.md +40 -18
- data/lib/cheesy-gallery/base_image_file.rb +21 -0
- data/lib/cheesy-gallery/generator.rb +7 -5
- data/lib/cheesy-gallery/image_file.rb +22 -7
- data/lib/cheesy-gallery/version.rb +1 -1
- data/sorbet/rbi/gems/addressable.rbi +147 -0
- data/sorbet/rbi/gems/ast.rbi +49 -0
- data/sorbet/rbi/gems/codecov.rbi +49 -0
- data/sorbet/rbi/gems/coderay.rbi +285 -0
- data/sorbet/rbi/gems/colorator.rbi +60 -0
- data/sorbet/rbi/gems/concurrent-ruby.rbi +225 -0
- data/sorbet/rbi/gems/docile.rbi +36 -0
- data/sorbet/rbi/gems/ffi.rbi +560 -0
- data/sorbet/rbi/gems/forwardable-extended.rbi +24 -0
- data/sorbet/rbi/gems/i18n.rbi +108 -0
- data/sorbet/rbi/gems/jekyll-sass-converter.rbi +61 -0
- data/sorbet/rbi/gems/jekyll.rbi +726 -0
- data/sorbet/rbi/gems/kramdown.rbi +250 -0
- data/sorbet/rbi/gems/liquid.rbi +649 -0
- data/sorbet/rbi/gems/method_source.rbi +64 -0
- data/sorbet/rbi/gems/parallel.rbi +83 -0
- data/sorbet/rbi/gems/parser.rbi +1429 -0
- data/sorbet/rbi/gems/pathutil.rbi +188 -0
- data/sorbet/rbi/gems/pry.rbi +1898 -0
- data/sorbet/rbi/gems/public_suffix.rbi +104 -0
- data/sorbet/rbi/gems/rainbow.rbi +118 -0
- data/sorbet/rbi/gems/rake.rbi +647 -0
- data/sorbet/rbi/gems/regexp_parser.rbi +926 -0
- data/sorbet/rbi/gems/rexml.rbi +599 -0
- data/sorbet/rbi/gems/rmagick.rbi +1249 -0
- data/sorbet/rbi/gems/rspec-core.rbi +1894 -0
- data/sorbet/rbi/gems/rspec-expectations.rbi +1148 -0
- data/sorbet/rbi/gems/rspec-mocks.rbi +1091 -0
- data/sorbet/rbi/gems/rspec-support.rbi +280 -0
- data/sorbet/rbi/gems/rspec.rbi +15 -0
- data/sorbet/rbi/gems/rubocop-ast.rbi +1357 -0
- data/sorbet/rbi/gems/rubocop.rbi +8027 -0
- data/sorbet/rbi/gems/ruby-progressbar.rbi +304 -0
- data/sorbet/rbi/gems/safe_yaml.rbi +124 -0
- data/sorbet/rbi/gems/sassc.rbi +532 -0
- data/sorbet/rbi/gems/simplecov-html.rbi +35 -0
- data/sorbet/rbi/gems/simplecov.rbi +419 -0
- data/sorbet/rbi/gems/unicode-display_width.rbi +22 -0
- data/sorbet/rbi/hidden-definitions/errors.txt +3516 -24801
- data/sorbet/rbi/hidden-definitions/hidden.rbi +7269 -39103
- data/sorbet/rbi/sorbet-typed/lib/rake/all/rake.rbi +645 -0
- data/sorbet/rbi/sorbet-typed/lib/rspec-core/all/rspec-core.rbi +1891 -0
- data/sorbet/rbi/sorbet-typed/lib/rubocop/>=1.8/rubocop.rbi +7799 -0
- data/sorbet/rbi/todo.rbi +6 -0
- metadata +47 -5
- data/Gemfile.lock +0 -134
- data/sorbet/rbi/sorbet-typed/lib/rubocop/~>0.85/rubocop.rbi +0 -2072
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19931d133435a6a55017ecac411db830706130e548d194cb46acd26a252adfd1
|
4
|
+
data.tar.gz: a1051c7f17f276558d65f681ae61bffb74f3ec3ae6d0089d4f2e1e963f83587a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b13062ca2c8117769df7e288aa285a67dcb467c56818faf6a92292492dd9c12f1319159b09c0f936edef88cec566075d3fa1807b15dfc0332e72e17372cedfa
|
7
|
+
data.tar.gz: cae163728e4f9ca11d2dc5059027f39d1c42930f6802d4917850d7e726c603682adbb47dc986d1d6f6363a5cdce3a4627a40e1bd5888c49c9e61a814b083087f
|
@@ -0,0 +1,12 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
- package-ecosystem: bundler
|
4
|
+
directory: "/"
|
5
|
+
schedule:
|
6
|
+
interval: weekly
|
7
|
+
open-pull-requests-limit: 10
|
8
|
+
- package-ecosystem: bundler
|
9
|
+
directory: "/spec/fixtures/test_site"
|
10
|
+
schedule:
|
11
|
+
interval: weekly
|
12
|
+
open-pull-requests-limit: 10
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -8,7 +8,6 @@ rvm:
|
|
8
8
|
|
9
9
|
# adopt future bundler 3 config style
|
10
10
|
before_install:
|
11
|
-
- bundle config set deployment 'true' # expect Gemfile.lock to be up-to-date for testing
|
12
11
|
- bundle config set path ${BUNDLE_PATH:-vendor/bundle}
|
13
12
|
- bundle config set jobs 3
|
14
13
|
- bundle config set retry 3
|
@@ -16,7 +15,7 @@ install: bundle install
|
|
16
15
|
|
17
16
|
jobs:
|
18
17
|
include:
|
19
|
-
- env: CHECK=
|
18
|
+
- env: CHECK=ruby
|
20
19
|
script:
|
21
20
|
- bundle exec rake
|
22
21
|
- env: CHECK=sorbet
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# 1.1.0
|
2
|
+
|
3
|
+
* Adds aggressive caching to reduce rebuild times.
|
4
|
+
If you need to re-render images for any reason, remove the `.jekyll-cache` folder or change the `_config.yml` file.
|
5
|
+
|
6
|
+
* Changes default quality to 85, and instead strips alls comments.
|
7
|
+
This results in better quality pictures with less size.
|
8
|
+
|
9
|
+
# 1.0.0
|
10
|
+
|
11
|
+
Initial Release
|
data/README.md
CHANGED
@@ -1,39 +1,61 @@
|
|
1
1
|
# Cheesy::Gallery
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This is a jekyll photo gallery to manage large amounts of galleries and pictures. You can see the results at https://www.cheesy.at/fotos/.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
|
7
|
+
Follow Jekyll's documentation on [how to install plugins](https://jekyllrb.com/docs/plugins/installation/) using "cheesy-gallery" as name for the gem and plugin.
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
After successful installation, enable gallery processing for a subdirectory of your site.
|
12
|
+
For this example, the folder is called `_my_gallery`:
|
10
13
|
|
11
|
-
```
|
12
|
-
|
14
|
+
```yaml
|
15
|
+
collections:
|
16
|
+
my_gallery:
|
17
|
+
cheesy-gallery: true
|
13
18
|
```
|
14
19
|
|
15
|
-
|
20
|
+
From now on, every Jekyll build will take all JPGs in all folders under `_my_gallery` and create a gallery for each folder, linking them according to their structure in the file system.
|
16
21
|
|
17
|
-
|
22
|
+
To add a thumbnail to a gallery, put it inside the gallery folder and call it `thumbnail.jpg`.
|
18
23
|
|
19
|
-
|
24
|
+
Frontmatter, like titles, etc., are read from the `index.md` file in the gallery.
|
20
25
|
|
21
|
-
|
26
|
+
Galleries and their contents are sorted by filename.
|
22
27
|
|
23
|
-
|
28
|
+
To layout galleries, check out the [example layout](spec/fixtures/test_site/_layouts/gallery.html) and adapt it to your site's style.
|
29
|
+
|
30
|
+
If you want an inline display of your photos, I recommend [glightbox](https://github.com/biati-digital/glightbox) by [biati-digital](https://github.com/biati-digital). Add their CSS and JavaScript to your assets, and link them in the `<head>` of your site:
|
31
|
+
|
32
|
+
```html
|
33
|
+
<link rel="stylesheet" href="{{ "/assets/glb/glightbox.min.css" | relative_url }}">
|
34
|
+
<script src="{{ "/assets/glb/glightbox.min.js" | relative_url }}"></script>
|
35
|
+
```
|
24
36
|
|
25
|
-
|
37
|
+
Then, in the gallery layout, add `data-gallery="gallery"` attribute to the `<a>` tag linking to each image, and put
|
38
|
+
|
39
|
+
```html
|
40
|
+
<script type="text/javascript">
|
41
|
+
const lightbox = GLightbox({selector: '*[data-gallery]'});
|
42
|
+
</script>
|
43
|
+
```
|
44
|
+
|
45
|
+
at the bottom of the layout.
|
46
|
+
|
47
|
+
## Caching
|
48
|
+
|
49
|
+
This plugin uses aggressive caching to keep render times short.
|
50
|
+
If you need to re-render images for any reason, remove the `.jekyll-cache` folder or change the `_config.yml` file.
|
51
|
+
See the [Cache API tutorial](https://jekyllrb.com/tutorials/cache-api/) for some background.
|
26
52
|
|
27
53
|
## Development
|
28
54
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
55
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. There is also a test site in `spec/fixtures/test_site` that you can use to try out changes.
|
30
56
|
|
31
57
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
58
|
|
33
59
|
## Contributing
|
34
60
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/DavidS/cheesy-gallery. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
-
|
37
|
-
## Code of Conduct
|
38
|
-
|
39
|
-
Everyone interacting in the Cheesy::Gallery project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/DavidS/cheesy-gallery/blob/main/CODE_OF_CONDUCT.md).
|
61
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/DavidS/cheesy-gallery. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. See [code of conduct](https://github.com/DavidS/cheesy-gallery/blob/main/CODE_OF_CONDUCT.md) for a local copy.
|
@@ -8,6 +8,8 @@ require 'rmagick'
|
|
8
8
|
class CheesyGallery::BaseImageFile < Jekyll::StaticFile
|
9
9
|
extend T::Sig
|
10
10
|
|
11
|
+
@@render_cache = T.let(Jekyll::Cache.new('CheesyGallery::Render'), Jekyll::Cache) # don't need to worry about inheritance here # rubocop:disable Style/ClassVars
|
12
|
+
|
11
13
|
sig { params(site: Jekyll::Site, collection: Jekyll::Collection, file: Jekyll::StaticFile, dest_path: T.nilable(String)).void }
|
12
14
|
def initialize(site, collection, file, dest_path = nil)
|
13
15
|
@source_file = T.let(file, Jekyll::StaticFile)
|
@@ -27,6 +29,25 @@ class CheesyGallery::BaseImageFile < Jekyll::StaticFile
|
|
27
29
|
img.write(path) {}
|
28
30
|
end
|
29
31
|
|
32
|
+
# Inject cache here to override default delete-before-copy behaviour
|
33
|
+
# See jekyll:lib/jekyll/static_file.rb for source
|
34
|
+
def write(dest)
|
35
|
+
dest_path = destination(dest)
|
36
|
+
return false if File.exist?(dest_path) && !modified?
|
37
|
+
|
38
|
+
self.class.mtimes[path] = mtime
|
39
|
+
|
40
|
+
return if @@render_cache.key?("#{dest_path}-rendered") && File.exist?(dest_path)
|
41
|
+
|
42
|
+
FileUtils.mkdir_p(File.dirname(dest_path))
|
43
|
+
FileUtils.rm(dest_path) if File.exist?(dest_path)
|
44
|
+
copy_file(dest_path)
|
45
|
+
|
46
|
+
@@render_cache["#{dest_path}-rendered"] = true
|
47
|
+
|
48
|
+
true
|
49
|
+
end
|
50
|
+
|
30
51
|
private
|
31
52
|
|
32
53
|
# instead of copying, allow rmagick processing
|
@@ -32,11 +32,11 @@ class CheesyGallery::Generator < Jekyll::Generator
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# create replacements for the files with additional functionality
|
35
|
-
image_files = collection.files.map do |f|
|
35
|
+
image_files = collection.files.sort { |a, b| a.name <=> b.name }.map do |f|
|
36
36
|
CheesyGallery::ImageFile.new(
|
37
37
|
site, collection, f,
|
38
38
|
max_size: collection.metadata['max_size'] || '1920x1080',
|
39
|
-
quality: collection.metadata['quality'] ||
|
39
|
+
quality: collection.metadata['quality'] || 85
|
40
40
|
)
|
41
41
|
end
|
42
42
|
|
@@ -66,6 +66,8 @@ class CheesyGallery::Generator < Jekyll::Generator
|
|
66
66
|
|
67
67
|
# attach images
|
68
68
|
doc.data['images'] = files_by_dirname[gallery_path]
|
69
|
+
doc.data['thumbnail_source'] = doc.data['images']&.select { |i| i.name == 'thumbnail.jpg' }&.first || doc.data['images']&.first
|
70
|
+
doc.data['images']&.reject! { |i| i.name == 'thumbnail.jpg' }
|
69
71
|
|
70
72
|
# attach parent
|
71
73
|
parent = if gallery_path == collection.relative_directory
|
@@ -77,13 +79,13 @@ class CheesyGallery::Generator < Jekyll::Generator
|
|
77
79
|
doc.data['parent'] = parent
|
78
80
|
galleries_by_parent[parent] << doc
|
79
81
|
|
80
|
-
# add thumbnail when there
|
81
|
-
next
|
82
|
+
# only add thumbnail when there is a thumbnail source
|
83
|
+
next unless doc.data['thumbnail_source']
|
82
84
|
|
83
85
|
collection.files << doc.data['thumbnail'] = CheesyGallery::ImageThumb.new(
|
84
86
|
site,
|
85
87
|
collection,
|
86
|
-
doc.data['
|
88
|
+
doc.data['thumbnail_source'],
|
87
89
|
'_index.jpg',
|
88
90
|
collection.metadata['gallery_thumbnail_size'] || 72,
|
89
91
|
collection.metadata['gallery_thumbnail_size'] || 72,
|
@@ -7,6 +7,8 @@ require 'cheesy-gallery/base_image_file'
|
|
7
7
|
# This StaticFile subclass adds additional functionality for images in the
|
8
8
|
# gallery
|
9
9
|
class CheesyGallery::ImageFile < CheesyGallery::BaseImageFile
|
10
|
+
@@geometry_cache = T.let(Jekyll::Cache.new('CheesyGallery::Geometry'), Jekyll::Cache) # don't need to worry about inheritance here # rubocop:disable Style/ClassVars
|
11
|
+
|
10
12
|
sig { params(site: Jekyll::Site, collection: Jekyll::Collection, file: Jekyll::StaticFile, max_size: String, quality: Integer).void }
|
11
13
|
def initialize(site, collection, file, max_size:, quality:)
|
12
14
|
super(site, collection, file)
|
@@ -14,14 +16,22 @@ class CheesyGallery::ImageFile < CheesyGallery::BaseImageFile
|
|
14
16
|
@max_size = T.let(max_size, String)
|
15
17
|
@quality = T.let(quality, Integer)
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
realpath = File.realdirpath(path)
|
20
|
+
mtime = File.mtime(realpath)
|
21
|
+
geom = @@geometry_cache.getset("#{realpath}##{mtime}") do
|
22
|
+
result = [100, 100]
|
23
|
+
# read file metadata in the same way it will be processed
|
24
|
+
Jekyll.logger.debug 'Identifying:', path
|
25
|
+
source = Magick::Image.ping(path).first
|
26
|
+
source.change_geometry!(@max_size) do |cols, rows, _img|
|
27
|
+
result = [rows, cols]
|
28
|
+
end
|
29
|
+
source.destroy!
|
30
|
+
result
|
23
31
|
end
|
24
|
-
|
32
|
+
|
33
|
+
data['height'] = geom[0]
|
34
|
+
data['width'] = geom[1]
|
25
35
|
end
|
26
36
|
|
27
37
|
# instead of copying, renders an optimised version
|
@@ -30,6 +40,11 @@ class CheesyGallery::ImageFile < CheesyGallery::BaseImageFile
|
|
30
40
|
img.change_geometry!(@max_size) do |cols, rows, i|
|
31
41
|
i.resize!(cols, rows)
|
32
42
|
end
|
43
|
+
# follow recommendations from https://stackoverflow.com/a/7262050/4918 to get better compression
|
44
|
+
img.interlace = Magick::PlaneInterlace
|
45
|
+
# but skip the blur to avoid too many changes to the data
|
46
|
+
# img.gaussian_blur(0.05)
|
47
|
+
img.strip!
|
33
48
|
# workaround weird {self} initialisation pattern
|
34
49
|
quality = @quality
|
35
50
|
img.write(path) { self.quality = quality }
|
@@ -0,0 +1,147 @@
|
|
1
|
+
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
|
2
|
+
# srb rbi gems
|
3
|
+
|
4
|
+
# typed: strict
|
5
|
+
#
|
6
|
+
# If you would like to make changes to this file, great! Please create the gem's shim here:
|
7
|
+
#
|
8
|
+
# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/addressable/all/addressable.rbi
|
9
|
+
#
|
10
|
+
# addressable-2.7.0
|
11
|
+
|
12
|
+
module Addressable
|
13
|
+
end
|
14
|
+
module Addressable::VERSION
|
15
|
+
end
|
16
|
+
module Addressable::IDNA
|
17
|
+
def self.lookup_unicode_combining_class(codepoint); end
|
18
|
+
def self.lookup_unicode_compatibility(codepoint); end
|
19
|
+
def self.lookup_unicode_composition(unpacked); end
|
20
|
+
def self.lookup_unicode_lowercase(codepoint); end
|
21
|
+
def self.punycode_adapt(delta, numpoints, firsttime); end
|
22
|
+
def self.punycode_basic?(codepoint); end
|
23
|
+
def self.punycode_decode(punycode); end
|
24
|
+
def self.punycode_decode_digit(codepoint); end
|
25
|
+
def self.punycode_delimiter?(codepoint); end
|
26
|
+
def self.punycode_encode(unicode); end
|
27
|
+
def self.punycode_encode_digit(d); end
|
28
|
+
def self.to_ascii(input); end
|
29
|
+
def self.to_unicode(input); end
|
30
|
+
def self.unicode_compose(unpacked); end
|
31
|
+
def self.unicode_compose_pair(ch_one, ch_two); end
|
32
|
+
def self.unicode_decompose(unpacked); end
|
33
|
+
def self.unicode_decompose_hangul(codepoint); end
|
34
|
+
def self.unicode_downcase(input); end
|
35
|
+
def self.unicode_normalize_kc(input); end
|
36
|
+
def self.unicode_sort_canonical(unpacked); end
|
37
|
+
end
|
38
|
+
class Addressable::IDNA::PunycodeBadInput < StandardError
|
39
|
+
end
|
40
|
+
class Addressable::IDNA::PunycodeBigOutput < StandardError
|
41
|
+
end
|
42
|
+
class Addressable::IDNA::PunycodeOverflow < StandardError
|
43
|
+
end
|
44
|
+
class Addressable::URI
|
45
|
+
def +(uri); end
|
46
|
+
def ==(uri); end
|
47
|
+
def ===(uri); end
|
48
|
+
def absolute?; end
|
49
|
+
def authority; end
|
50
|
+
def authority=(new_authority); end
|
51
|
+
def basename; end
|
52
|
+
def default_port; end
|
53
|
+
def defer_validation; end
|
54
|
+
def display_uri; end
|
55
|
+
def domain; end
|
56
|
+
def dup; end
|
57
|
+
def empty?; end
|
58
|
+
def eql?(uri); end
|
59
|
+
def extname; end
|
60
|
+
def fragment; end
|
61
|
+
def fragment=(new_fragment); end
|
62
|
+
def freeze; end
|
63
|
+
def hash; end
|
64
|
+
def host; end
|
65
|
+
def host=(new_host); end
|
66
|
+
def hostname; end
|
67
|
+
def hostname=(new_hostname); end
|
68
|
+
def inferred_port; end
|
69
|
+
def initialize(options = nil); end
|
70
|
+
def inspect; end
|
71
|
+
def ip_based?; end
|
72
|
+
def join!(uri); end
|
73
|
+
def join(uri); end
|
74
|
+
def merge!(uri); end
|
75
|
+
def merge(hash); end
|
76
|
+
def normalize!; end
|
77
|
+
def normalize; end
|
78
|
+
def normalized_authority; end
|
79
|
+
def normalized_fragment; end
|
80
|
+
def normalized_host; end
|
81
|
+
def normalized_password; end
|
82
|
+
def normalized_path; end
|
83
|
+
def normalized_port; end
|
84
|
+
def normalized_query(*flags); end
|
85
|
+
def normalized_scheme; end
|
86
|
+
def normalized_site; end
|
87
|
+
def normalized_user; end
|
88
|
+
def normalized_userinfo; end
|
89
|
+
def omit!(*components); end
|
90
|
+
def omit(*components); end
|
91
|
+
def origin; end
|
92
|
+
def origin=(new_origin); end
|
93
|
+
def password; end
|
94
|
+
def password=(new_password); end
|
95
|
+
def path; end
|
96
|
+
def path=(new_path); end
|
97
|
+
def port; end
|
98
|
+
def port=(new_port); end
|
99
|
+
def query; end
|
100
|
+
def query=(new_query); end
|
101
|
+
def query_values(return_type = nil); end
|
102
|
+
def query_values=(new_query_values); end
|
103
|
+
def relative?; end
|
104
|
+
def remove_composite_values; end
|
105
|
+
def replace_self(uri); end
|
106
|
+
def request_uri; end
|
107
|
+
def request_uri=(new_request_uri); end
|
108
|
+
def route_from(uri); end
|
109
|
+
def route_to(uri); end
|
110
|
+
def scheme; end
|
111
|
+
def scheme=(new_scheme); end
|
112
|
+
def self.convert_path(path); end
|
113
|
+
def self.encode(uri, return_type = nil); end
|
114
|
+
def self.encode_component(component, character_class = nil, upcase_encoded = nil); end
|
115
|
+
def self.escape(uri, return_type = nil); end
|
116
|
+
def self.form_encode(form_values, sort = nil); end
|
117
|
+
def self.form_unencode(encoded_value); end
|
118
|
+
def self.heuristic_parse(uri, hints = nil); end
|
119
|
+
def self.ip_based_schemes; end
|
120
|
+
def self.join(*uris); end
|
121
|
+
def self.normalize_component(component, character_class = nil, leave_encoded = nil); end
|
122
|
+
def self.normalize_path(path); end
|
123
|
+
def self.normalized_encode(uri, return_type = nil); end
|
124
|
+
def self.parse(uri); end
|
125
|
+
def self.port_mapping; end
|
126
|
+
def self.unencode(uri, return_type = nil, leave_encoded = nil); end
|
127
|
+
def self.unencode_component(uri, return_type = nil, leave_encoded = nil); end
|
128
|
+
def self.unescape(uri, return_type = nil, leave_encoded = nil); end
|
129
|
+
def self.unescape_component(uri, return_type = nil, leave_encoded = nil); end
|
130
|
+
def site; end
|
131
|
+
def site=(new_site); end
|
132
|
+
def split_path(path); end
|
133
|
+
def tld; end
|
134
|
+
def tld=(new_tld); end
|
135
|
+
def to_hash; end
|
136
|
+
def to_s; end
|
137
|
+
def to_str; end
|
138
|
+
def user; end
|
139
|
+
def user=(new_user); end
|
140
|
+
def userinfo; end
|
141
|
+
def userinfo=(new_userinfo); end
|
142
|
+
def validate; end
|
143
|
+
end
|
144
|
+
class Addressable::URI::InvalidURIError < StandardError
|
145
|
+
end
|
146
|
+
module Addressable::URI::CharacterClasses
|
147
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
|
2
|
+
# srb rbi gems
|
3
|
+
|
4
|
+
# typed: strict
|
5
|
+
#
|
6
|
+
# If you would like to make changes to this file, great! Please create the gem's shim here:
|
7
|
+
#
|
8
|
+
# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/ast/all/ast.rbi
|
9
|
+
#
|
10
|
+
# ast-2.4.2
|
11
|
+
|
12
|
+
module AST
|
13
|
+
end
|
14
|
+
class AST::Node
|
15
|
+
def +(array); end
|
16
|
+
def <<(element); end
|
17
|
+
def ==(other); end
|
18
|
+
def append(element); end
|
19
|
+
def assign_properties(properties); end
|
20
|
+
def children; end
|
21
|
+
def clone; end
|
22
|
+
def concat(array); end
|
23
|
+
def deconstruct; end
|
24
|
+
def dup; end
|
25
|
+
def eql?(other); end
|
26
|
+
def fancy_type; end
|
27
|
+
def hash; end
|
28
|
+
def initialize(type, children = nil, properties = nil); end
|
29
|
+
def inspect(indent = nil); end
|
30
|
+
def original_dup; end
|
31
|
+
def to_a; end
|
32
|
+
def to_ast; end
|
33
|
+
def to_s(indent = nil); end
|
34
|
+
def to_sexp(indent = nil); end
|
35
|
+
def to_sexp_array; end
|
36
|
+
def type; end
|
37
|
+
def updated(type = nil, children = nil, properties = nil); end
|
38
|
+
end
|
39
|
+
class AST::Processor
|
40
|
+
include AST::Processor::Mixin
|
41
|
+
end
|
42
|
+
module AST::Processor::Mixin
|
43
|
+
def handler_missing(node); end
|
44
|
+
def process(node); end
|
45
|
+
def process_all(nodes); end
|
46
|
+
end
|
47
|
+
module AST::Sexp
|
48
|
+
def s(type, *children); end
|
49
|
+
end
|