ahoy_panel 0.0.8 → 0.0.10

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: b6e78b9b1773248b6ad217b27d489d0efda25d46a5ae899f56626c1963ea1dcc
4
- data.tar.gz: a235f3329990fde4009bbed4f75281147ca6bdf33ba7395fb7b2071c06aa7300
3
+ metadata.gz: 1c208f43575b25e5f89a9f850704ca103edfb1e2d229d07a743a6cc95fe08f7b
4
+ data.tar.gz: 5b98e7b5ffca6c57770ec99a0f9e6b84eea572690aaa8d52cae3ae7200fac554
5
5
  SHA512:
6
- metadata.gz: e8dd26859d9a5c383bbb44a0c4eba8e7b5665c293f37a2fbd0663a02abc6c883b784654858c7aeb3da00a264dd75efa4e070e177bb7561297107c86f4381d1f6
7
- data.tar.gz: d7f9c6e8e1f4acc23c8f48cfba986b43ac7249d8bcf9502393f4454e58d3e44d06744801f376d03845a4a2b8a3ab1a49e861ada1c8c259184da1917265daca3a
6
+ metadata.gz: cea4a574fc28f1c198ae713e2e57ed8df3544214afb6be4145d6b9359b4bde3206ff01a387006a174301cb2fbbadeafa307fa02824dbee439ae40f54b216b941
7
+ data.tar.gz: f131405d07d585c711fc806b715c0eb22689575dd0a6371f92428204d63179628af3f37d760f25f87e86d4386bd026326cbdea74880b441a7b764e2112f2a04f
data/README.md CHANGED
@@ -31,6 +31,13 @@ And then execute:
31
31
  bundle install
32
32
  ```
33
33
 
34
+ Mount AhoyPanel in your `config/routes.rb` file:
35
+ ```ruby
36
+ Rails.application.routes.draw do
37
+ mount AhoyPanel::Engine => "ahoy_panel"
38
+ end
39
+ ```
40
+
34
41
  ---
35
42
 
36
43
  ## Configuration
@@ -5,21 +5,9 @@ module AhoyPanel
5
5
  protected
6
6
 
7
7
  def authenticate_api_key!
8
- api_key = request.headers["Ahoy-Panel-Api-Key"]
8
+ api_key = request.headers["Ahoy-Panel-Api-Key"].remove("Bearer").squish
9
9
 
10
- return true if Rails.env.development?
11
-
12
- ahoy_panel_root_url = "https://www.ahoypanel.com"
13
-
14
- client = Faraday.new(url: ahoy_panel_root_url) do |conn|
15
- conn.headers["Ahoy-Panel-Api-Key"] = "#{api_key}"
16
- conn.request :json
17
- conn.response :json
18
- end
19
-
20
- if !response.body["verified"]
21
- raise
22
- end
10
+ raise if api_key != ::AhoyPanel.config.api_key
23
11
  end
24
12
  end
25
13
  end
@@ -1,3 +1,3 @@
1
1
  module AhoyPanel
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_panel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Jeon