simple_captcha_guard 0.1.7 → 0.2.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: bf46a2fadbebeb8816af2e38980eb57bf9ba6b58575949ee126e487f396e0bf7
4
- data.tar.gz: 82284cbbb97b7b68c0f29ffe647620a6692810bcc46506e69ee7932979a30dab
3
+ metadata.gz: 1b7d7cebb9d91785f42291142c5bbca57a7e19a383ed55b8f4efd86b4a04c09d
4
+ data.tar.gz: 9c15cd7d42e2c8a51779f5c60e368d11cbd37fa4e2b1878bf00e366c2f6d3e60
5
5
  SHA512:
6
- metadata.gz: 04a2c3bdc358dbc5bf4f84421b1336058289ee352754d1490c575d5aa6981e561444292b43ca3503edc4ca9950a092c9a5b1a8fc75e2c3968911664ae422d23e
7
- data.tar.gz: 93fb0f2aed5f559deaeb9cd8783aae44bb05df4f0f91d024af95d8486136fdbdbbd93ef3cde52c44f14e6cc88e905f42a3732eb358a1225758d501cfbbc58b65
6
+ metadata.gz: 8454535cc06482052361db8f7979df6945bbe8e61f25c9855569ceed0b51ed133cb4fdb67534474c5ce7a601db8f4ed6dc4a5f27e9f4d4bf8d113e9c200f469e
7
+ data.tar.gz: 2f2289a0cedd3bd3cce3e931fdddce712f692209f4b6f646c81bfb6b72c076c8ed62748d22b8eb621b639f421fb1b192867eef3c97190760389e7f84e2461713
@@ -1,7 +1,5 @@
1
1
  module SimpleCaptchaGuard
2
2
  module CaptchaHelper
3
- module_function
4
-
5
3
  def captcha_tag
6
4
  captcha = SimpleCaptchaGuard::Captcha.new
7
5
  session[:rewsna_ahctpac] = captcha.code.reverse
@@ -1,6 +1,15 @@
1
+ # lib/simple_captcha_guard/railtie.rb
2
+ require 'rails/railtie'
3
+
1
4
  module SimpleCaptchaGuard
2
5
  class Railtie < Rails::Railtie
3
- initializer "simple_captcha_guard.helpers" do
6
+ initializer 'simple_captcha_guard.controller' do
7
+ ActiveSupport.on_load(:action_controller_base) do
8
+ include SimpleCaptchaGuard::CaptchaHelper
9
+ end
10
+ end
11
+
12
+ initializer 'simple_captcha_guard.view' do
4
13
  ActiveSupport.on_load(:action_view) do
5
14
  include SimpleCaptchaGuard::CaptchaHelper
6
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_captcha_guard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed Mahir Tazwar
@@ -34,7 +34,7 @@ files:
34
34
  - lib/simple_captcha_guard/captcha.rb
35
35
  - lib/simple_captcha_guard/captcha_helper.rb
36
36
  - lib/simple_captcha_guard/railtie.rb
37
- homepage: https://medium.com/@tazwarutshas/simplecaptchaguard-add-captcha-protection-to-your-rails-forms-in-seconds-785413d3b807
37
+ homepage: https://github.com/Utshas/simple-captcha-guard
38
38
  licenses:
39
39
  - MIT
40
40
  metadata: {}