scribe/shard.lock

107 lines
2.3 KiB
Plaintext
Raw Normal View History

2021-05-01 23:02:08 +02:00
version: 2.0
shards:
authentic:
git: https://github.com/luckyframework/authentic.git
version: 0.8.2
2021-05-01 23:02:08 +02:00
avram:
git: https://github.com/luckyframework/avram.git
version: 0.23.0
backtracer:
git: https://github.com/sija/backtracer.cr.git
version: 1.2.1
2021-05-01 23:02:08 +02:00
cadmium_transliterator:
git: https://github.com/cadmiumcr/transliterator.git
version: 0.1.0+git.commit.46c4c14594057dbcfaf27e7e7c8c164d3f0ce3f1
2021-05-01 23:02:08 +02:00
carbon:
git: https://github.com/luckyframework/carbon.git
version: 0.2.1
2021-05-01 23:02:08 +02:00
cry:
git: https://github.com/luckyframework/cry.git
version: 0.4.3
crystar:
git: https://github.com/naqvis/crystar.git
version: 0.2.0
db:
git: https://github.com/crystal-lang/crystal-db.git
version: 0.11.0
2021-05-01 23:02:08 +02:00
dexter:
git: https://github.com/luckyframework/dexter.git
version: 0.3.4
2021-05-01 23:02:08 +02:00
exception_page:
git: https://github.com/crystal-loot/exception_page.git
version: 0.2.2
2021-05-01 23:02:08 +02:00
habitat:
git: https://github.com/luckyframework/habitat.git
version: 0.4.7
lucky:
git: https://github.com/luckyframework/lucky.git
version: 0.30.1
lucky_cache:
git: https://github.com/luckyframework/lucky_cache.git
version: 0.1.1
lucky_env:
git: https://github.com/luckyframework/lucky_env.git
version: 0.1.4
2021-05-01 23:02:08 +02:00
lucky_flow:
git: https://github.com/luckyframework/lucky_flow.git
version: 0.7.3
lucky_router:
git: https://github.com/luckyframework/lucky_router.git
version: 0.5.1
2021-05-01 23:02:08 +02:00
lucky_task:
git: https://github.com/luckyframework/lucky_task.git
version: 0.1.1
2021-05-01 23:02:08 +02:00
Render embedded content PostResponse::Paragraph's that are of type IFRAME have extra data in the iframe attribute to specify what's in the iframe. Not all data is the same, however. I've identified three types and am using the new EmbeddedConverter class to convert them: * EmbeddedContent, the full iframe experience * GithubGist, because medium or github treat embeds differently for whatever reason * EmbeddedLink, the old style, just a link to the content. Effectively a fallback The size of the original iframe is also specified as an attribute. This code resizes it. The resizing is determined by figuring out the width/height ratio and setting the width to 800. EmbeddedContent can be displayed if we have an embed.ly url, which most iframe response data has. GitHub gists are a notable exception. Gists instead can be embedded simply by taking the gist URL and attaching .js to the end. That becomes the iframe's src attribute. The PostResponse::Paragraph's iframe attribute is nillable. Previous code used lots of if-statements with variable bindings to work with the possible nil values: ```crystal if foo = obj.nillable_value # obj.nillable_value was not nil and foo contains the value else # obj.nillable_value was nil so do something else end ``` See https://crystal-lang.org/reference/syntax_and_semantics/if_var.html for more info In the EmbeddedConverter the monads library has been introduced to get rid of at least one level of nillability. This wraps values in Maybe which allows for a cleaner interface: ```crystal Monads::Try(Value).new(->{ obj.nillable_value }) .to_maybe .fmap(->(value: Value) { # do something with value }) .value_or(# value was nil, do something else) ``` This worked to get the iframe attribute from a Paragraph: ```crystal Monads::Try(PostResponse::IFrame).new(->{ paragraph.iframe }) .to_maybe .fmap(->(iframe : PostResponse::IFrame) { # iframe is not nil! }) .fmap(#and so on) .value_or(Empty.new) ``` iframe only has one attribute: mediaResource which contains the iframe data. That was used to determine one of the three types above. Finally, Tufte.css has options for iframes. They mostly look good except for tweets which are too small and weirdly in the center of the page which actually looks off-center. That's for another day though.
2021-09-13 19:27:52 +02:00
monads:
git: https://github.com/alex-lairan/monads.git
version: 1.0.0
2021-05-01 23:02:08 +02:00
pg:
git: https://github.com/will/crystal-pg.git
version: 0.26.0
2021-05-01 23:02:08 +02:00
pulsar:
git: https://github.com/luckyframework/pulsar.git
version: 0.2.3
2021-05-01 23:02:08 +02:00
selenium:
git: https://github.com/matthewmcgarvey/selenium.cr.git
version: 0.9.1
shell-table:
git: https://github.com/luckyframework/shell-table.cr.git
version: 0.9.3
splay_tree_map:
git: https://github.com/wyhaines/splay_tree_map.cr.git
version: 0.2.2
2021-05-01 23:02:08 +02:00
teeplate:
git: https://github.com/luckyframework/teeplate.git
version: 0.8.5
2021-05-01 23:02:08 +02:00
webdrivers:
git: https://github.com/matthewmcgarvey/webdrivers.cr.git
version: 0.4.0
wordsmith:
git: https://github.com/luckyframework/wordsmith.git
version: 0.3.0
2021-05-01 23:02:08 +02:00