mailbin 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84c679d5445e1e16ced5d1a33bf0a1306a648bafb0a67ecb8634999fb0832896
4
- data.tar.gz: d753e8e47c101a921b89ed3256ca0b5b863ca15e790616f3540c399deb3ef32c
3
+ metadata.gz: 73f5fc29a443b34ed2e7852216100c7c936bbecffaa9b25c7660053624971600
4
+ data.tar.gz: 7cbdf1f535ce9cb7d3aa00d639b19884b7beab77d2beaae37f97e19a41a1c164
5
5
  SHA512:
6
- metadata.gz: 001e8a9d5d8e2eb5d51ffac61276e7368e276a0d7ce8982da1e7e7ec8e557fa3a5ae53e9bda654a5deb4a77fe76a8ba7611bad083bcf96fab7c0bf625c5d6fcb
7
- data.tar.gz: be42f88094e42567dfef8126cef214f1b5d5a48c6e877c45a98c1d3bb2880486c1aa5df6319c6ac6546ab2a543773572d02ecfc138d20b303dcd16f65d56f191
6
+ metadata.gz: 87e33fb0427d64dafc929a37d873b1a898ea30c2bbb316b7a98d30fd3faf8f9d519e9e5943fa8fafbc876462b6e6ecd8042a77f61c9c0459fe86146ea1ed74e5
7
+ data.tar.gz: e02b3772dd23e111ae5e223c4433779afcaad50f2a66426ead9984a903872abbf6ce53d3c9b8eacf17c74a00606489fd34f09e7d0913e8480680dbcc514215e8
data/README.md CHANGED
@@ -31,9 +31,32 @@ end
31
31
 
32
32
  Open http://localhost:3000/mailbin to view your emails in development.
33
33
 
34
+ ### Storage Loaction
35
+
36
+ Mailbin stores emails in `tmp/mailbin` by default. To change this, you can set
37
+ the `storage_location` config.
38
+
39
+ ```ruby
40
+ # config/initializers/mailbin.rb
41
+ Mailbin.storage_location = ENV["MAILBIN_STORAGE_LOCATION"] || Rails.root.join("tmp", "mailbin-#{Rails.env}")
42
+ ```
43
+
44
+ ### Authentication
45
+
46
+ If you're using Mailbin outside of development, you can override
47
+ `Mailbin::ApplicationController` to add authentication.
48
+
49
+ ```ruby
50
+ class Mailbin::ApplicationController < ActionController::Base
51
+ # Add authentication here
52
+ end
53
+ ```
54
+
34
55
  ## Contributing
35
56
 
36
- If you have an issue you'd like to submit, please do so using the issue tracker in GitHub. In order for us to help you in the best way possible, please be as detailed as you can.
57
+ If you have an issue you'd like to submit, please do so using the issue tracker
58
+ in GitHub. In order for us to help you in the best way possible, please be as
59
+ detailed as you can.
37
60
 
38
61
  If you'd like to open a PR please make sure the following things pass:
39
62
 
@@ -44,4 +67,5 @@ bin/rubocop -A
44
67
  ```
45
68
 
46
69
  ## License
47
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
70
+ The gem is available as open source under the terms of the
71
+ [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -4,7 +4,6 @@ require "rake/testtask"
4
4
 
5
5
  APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
6
6
  load "rails/tasks/engine.rake"
7
- load "rails/tasks/statistics.rake"
8
7
 
9
8
  desc "Run tests"
10
9
  Rake::TestTask.new(:test) do |t|
@@ -40,7 +40,7 @@ dd {
40
40
  }
41
41
 
42
42
  dd:empty:before {
43
- content: "\00a0"; // &nbsp;
43
+ content: "\00a0"; /* &nbsp; */
44
44
  }
45
45
 
46
46
  .headers {
@@ -6,11 +6,13 @@ module Mailbin
6
6
  isolate_namespace Mailbin
7
7
 
8
8
  initializer "mailbin.add_delivery_method" do
9
+ Mailbin.storage_location ||= Rails.root.join("tmp", "mailbin")
10
+
9
11
  ActiveSupport.on_load :action_mailer do
10
12
  ActionMailer::Base.add_delivery_method(
11
13
  :mailbin,
12
14
  Mailbin::DeliveryMethod,
13
- location: Rails.root.join("tmp", "mailbin")
15
+ location: Mailbin.storage_location
14
16
  )
15
17
  end
16
18
  end
@@ -1,3 +1,3 @@
1
1
  module Mailbin
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
data/lib/mailbin.rb CHANGED
@@ -6,6 +6,7 @@ module Mailbin
6
6
  autoload :InlinePreviewInterceptor, "mailbin/inline_preview_interceptor"
7
7
 
8
8
  mattr_accessor :importmap, default: Importmap::Map.new
9
+ mattr_accessor :storage_location
9
10
 
10
11
  class << self
11
12
  def all
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailbin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -85,7 +84,6 @@ metadata:
85
84
  homepage_uri: https://github.com/excid3/mailbin
86
85
  source_code_uri: https://github.com/excid3/mailbin
87
86
  changelog_uri: https://github.com/excid3/mailbin
88
- post_install_message:
89
87
  rdoc_options: []
90
88
  require_paths:
91
89
  - lib
@@ -100,8 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
98
  - !ruby/object:Gem::Version
101
99
  version: '0'
102
100
  requirements: []
103
- rubygems_version: 3.5.23
104
- signing_key:
101
+ rubygems_version: 4.0.2
105
102
  specification_version: 4
106
103
  summary: Mailbin collects emails from Rails ActionMailer in development for testing.
107
104
  test_files: []