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 'package:flutter/material.dart'; | |
import 'package:japanese_reading/settings_page/services/experimental_mode.dart'; | |
class ExperimentalModeSwitcher extends StatefulWidget { | |
final Widget child; | |
final ExperimentalMode experimentalMode; | |
const ExperimentalModeSwitcher({Key key, @required this.child, @required this.experimentalMode}) : super(key: key); | |
@override |
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 'package:firebase_analytics/firebase_analytics.dart'; | |
import 'package:japanese_reading/services/preferences.dart'; | |
class ExperimentalMode { | |
static final cacheStaleKey = 'cache_stale'; | |
static final experimentalModeKey = 'experimental_mode'; | |
final FirebaseAnalytics analytics; | |
final Preferences preferences; |
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
Then("the first match is {string}") do |title| | |
expect(find(:css, '#search div h3', :match => :first).text).to eq(title) | |
end | |
When("tapping search") do | |
click_button('btnK') | |
end |
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
Feature: Google Search | |
Scenario: Searching a term will generate results | |
Given the user is on google top page | |
When searching for "greycastle ab software" | |
Then the first match is "Greycastle - Greycastle" | |
Scenario: The lucky feature will navigate straight to the first match | |
Given the user is on google top page | |
When entering "greycastle ab software" |
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
''' Utility class Table for parsing an html table with Scrapy | |
''' | |
class InvalidSelector(Exception): | |
''' Exception raised when the table selector is invalid | |
''' | |
def validate_selector(selector): | |
''' Validates if a selector has a match and can be used | |
''' |
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 scrapy | |
from table import Table | |
# requires https://gist.github.com/ddikman/7426cad6cba342b162162babc1a5d0a3 to be placed as tably.py in the same folder | |
class TableSpider(scrapy.Spider): | |
name = "table-scraper" | |
start_urls = [ |
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
cache: | |
paths: | |
- /flutter/bin/cache/dart-sdk | |
build: | |
image: greycastle/jreader:2.3.0 | |
script: | |
- flutter analyze | |
- pub global activate junitreport | |
- export PATH="$PATH":"$HOME/.pub-cache/bin" |
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
stages: | |
- lint | |
- test | |
- coverage | |
default: | |
image: greycastle/jreader:2.3.0 | |
cache: | |
paths: |
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
stages: | |
- lint | |
- test | |
- coverage | |
default: | |
image: greycastle/flutter:2.2.0 | |
cache: | |
paths: |
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
# Add this pre-commit file to ./.git/hooks/pre-commit | |
#!/bin/sh | |
flutter analyze |