ifsApi 1.2.0 → 1.3.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ifsApi.rb +8 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88c7c12525c61c42c5e33eab680b6f6c3ae28422918d9f63a5fa57ec9b9247be
4
- data.tar.gz: 576a804fbd8a6bbe51a05328cd1b8d092275363f93e93eef953390631ce66bfc
3
+ metadata.gz: 7f559f378ce2bf7e22d113675282d82391ca58398af277d4a206cd6241147632
4
+ data.tar.gz: afe191051d1f46e420867f53c3783841235ec71e4186041dad31badf9f1d5081
5
5
  SHA512:
6
- metadata.gz: d5ac281e4431b01da03eb171e05c9c517be173211cfee9ceec1e1c962e06dd223f12e77f8e1f02fcc4dbdb90f515f2a0662292f9e25a64666f928bd1097b1c3f
7
- data.tar.gz: 1c01a880a23e86247d97539c191987fdf3d434639cedb22417caf1d6b139e4c1d2d4c7fbf965a05dd18c4b865feba8361f899d7474ef7e9f90fa7fb9cdb7ec6d
6
+ metadata.gz: 74e071d651f5c2572be197fa724f6342e54dae367ea9609bd4ede79449a44f91662369c4ddd65714d579f86cb6e79fa410d86f4fd96e715a688644b29a70d5c3
7
+ data.tar.gz: 8703df7ffbbd3038f3f2fe99fb25b5cfedf29b8efdae7397bdc92e52ddf87f725e81e63c79919a7a1867111e6c1906c37ca7f00d5f5ac179c5358eeab8632222
@@ -6,10 +6,10 @@ require "json"
6
6
 
7
7
  module IFS
8
8
  class Api
9
+ attr_accessor :isProduction
9
10
  @userid = ""
10
11
  @password = ""
11
12
  @role = ""
12
- attr_accessor :isProduction
13
13
 
14
14
  def initialize(userid, password, role)
15
15
  @userid = userid
@@ -70,10 +70,7 @@ module IFS
70
70
  put url, {}
71
71
  end
72
72
 
73
- #PRIVATE
74
- private
75
-
76
- def baseUrl
73
+ def baseUrl()
77
74
  r = "https://nwframing.com/"
78
75
  if @isProduction == true
79
76
  r = "#{r}ifs"
@@ -83,6 +80,9 @@ module IFS
83
80
  "#{r}/api/#{@role}"
84
81
  end
85
82
 
83
+ #PRIVATE
84
+ private
85
+
86
86
  def endpoint(action, id = nil)
87
87
  r = "#{baseUrl}/#{action}"
88
88
  unless id.nil?
@@ -92,6 +92,7 @@ module IFS
92
92
  end
93
93
 
94
94
  def get(url, params = {})
95
+ puts "get from #{url}"
95
96
  header = basicHeader
96
97
  header[:params] = params
97
98
  begin
@@ -104,6 +105,7 @@ module IFS
104
105
  end
105
106
 
106
107
  def post(url, payload = {})
108
+ puts "post to #{url}"
107
109
  begin
108
110
  header = basicHeader
109
111
  header["Content-Type"] = "application/json"
@@ -116,6 +118,7 @@ module IFS
116
118
  end
117
119
 
118
120
  def put(url, payload = {})
121
+ puts "put to #{url}"
119
122
  begin
120
123
  header = basicHeader
121
124
  header["Content-Type"] = "application/json"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ifsApi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Jones
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-03 00:00:00.000000000 Z
11
+ date: 2018-08-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Access IFS Api
14
14
  email: justinj@nwframing.com