grpc_auth 0.0.1 → 0.0.2

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
  SHA256:
3
- metadata.gz: c61d18eff793204e543326a7fed3fbd6df32f3e5c9b8fe70a1d2b350bebd9242
4
- data.tar.gz: ceac7953db4ffc57b1bb0abe5c2c2ed86c827a71a7b2c531c7b2702be8759de6
3
+ metadata.gz: dcdd3e92f00f34a2f5e5c409503d82d71078d81b6c48ac6da2a6cbb6f4839b57
4
+ data.tar.gz: bb67e0af365588a83c66185d1ac8ae8880606efa735771a440cfd30a38230712
5
5
  SHA512:
6
- metadata.gz: 1f6f69745939b58dadb9dad85644a50c690a7b42b8ed235770a26d9e8a3397ab7b1ccf79269127f1abfb7d484a1e3c3fa094a114e6565f72f574d4e79181b395
7
- data.tar.gz: d62b06b269d7ad12cf580ad14107cae57a66c5a478c551f2f6aff439f4c3ce6e8a7753e3793c37891f460c400f980b0926595f635e9a013c3762ee62e7b67c5a
6
+ metadata.gz: 3e7b27677ebc9cadd0bf060d9c6de4ca63a56a3c9ade27bba83c413ee115aa3c7f9a2943fadccd636e6f01006bdb67ca3fd06e81aecf47d7025bbcd68cc34385
7
+ data.tar.gz: c797961885f0877ba1203a131beb7cda1617a2dadbc7d73f1c93e5fab1eb6e07fbc987dc327224d13ffd631fd230874b2de68d6e81fb1eb9f79d4328f5e684c2
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # LwqzxAuth
1
+ # GrpcAuth
2
2
  Short description and motivation.
3
3
 
4
4
  ## Usage
@@ -8,7 +8,7 @@ How to use my plugin.
8
8
  Add this line to your application's Gemfile:
9
9
 
10
10
  ```ruby
11
- gem 'lwqzx_auth'
11
+ gem 'grpc_auth'
12
12
  ```
13
13
 
14
14
  And then execute:
@@ -18,21 +18,33 @@ $ bundle
18
18
 
19
19
  Or install it yourself as:
20
20
  ```bash
21
- $ gem install lwqzx_auth
21
+ $ gem install grpc_auth
22
22
  ```
23
23
 
24
- ## method added
25
-
26
- attachit : can be used in controller to add tempfile to mongodb
24
+ ## Method added
27
25
 
28
26
  ```ruby
29
- group[:logo] = attachit("group",:logo)
30
- ```
27
+ attachit: can be used in controller to add tempfile to mongodb
28
+
29
+ group[:logo] = attachit("group",:logo)
30
+
31
31
  pageit: can be used in controller for page model
32
32
 
33
- is_login? : can be used in controller or views to test login status
33
+ is_login?: can be used in controller or views to test login status
34
34
 
35
35
  need_login: can be used in controller
36
+ ```
37
+
38
+ ## ENV Setting
39
+
40
+ You should set some env variable
41
+
42
+ ```
43
+ ENV["GRPC_AUTH_MOUNT_PATH"] = "/"
44
+
45
+ ENV["GRPCD_ADDRESS"] = "172.16.144.248:5005"
46
+ ```
36
47
 
37
48
  ## License
49
+
38
50
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -3,4 +3,10 @@ require "grpc"
3
3
  require 'grpcd_services_pb'
4
4
 
5
5
  module GrpcAuth
6
+ attr_accessor :grpcd_address
7
+ extend self
8
+
9
+ def configure
10
+ yield self
11
+ end
6
12
  end
@@ -15,7 +15,7 @@ module GrpcAuth
15
15
 
16
16
  initializer "grpc_auth.mount" do |app|
17
17
  app.routes.prepend do
18
- mount GrpcAuth::Engine => ENV["LWQZX_AUTH_MOUNT_PATH"]
18
+ mount GrpcAuth::Engine => ENV["GRPC_AUTH_MOUNT_PATH"]
19
19
  end
20
20
  end
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module GrpcAuth
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zxy