sugarcrm_rest 0.1.0 → 0.1.1

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: 1d9ac199257b3eab145c9a2d82bb98e8795ed2a814c625c9f7d383617ed67864
4
- data.tar.gz: 5bc4f5a0649e27256b7ccba89c3c590437cb1117e6b4d8bcba8fae1fafb744e8
3
+ metadata.gz: 2ffe3bf420b309c9064b1d81df342ce56b5f2e50a7b9105a17215596c14707c3
4
+ data.tar.gz: 765bd43aaca14c46c67565e915a9983eb8aaa3a598911e6e9195b13c2d3b6780
5
5
  SHA512:
6
- metadata.gz: d8f46251b0a852c12a0490660b3bfaeeba382967cbe13ca4c88917c5652979d2a5bfb32d4f6a5ba88f0ca674d0c2cafe30bc8758cddc8422a14862fadf1ea5d4
7
- data.tar.gz: 7c4b971aef3185a82d17f3f6067013e8e56cca32c4f595d3ea931eeb0c7d9906994e527169c3062e4ce7b6dcc78f466f95f27ed4757dadd9bace4aa717dd7a36
6
+ metadata.gz: 8f5f76d751b433b70a72f660dc32f031d8e567a0355b76e889e38f4cd8dd7cbc2df0eaa058bea069453fa3332b43810b24ff84749cb6bd0f18bf69ed9a657306
7
+ data.tar.gz: '0383eb31cf1138a88021ea1d76b0469bdac9fbc8107f2a5089e4e6957c1318fbdd121937855b2c3ff55eeaf7cec4daad514cd8a4a494fbfdea4de169f253cf1a'
data/Gemfile.lock ADDED
@@ -0,0 +1,35 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sugarcrm_rest (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.4.4)
10
+ rake (10.5.0)
11
+ rspec (3.10.0)
12
+ rspec-core (~> 3.10.0)
13
+ rspec-expectations (~> 3.10.0)
14
+ rspec-mocks (~> 3.10.0)
15
+ rspec-core (3.10.1)
16
+ rspec-support (~> 3.10.0)
17
+ rspec-expectations (3.10.1)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.10.0)
20
+ rspec-mocks (3.10.2)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.10.0)
23
+ rspec-support (3.10.2)
24
+
25
+ PLATFORMS
26
+ x64-mingw32
27
+
28
+ DEPENDENCIES
29
+ bundler (~> 1.17)
30
+ rake (~> 10.0)
31
+ rspec (~> 3.0)
32
+ sugarcrm_rest!
33
+
34
+ BUNDLED WITH
35
+ 1.17.2
data/lib/sugarcrm_rest.rb CHANGED
@@ -1,4 +1,10 @@
1
1
  require "sugarcrm_rest/version"
2
+ require 'active_support'
3
+ require "net/https"
4
+ require "rest-client"
5
+ require "uri"
6
+ require "rubygems"
7
+ require "json"
2
8
 
3
9
  module SugarcrmRest
4
10
 
@@ -33,11 +39,11 @@ end
33
39
  if response.kind_of? Net::HTTPSuccess
34
40
  token = JSON.parse response.body
35
41
  end
36
- p token['access_token']
42
+
37
43
  return token['access_token']
38
44
  end
39
45
  rescue Exception=>e
40
- p $count
46
+
41
47
  retry if ($count += 1) < 3
42
48
 
43
49
  end
@@ -57,7 +63,7 @@ end
57
63
  end
58
64
  rescue Exception=>e
59
65
 
60
- p $count
66
+
61
67
  retry if ($count += 1) < 3
62
68
  end
63
69
 
@@ -84,7 +90,7 @@ class Fetch_Data
84
90
  response = Get_Token_Process_Url.execute_uri(connect,url)
85
91
  if response.kind_of? Net::HTTPSuccess
86
92
  root = JSON.parse response.body
87
- p root
93
+
88
94
  return root
89
95
  end
90
96
  end
@@ -243,7 +249,7 @@ class Fetch_Data
243
249
  request.add_field('Content-Type','application/json')
244
250
 
245
251
  response = http.request request
246
- p response.to_s
252
+
247
253
  if response.kind_of? Net::HTTPSuccess
248
254
  root = JSON.parse response.body
249
255
  end
@@ -1,3 +1,3 @@
1
1
  module SugarcrmRest
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcrm_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sruthi PN
@@ -63,6 +63,7 @@ files:
63
63
  - ".rspec"
64
64
  - ".travis.yml"
65
65
  - Gemfile
66
+ - Gemfile.lock
66
67
  - LICENSE.txt
67
68
  - README.md
68
69
  - Rakefile