Commit Graph
710 Commits
Author SHA1 Message Date
evazion 02122343c3 dmails: don't default IP addr to 127.0.0.1 in database (fixes #2908).
Bug introduced in 1400f64; that commit changed dmails so that
creator_ip_addr defaulted to CurrentUser.ip_addr like this:

    after_initialize :initialize_attributes, if: :new_record?

    def initialize_attributes
      self.from_id ||= CurrentUser.id
      self.creator_ip_addr ||= CurrentUser.ip_addr
    end

...but creator_ip_addr already defaulted to 127.0.0.1 from the database,
so the ||= assignment didn't work. Remove the database default so we
always default to CurrentUser.ip_addr.
2017-03-01 19:51:48 -06:00
Albert Yi fd7cddc909 Merge branch 'master' into fix-mention-dmails 2017-02-27 17:00:24 -08:00
Albert Yi 1fa0aabbe0 Merge pull request #2896 from evazion/fix-username-whitespace
Disallow unicode whitespace in usernames (#2894).
2017-02-27 16:47:44 -08:00
r888888888 398f58684f Merge branch 'post-archive' 2017-02-27 10:45:13 -08:00
evazion 46280f2227 mentions: include mentioner in subject line.
The template looks like this:

Subject:

    #{creator_name} mentioned you in a comment on post ##{post_id}

Body:

    @#{creator_name} mentioned you in a \"comment\":/posts/#{post_id}#comment-#{id} on post ##{post_id}:

    [quote]
    #{DText.excerpt(body, "@"+user_name)}
    [/quote]
2017-02-25 23:05:44 -06:00
evazion 6e3ddb6ed6 dmails: don't save copies of outgoing dmails sent by DanbooruBot.
There's not much sense in saving copies of everything DanbooruBot sends
in DanbooruBot's inbox. They probably won't be checked so it just bloats
the dmails table.
2017-02-25 23:05:44 -06:00
evazion 6966b74e18 Disallow unicode whitespace in usernames (#2894). 2017-02-25 01:51:33 -06:00
evazion 6704e71377 dmails: add tests for automated dmails. 2017-02-23 22:51:17 -06:00
evazion d852f98e4f /dmails: remove unused search[owner_id] param.
/dmails is restricted to viewing dmails for CurrentUser only (due to
Dmail.visible in the index action). Remove owner_id from subnavbar links
in /dmails, and don't support it in /dmails?search[owner_id], since it
doesn't actually do anything.

Also removes related dead methods and fixes tests that didn't test owner_id properly.
2017-02-23 22:51:17 -06:00
r888888888 6bd03ee4db fix tests 2017-02-21 15:04:55 -08:00
Albert Yi 5404c1d231 implement postarchive 2017-02-21 13:40:52 -08:00
r888888888 6c9d5e4f9a remove advertisement code 2017-02-21 13:35:22 -08:00
evazion d78c537ec2 Add user mailer previewer.
Usage: open /rails/mailers in your browser.
2017-02-18 03:10:49 -06:00
r888888888 291e9acdc7 fixes #2885: "Is Deleted" not being recorded correctly for Wiki Page Versions 2017-02-15 15:32:41 -08:00
evazion f971f927fd post_test.rb: add tag name validation tests. 2017-02-08 23:31:30 -06:00
r888888888 c01f48f18c mock pool archive service in post test 2017-02-07 14:14:36 -08:00
Albert Yi b1c33f2379 Merge pull request #2878 from evazion/fix-test-coverage
Improve controller test coverage
2017-02-07 13:45:16 -08:00
r888888888 7a3d1c7d1d dont download original artstation images if they dont exist 2017-02-07 13:40:19 -08:00
r888888888 39b6601afe Merge branch 'artstation' 2017-02-06 17:07:57 -08:00
r888888888 7a2f652152 add source strategy for artstation 2017-02-06 17:07:09 -08:00
evazion 35b3398142 post_test.rb: add more metatag search tests. 2017-02-06 18:48:39 -06:00
evazion cac5eae3c4 tests: add more tags controller/model tests. 2017-02-06 18:48:39 -06:00
evazion 2b4c722bd1 tests: add more notes controller tests. 2017-02-06 18:48:38 -06:00
evazion 0890c6320b tests: add more comments controller tests. 2017-02-06 18:48:38 -06:00
evazion 73e274b2e0 tests: add more moderator/post/queues controller tests. 2017-02-06 18:48:38 -06:00
evazion a120a63d3b tests: add more moderator/post/posts controller tests. 2017-02-06 18:48:38 -06:00
evazion cdafbc849d tests: add more artist commentary controller tests. 2017-02-06 18:48:38 -06:00
evazion 2d62fff89b tests: add more wiki page versions controller tests. 2017-02-06 18:48:37 -06:00
evazion 43591e0c2d tests: add more wiki pages controller tests. 2017-02-06 18:48:37 -06:00
evazion 5c871aee64 tests: add more pools controller tests. 2017-02-06 18:48:37 -06:00
evazion dfb8d0106d tests: add more posts controller tests. 2017-02-06 18:48:37 -06:00
evazion 09ffac07ea tests: add more users controller tests. 2017-02-06 18:48:37 -06:00
evazion 3edd814be5 tests: add iqdb queries controller tests. 2017-02-06 18:48:37 -06:00
evazion e26fb61ee9 tests: add explore/posts controller tests. 2017-02-06 18:48:36 -06:00
evazion 443c41cff2 tests: add meta searches controller tests. 2017-02-06 18:48:36 -06:00
evazion 30c3a52187 tests: add mod actions controller test. 2017-02-06 18:48:36 -06:00
evazion 101a03e797 tests: add related tags controller tests. 2017-02-06 18:48:36 -06:00
evazion 423dfc13b8 tests: add sources controller tests. 2017-02-06 18:48:36 -06:00
evazion 142dc05d0c tests: add note previews controller tests. 2017-02-06 18:48:35 -06:00
evazion 77b4dfcdfb tests: add artist controller tests. 2017-02-06 18:48:35 -06:00
evazion 490864e24d tests: add saved searches controller tests. 2017-02-06 18:48:35 -06:00
evazion 64b4004bbf tests: add favorite groups controller tests. 2017-02-06 18:48:35 -06:00
evazion ed451b7199 tests: add reports controller tests. 2017-02-06 18:48:35 -06:00
evazion d74503ae05 tests: add misc controller tests. 2017-02-06 18:48:35 -06:00
r888888888 5c16e9ce48 add download strategy for artstation 2017-02-06 12:03:00 -08:00
r888888888 6bf050c607 add download strategy for artstation 2017-02-06 11:59:27 -08:00
evazion 8c75f74ca5 tests: update simplecov config. 2017-02-04 22:17:39 -06:00
evazion e8cf417e9c tests: update gems to latest versions.
Also fix a few things that broke under shoulda-matchers 3.1.1.
2017-02-04 22:17:15 -06:00
evazion dd5974bf8c test_helper.rb: use MemcacheMock. 2017-02-04 17:18:52 -06:00
evazion 9b16c45edc test_helper.rb: factor out upload test helpers. 2017-02-04 17:18:52 -06:00