freshsales 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/.github_changelog_generator +1 -1
- data/.rubocop.yml +3 -2
- data/Gemfile.lock +83 -71
- data/Rakefile +5 -3
- data/appveyor.yml +1 -0
- data/freshsales.gemspec +7 -5
- data/lib/freshsales.rb +2 -0
- data/lib/freshsales/api.rb +2 -0
- data/lib/freshsales/client.rb +3 -1
- data/lib/freshsales/cursor.rb +2 -0
- data/lib/freshsales/freshsales_error.rb +2 -0
- data/lib/freshsales/request_builder.rb +2 -0
- data/lib/freshsales/response.rb +2 -0
- data/lib/freshsales/version.rb +3 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15cc945c608ab34a89ba51dc2297260e3059c448
|
4
|
+
data.tar.gz: 2a0c39b54b2da29038e3f290cf3021d8ad21b013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37988f797ec440b64d5bd88fa8fa22bccc49d7fc590710ac72836ae62c9362a036c77ca3993d16ed6fd88ee903b9d743b087796d164ef9ea125bd645bcaa961f
|
7
|
+
data.tar.gz: e124629869c83af354ccaebef63684b3e7ec052c5cf4f8e595f7e456b47af4c13680712dba9d59d2ff339f6c4268e422eeda564d2d9260edab774838fa3aab96
|
data/.circleci/config.yml
CHANGED
@@ -7,7 +7,7 @@ jobs:
|
|
7
7
|
build:
|
8
8
|
docker:
|
9
9
|
# specify the version you desire here
|
10
|
-
- image:
|
10
|
+
- image: cimg/ruby:2.5-browsers
|
11
11
|
|
12
12
|
# Specify service dependencies here if necessary
|
13
13
|
# CircleCI maintains a library of pre-built images
|
@@ -51,4 +51,4 @@ jobs:
|
|
51
51
|
path: /tmp/rspec/
|
52
52
|
- store_artifacts:
|
53
53
|
path: /tmp/rspec/
|
54
|
-
destination: test-results
|
54
|
+
destination: test-results
|
data/.github_changelog_generator
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
future-release=v0.0.
|
1
|
+
future-release=v0.0.6
|
2
2
|
exclude-labels=nochangelog,question
|
data/.rubocop.yml
CHANGED
@@ -5,9 +5,10 @@
|
|
5
5
|
#
|
6
6
|
# File.chmod(0o777, f)
|
7
7
|
#
|
8
|
-
|
8
|
+
AllCops:
|
9
9
|
#Include:
|
10
10
|
# - '**/fastlane/Fastfile'
|
11
|
+
TargetRubyVersion: 2.4
|
11
12
|
|
12
13
|
# broken in 0.52.1
|
13
14
|
Layout/EmptyLinesAroundArguments:
|
@@ -55,4 +56,4 @@ Layout/EndOfLine:
|
|
55
56
|
|
56
57
|
# Some issues with rspec style
|
57
58
|
Lint/AmbiguousBlockAssociation:
|
58
|
-
Enabled: false
|
59
|
+
Enabled: false
|
data/Gemfile.lock
CHANGED
@@ -1,85 +1,95 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
freshsales (0.0.
|
5
|
-
faraday (>= 0.
|
4
|
+
freshsales (0.0.6)
|
5
|
+
faraday (>= 0.16.0)
|
6
6
|
multi_json (>= 1.11.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (5.2.
|
11
|
+
activesupport (5.2.5)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 0.7, < 2)
|
14
14
|
minitest (~> 5.1)
|
15
15
|
tzinfo (~> 1.1)
|
16
|
-
addressable (2.
|
17
|
-
public_suffix (>= 2.0.2, <
|
18
|
-
ast (2.4.
|
19
|
-
builder (3.2.
|
20
|
-
byebug (
|
21
|
-
coderay (1.1.
|
16
|
+
addressable (2.7.0)
|
17
|
+
public_suffix (>= 2.0.2, < 5.0)
|
18
|
+
ast (2.4.2)
|
19
|
+
builder (3.2.4)
|
20
|
+
byebug (11.1.3)
|
21
|
+
coderay (1.1.3)
|
22
22
|
colored (1.2)
|
23
|
-
concurrent-ruby (1.
|
24
|
-
coveralls (0.8.
|
23
|
+
concurrent-ruby (1.1.8)
|
24
|
+
coveralls (0.8.23)
|
25
25
|
json (>= 1.8, < 3)
|
26
|
-
simplecov (~> 0.
|
26
|
+
simplecov (~> 0.16.1)
|
27
27
|
term-ansicolor (~> 1.3)
|
28
|
-
thor (
|
28
|
+
thor (>= 0.19.4, < 2.0)
|
29
29
|
tins (~> 1.6)
|
30
|
-
crack (0.4.
|
31
|
-
|
32
|
-
diff-lcs (1.
|
33
|
-
docile (1.
|
34
|
-
faraday (
|
30
|
+
crack (0.4.5)
|
31
|
+
rexml
|
32
|
+
diff-lcs (1.4.4)
|
33
|
+
docile (1.3.5)
|
34
|
+
faraday (1.4.1)
|
35
|
+
faraday-excon (~> 1.1)
|
36
|
+
faraday-net_http (~> 1.0)
|
37
|
+
faraday-net_http_persistent (~> 1.1)
|
35
38
|
multipart-post (>= 1.2, < 3)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
+
ruby2_keywords (>= 0.0.4)
|
40
|
+
faraday-excon (1.1.0)
|
41
|
+
faraday-http-cache (2.2.0)
|
42
|
+
faraday (>= 0.8)
|
43
|
+
faraday-net_http (1.0.1)
|
44
|
+
faraday-net_http_persistent (1.1.0)
|
45
|
+
github_changelog_generator (1.15.2)
|
39
46
|
activesupport
|
40
47
|
faraday-http-cache
|
41
48
|
multi_json
|
42
49
|
octokit (~> 4.6)
|
43
|
-
rainbow (>= 2.1)
|
50
|
+
rainbow (>= 2.2.1)
|
44
51
|
rake (>= 10.0)
|
45
|
-
retriable (~>
|
46
|
-
hashdiff (0.
|
52
|
+
retriable (~> 3.0)
|
53
|
+
hashdiff (1.0.1)
|
47
54
|
highline (1.7.10)
|
48
|
-
i18n (1.
|
55
|
+
i18n (1.8.10)
|
49
56
|
concurrent-ruby (~> 1.0)
|
50
|
-
json (2.1
|
51
|
-
method_source (0.
|
52
|
-
minitest (5.
|
53
|
-
multi_json (1.
|
54
|
-
multipart-post (2.
|
55
|
-
octokit (4.
|
57
|
+
json (2.5.1)
|
58
|
+
method_source (1.0.0)
|
59
|
+
minitest (5.14.4)
|
60
|
+
multi_json (1.15.0)
|
61
|
+
multipart-post (2.1.1)
|
62
|
+
octokit (4.20.0)
|
63
|
+
faraday (>= 0.9)
|
56
64
|
sawyer (~> 0.8.0, >= 0.5.3)
|
57
|
-
parallel (1.
|
58
|
-
parser (2.
|
59
|
-
ast (~> 2.4.
|
60
|
-
powerpack (0.1.
|
61
|
-
pry (0.
|
62
|
-
coderay (~> 1.1
|
63
|
-
method_source (~>
|
64
|
-
pry-byebug (3.
|
65
|
-
byebug (~>
|
66
|
-
pry (~> 0.
|
67
|
-
public_suffix (
|
65
|
+
parallel (1.20.1)
|
66
|
+
parser (2.7.2.0)
|
67
|
+
ast (~> 2.4.1)
|
68
|
+
powerpack (0.1.3)
|
69
|
+
pry (0.13.1)
|
70
|
+
coderay (~> 1.1)
|
71
|
+
method_source (~> 1.0)
|
72
|
+
pry-byebug (3.9.0)
|
73
|
+
byebug (~> 11.0)
|
74
|
+
pry (~> 0.13.0)
|
75
|
+
public_suffix (4.0.6)
|
68
76
|
rainbow (3.0.0)
|
69
|
-
rake (
|
70
|
-
retriable (
|
71
|
-
|
72
|
-
|
73
|
-
rspec-
|
74
|
-
rspec-
|
75
|
-
|
76
|
-
|
77
|
-
|
77
|
+
rake (13.0.3)
|
78
|
+
retriable (3.1.2)
|
79
|
+
rexml (3.2.5)
|
80
|
+
rspec (3.8.0)
|
81
|
+
rspec-core (~> 3.8.0)
|
82
|
+
rspec-expectations (~> 3.8.0)
|
83
|
+
rspec-mocks (~> 3.8.0)
|
84
|
+
rspec-core (3.8.2)
|
85
|
+
rspec-support (~> 3.8.0)
|
86
|
+
rspec-expectations (3.8.6)
|
78
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
79
|
-
rspec-support (~> 3.
|
80
|
-
rspec-mocks (3.
|
81
|
-
|
82
|
-
|
88
|
+
rspec-support (~> 3.8.0)
|
89
|
+
rspec-mocks (3.8.2)
|
90
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
91
|
+
rspec-support (~> 3.8.0)
|
92
|
+
rspec-support (3.8.3)
|
83
93
|
rspec_junit_formatter (0.2.3)
|
84
94
|
builder (< 4)
|
85
95
|
rspec-core (>= 2, < 4, != 2.12.0)
|
@@ -90,24 +100,26 @@ GEM
|
|
90
100
|
rainbow (>= 2.2.2, < 4.0)
|
91
101
|
ruby-progressbar (~> 1.7)
|
92
102
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
93
|
-
ruby-progressbar (1.
|
94
|
-
|
95
|
-
sawyer (0.8.
|
96
|
-
addressable (>= 2.3.5
|
97
|
-
faraday (
|
98
|
-
simplecov (0.
|
99
|
-
docile (~> 1.1
|
103
|
+
ruby-progressbar (1.11.0)
|
104
|
+
ruby2_keywords (0.0.4)
|
105
|
+
sawyer (0.8.2)
|
106
|
+
addressable (>= 2.3.5)
|
107
|
+
faraday (> 0.8, < 2.0)
|
108
|
+
simplecov (0.16.1)
|
109
|
+
docile (~> 1.1)
|
100
110
|
json (>= 1.8, < 3)
|
101
111
|
simplecov-html (~> 0.10.0)
|
102
112
|
simplecov-html (0.10.2)
|
103
|
-
|
113
|
+
sync (0.5.0)
|
114
|
+
term-ansicolor (1.7.1)
|
104
115
|
tins (~> 1.0)
|
105
|
-
thor (
|
116
|
+
thor (1.1.0)
|
106
117
|
thread_safe (0.3.6)
|
107
|
-
tins (1.
|
108
|
-
|
118
|
+
tins (1.28.0)
|
119
|
+
sync
|
120
|
+
tzinfo (1.2.9)
|
109
121
|
thread_safe (~> 0.1)
|
110
|
-
unicode-display_width (1.
|
122
|
+
unicode-display_width (1.7.0)
|
111
123
|
webmock (3.3.0)
|
112
124
|
addressable (>= 2.3.6)
|
113
125
|
crack (>= 0.3.2)
|
@@ -117,18 +129,18 @@ PLATFORMS
|
|
117
129
|
ruby
|
118
130
|
|
119
131
|
DEPENDENCIES
|
120
|
-
bundler (~>
|
132
|
+
bundler (~> 2.2)
|
121
133
|
colored (>= 1.2, < 2.0.0)
|
122
134
|
coveralls
|
123
135
|
freshsales!
|
124
136
|
github_changelog_generator
|
125
137
|
highline (~> 1.7.10)
|
126
138
|
pry-byebug
|
127
|
-
rake (
|
128
|
-
rspec (~> 3.
|
139
|
+
rake (>= 12.3.3)
|
140
|
+
rspec (~> 3.8.0)
|
129
141
|
rspec_junit_formatter (~> 0.2.3)
|
130
142
|
rubocop (~> 0.52.1)
|
131
143
|
webmock (~> 3.3.0)
|
132
144
|
|
133
145
|
BUNDLED WITH
|
134
|
-
|
146
|
+
2.2.16
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
## --- BEGIN LICENSE BLOCK ---
|
2
4
|
# Copyright (c) 2018-present WeWantToKnow AS
|
3
5
|
#
|
@@ -139,7 +141,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
139
141
|
RuboCop::RakeTask.new
|
140
142
|
|
141
143
|
class GithubChangelogGenerator
|
142
|
-
PATH = '.github_changelog_generator'
|
144
|
+
PATH = '.github_changelog_generator'
|
143
145
|
class << self
|
144
146
|
def future_release
|
145
147
|
s = File.read(PATH)
|
@@ -166,12 +168,12 @@ class GithubChangelogGenerator
|
|
166
168
|
end
|
167
169
|
|
168
170
|
class FreshsalesCode
|
169
|
-
PATH = 'lib/freshsales/version.rb'
|
171
|
+
PATH = 'lib/freshsales/version.rb'
|
170
172
|
class << self
|
171
173
|
def version=(version)
|
172
174
|
s = File.read(PATH)
|
173
175
|
lines = s.split("\n").map do |line|
|
174
|
-
m = line.match(/(.*VERSION = ['"]).*(['"]
|
176
|
+
m = line.match(/(.*VERSION = ['"]).*(['"].*)/)
|
175
177
|
if m
|
176
178
|
"#{m[1]}#{version}#{m[2]}"
|
177
179
|
else
|
data/appveyor.yml
CHANGED
data/freshsales.gemspec
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
lib = File.expand_path('../lib', __FILE__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require 'freshsales/version'
|
@@ -8,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
8
10
|
spec.authors = ["Jerome Lacoste"]
|
9
11
|
spec.email = 'jerome@wewanttoknow.com'
|
10
12
|
|
11
|
-
spec.required_ruby_version = '>= 2.
|
13
|
+
spec.required_ruby_version = '>= 2.4.0'
|
12
14
|
|
13
15
|
spec.summary = "Freshsales"
|
14
16
|
spec.description = 'A wrapper for Freshsales API'
|
@@ -22,18 +24,18 @@ Gem::Specification.new do |spec|
|
|
22
24
|
spec.require_paths = ["lib"]
|
23
25
|
|
24
26
|
# using same minimal dependencies as gibbon, for the sake of compatibility
|
25
|
-
spec.add_dependency 'faraday', '>= 0.
|
27
|
+
spec.add_dependency 'faraday', '>= 0.16.0'
|
26
28
|
spec.add_dependency 'multi_json', '>= 1.11.0'
|
27
29
|
|
28
30
|
# Development only
|
29
|
-
spec.add_development_dependency "bundler", "~>
|
31
|
+
spec.add_development_dependency "bundler", "~> 2.2"
|
30
32
|
spec.add_development_dependency "colored", '>= 1.2', '< 2.0.0'
|
31
33
|
spec.add_development_dependency "coveralls"
|
32
34
|
spec.add_development_dependency "github_changelog_generator"
|
33
35
|
spec.add_development_dependency "highline", "~> 1.7.10"
|
34
36
|
spec.add_development_dependency "pry-byebug"
|
35
|
-
spec.add_development_dependency "rake", "
|
36
|
-
spec.add_development_dependency "rspec", "~> 3.
|
37
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
38
|
+
spec.add_development_dependency "rspec", "~> 3.8.0"
|
37
39
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.2.3'
|
38
40
|
spec.add_development_dependency 'rubocop', '~> 0.52.1'
|
39
41
|
spec.add_development_dependency "webmock", "~> 3.3.0"
|
data/lib/freshsales.rb
CHANGED
data/lib/freshsales/api.rb
CHANGED
data/lib/freshsales/client.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Freshsales
|
2
4
|
class Client
|
3
5
|
def initialize(config)
|
@@ -57,7 +59,7 @@ module Freshsales
|
|
57
59
|
|
58
60
|
def handle_request_error(error)
|
59
61
|
error_params = {}
|
60
|
-
if error.is_a?(Faraday::
|
62
|
+
if error.is_a?(Faraday::ClientError) && error.response
|
61
63
|
error_params[:status_code] = error.response[:status]
|
62
64
|
error_params[:raw_body] = error.response[:body]
|
63
65
|
|
data/lib/freshsales/cursor.rb
CHANGED
data/lib/freshsales/response.rb
CHANGED
data/lib/freshsales/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freshsales
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jerome Lacoste
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.16.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.16.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: colored
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,30 +132,30 @@ dependencies:
|
|
132
132
|
name: rake
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- - "
|
135
|
+
- - ">="
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
137
|
+
version: 12.3.3
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- - "
|
142
|
+
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
144
|
+
version: 12.3.3
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: rspec
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: 3.
|
151
|
+
version: 3.8.0
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 3.
|
158
|
+
version: 3.8.0
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: rspec_junit_formatter
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,7 +232,7 @@ homepage: https://github.com/DragonBox/freshsales
|
|
232
232
|
licenses:
|
233
233
|
- MIT
|
234
234
|
metadata: {}
|
235
|
-
post_install_message:
|
235
|
+
post_install_message:
|
236
236
|
rdoc_options: []
|
237
237
|
require_paths:
|
238
238
|
- lib
|
@@ -240,16 +240,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
240
240
|
requirements:
|
241
241
|
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version: 2.
|
243
|
+
version: 2.4.0
|
244
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
246
|
- - ">="
|
247
247
|
- !ruby/object:Gem::Version
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
|
-
rubyforge_project:
|
251
|
-
rubygems_version: 2.6.
|
252
|
-
signing_key:
|
250
|
+
rubyforge_project:
|
251
|
+
rubygems_version: 2.6.14
|
252
|
+
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: Freshsales
|
255
255
|
test_files: []
|