simple-admin 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b313a9b07cb42d38afd189ed5f9d36547e8f7a54
4
- data.tar.gz: e01f13bcff49f9b858f74d191368bfb5e711838d
3
+ metadata.gz: 2022299e76bb574d4b78ee76e1ac1b9a677bd8c1
4
+ data.tar.gz: 93527948e0051a7db130c8ee145c2c747b83d95e
5
5
  SHA512:
6
- metadata.gz: 6e000b24abaec6f299f952fb4d4813fb047c4dbae220f19f47e0442b05702955893784a16be0c9b48d0b49e29d96d0d40c6356eaf9de5822f00a136f2cedbc3d
7
- data.tar.gz: ec4b4028579748601636afdc285aa5d91be4c3888921c0f944532098fe2f1228befc55862ff8dde548fc940acae690b934b1806b5d64768cc535abdcaae9fe82
6
+ metadata.gz: 37da6485b515879d0d72371cefdc7fd0fa7e340673dded94e61ff805207d21fb3fa78e613ca237c43fca219650eced2f0f0c56278cee8aca6d228f0f7adfcdfc
7
+ data.tar.gz: 7f7b421810bbf4e415734cd34fbba590e1a943de53f5ccdd1f208302f3c34073c49ff411a68dce74ccacc4388b5c69d094e85f752adfebc03d2f079fa53624e2
data/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![codecov](https://codecov.io/gh/evil-raccoon/simple_admin/branch/master/graph/badge.svg)](https://codecov.io/gh/evil-raccoon/simple_admin)
5
5
  [![Inline docs](http://inch-ci.org/github/evil-raccoon/simple_admin.svg)](http://inch-ci.org/github/evil-raccoon/simple_admin)
6
6
 
7
+ https://getsimpleadmin.com
8
+
7
9
  A small API library to connect your application with SimpleAdmin service and create admin dashboards in an instant.
8
10
 
9
11
  ## Getting started
@@ -1,6 +1,13 @@
1
1
  module Api::V1
2
2
  module SimpleAdmin
3
3
  class BaseController < ActionController::API
4
+ before_action :verify_key_is_valid!
5
+
6
+ private
7
+
8
+ def verify_key_is_valid!
9
+ return head(:forbidden) unless request.headers['SimpleAdmin-Secret-Key'] == ENV['SIMPLE_ADMIN_SECRET_KEY']
10
+ end
4
11
  end
5
12
  end
6
13
  end
@@ -45,7 +45,7 @@ module Api::V1
45
45
 
46
46
  def show
47
47
  model_klass = params[:model_klass_name].constantize
48
- model_fields = params[:model_fields].split(',')
48
+ model_fields = params[:model_fields]
49
49
 
50
50
  resource = model_klass.find(params[:id]).attributes.slice(*model_fields)
51
51
 
@@ -1,3 +1,3 @@
1
1
  module SimpleAdmin
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Strukov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-15 00:00:00.000000000 Z
11
+ date: 2018-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler