This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from unittest import TestCase | |
from main import replace_content, BlogEntry, fetch_and_parse_rss_feed | |
EXPECTED_CONTENT = "This is expected content in target block" | |
EXPECTED_RESULT = """#Header | |
<!-- blog starts --> | |
""" + EXPECTED_CONTENT + """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from dataclasses import dataclass | |
import feedparser | |
MAX_FETCHED_BLOG_POSTS = 5 | |
README_FILE_NAME = 'README.md' | |
@dataclass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build README | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "mw", | |
"platform": "xbl", | |
"username": "tuksiarz", | |
"type": "wz", | |
"level": 140.0, | |
"maxLevel": 0.0, | |
"levelXpRemainder": 3000.0, | |
"levelXpGained": 7000.0, | |
"prestige": 0.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default_platform(:android) | |
platform :android do | |
desc "Deploy to Firebase App Distribution" | |
lane :firebase_distribution do | |
sh("wget https://github.com/appium/appium/raw/master/sample-code/apps/ApiDemos-debug.apk") | |
firebase_app_distribution( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Distribute to firebase | |
on: | |
workflow_dispatch: | |
jobs: | |
distribute: | |
runs-on: ubuntu-latest | |
steps: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val stringAssignedInCode = "foo\nbar" | |
val plainStringFromFile: String = this::class.java.classLoader.getResource("saved_line")!!.readText() | |
val stringSimplyReplaced = plainStringFromFile.replace("\\n", "\n") | |
val stringUnescapedWithApacheCommons = StringEscapeUtils.unescapeJava(plainStringFromFile) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val stringAssignedInCode = "foo\nbar" | |
val stringStoredInFile: String = this::class.java.classLoader.getResource("saved_line")!!.readText() | |
.replace("\\n", "\n") | |
assertThat(stringAssignedInCode).isEqualTo(stringStoredInFile) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val stringAssignedInCode = "foo\nbar" | |
val stringStoredInFile: String = this::class.java.classLoader.getResource("saved_line")!!.readText() | |
assertThat(stringAssignedInCode).isEqualTo(stringStoredInFile) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo\nbar |