PipedrivePUT 1.1.21 → 1.1.23

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
  SHA1:
3
- metadata.gz: abfededc061f6f1e23bb2650ac22db253c67ce90
4
- data.tar.gz: 9b95aa54f9730479dee021389aec497bb7d29342
3
+ metadata.gz: 7fabebda4ac076982a163ad00946531004382b0e
4
+ data.tar.gz: 2c39b37f3ec1a21d4d31ddbd87bb981f3e469eb9
5
5
  SHA512:
6
- metadata.gz: 4602d5a965c0a334bde487cbb39299a582d1c5086f903b4d77f18ce06344c1a5074937c4c6873dc20d24dd58c56a43b1ae9f6d588308d392b4035f9aca7ae95a
7
- data.tar.gz: 231361a5a5045f25e977ff43b04e5fa4e0ebd42863525a8996b4c1c3abd36df631f246a1b091b17862d2e211e1812a2c88987e03027a09521c8d83d60820d11b
6
+ metadata.gz: e0aace8df9f5fe04015c794bd60539f4220756314c21aadb6cbe5bf3f5658309a099cae65379715c2eccec2b790aa30584c89e1f16eb12c27bccde1e512387a3
7
+ data.tar.gz: 4f934eeb939fa8402bbfb665f87160f2d1e63f6addb7b05f95f92dd44b85bc64ff2e808fb80d339628c6e6c085104add754e11514a6e863251383afb77b30042
@@ -3,6 +3,8 @@ module PipedrivePUT
3
3
 
4
4
  include PipedrivePUT
5
5
 
6
+ require 'httparty'
7
+
6
8
  require 'rest-client'
7
9
  def self.key
8
10
  puts @@key
@@ -19,9 +21,9 @@ require 'rest-client'
19
21
  while @more_items == true do
20
22
  count = 0
21
23
  #puts @more_items
22
- @base = 'https://api.pipedrive.com/v1/organizations?start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
24
+ @base = URI.parse('https://api.pipedrive.com/v1/organizations?start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s)
23
25
  #puts @base
24
- @content = open(@base.to_s).read
26
+ @content = Net::HTTP.get(@base.to_s)
25
27
  @parsed = JSON.parse(@content)
26
28
 
27
29
  while count < @parsed["data"].size
@@ -77,9 +79,14 @@ require 'rest-client'
77
79
  while @more_items == true do
78
80
  count = 0
79
81
 
80
- @base = 'https://api.pipedrive.com/v1/organizations/find?term=' + name.to_s + '&start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
81
-
82
+ @base = URI.parse('https://api.pipedrive.com/v1/organizations/find?term=' + name+ '&start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s)
83
+
84
+ puts @base
85
+
82
86
  @content = open(@base.to_s).read
87
+
88
+ puts @content
89
+
83
90
  @parsed = JSON.parse(@content)
84
91
 
85
92
  while count < @parsed["data"].size
@@ -1,7 +1,5 @@
1
1
  module PipedrivePUT
2
2
 
3
- require 'httparty'
4
-
5
3
  class Persons
6
4
  include PipedrivePUT
7
5
 
@@ -35,18 +35,19 @@ module PipedrivePUT
35
35
 
36
36
  #puts @base
37
37
 
38
- @content = HTTParty.get(@base.to_s)
38
+ @content = open(@base.to_s).read
39
39
 
40
-
40
+ #puts @content
41
+
42
+ @parsed = JSON.parse(@content)
41
43
 
42
- #@parsed = JSON.parse(@content)
43
44
 
44
- while count < @content["data"].size
45
- table.push(@content["data"][count])
45
+ while count < @parsed["data"].size
46
+ table.push(@parsed["data"][count])
46
47
  count = count +1
47
48
  end
48
49
 
49
- @pagination = @content['additional_data']['pagination']
50
+ @pagination = @parsed['additional_data']['pagination']
50
51
  @more_items = @pagination['more_items_in_collection']
51
52
  #puts @more_items
52
53
  @start = @pagination['next_start']
@@ -65,18 +66,18 @@ module PipedrivePUT
65
66
  count = 0
66
67
  #puts @base
67
68
 
68
- @content = HTTParty.get(@base.to_s)
69
+ @content = open(@base.to_s).read
69
70
 
70
- #puts @content
71
+ puts @content
71
72
 
72
- #@parsed = JSON.parse(@content)
73
+ @parsed = JSON.parse(@content)
73
74
 
74
- while count < @content["data"].size
75
- table.push(@content["data"][count])
75
+ while count < @parsed["data"].size
76
+ table.push(@parsed["data"][count])
76
77
  count = count +1
77
78
  end
78
79
 
79
- @pagination = @content['additional_data']['pagination']
80
+ @pagination = @parsed['additional_data']['pagination']
80
81
  @more_items = @pagination['more_items_in_collection']
81
82
  #puts @more_items
82
83
  @start = @pagination['next_start']
@@ -1,3 +1,3 @@
1
1
  module PipedrivePUT
2
- VERSION = "1.1.21"
2
+ VERSION = "1.1.23"
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PipedrivePUT
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.21
4
+ version: 1.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - JakePens71
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-06 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.7'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.0.7
97
- - !ruby/object:Gem::Dependency
98
- name: httparty
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
97
  description: Pipedrive gem supports a small amount of functionality at the moment.
112
98
  Will add more when I can.
113
99
  email: