nabil_can 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: efa0efdd3391f70763ba3c4c65bfff0cfd0fd974
4
- data.tar.gz: 023d91f2aa0af926a480268dc700a894743a8651
3
+ metadata.gz: 99a0496656ca020aace1cbf74a27843030cfab3f
4
+ data.tar.gz: c0cc8cb320d0fef45a880b5d1d0f8a2de0b4dc93
5
5
  SHA512:
6
- metadata.gz: 4a65cd0f8d0a766c6539e0d29fd1c8d41431c66e75b0b982625fb79cd9ee13abe7df6e3cde04535a40588c9d172803ecef28be187968dd83211a4d643b7e4dde
7
- data.tar.gz: a9d62994b0efcdb120cd053e4f2b586d8d9a50749ae0b6955e02527d3b075cba1f6ef0e429665e815bbb8f01ad29d44a0eabc699f7b78b5e40e73bed6b85461f
6
+ metadata.gz: f19f1f989b5d677fdd763bc5f8d0bf4930f859f3371b7b0a9c0482bf10f07a9c9c83eae30871a7ecaeee344bc9b9b2534f973746ebc6b18c7e438c322268d7c0
7
+ data.tar.gz: af3b3dc4af2b1e591a6d0c6c5080963a249c3336dafa516e47752204ba12af3c492de68edc5cf0ade45724ee39c1e68e42963aeb288214e7acbb6b301a4d0e7b
@@ -1,3 +1,3 @@
1
1
  module NabilCan
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/nabil_can.rb CHANGED
@@ -2,10 +2,10 @@ require "nabil_can/version"
2
2
 
3
3
  module NabilCan
4
4
  # Your code goes here...
5
- class Can
6
- def self.sending_http_request(user_id,action_name,model,path)
7
- @host = 'localhost'
8
- @port = '3000'
5
+ class Ability
6
+ def self.sending_http_request(user_id,action_name,model,path,port_no,host_name)
7
+ @host = host_name
8
+ @port = port_no
9
9
  @path = "#{path}?user_id=#{user_id}&action_name=#{action_name}&model=#{model}"
10
10
 
11
11
  request = Net::HTTP::Get.new(@path, initheader = {'Content-Type' =>'application/json'})
@@ -15,16 +15,16 @@ module NabilCan
15
15
  return response.body
16
16
  end
17
17
 
18
- def self.can(user_id,action_name,model)
18
+ def self.can(user_id,action_name,model,port_no,host_name)
19
19
  path='/ability/can'
20
20
 
21
- return sending_http_request(user_id,action_name,model,path)
21
+ return sending_http_request(user_id,action_name,model,path,port_no,host_name)
22
22
 
23
23
  end
24
24
 
25
25
  def self.cannot(user_id,action_name,model)
26
26
  path='/ability/cannot'
27
- return sending_http_request(user_id,action_name,model,path)
27
+ return sending_http_request(user_id,action_name,model,path,port_no,host_name)
28
28
  end
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nabil_can
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohamednabil00000