usaidwat 1.5.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd56c1ad68b4c40008065965cdb1ae6868d6156f
4
- data.tar.gz: 28f5d5efdf0f0699b5acf4c4819e5dcbd9484755
3
+ metadata.gz: 7ff7340965e5a501a28aa84a1bacc1d3079c374c
4
+ data.tar.gz: 2dcd4a947aa5e5b09d74a2b6f059972eff73e393
5
5
  SHA512:
6
- metadata.gz: ad29b44221fcbd8e8f9559c8e0852598fe90034e2cc6bfdc7abfe908b90d664e0129538f0eb8ab6e158ae96d745f679cdd362fd9ffaa36b2ef6322b5ebecf8fa
7
- data.tar.gz: 1ccdf23613c87cd19356d1e26dc63e022fe88dbb38d45300494af76b3c40a644aa59e53032a2912f13fd4c67da26bff26480ca8099f7354d0f4d6cd55df102fc
6
+ metadata.gz: 1cf3cfcc75e31c619418a5d30966dfb308ba96974feb002cffdd2ac09b33ee256b79f37f975fd598da7773430547c5084d7fec3c0b91fb3fa211c8b22212d27d
7
+ data.tar.gz: 4290d21e50f7607e1d86e438f2cd869b9020478af1edafb3a43fa14acd69f5d2eb47064007ff4939e78eaeeb470bd8d845ef789c28f2db203b8b496533f7abd5
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012-2015 Michael Dippery
1
+ Copyright (c) 2012-2017 Michael Dippery
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -43,4 +43,9 @@ task :clean do
43
43
  rm Dir.glob("*.gem"), :verbose => true
44
44
  end
45
45
 
46
+ desc "Show current version number"
47
+ task :version do
48
+ puts USaidWat::VERSION
49
+ end
50
+
46
51
  task :default => :build
data/features/log.feature CHANGED
@@ -410,6 +410,509 @@ Feature: Browse comments
410
410
  Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
411
411
  """
412
412
 
413
+ Scenario: Exclude a subreddit
414
+ Given the Reddit service returns comments for the user "mipadi"
415
+ And time is frozen at Apr 10, 2017 12:08 PM
416
+ When I run `usaidwat log -- mipadi -AskReddit`
417
+ Then it should pass with exactly:
418
+ """
419
+ wikipedia
420
+ http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
421
+ Heisenbug: a software bug that seems to disappear or alter its behavior when one attempts to study it
422
+ over 4 years ago • +1
423
+
424
+ Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
425
+
426
+
427
+ nyc
428
+ http://www.reddit.com/r/nyc/comments/141zqc/z/c79dxg6
429
+ NYC taxi roof lights get overhaul - A light simply will mean the cab is available. No light will mean it's not.
430
+ over 4 years ago • +2
431
+
432
+ It has a fare when the lights are off.
433
+
434
+
435
+ worldnews
436
+ http://www.reddit.com/r/worldnews/comments/140mra/z/c797jq4
437
+ Palestinians win upgraded UN status by wide margin
438
+ over 4 years ago • +1
439
+
440
+ The Judgment of Solomon Accords.
441
+
442
+
443
+ apple
444
+ http://www.reddit.com/r/apple/comments/1405el/z/c78zb9q
445
+ iTunes 11 finally available for download - The Verge
446
+ over 4 years ago • +1
447
+
448
+ I just got rid of the ones "in the cloud". I don't want to lose the play counts on the old (protected) files, and I don't use the iTunes Match service anyway.
449
+
450
+
451
+ apple
452
+ http://www.reddit.com/r/apple/comments/1405el/z/c78zas6
453
+ iTunes 11 finally available for download - The Verge
454
+ over 4 years ago • +1
455
+
456
+ Let's just say I'm writing checks my body can't cash.
457
+
458
+
459
+ apple
460
+ http://www.reddit.com/r/apple/comments/1405el/z/c78qp8s
461
+ iTunes 11 finally available for download - The Verge
462
+ over 4 years ago • +3
463
+
464
+ Is there anything wrong with just deleting them? I get a warning about their being deleted from iCloud, but I don't really care because these duplicates tend to mess with syncing on my iPhone anyway. (They're tracks I downloaded from iTMS as much as 8 years ago, and in some cases I've changed the ID3 tags which seems to confuse iTunes to no end. Or maybe it's because they're the old protected AAC files, I dunno.)
465
+
466
+ Edit: Ah yes, it appears to happen for protected AAC files.
467
+
468
+
469
+ apple
470
+ http://www.reddit.com/r/apple/comments/1405el/z/c78p6wa
471
+ iTunes 11 finally available for download - The Verge
472
+ over 4 years ago • +28
473
+
474
+ Oh cool, it even duplicated my songs <http://i.imgur.com/8BSE9.png>—for free!
475
+
476
+
477
+ Games
478
+ http://www.reddit.com/r/Games/comments/13xc2o/z/c784qj8
479
+ The True Story of Battlefield 3, the Battlefield Franchise, Its Community, & EA/DICE
480
+ over 4 years ago • +2
481
+
482
+ That's exactly how I feel. There are times when I have a ton of fun playing BF3…but it always feels like it has so much more potential to be an awesome game.
483
+
484
+ And that feeling comes even when the game isn't completely fucking frustrating because some admin is kicking you for using some arbitrary weapon he doesn't like, or switching you to the losing team because he doesn't like getting his ass kicked. Or when the game is simply crashing.
485
+
486
+
487
+ books
488
+ http://www.reddit.com/r/books/comments/13vijv/z/c77stm8
489
+ I was saddened hearing this story on the Takeaway this morning- "Is literature necessary?" discussing the new common core standards dictating that 70% of reading be non-fiction.
490
+ over 4 years ago • +1
491
+
492
+ I went to a public school.
493
+
494
+
495
+ django
496
+ http://www.reddit.com/r/django/comments/13p9ez/z/c77n56i
497
+ I need a little help understanding billing and payment
498
+ over 4 years ago • +2
499
+
500
+ I have a lot of experience working with Satchmo. I don't recommend it. It's over-engineered, hard to adapt to your own needs, and, while buggy, it's rarely updated anymore.
501
+
502
+
503
+ books
504
+ http://www.reddit.com/r/books/comments/13vijv/z/c77n2hg
505
+ I was saddened hearing this story on the Takeaway this morning- "Is literature necessary?" discussing the new common core standards dictating that 70% of reading be non-fiction.
506
+ over 4 years ago • +11
507
+
508
+ Yeah, I'm disappointed that some people only enjoyed two books. I didn't like all of the stuff I read in high school, but I got to read great things like Animal Farm, 1984, Night, Raisin in the Sun, The Glass Menagerie, Shakespeare, King Arthur, A Doll's House, Death of a Salesman, and probably more.
509
+
510
+
511
+ programming
512
+ http://www.reddit.com/r/programming/comments/13ug2x/z/c77msa1
513
+ Why software engineers are vastly undervalued
514
+ over 4 years ago • +4
515
+
516
+ A conductor just collects your tickets.
517
+
518
+
519
+ apple
520
+ http://www.reddit.com/r/apple/comments/13vgrv/z/c77ksqn
521
+ Report: Apple bumps Android from top spot in U.S. smartphone market on strength of iPhone 5
522
+ over 4 years ago • +13
523
+
524
+ I foresee this being on the "Things That Didn't Get More Than 2 Upvotes in /r/technology" list.
525
+
526
+
527
+ programming
528
+ http://www.reddit.com/r/programming/comments/13t868/z/c77jtox
529
+ Apple's proposal for modules in C(++) [PDF slides]
530
+ over 4 years ago • +1
531
+
532
+ I am aware of that. I think that only underscores my point.
533
+
534
+
535
+ programming
536
+ http://www.reddit.com/r/programming/comments/13t868/z/c77jjo6
537
+ Apple's proposal for modules in C(++) [PDF slides]
538
+ over 4 years ago • +1
539
+
540
+ Well, yes; I'm just pointing out that OS X led to a resurgence in interest and usage of Objective-C, years before the iPhone.
541
+
542
+
543
+ programming
544
+ http://www.reddit.com/r/programming/comments/13t868/z/c776z4r
545
+ Apple's proposal for modules in C(++) [PDF slides]
546
+ over 4 years ago • +1
547
+
548
+ OS X wasn't out yet in 1999, so most Objective-C programmers would've been from the NeXTSTEP days.
549
+
550
+
551
+ programming
552
+ http://www.reddit.com/r/programming/comments/13t868/z/c772epw
553
+ Apple's proposal for modules in C(++) [PDF slides]
554
+ over 4 years ago • +3
555
+
556
+ Objective-C's clunky import system is due to its need to be backwards-compatible with C.
557
+
558
+
559
+ programming
560
+ http://www.reddit.com/r/programming/comments/13t868/z/c772dux
561
+ Apple's proposal for modules in C(++) [PDF slides]
562
+ over 4 years ago • +7
563
+
564
+ Anyone who wrote software for OS X (or NeXTSTEP, even) had used Objective-C before the iPhone. ;)
565
+
566
+
567
+ programming
568
+ http://www.reddit.com/r/programming/comments/13t868/z/c7729jt
569
+ Apple's proposal for modules in C(++) [PDF slides]
570
+ over 4 years ago • -3
571
+
572
+ u mad bro?
573
+
574
+
575
+ programming
576
+ http://www.reddit.com/r/programming/comments/13rnu0/z/c77071r
577
+ RubyMonk
578
+ over 4 years ago • +3
579
+
580
+ Proggit: Where knowledge is made up and the karma points don't matter!
581
+
582
+
583
+ programming
584
+ http://www.reddit.com/r/programming/comments/13rnu0/z/c7706ho
585
+ RubyMonk
586
+ over 4 years ago • +5
587
+
588
+ I took the wink to mean that the comment was tongue-in-cheek. (The site's owners may have asked for a comment from Matz himself, and that's what he gave as a joke.)
589
+
590
+
591
+ programming
592
+ http://www.reddit.com/r/programming/comments/13pp8j/z/c76gi00
593
+ The X.Org CodingStyle
594
+ over 4 years ago • +2
595
+
596
+ Exactly. You can make a "tabs for indentation, spaces for alignment" rule, but some dingback invariably screws it up (uses tabs for both or something like that), which inevitably makes the alignment/indentation wrong for everyone but him. (This is especially true on open source projects, where it's hard to tell Random J. Contributor to uses "tabs for indentation, spaces for alignment"). Using spaces for everything is just easier, and it's not really a that big of a deal if indents aren't in your preferred size. (Prefer 8-space tabs to 4-space tabs? Too bad, you can live with 4-space tabs?)
597
+
598
+
599
+ programming
600
+ http://www.reddit.com/r/programming/comments/13pp8j/z/c76gg04
601
+ The X.Org CodingStyle
602
+ over 4 years ago • +3
603
+
604
+ It is pretty unreadable, but that's not the X.Org coding style. X.Org would do:
605
+
606
+ static int
607
+ nameofthefunction(int arg1,
608
+ int arg2,
609
+ int arg3);
610
+
611
+
612
+ worldnews
613
+ http://www.reddit.com/r/worldnews/comments/13mdw2/z/c758qos
614
+ How Israeli Drone Pilots Made Their Life-and-Death Choices Over Gaza - “When you see a target, all you want to do is attack. But it’s not that simple.”
615
+ over 4 years ago • -3
616
+
617
+ Since when did Wired start publishing PR pieces for the Israeli military?
618
+
619
+
620
+ personalfinance
621
+ http://www.reddit.com/r/personalfinance/comments/13iea3/z/c74b9j1
622
+ What's the most expensive mistake you ever made financially?
623
+ over 4 years ago • +2
624
+
625
+ It's not just money for a piece of paper. If you're serious about writing, studying it puts you in contact with serious writers, lets you focus on your craft, and provides valuable networking opportunities. And a lot of MFA programs are funded.
626
+
627
+ It's not necessarily the most pragmatic option (especially not now), and sure, you can write without it, but it's about far more than the degree itself.
628
+
629
+
630
+ programming
631
+ http://www.reddit.com/r/programming/comments/13f783/z/c740nlq
632
+ Why Brit Ruby 2013 was cancelled and why this is not ok — Gist
633
+ over 4 years ago • +1
634
+
635
+ Not different at all. Implying that they didn't bother to ask anyone is the consequence of being ignorant about the situation.
636
+
637
+
638
+ programming
639
+ http://www.reddit.com/r/programming/comments/13f783/z/c73zda5
640
+ Why Brit Ruby 2013 was cancelled and why this is not ok — Gist
641
+ over 4 years ago • +1
642
+
643
+ Neither. It's not uncommon, though, for the promotional material and even the speaker lineup for programming conventions to be aimed at heterosexual white males. I don't think that the organizers are actually racist or sexist or homophobic; rather, I think they're in a field were most people are straight white males, and fail to realize that not everyone is like them.
644
+
645
+ This article <http://devblog.avdi.org/2012/11/19/on-britruby/> has a provocative analysis. The key point (and obviously I agree with the blogger) is this:
646
+
647
+ "I fully believe them when they say that they set out to create a diverse conference. However, I think some implicit bias crept into their selection process.
648
+
649
+
650
+
651
+ I’m not accusing the BritRuby organizers of being racist, sexist, or misogynistic. And I don’t think anyone else involved in this conversation is accusing them of those things either, despite misguided claims to the contrary. But I don’t think it’s farfetched to suggest that in their process for coming up with names to invite, their brain VMs might have been over-optimized for the common case: white dudes."
652
+
653
+
654
+ battlefield3
655
+ http://www.reddit.com/r/battlefield3/comments/13d64e/z/c73vgqr
656
+ Can't argue with those rules..
657
+ over 4 years ago • +1
658
+
659
+ I haven't used the AK-74M since I unlocked other weapons (I only have 1h5m of play time on it), but you inspired me to give it another try.
660
+
661
+
662
+ redditcasual
663
+ http://www.reddit.com/r/redditcasual/comments/13fxv8/z/c73rp5l
664
+ Submissions for new clan tag...
665
+ over 4 years ago • +1
666
+
667
+ RDDT was used a lot back in the Black Ops days.
668
+
669
+
670
+ programming
671
+ http://www.reddit.com/r/programming/comments/13f4tu/z/c73r5l1
672
+ How To Package Your Python Code - The Right Way…
673
+ over 4 years ago • +2
674
+
675
+ Python is a little bit like a Reese's Peanut Butter Cup: there's no right way to package Python code.
676
+
677
+
678
+ programming
679
+ http://www.reddit.com/r/programming/comments/13f8y8/z/c73r0ok
680
+ Hounded By Recruiters, Coders Put Themselves Up For Auction - Forbes
681
+ over 4 years ago • +3
682
+
683
+ I get at least one email per week, sometimes from a rep at the company, and sometimes just from a random recruiter. I'm not even on LinkedIn—these are from people who happen to find me on Stack Overflow or GitHub. During some periods, I even get 2-4 emails per week. (I've actually stopped responding to them, because it's become a bit burdensome to write back.)
684
+
685
+
686
+ programming
687
+ http://www.reddit.com/r/programming/comments/13f783/z/c73qhxi
688
+ Why Brit Ruby 2013 was cancelled and why this is not ok — Gist
689
+ over 4 years ago • +11
690
+
691
+ Welcome to the wonderful world of Python drama!
692
+
693
+
694
+ programming
695
+ http://www.reddit.com/r/programming/comments/13f783/z/c73qhq1
696
+ Why Brit Ruby 2013 was cancelled and why this is not ok — Gist
697
+ over 4 years ago • +2
698
+
699
+ "Turns out, a lot of the prominent Rubyists are white guys and all of the ones who said they'd like to come were, indeed, white guys."
700
+
701
+ I do have to wonder if they even bothered to ask anyone who wasn't white and male.
702
+
703
+
704
+ photography
705
+ http://www.reddit.com/r/photography/comments/13fsog/z/c73qesj
706
+ Do you travel? If so, what camera do you use/prefer?
707
+ over 4 years ago • +1
708
+
709
+ I usually take my Olympus EP-3 and/or my Fujifilm FinePix X100. The X100 is great, but it has a fixed lens, so if need something with zoom or a certain kind of lens, I take the EP-3.
710
+
711
+
712
+ apple
713
+ http://www.reddit.com/r/apple/comments/13erfl/z/c73e3re
714
+ iMessage down?
715
+ over 4 years ago • +3
716
+
717
+ Reporting in from New York. I can't message another person who lives in New York, so it could just be regional. Who knows.
718
+
719
+
720
+ battlefield3
721
+ http://www.reddit.com/r/battlefield3/comments/13d64e/z/c72wwhw
722
+ Can't argue with those rules..
723
+ over 4 years ago • +16
724
+
725
+ I'm still burned that one time I was tearing up an admin (and other people) with the M39, and I got kicked for "being a n00b" (yes, the guy sent me a message to tell me that). Thing was, the M39 wasn't even listed as a banned weapon in the "rules".
726
+
727
+
728
+ programming
729
+ http://www.reddit.com/r/programming/comments/138od3/z/c71xla4
730
+ FizzBuzz Still Works
731
+ over 4 years ago • +2
732
+
733
+ Haskell and Erlang are two languages that don't use `%` as a modulus operator (Haskell just doesn't, and in Erlang `%` is the comment sigil).
734
+
735
+
736
+ programming
737
+ http://www.reddit.com/r/programming/comments/136mxi/z/c71ecky
738
+ UserManager.isUserAGoat() -- Oh you silly goat
739
+ over 4 years ago • +9
740
+
741
+ Of course, why else would they have the function?
742
+
743
+
744
+ programming
745
+ http://www.reddit.com/r/programming/comments/136mxi/z/c71davt
746
+ UserManager.isUserAGoat() -- Oh you silly goat
747
+ over 4 years ago • +6
748
+
749
+ Or if they just lit the computer on fire manually, I suppose.
750
+ """
751
+
752
+ Scenario: Exclude multiple subreddits
753
+ Given the Reddit service returns comments for the user "mipadi"
754
+ And time is frozen at Apr 10, 2017 12:08 PM
755
+ When I run `usaidwat log -- mipadi -AskReddit -programming`
756
+ Then it should pass with exactly:
757
+ """
758
+ wikipedia
759
+ http://www.reddit.com/r/wikipedia/comments/142t4w/z/c79peed
760
+ Heisenbug: a software bug that seems to disappear or alter its behavior when one attempts to study it
761
+ over 4 years ago • +1
762
+
763
+ Yep. My first experience with a Heisenbug occurred in a C++ program, and disappeared when I tried to print a variable with printf (only to reappear when that call was removed).
764
+
765
+
766
+ nyc
767
+ http://www.reddit.com/r/nyc/comments/141zqc/z/c79dxg6
768
+ NYC taxi roof lights get overhaul - A light simply will mean the cab is available. No light will mean it's not.
769
+ over 4 years ago • +2
770
+
771
+ It has a fare when the lights are off.
772
+
773
+
774
+ worldnews
775
+ http://www.reddit.com/r/worldnews/comments/140mra/z/c797jq4
776
+ Palestinians win upgraded UN status by wide margin
777
+ over 4 years ago • +1
778
+
779
+ The Judgment of Solomon Accords.
780
+
781
+
782
+ apple
783
+ http://www.reddit.com/r/apple/comments/1405el/z/c78zb9q
784
+ iTunes 11 finally available for download - The Verge
785
+ over 4 years ago • +1
786
+
787
+ I just got rid of the ones "in the cloud". I don't want to lose the play counts on the old (protected) files, and I don't use the iTunes Match service anyway.
788
+
789
+
790
+ apple
791
+ http://www.reddit.com/r/apple/comments/1405el/z/c78zas6
792
+ iTunes 11 finally available for download - The Verge
793
+ over 4 years ago • +1
794
+
795
+ Let's just say I'm writing checks my body can't cash.
796
+
797
+
798
+ apple
799
+ http://www.reddit.com/r/apple/comments/1405el/z/c78qp8s
800
+ iTunes 11 finally available for download - The Verge
801
+ over 4 years ago • +3
802
+
803
+ Is there anything wrong with just deleting them? I get a warning about their being deleted from iCloud, but I don't really care because these duplicates tend to mess with syncing on my iPhone anyway. (They're tracks I downloaded from iTMS as much as 8 years ago, and in some cases I've changed the ID3 tags which seems to confuse iTunes to no end. Or maybe it's because they're the old protected AAC files, I dunno.)
804
+
805
+ Edit: Ah yes, it appears to happen for protected AAC files.
806
+
807
+
808
+ apple
809
+ http://www.reddit.com/r/apple/comments/1405el/z/c78p6wa
810
+ iTunes 11 finally available for download - The Verge
811
+ over 4 years ago • +28
812
+
813
+ Oh cool, it even duplicated my songs <http://i.imgur.com/8BSE9.png>—for free!
814
+
815
+
816
+ Games
817
+ http://www.reddit.com/r/Games/comments/13xc2o/z/c784qj8
818
+ The True Story of Battlefield 3, the Battlefield Franchise, Its Community, & EA/DICE
819
+ over 4 years ago • +2
820
+
821
+ That's exactly how I feel. There are times when I have a ton of fun playing BF3…but it always feels like it has so much more potential to be an awesome game.
822
+
823
+ And that feeling comes even when the game isn't completely fucking frustrating because some admin is kicking you for using some arbitrary weapon he doesn't like, or switching you to the losing team because he doesn't like getting his ass kicked. Or when the game is simply crashing.
824
+
825
+
826
+ books
827
+ http://www.reddit.com/r/books/comments/13vijv/z/c77stm8
828
+ I was saddened hearing this story on the Takeaway this morning- "Is literature necessary?" discussing the new common core standards dictating that 70% of reading be non-fiction.
829
+ over 4 years ago • +1
830
+
831
+ I went to a public school.
832
+
833
+
834
+ django
835
+ http://www.reddit.com/r/django/comments/13p9ez/z/c77n56i
836
+ I need a little help understanding billing and payment
837
+ over 4 years ago • +2
838
+
839
+ I have a lot of experience working with Satchmo. I don't recommend it. It's over-engineered, hard to adapt to your own needs, and, while buggy, it's rarely updated anymore.
840
+
841
+
842
+ books
843
+ http://www.reddit.com/r/books/comments/13vijv/z/c77n2hg
844
+ I was saddened hearing this story on the Takeaway this morning- "Is literature necessary?" discussing the new common core standards dictating that 70% of reading be non-fiction.
845
+ over 4 years ago • +11
846
+
847
+ Yeah, I'm disappointed that some people only enjoyed two books. I didn't like all of the stuff I read in high school, but I got to read great things like Animal Farm, 1984, Night, Raisin in the Sun, The Glass Menagerie, Shakespeare, King Arthur, A Doll's House, Death of a Salesman, and probably more.
848
+
849
+
850
+ apple
851
+ http://www.reddit.com/r/apple/comments/13vgrv/z/c77ksqn
852
+ Report: Apple bumps Android from top spot in U.S. smartphone market on strength of iPhone 5
853
+ over 4 years ago • +13
854
+
855
+ I foresee this being on the "Things That Didn't Get More Than 2 Upvotes in /r/technology" list.
856
+
857
+
858
+ worldnews
859
+ http://www.reddit.com/r/worldnews/comments/13mdw2/z/c758qos
860
+ How Israeli Drone Pilots Made Their Life-and-Death Choices Over Gaza - “When you see a target, all you want to do is attack. But it’s not that simple.”
861
+ over 4 years ago • -3
862
+
863
+ Since when did Wired start publishing PR pieces for the Israeli military?
864
+
865
+
866
+ personalfinance
867
+ http://www.reddit.com/r/personalfinance/comments/13iea3/z/c74b9j1
868
+ What's the most expensive mistake you ever made financially?
869
+ over 4 years ago • +2
870
+
871
+ It's not just money for a piece of paper. If you're serious about writing, studying it puts you in contact with serious writers, lets you focus on your craft, and provides valuable networking opportunities. And a lot of MFA programs are funded.
872
+
873
+ It's not necessarily the most pragmatic option (especially not now), and sure, you can write without it, but it's about far more than the degree itself.
874
+
875
+
876
+ battlefield3
877
+ http://www.reddit.com/r/battlefield3/comments/13d64e/z/c73vgqr
878
+ Can't argue with those rules..
879
+ over 4 years ago • +1
880
+
881
+ I haven't used the AK-74M since I unlocked other weapons (I only have 1h5m of play time on it), but you inspired me to give it another try.
882
+
883
+
884
+ redditcasual
885
+ http://www.reddit.com/r/redditcasual/comments/13fxv8/z/c73rp5l
886
+ Submissions for new clan tag...
887
+ over 4 years ago • +1
888
+
889
+ RDDT was used a lot back in the Black Ops days.
890
+
891
+
892
+ photography
893
+ http://www.reddit.com/r/photography/comments/13fsog/z/c73qesj
894
+ Do you travel? If so, what camera do you use/prefer?
895
+ over 4 years ago • +1
896
+
897
+ I usually take my Olympus EP-3 and/or my Fujifilm FinePix X100. The X100 is great, but it has a fixed lens, so if need something with zoom or a certain kind of lens, I take the EP-3.
898
+
899
+
900
+ apple
901
+ http://www.reddit.com/r/apple/comments/13erfl/z/c73e3re
902
+ iMessage down?
903
+ over 4 years ago • +3
904
+
905
+ Reporting in from New York. I can't message another person who lives in New York, so it could just be regional. Who knows.
906
+
907
+
908
+ battlefield3
909
+ http://www.reddit.com/r/battlefield3/comments/13d64e/z/c72wwhw
910
+ Can't argue with those rules..
911
+ over 4 years ago • +16
912
+
913
+ I'm still burned that one time I was tearing up an admin (and other people) with the M39, and I got kicked for "being a n00b" (yes, the guy sent me a message to tell me that). Thing was, the M39 wasn't even listed as a banned weapon in the "rules".
914
+ """
915
+
413
916
  Scenario: Search for a specific comment with no matches
414
917
  Given the Reddit service returns comments for the user "mipadi"
415
918
  And time is frozen at Jun 24, 2015 11:05 AM
@@ -28,12 +28,13 @@ module USaidWat
28
28
  def process(options, args)
29
29
  raise ArgumentError.new('You must specify a username') if args.empty?
30
30
  username = args.shift
31
- subreddits = args.subreddits
31
+ subreddits = args.subreddits.reject { |s| s.start_with?('-') }
32
+ exclude_subreddits = args.subreddits.select { |s| s.start_with?('-') }.map { |e| e.sub(/^-/, '') }
32
33
 
33
34
  redditor = client.new(username)
34
35
  comments = redditor.comments
35
36
 
36
- res = filter_entries('comments', redditor, comments, subreddits) >>
37
+ res = filter_entries('comments', redditor, comments, subreddits, exclude_subreddits) >>
37
38
  lambda { |r| grep_entries('comments', redditor, r.value, options['grep'], subreddits) } >>
38
39
  lambda { |r| limit_entries('comments', redditor, r.value, options['limit']) } >>
39
40
  lambda { |r| ensure_entries('comments', redditor, r.value) }
@@ -3,11 +3,14 @@ require 'usaidwat/either'
3
3
  module USaidWat
4
4
  module Application
5
5
  module FilterCommand
6
- def filter_entries(noun, redditor, entries, subreddits)
7
- return USaidWat::Right.new(entries) if subreddits.empty?
8
- entries = entries.find_all { |e| subreddits.include?(e.subreddit.downcase) }
6
+ def filter_entries(noun, redditor, entries, subreddits, excluded_subreddits = [])
7
+ return USaidWat::Right.new(entries) if subreddits.empty? && excluded_subreddits.empty?
8
+ entries = entries.select { |e| subreddits.include?(e.subreddit.downcase) } unless subreddits.empty?
9
+ entries = entries.reject { |e| excluded_subreddits.include?(e.subreddit.downcase) }
9
10
  if entries.empty?
10
- USaidWat::Left.new("No #{noun} by #{redditor.username} for #{subreddits.join(', ')}.")
11
+ msg = "No #{noun} by #{redditor.username}"
12
+ msg += " for #{subreddits.join(', ')}." unless subreddits.empty?
13
+ USaidWat::Left.new(msg)
11
14
  else
12
15
  USaidWat::Right.new(entries)
13
16
  end
@@ -1,5 +1,5 @@
1
1
  module USaidWat
2
- VERSION = "1.5.1"
2
+ VERSION = "1.6.0"
3
3
 
4
4
  def self.commit_hash
5
5
  spec = Gem.loaded_specs['usaidwat']
data/usaidwat.gemspec CHANGED
@@ -28,17 +28,16 @@ Gem::Specification.new do |gem|
28
28
 
29
29
  gem.required_ruby_version = '>= 1.9.3'
30
30
 
31
- gem.add_runtime_dependency('downterm', '~> 0.1.5')
31
+ gem.add_runtime_dependency('downterm', '~> 0.1.7')
32
32
  gem.add_runtime_dependency('mercenary', '~> 0.3.5', '!= 0.3.6')
33
- gem.add_runtime_dependency('rainbow', '~> 2.0')
33
+ gem.add_runtime_dependency('rainbow', '~> 3.0')
34
34
  gem.add_runtime_dependency('requests', '~> 1.0')
35
35
  gem.add_runtime_dependency('sysexits', '~> 1.2')
36
36
  gem.add_runtime_dependency('ttycaca', '~> 1.0')
37
37
 
38
38
  gem.add_development_dependency('aruba', '~> 0.9')
39
- gem.add_development_dependency('cucumber', '~> 2.0')
40
- gem.add_development_dependency('rake', '~> 12.0')
39
+ gem.add_development_dependency('cucumber', '~> 3.0')
41
40
  gem.add_development_dependency('rspec', '~> 3.2')
42
- gem.add_development_dependency('timecop', '~> 0.8.0')
43
- gem.add_development_dependency('webmock', '~> 2.0')
41
+ gem.add_development_dependency('timecop', '~> 0.9.0')
42
+ gem.add_development_dependency('webmock', '~> 3.0')
44
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usaidwat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dippery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-06 00:00:00.000000000 Z
11
+ date: 2017-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: downterm
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.5
19
+ version: 0.1.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.5
26
+ version: 0.1.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mercenary
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '2.0'
53
+ version: '3.0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '2.0'
60
+ version: '3.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: requests
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -120,28 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '2.0'
123
+ version: '3.0'
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '2.0'
131
- - !ruby/object:Gem::Dependency
132
- name: rake
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '12.0'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '12.0'
130
+ version: '3.0'
145
131
  - !ruby/object:Gem::Dependency
146
132
  name: rspec
147
133
  requirement: !ruby/object:Gem::Requirement
@@ -162,28 +148,28 @@ dependencies:
162
148
  requirements:
163
149
  - - "~>"
164
150
  - !ruby/object:Gem::Version
165
- version: 0.8.0
151
+ version: 0.9.0
166
152
  type: :development
167
153
  prerelease: false
168
154
  version_requirements: !ruby/object:Gem::Requirement
169
155
  requirements:
170
156
  - - "~>"
171
157
  - !ruby/object:Gem::Version
172
- version: 0.8.0
158
+ version: 0.9.0
173
159
  - !ruby/object:Gem::Dependency
174
160
  name: webmock
175
161
  requirement: !ruby/object:Gem::Requirement
176
162
  requirements:
177
163
  - - "~>"
178
164
  - !ruby/object:Gem::Version
179
- version: '2.0'
165
+ version: '3.0'
180
166
  type: :development
181
167
  prerelease: false
182
168
  version_requirements: !ruby/object:Gem::Requirement
183
169
  requirements:
184
170
  - - "~>"
185
171
  - !ruby/object:Gem::Version
186
- version: '2.0'
172
+ version: '3.0'
187
173
  description: View a user's last 100 Reddit comments, organized by subreddit.
188
174
  email:
189
175
  - michael@monkey-robot.com
@@ -260,9 +246,9 @@ homepage: https://github.com/mdippery/usaidwat
260
246
  licenses:
261
247
  - MIT
262
248
  metadata:
263
- build_date: 2017-03-05 18:42:10 PST
264
- commit: v1.5.1
265
- commit_hash: 76e5fc4336f86bc7336ce8cf448230b500186e14
249
+ build_date: 2017-12-03 22:26:01 PST
250
+ commit: v1.6.0
251
+ commit_hash: 357860f76a11f969c5e24a74b050cb64053aee60
266
252
  post_install_message:
267
253
  rdoc_options: []
268
254
  require_paths: