dup_send_blocker 0.0.1

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.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +26 -0
  4. data/app/assets/javascripts/dup_send_blocker/application.js +13 -0
  5. data/app/assets/stylesheets/dup_send_blocker/application.css +15 -0
  6. data/app/controllers/dup_send_blocker/application_controller.rb +5 -0
  7. data/app/helpers/dup_send_blocker/application_helper.rb +4 -0
  8. data/app/models/dup_send_blocker/send_log.rb +25 -0
  9. data/app/views/layouts/dup_send_blocker/application.html.erb +14 -0
  10. data/config/routes.rb +2 -0
  11. data/db/migrate/20201006085900_create_dup_send_blocker_send_logs.rb +25 -0
  12. data/lib/dup_send_blocker.rb +38 -0
  13. data/lib/dup_send_blocker/engine.rb +9 -0
  14. data/lib/dup_send_blocker/version.rb +3 -0
  15. data/lib/tasks/dup_send_blocker_tasks.rake +4 -0
  16. data/spec/dummy_app/README.rdoc +28 -0
  17. data/spec/dummy_app/Rakefile +6 -0
  18. data/spec/dummy_app/app/assets/config/manifest.js +3 -0
  19. data/spec/dummy_app/app/assets/javascripts/application.js +13 -0
  20. data/spec/dummy_app/app/assets/stylesheets/application.css +15 -0
  21. data/spec/dummy_app/app/controllers/application_controller.rb +5 -0
  22. data/spec/dummy_app/app/helpers/application_helper.rb +2 -0
  23. data/spec/dummy_app/app/views/layouts/application.html.erb +14 -0
  24. data/spec/dummy_app/bin/bundle +3 -0
  25. data/spec/dummy_app/bin/rails +4 -0
  26. data/spec/dummy_app/bin/rake +4 -0
  27. data/spec/dummy_app/bin/setup +29 -0
  28. data/spec/dummy_app/config.ru +4 -0
  29. data/spec/dummy_app/config/application.rb +33 -0
  30. data/spec/dummy_app/config/boot.rb +5 -0
  31. data/spec/dummy_app/config/database.yml +23 -0
  32. data/spec/dummy_app/config/database.yml.bak +25 -0
  33. data/spec/dummy_app/config/environment.rb +5 -0
  34. data/spec/dummy_app/config/environments/development.rb +41 -0
  35. data/spec/dummy_app/config/environments/production.rb +79 -0
  36. data/spec/dummy_app/config/environments/test.rb +47 -0
  37. data/spec/dummy_app/config/initializers/assets.rb +11 -0
  38. data/spec/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
  39. data/spec/dummy_app/config/initializers/cookies_serializer.rb +3 -0
  40. data/spec/dummy_app/config/initializers/filter_parameter_logging.rb +4 -0
  41. data/spec/dummy_app/config/initializers/inflections.rb +16 -0
  42. data/spec/dummy_app/config/initializers/mime_types.rb +4 -0
  43. data/spec/dummy_app/config/initializers/session_store.rb +3 -0
  44. data/spec/dummy_app/config/initializers/to_time_preserves_timezone.rb +10 -0
  45. data/spec/dummy_app/config/initializers/wrap_parameters.rb +14 -0
  46. data/spec/dummy_app/config/locales/en.yml +23 -0
  47. data/spec/dummy_app/config/routes.rb +4 -0
  48. data/spec/dummy_app/config/secrets.yml +22 -0
  49. data/spec/dummy_app/db/schema.rb +27 -0
  50. data/spec/dummy_app/log/development.log +205 -0
  51. data/spec/dummy_app/log/test.log +2019 -0
  52. data/spec/dummy_app/public/404.html +67 -0
  53. data/spec/dummy_app/public/422.html +67 -0
  54. data/spec/dummy_app/public/500.html +66 -0
  55. data/spec/dummy_app/public/favicon.ico +0 -0
  56. data/spec/models/dup_send_blocker/send_log_spec.rb +69 -0
  57. data/spec/models/dup_send_blocker_spec.rb +114 -0
  58. data/spec/rails_helper.rb +69 -0
  59. data/spec/spec_helper.rb +109 -0
  60. metadata +229 -0
@@ -0,0 +1,109 @@
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
16
+
17
+ require 'database_cleaner'
18
+ RSpec.configure do |config|
19
+ # rspec-expectations config goes here. You can use an alternate
20
+ # assertion/expectation library such as wrong or the stdlib/minitest
21
+ # assertions if you prefer.
22
+ config.expect_with :rspec do |expectations|
23
+ # This option will default to `true` in RSpec 4. It makes the `description`
24
+ # and `failure_message` of custom matchers include text for helper methods
25
+ # defined using `chain`, e.g.:
26
+ # be_bigger_than(2).and_smaller_than(4).description
27
+ # # => "be bigger than 2 and smaller than 4"
28
+ # ...rather than:
29
+ # # => "be bigger than 2"
30
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
31
+ end
32
+
33
+ # rspec-mocks config goes here. You can use an alternate test double
34
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
35
+ config.mock_with :rspec do |mocks|
36
+ # Prevents you from mocking or stubbing a method that does not exist on
37
+ # a real object. This is generally recommended, and will default to
38
+ # `true` in RSpec 4.
39
+ mocks.verify_partial_doubles = true
40
+ end
41
+
42
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
43
+ # have no way to turn it off -- the option exists only for backwards
44
+ # compatibility in RSpec 3). It causes shared context metadata to be
45
+ # inherited by the metadata hash of host groups and examples, rather than
46
+ # triggering implicit auto-inclusion in groups with matching metadata.
47
+ config.shared_context_metadata_behavior = :apply_to_host_groups
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ =begin
52
+ # This allows you to limit a spec run to individual examples or groups
53
+ # you care about by tagging them with `:focus` metadata. When nothing
54
+ # is tagged with `:focus`, all examples get run. RSpec also provides
55
+ # aliases for `it`, `describe`, and `context` that include `:focus`
56
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
57
+ config.filter_run_when_matching :focus
58
+
59
+ # Allows RSpec to persist some state between runs in order to support
60
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
61
+ # you configure your source control system to ignore this file.
62
+ config.example_status_persistence_file_path = "spec/examples.txt"
63
+
64
+ # Limits the available syntax to the non-monkey patched syntax that is
65
+ # recommended. For more details, see:
66
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
67
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
68
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
69
+ config.disable_monkey_patching!
70
+
71
+ # Many RSpec users commonly either run the entire suite or an individual
72
+ # file, and it's useful to allow more verbose output when running an
73
+ # individual spec file.
74
+ if config.files_to_run.one?
75
+ # Use the documentation formatter for detailed output,
76
+ # unless a formatter has already been configured
77
+ # (e.g. via a command-line flag).
78
+ config.default_formatter = "doc"
79
+ end
80
+
81
+ # Print the 10 slowest examples and example groups at the
82
+ # end of the spec run, to help surface which specs are running
83
+ # particularly slow.
84
+ config.profile_examples = 10
85
+
86
+ # Run specs in random order to surface order dependencies. If you find an
87
+ # order dependency and want to debug it, you can fix the order by providing
88
+ # the seed, which is printed after each run.
89
+ # --seed 1234
90
+ config.order = :random
91
+
92
+ # Seed global randomization in this process using the `--seed` CLI option.
93
+ # Setting this allows you to use `--seed` to deterministically reproduce
94
+ # test failures related to randomization by passing the same `--seed` value
95
+ # as the one that triggered the failure.
96
+ Kernel.srand config.seed
97
+ =end
98
+
99
+ config.before(:suite) do
100
+ DatabaseCleaner[:active_record].strategy = :transaction
101
+ DatabaseCleaner.clean_with(:truncation)
102
+ end
103
+
104
+ config.around(:each) do |example|
105
+ DatabaseCleaner.cleaning do
106
+ example.run
107
+ end
108
+ end
109
+ end
metadata ADDED
@@ -0,0 +1,229 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dup_send_blocker
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - ''
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-10-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 4.2.11.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 4.2.11.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: mysql2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sqlite3
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: database_cleaner
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry-rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: This gem blocks duplicate emails.
98
+ email:
99
+ - ''
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - MIT-LICENSE
105
+ - Rakefile
106
+ - app/assets/javascripts/dup_send_blocker/application.js
107
+ - app/assets/stylesheets/dup_send_blocker/application.css
108
+ - app/controllers/dup_send_blocker/application_controller.rb
109
+ - app/helpers/dup_send_blocker/application_helper.rb
110
+ - app/models/dup_send_blocker/send_log.rb
111
+ - app/views/layouts/dup_send_blocker/application.html.erb
112
+ - config/routes.rb
113
+ - db/migrate/20201006085900_create_dup_send_blocker_send_logs.rb
114
+ - lib/dup_send_blocker.rb
115
+ - lib/dup_send_blocker/engine.rb
116
+ - lib/dup_send_blocker/version.rb
117
+ - lib/tasks/dup_send_blocker_tasks.rake
118
+ - spec/dummy_app/README.rdoc
119
+ - spec/dummy_app/Rakefile
120
+ - spec/dummy_app/app/assets/config/manifest.js
121
+ - spec/dummy_app/app/assets/javascripts/application.js
122
+ - spec/dummy_app/app/assets/stylesheets/application.css
123
+ - spec/dummy_app/app/controllers/application_controller.rb
124
+ - spec/dummy_app/app/helpers/application_helper.rb
125
+ - spec/dummy_app/app/views/layouts/application.html.erb
126
+ - spec/dummy_app/bin/bundle
127
+ - spec/dummy_app/bin/rails
128
+ - spec/dummy_app/bin/rake
129
+ - spec/dummy_app/bin/setup
130
+ - spec/dummy_app/config.ru
131
+ - spec/dummy_app/config/application.rb
132
+ - spec/dummy_app/config/boot.rb
133
+ - spec/dummy_app/config/database.yml
134
+ - spec/dummy_app/config/database.yml.bak
135
+ - spec/dummy_app/config/environment.rb
136
+ - spec/dummy_app/config/environments/development.rb
137
+ - spec/dummy_app/config/environments/production.rb
138
+ - spec/dummy_app/config/environments/test.rb
139
+ - spec/dummy_app/config/initializers/assets.rb
140
+ - spec/dummy_app/config/initializers/backtrace_silencers.rb
141
+ - spec/dummy_app/config/initializers/cookies_serializer.rb
142
+ - spec/dummy_app/config/initializers/filter_parameter_logging.rb
143
+ - spec/dummy_app/config/initializers/inflections.rb
144
+ - spec/dummy_app/config/initializers/mime_types.rb
145
+ - spec/dummy_app/config/initializers/session_store.rb
146
+ - spec/dummy_app/config/initializers/to_time_preserves_timezone.rb
147
+ - spec/dummy_app/config/initializers/wrap_parameters.rb
148
+ - spec/dummy_app/config/locales/en.yml
149
+ - spec/dummy_app/config/routes.rb
150
+ - spec/dummy_app/config/secrets.yml
151
+ - spec/dummy_app/db/schema.rb
152
+ - spec/dummy_app/log/development.log
153
+ - spec/dummy_app/log/test.log
154
+ - spec/dummy_app/public/404.html
155
+ - spec/dummy_app/public/422.html
156
+ - spec/dummy_app/public/500.html
157
+ - spec/dummy_app/public/favicon.ico
158
+ - spec/models/dup_send_blocker/send_log_spec.rb
159
+ - spec/models/dup_send_blocker_spec.rb
160
+ - spec/rails_helper.rb
161
+ - spec/spec_helper.rb
162
+ homepage: https://github.com/kinosuke01/dup_send_blocker
163
+ licenses:
164
+ - MIT
165
+ metadata: {}
166
+ post_install_message:
167
+ rdoc_options: []
168
+ require_paths:
169
+ - lib
170
+ required_ruby_version: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ required_rubygems_version: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ requirements: []
181
+ rubygems_version: 3.0.3
182
+ signing_key:
183
+ specification_version: 4
184
+ summary: This gem blocks duplicate emails.
185
+ test_files:
186
+ - spec/dummy_app/README.rdoc
187
+ - spec/dummy_app/Rakefile
188
+ - spec/dummy_app/app/assets/config/manifest.js
189
+ - spec/dummy_app/app/assets/javascripts/application.js
190
+ - spec/dummy_app/app/assets/stylesheets/application.css
191
+ - spec/dummy_app/app/controllers/application_controller.rb
192
+ - spec/dummy_app/app/helpers/application_helper.rb
193
+ - spec/dummy_app/app/views/layouts/application.html.erb
194
+ - spec/dummy_app/bin/bundle
195
+ - spec/dummy_app/bin/rails
196
+ - spec/dummy_app/bin/rake
197
+ - spec/dummy_app/bin/setup
198
+ - spec/dummy_app/config/application.rb
199
+ - spec/dummy_app/config/boot.rb
200
+ - spec/dummy_app/config/database.yml
201
+ - spec/dummy_app/config/database.yml.bak
202
+ - spec/dummy_app/config/environment.rb
203
+ - spec/dummy_app/config/environments/development.rb
204
+ - spec/dummy_app/config/environments/production.rb
205
+ - spec/dummy_app/config/environments/test.rb
206
+ - spec/dummy_app/config/initializers/assets.rb
207
+ - spec/dummy_app/config/initializers/backtrace_silencers.rb
208
+ - spec/dummy_app/config/initializers/cookies_serializer.rb
209
+ - spec/dummy_app/config/initializers/filter_parameter_logging.rb
210
+ - spec/dummy_app/config/initializers/inflections.rb
211
+ - spec/dummy_app/config/initializers/mime_types.rb
212
+ - spec/dummy_app/config/initializers/session_store.rb
213
+ - spec/dummy_app/config/initializers/to_time_preserves_timezone.rb
214
+ - spec/dummy_app/config/initializers/wrap_parameters.rb
215
+ - spec/dummy_app/config/locales/en.yml
216
+ - spec/dummy_app/config/routes.rb
217
+ - spec/dummy_app/config/secrets.yml
218
+ - spec/dummy_app/config.ru
219
+ - spec/dummy_app/db/schema.rb
220
+ - spec/dummy_app/log/development.log
221
+ - spec/dummy_app/log/test.log
222
+ - spec/dummy_app/public/404.html
223
+ - spec/dummy_app/public/422.html
224
+ - spec/dummy_app/public/500.html
225
+ - spec/dummy_app/public/favicon.ico
226
+ - spec/models/dup_send_blocker/send_log_spec.rb
227
+ - spec/models/dup_send_blocker_spec.rb
228
+ - spec/rails_helper.rb
229
+ - spec/spec_helper.rb