diff --git a/Gemfile b/Gemfile index 8229524..c1e20cd 100644 --- a/Gemfile +++ b/Gemfile @@ -5,10 +5,7 @@ source "https://rubygems.org" # Specify your gem's dependencies in fic_tracker.gemspec gemspec -gem "rake", "~> 13.0" - gem "minitest", "~> 5.16" - +gem "rake", "~> 13.0" gem "rubocop", "~> 1.21" - -gem 'irb' +gem "webmock" diff --git a/lib/fic_tracker/backends/ao3/backend.rb b/lib/fic_tracker/backends/ao3/backend.rb index 25b2d81..ca69b63 100644 --- a/lib/fic_tracker/backends/ao3/backend.rb +++ b/lib/fic_tracker/backends/ao3/backend.rb @@ -126,6 +126,8 @@ module FicTracker::Backends::Ao3 attrs = extract_chapter(doc.at_css('#chapters > div.chapter')) chapter.set(**attrs) + + chapter end def get_search_info @@ -144,6 +146,22 @@ module FicTracker::Backends::Ao3 slug.to_s end + def parse_slug_type(slug) + return nil unless slug.is_a?(String) && slug.start_with?('http') + + slug = URI(slug) + first_part = slug.path.split('/').reject(&:empty?).first + + case first_part + when 'users' + :author + when 'works' + :story + else + raise "Unable to parse #{slug} (#{first_part}) as a slug" + end + end + private def extract_story(doc) diff --git a/lib/fic_tracker/util/cache.rb b/lib/fic_tracker/util/cache.rb index 11dc5bb..21cf9be 100644 --- a/lib/fic_tracker/util/cache.rb +++ b/lib/fic_tracker/util/cache.rb @@ -102,7 +102,7 @@ module FicTracker::Util Logging.logger[self] end - attr_accessor :encoder, :compress + attr_accessor :encoder ENCODING_FLAGS = 1 << 0 | 1 << 1 | 1 << 2 COMPRESSED_FLAG = 1 << 3 diff --git a/test/backends/test_ao3.rb b/test/backends/test_ao3.rb new file mode 100644 index 0000000..6e9d3dd --- /dev/null +++ b/test/backends/test_ao3.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +require 'test_helper' +require 'fic_tracker/backends/ao3/backend' + +class TestAo3 < Minitest::Test + def setup + stub_request(:get, 'https://archiveofourown.org/works/1234567890?view_adult=true').to_return( + status: 302, + headers: { 'Location' => 'https://archiveofourown.org/works/1234567890/chapters/1234567890?view_adult=true' }, + ) + stub_request(:get, 'https://archiveofourown.org/works/1234567890/navigate').to_return( + status: 200, + body: File.read('test/fixtures/ao3/story_nav.html') + ) + stub_request(:get, 'https://archiveofourown.org/works/1234567890/chapters/1234567890?view_adult=true').to_return( + status: 200, + body: File.read('test/fixtures/ao3/story_chapter.html') + ) + stub_request(:get, 'https://archiveofourown.org/works/1234567890?view_full_work=true&view_adult=true').to_return( + status: 200, + body: File.read('test/fixtures/ao3/story_fullstory.html') + ) + stub_request(:get, 'https://archiveofourown.org/users/Example/pseuds/Example').to_return( + status: 200, + body: File.read('test/fixtures/ao3/user.html') + ) + stub_request(:get, 'https://archiveofourown.org/users/Example/pseuds/Example2').to_return( + status: 200, + body: File.read('test/fixtures/ao3/user.html') + ) + + FicTracker.test! + @backend = FicTracker::Backends::Ao3::Backend.new + end + + def test_url_handling + klass = @backend.class + + assert klass.supports_url? 'https://archiveofourown.org/works/1234567890' + assert klass.supports_url? 'https://archiveofourown.org/works/1234567890/chapters/1234567890' + assert klass.supports_url? 'https://archiveofourown.org/users/Example' + assert klass.supports_url? 'https://archiveofourown.org/users/Example/pseuds/Example' + refute klass.supports_url? 'https://example.com' + end + + def test_slugging + assert_equal '1234567890', @backend.parse_slug('https://archiveofourown.org/works/1234567890') + assert_equal '1234567890', @backend.parse_slug('https://archiveofourown.org/works/1234567890/chapters/1234567890') + assert_equal :story, @backend.parse_slug_type('https://archiveofourown.org/works/1234567890') + assert_equal :story, @backend.parse_slug_type('https://archiveofourown.org/works/1234567890/chapters/1234567890') + assert_equal 'Example', @backend.parse_slug('https://archiveofourown.org/users/Example') + assert_equal 'Example', @backend.parse_slug('https://archiveofourown.org/users/Example/pseuds/Example') + assert_equal :author, @backend.parse_slug_type('https://archiveofourown.org/users/Example') + assert_equal :author, @backend.parse_slug_type('https://archiveofourown.org/users/Example/pseuds/Example') + end + + def test_load_author + aut = @backend.load_author 'Example' + + assert_nil aut.name + assert_equal 'https://s3.amazonaws.com/otw-ao3-icons/icons/1363284/standard.png?1668353161', aut.image + assert_equal 'https://archiveofourown.org/users/Example/pseuds/Example', aut.url + end + + def test_load_chapter + story = FicTracker::Models::Story.new(slug: '1234567890', backend: @backend) + story.id = 0 + chapter = @backend.load_chapter '1234567890', story + + assert_equal 1, chapter.index + assert_equal "Gotham's Top Ten Memes", chapter.name + assert_equal 'https://archiveofourown.org/works/1234567890/chapters/1234567890', chapter.url + + assert_equal 6213, chapter.content.size + assert_equal 'text/html', chapter.content_type + assert_equal 'f247c6ce215f2cf9398d6af29fafbb564220631a', chapter.etag + end + + def test_load_story + story = @backend.load_story '1234567890' + + assert_equal "Gotham's Top Ten Memes", story.name + assert_equal 1, story.authors.size + assert_equal 'Example', story.authors.first.slug + assert_equal 364, story.synopsis.size + assert_equal "https://archiveofourown.org/works/1234567890", story.url + assert_equal 'en', story.language + assert_equal 4, story.chapter_count + assert_equal 1333, story.word_count + refute story.completed? + end + + def test_find_chapters + story = @backend.find_chapters '1234567890' + + assert_equal 4, story.chapters.size + assert_equal [22, 48, 35, 10], story.chapters.map(&:name).map(&:size) + assert_equal '2019-06-19', story.chapters.first.published_at.strftime('%Y-%m-%d') + end + + def test_load_full_story + story = @backend.load_full_story '1234567890' + + assert_equal "Gotham's Top Ten Memes", story.name + assert_equal 1, story.authors.size + assert_equal 'Example', story.authors.first.slug + assert_equal 364, story.synopsis.size + assert_equal "https://archiveofourown.org/works/1234567890", story.url + assert_equal 'en', story.language + assert_equal 4, story.chapter_count + assert_equal 1333, story.word_count + refute story.completed? + + assert_equal 4, story.chapters.size + assert_equal [22, 48, 35, 10], story.chapters.map(&:name).map(&:size) + end +end diff --git a/test/backends/test_spacebattles.rb b/test/backends/test_spacebattles.rb new file mode 100644 index 0000000..e69de29 diff --git a/test/fixtures/ao3/story_chapter.html b/test/fixtures/ao3/story_chapter.html new file mode 100644 index 0000000..24de915 --- /dev/null +++ b/test/fixtures/ao3/story_chapter.html @@ -0,0 +1,612 @@ + + + + + + + + + + + + + + + Gotham's Top Ten Memes - Chapter 1 - Example - Multifandom [Archive of Our Own] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+

Donate at least US$10 and you'll become a member of the OTW! Learn about Fanlore, one of the projects your membership will support, and about our new thank-you gifts! So far we've raised US$46,902.92, and we’ve reached 1,229 new members out of our goal of 4,500

+
+

+× +

+
+ +
+ + + +
+
+ + + + + +

 

+ +

Actions

+ + +

Work Header

+ + +
+
+

+Gotham's Top Ten Memes +

+ +
+

Summary:

+
+

Every city has its pride and Gotham isn't different. We love our “dark and gloomy” architecture (meet us in the Batburgers parking lot Metropolis) and our Waynes, our vigilantes and most importantly: Our memes.

So, without much further ado, we present you Gotham’s top ten memes.

Gotham, the Waynes and the Bats through the eyes of social media.

+
+
+
+

Notes:

+
+

Because I love world building, I love multimedia fanfics and I really wanted to make memes from the perspective of Gotham city civilians. No need to have read the other parts of this series. Have fun!

+
+

(See the end of the work for more notes.)

+
+
+
+ +
+ +
+

+Chapter 1: Gotham's Top Ten Memes +

+ +
+ +
+

Chapter Text

+

Every city has its pride and Gotham isn't different. We love our “dark and gloomy” architecture (meet us in the Batburgers parking lot Metropolis) and our Waynes, our vigilantes and most importantly: Our memes.

So, without much further ado, we present you Gotham’s top ten memes.

+1) Child hoarders? +

+

+ +

+

We all know Bruce Wayne has made it his personal goal to get a child for every room in Wayne manor, but what about Batman? Since he started, more and more masks have appeared on the field. Not that we’re complaining…

+2) Poor, poor foreigners +

+ +

It is common knowledge that Batman is part of the Justice League, he even has his own Wikipedia article! Yet people still have a hard time believing our dark knight is more than just a conspiracy theory started by cultists.

+3) Going to work? Not always easy! +

+ +

Don’t forget! Wayne Enterprises are still selling the latest gas masks. You can find them right here. If you’re unable to afford one, you can pick up one for free at WE’s main office. The money earned by the sold gas masks goes straight into the research for the Anti-Joker-Venom vaccines and antidotes to Fear Gas.

+4) It’s an aesthetic and we are willing to commit +

+ +

Fun fact! A lot of our architecture was actually based on spite! Mainly, Gotham’s wealthiest taking one look at Metropolis’s architecture and deciding that we will be infinitely better. The events of the last decade have left their mark, but we have rebuilt Gotham in the same image (with some improvements! Rumor has it that Robin loves gargoyles, so one or two more are no harm, right?)

+5) A place for the future! +

+ +

Every student’s biggest fear is debt! So, despite our gloomy image, WE once again has decided to make Gotham much more attractive to outsiders by promising to pay part of your student debt. What do you have to do in turn? Well, be a (paid!) intern at any Wayne owned facility for a year. Does that include the little Cup Cape bakery on main street that Damian Wayne frequents? Yes, it does! So even if you’re no STEM student, you can apply for support!

+6) Since we’re already talking Wayne… +

+ +

Yes, Capitalism is bad and no, we should not support the rich. However, I dare you to say one word against Bruce Wayne, who pays one of the best wages in the country, gives more to charity than anybody else, starts up charities if he finds there aren’t enough, doesn’t run off to a city with less problems, supports stricter gun laws and is just an all-around sunshine.

+7) Gotham’s Baby +

+ +

If there is someone we love more than Bruce Wayne though, it’s Robin!!! No matter what shape or form or creepy laugh they come in, our punny bird is the absolute best. In the wise words of another meme:

+ +

+8) Yes, we have a lecture for that +

+ +

Okay, so in case you don’t know it, Gotham’s education system is a little weird. Namely, that we have a mandatory class once a month in which we get updated on the latest villain statuses, which vaccines don’t work anymore and etc. Pictures of the power points used in those classes hit the web about a month ago, and of course, it became a meme of people adding weird situations they stumbled into in Gotham in power point format.

+9) Clowns +

+ +

Look, the Joker is simply the worst. And what’s even more terrible than him breaking out? It’s him breaking out during exam time. Since we deal with so many villains per month, their attacks aren’t a valid excuse to miss school anymore. Fun. (But if the teacher doesn't show up, you pass with 100%!)

+10) Conspiracy theory +

+ +

Gotham’s longest – and best-running conspiracy theory of all time – DO THE BUTTS MATCH!? In our quest to figure out the identity of our masked heroes, we have tried our best to discover to whom we should sing our praise and the Do the butts match?  theory has helped us come quite far! We have discovered that, while Officer Grayson looks absolutely great in his uniform, he is sadly no match for Nightwing.

You liked this article? Then you may also be interested in:

+ 10 Projects Wayne Enterprises supports in Gotham +

+ 10 Meetings with the Bat – Stories from the GCPD +

+ 10 Reasons why you should study at Gotham U +

+
+ +
+ +
+
+ +
+ + + + + + + +
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/ao3/story_fullstory.html b/test/fixtures/ao3/story_fullstory.html new file mode 100644 index 0000000..10c728a --- /dev/null +++ b/test/fixtures/ao3/story_fullstory.html @@ -0,0 +1,800 @@ + + + + + + + + + + + + + + + Gotham's Top Ten Memes - Example - Multifandom [Archive of Our Own] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+

Donate at least US$10 and you'll become a member of the OTW! Learn about Fanlore, one of the projects your membership will support, and about our new thank-you gifts! So far we've raised US$46,902.92, and we’ve reached 1,229 new members out of our goal of 4,500

+
+

+× +

+
+ +
+ + + +
+
+ + + + + + + + + +

Actions

+ + +

Work Header

+ + +
+
+

+Gotham's Top Ten Memes +

+ +
+

Summary:

+
+

Every city has its pride and Gotham isn't different. We love our “dark and gloomy” architecture (meet us in the Batburgers parking lot Metropolis) and our Waynes, our vigilantes and most importantly: Our memes.

So, without much further ado, we present you Gotham’s top ten memes.

Gotham, the Waynes and the Bats through the eyes of social media.

+
+
+
+

Notes:

+
+

Because I love world building, I love multimedia fanfics and I really wanted to make memes from the perspective of Gotham city civilians. No need to have read the other parts of this series. Have fun!

+
+

(See the end of the work for more notes.)

+
+
+ + +
+ +
+ +
+

+Chapter 1: Gotham's Top Ten Memes +

+ +
+ +
+

Chapter Text

+

Every city has its pride and Gotham isn't different. We love our “dark and gloomy” architecture (meet us in the Batburgers parking lot Metropolis) and our Waynes, our vigilantes and most importantly: Our memes.

So, without much further ado, we present you Gotham’s top ten memes.

+1) Child hoarders? +

+

+ +

+

We all know Bruce Wayne has made it his personal goal to get a child for every room in Wayne manor, but what about Batman? Since he started, more and more masks have appeared on the field. Not that we’re complaining…

+2) Poor, poor foreigners +

+ +

It is common knowledge that Batman is part of the Justice League, he even has his own Wikipedia article! Yet people still have a hard time believing our dark knight is more than just a conspiracy theory started by cultists.

+3) Going to work? Not always easy! +

+ +

Don’t forget! Wayne Enterprises are still selling the latest gas masks. You can find them right here. If you’re unable to afford one, you can pick up one for free at WE’s main office. The money earned by the sold gas masks goes straight into the research for the Anti-Joker-Venom vaccines and antidotes to Fear Gas.

+4) It’s an aesthetic and we are willing to commit +

+ +

Fun fact! A lot of our architecture was actually based on spite! Mainly, Gotham’s wealthiest taking one look at Metropolis’s architecture and deciding that we will be infinitely better. The events of the last decade have left their mark, but we have rebuilt Gotham in the same image (with some improvements! Rumor has it that Robin loves gargoyles, so one or two more are no harm, right?)

+5) A place for the future! +

+ +

Every student’s biggest fear is debt! So, despite our gloomy image, WE once again has decided to make Gotham much more attractive to outsiders by promising to pay part of your student debt. What do you have to do in turn? Well, be a (paid!) intern at any Wayne owned facility for a year. Does that include the little Cup Cape bakery on main street that Damian Wayne frequents? Yes, it does! So even if you’re no STEM student, you can apply for support!

+6) Since we’re already talking Wayne… +

+ +

Yes, Capitalism is bad and no, we should not support the rich. However, I dare you to say one word against Bruce Wayne, who pays one of the best wages in the country, gives more to charity than anybody else, starts up charities if he finds there aren’t enough, doesn’t run off to a city with less problems, supports stricter gun laws and is just an all-around sunshine.

+7) Gotham’s Baby +

+ +

If there is someone we love more than Bruce Wayne though, it’s Robin!!! No matter what shape or form or creepy laugh they come in, our punny bird is the absolute best. In the wise words of another meme:

+ +

+8) Yes, we have a lecture for that +

+ +

Okay, so in case you don’t know it, Gotham’s education system is a little weird. Namely, that we have a mandatory class once a month in which we get updated on the latest villain statuses, which vaccines don’t work anymore and etc. Pictures of the power points used in those classes hit the web about a month ago, and of course, it became a meme of people adding weird situations they stumbled into in Gotham in power point format.

+9) Clowns +

+ +

Look, the Joker is simply the worst. And what’s even more terrible than him breaking out? It’s him breaking out during exam time. Since we deal with so many villains per month, their attacks aren’t a valid excuse to miss school anymore. Fun. (But if the teacher doesn't show up, you pass with 100%!)

+10) Conspiracy theory +

+ +

Gotham’s longest – and best-running conspiracy theory of all time – DO THE BUTTS MATCH!? In our quest to figure out the identity of our masked heroes, we have tried our best to discover to whom we should sing our praise and the Do the butts match?  theory has helped us come quite far! We have discovered that, while Officer Grayson looks absolutely great in his uniform, he is sadly no match for Nightwing.

You liked this article? Then you may also be interested in:

+ 10 Projects Wayne Enterprises supports in Gotham +

+ 10 Meetings with the Bat – Stories from the GCPD +

+ 10 Reasons why you should study at Gotham U +

+
+ +
+ + +
+ +
+

+Chapter 2: 10 Meetings with the Bat - Stories from the GCPD +

+ +
+

Notes:

+

I had so much fun I made more social media stuff!

+

+(See the end of the chapter for more notes.) +

+
+
+ +
+

Chapter Text

+

Batman and the GCPD: Sometimes enemies, most of the time good friends (at least when the other federal agencies aren't looking). Here we present you the top 10 times social media witnessed the GCPD and the Bat interacting.

+1) Big Dad Energy +

Now, while there is no official number of Robins, we’re guessing there have been up to six different ones so far. The skip from the first to the second one being quite noticeably – it’s not always that a roughly 5'6" bird suddenly shrinks to a 4'6" fledgling. And apparently, the shorter a bird is, the more does Batman care.

+ +

+ +

+2) Martha Park +

Okay, hands up – and be honest: Who remembers what started the trend of new dads dressing up as Batman holding their babies? Noone? Alright, let me give you a tip:

a) Bruce Wayne and his then recently adopted son Jason Todd going trick or treating dressed as Robin and Batman

b) A picture of Batman holding a baby going viral

c) Copied the Metropolis trend of dressing up as Superman holding a baby

If you guessed b) you were correct! Back in 2015 the following pictures and article dominated the news.

+ +

+ +

+3) Speeding Cars +

The GCPD is more and more becoming a police force to not only trust, but actually be proud of as well – and they take doing their job very seriously.

+ +

+4) Not exactly the GCPD but they get enough of our criminals +

Our sister city Blüdhaven has a hard time being our sister city. They get all our runaway criminals and she only has Nightwing to protect her. And Nightwing has Officer Rohrbach.

+ +

+5) DIY +

Batman is the representation for the “hands-on” approach – in all matters.

+ +

+6) Money, money, money +

Everyone loves legal loopholes, the GCPD is no different. Currently, they’re making use of one that allows them to accept cash from the Batman. That’s right, Batman, or with Batman Inc. now Bruce Wayne, comes by every three month to pay quarterly fees. They’re supposed to cover the other vigilantes’ speeding tickets, officially, but I’d like to know how much cash it is that the GCPD is celebrating like this:

+ +

+7) #BetterCars +

Everything in Gotham except the politicians and the drug market is criminally underfunded. Same goes for the GCPD, so they don’t have the best equipment in town.

+ +

+8) CHALLENGE ACCEPTED +

Despite the fact that the Batfamily has been declared criminal a few times, as seen by this post, they can get along masterfully with each other as well. The BPD, on the other hand, is still a work in progress.

+ +

+9) Babysitting +

Let’s be honest, being a police officer means a lot of waiting. Observing. Babysitting Robin.

+ +

+10) Supreme Authority +

It isn’t news that Batman has quite the authority in the GCPD as the Wayne family and friends can now testify.

+ +

 

 

+

 

+

 

+
+

 

+

 

+
+

You liked this article? Then you might also be interested in:

+

+ 10 Projects Wayne Enterprises supports in Gotham  +

+

+ 10 Reasons why you should study at Gotham U  +

+

+ The Wayne Family Twitters +

+
+
+
+
+ +
+
+

Notes:

+
+

Thanks for reading! I'd love to hear what you think!
Shout out to my friend Garce for helping me with 6).
Anything in particular you'd like to see?

+
+
+
+
+ + +
+ +
+

+Chapter 3: The Wayne (and affiliated) Twitters +

+ +
+

Notes:

+

You asked for the Wayne Twitters and here they are.

+

+(See the end of the chapter for more notes.) +

+
+
+ +
+

Chapter Text

+

+ +

+ +

 

+ +

 

 

+ +

+ +

 

+ +

+ +

 

+ +

+ +

 

+ +

+ +

 

+ +

+ +

 

+ +

+ +

 

+ +

+ +


"Tim."

"Yes?"

"You spend way too much time on twitter."

"I'm sorry, all the other rich-kid-covers were already in use, so I took one for the team and became the social media addict. Feel free to switch with me, reclusive nerd."

"... Know what? I'm actually good, thanks. Anyway, did you hear this? That was totally B calling me to rant at me for my recklessness. I absolutely should go to him immediately and pay attention to whatever important thing he has to say."

"Really smooth, Jason. Totally unable to spot the lie."

+
+ +
+
+

Notes:

+
+

I,,, did not expect this to blow up as much as it did lmao. Happy to see you all are enjoying this!
Any other suggestions of stuff you want to see?
Thanks for reading! Comments are more than welcome and make me cry very happy tears.

+
+
+
+
+ + +
+ +
+

+Chapter 4: Party Time +

+ +
+ +
+

Chapter Text

+

A story told across social media.

+ +
+
+ +
+
+ +
+
+ +
+
+ +

+
+ +
+ +
+ + +
+ +
+

Notes:

+

Thanks for reading!

+
+ + +
+

Series this work belongs to:

+ +
+ +
+ +
+ + + + + + + + +
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/ao3/story_nav.html b/test/fixtures/ao3/story_nav.html new file mode 100644 index 0000000..c94503f --- /dev/null +++ b/test/fixtures/ao3/story_nav.html @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + Navigate + Work + | + Archive of Our Own + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+

Donate at least US$10 and you'll become a member of the OTW! Learn about Fanlore, one of the projects your membership will support, and about our new thank-you gifts! So far we've raised US$46,902.92, and we’ve reached 1,229 new members out of our goal of 4,500

+
+

+× +

+
+ +
+ + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/ao3/user.html b/test/fixtures/ao3/user.html new file mode 100644 index 0000000..d737808 --- /dev/null +++ b/test/fixtures/ao3/user.html @@ -0,0 +1,1066 @@ + + + + + + + + + + + + + + + Example + | + Archive of Our Own + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+

Donate at least US$10 and you'll become a member of the OTW! Learn about Fanlore, one of the projects your membership will support, and about our new thank-you gifts! So far we've raised US$46,902.92, and we’ve reached 1,229 new members out of our goal of 4,500

+
+

+× +

+
+ +
+ + + + +
+
+
+ +
+

+Example +

+

+ + + +
+ + +
+

Fandoms

+
    +
  1. +Star Wars - All Media Types (93) +
  2. +
  3. +Star Wars Prequel Trilogy (72) +
  4. +
  5. +Turning - 쿠유 | Kuyu (Webcomic) (40) +
  6. +
  7. +Turning | 쿠유 - Kuyu (Webnovel) (40) +
  8. +
  9. +One Piece (Anime & Manga) (38) +
  10. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ + + +

+
+
+

Recent works

+ +
+
+

Recent series

+
    +
  1. + + + + + +
    Summary
    +
    +

    Katchian la Orr awakens as an Omega. He calls Yuder to help him deal with his heat.

    +
    + +
    +
    Words:
    +
    3,394
    +
    Works:
    +
    2
    +
    Bookmarks:
    +
    1
    +
    +
  2. +
  3. + + + + + +
    Summary
    +
    +

    Your father in your first life ignored you? That's no problem, just get a new one when you regress- why are they gay kissing.

    +
    + +
    +
    Words:
    +
    4,679
    +
    Works:
    +
    4
    +
    Bookmarks:
    +
    12
    +
    +
  4. +
  5. + + + + + + +
    +
    Words:
    +
    19,136
    +
    Works:
    +
    2
    +
    Bookmarks:
    +
    8
    +
    +
  6. +
  7. + + + + + +
    Summary
    +
    +

    In which Yuder is trying to get his birthright and Kishiar gets himself involved with a doomed crown prince.

    +
    + +
    +
    Words:
    +
    2,374
    +
    Works:
    +
    1
    +
    Bookmarks:
    +
    5
    +
    +
  8. +
  9. + + + + + +
    Summary
    +
    +

    Metas on Turning.

    +
    + +
    +
    Words:
    +
    7,702
    +
    Works:
    +
    3
    +
    Bookmarks:
    +
    3
    +
    +
  10. +
+ +
+ +
+ +

Navigation

+ + +
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/spacebattles/story_chapter.html b/test/fixtures/spacebattles/story_chapter.html new file mode 100644 index 0000000..e69de29 diff --git a/test/fixtures/spacebattles/story_mainpage.html b/test/fixtures/spacebattles/story_mainpage.html new file mode 100644 index 0000000..e69de29 diff --git a/test/fixtures/spacebattles/story_nav.html b/test/fixtures/spacebattles/story_nav.html new file mode 100644 index 0000000..e69de29 diff --git a/test/test_fic_tracker.rb b/test/test_fic_tracker.rb index bdcbc99..69383ef 100644 --- a/test/test_fic_tracker.rb +++ b/test/test_fic_tracker.rb @@ -6,8 +6,4 @@ class TestFicTracker < Minitest::Test def test_that_it_has_a_version_number refute_nil ::FicTracker::VERSION end - - def test_it_does_something_useful - assert false - end end diff --git a/test/test_helper.rb b/test/test_helper.rb index 88dee09..16f4dde 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -4,3 +4,12 @@ $LOAD_PATH.unshift File.expand_path("../lib", __dir__) require "fic_tracker" require "minitest/autorun" +require "webmock/minitest" + +module FicTracker + def self.test! + FicTracker.database = FicTracker::Util::Database.connect :memory, migrate: true + FicTracker.cache = FicTracker::Util::Cache.create type: :none + FicTracker.logger.level = :error + end +end