prosperworks-ruby 0.1.1 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 178f861fcbab618ab5d7868804aaff682fec7afe
4
- data.tar.gz: e50f45003f905d514bb09bc58e4ce8a44773fe74
3
+ metadata.gz: 2f177b413ed00d8a842401ad29eeb37a8b931c33
4
+ data.tar.gz: f337dae055cfe241028adb8bf2de244753b6b50a
5
5
  SHA512:
6
- metadata.gz: d711c8ca0e924dc2359ebe4401c44395ad39338bf223a5440d6059a0408bdcb9370a952a7c6e5c49a351c9355e7382c40ce1eb787b88ed26555223e9252b995e
7
- data.tar.gz: 04f910b8d9d2efb1e1a77a0b1a37ecc83ee8524b6d311d9e1559cb88e1aff6ee5da90ce454a5f9aed20a45aab5b36c5fa5264c2a51e2f4fab407a9d76332b099
6
+ metadata.gz: 70562f06d5692803ae3d4be304d3f262edd2376680a1de88c3f7965405274936387ddadba1c801756f63261c91e0e04ea7f418b07834d1056b512a178e6a3f30
7
+ data.tar.gz: 76bde3a2730f03ae7fbec1050d924e2a76ab3069489378990b9f5e71a27ccb04cd0170ae12267c71f35157cfb4c16141474c308817bd0625be783ccf0aedcc94
@@ -0,0 +1,13 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ DisplayCopNames: true
5
+
6
+ Layout/EmptyLinesAroundModuleBody:
7
+ Enabled: false
8
+
9
+ Metrics/ModuleLength:
10
+ Enabled: false
11
+
12
+ Metrics/MethodLength:
13
+ Enabled: false
@@ -0,0 +1,267 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2017-08-03 08:00:07 -0600 using RuboCop version 0.49.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
12
+ # SupportedStyles: with_first_parameter, with_fixed_indentation
13
+ Layout/AlignParameters:
14
+ Exclude:
15
+ - 'lib/prosperworks/company.rb'
16
+
17
+ # Offense count: 1
18
+ # Cop supports --auto-correct.
19
+ Layout/EmptyLineAfterMagicComment:
20
+ Exclude:
21
+ - 'prosperworks-ruby.gemspec'
22
+
23
+ # Offense count: 1
24
+ # Cop supports --auto-correct.
25
+ # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
26
+ Layout/EmptyLineBetweenDefs:
27
+ Exclude:
28
+ - 'test/prosperworks/integration/webhook_test.rb'
29
+
30
+ # Offense count: 5
31
+ # Cop supports --auto-correct.
32
+ Layout/EmptyLines:
33
+ Exclude:
34
+ - 'Gemfile'
35
+ - 'lib/prosperworks.rb'
36
+ - 'lib/prosperworks/api_operations/connect.rb'
37
+ - 'lib/prosperworks/base_entity.rb'
38
+
39
+ # Offense count: 43
40
+ # Cop supports --auto-correct.
41
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
42
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
43
+ Layout/EmptyLinesAroundClassBody:
44
+ Enabled: false
45
+
46
+ # Offense count: 12
47
+ # Cop supports --auto-correct.
48
+ # Configuration parameters: SupportedStyles, IndentationWidth.
49
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
50
+ Layout/IndentHash:
51
+ EnforcedStyle: consistent
52
+
53
+ # Offense count: 2
54
+ # Cop supports --auto-correct.
55
+ # Configuration parameters: Width, IgnoredPatterns.
56
+ Layout/IndentationWidth:
57
+ Exclude:
58
+ - 'lib/prosperworks.rb'
59
+ - 'sample.rb'
60
+
61
+ # Offense count: 2
62
+ # Cop supports --auto-correct.
63
+ Layout/SpaceAfterComma:
64
+ Exclude:
65
+ - 'lib/prosperworks/api_operations/update.rb'
66
+ - 'test/test_helper.rb'
67
+
68
+ # Offense count: 9
69
+ # Cop supports --auto-correct.
70
+ # Configuration parameters: AllowForAlignment.
71
+ Layout/SpaceAroundOperators:
72
+ Exclude:
73
+ - 'test/test_helper.rb'
74
+
75
+ # Offense count: 1
76
+ # Cop supports --auto-correct.
77
+ Layout/SpaceBeforeComma:
78
+ Exclude:
79
+ - 'lib/prosperworks/api_operations/update.rb'
80
+
81
+ # Offense count: 9
82
+ # Cop supports --auto-correct.
83
+ # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces.
84
+ # SupportedStyles: space, no_space, compact
85
+ # SupportedStylesForEmptyBraces: space, no_space
86
+ Layout/SpaceInsideHashLiteralBraces:
87
+ Exclude:
88
+ - 'test/test_helper.rb'
89
+
90
+ # Offense count: 26
91
+ # Cop supports --auto-correct.
92
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
93
+ # SupportedStyles: final_newline, final_blank_line
94
+ Layout/TrailingBlankLines:
95
+ Enabled: false
96
+
97
+ # Offense count: 8
98
+ # Cop supports --auto-correct.
99
+ Layout/TrailingWhitespace:
100
+ Exclude:
101
+ - 'lib/prosperworks/api_operations/delete.rb'
102
+ - 'lib/prosperworks/configuration.rb'
103
+ - 'test/prosperworks/integration/webhook_test.rb'
104
+ - 'test/prosperworks/unit/api_operations/connect_test.rb'
105
+ - 'test/prosperworks/unit/api_operations/delete_test.rb'
106
+ - 'test/prosperworks/version_test.rb'
107
+
108
+ # Offense count: 1
109
+ Lint/AmbiguousOperator:
110
+ Exclude:
111
+ - 'lib/prosperworks/configuration.rb'
112
+
113
+ # Offense count: 6
114
+ Lint/UselessAssignment:
115
+ Exclude:
116
+ - 'test/prosperworks/integration/company_test.rb'
117
+ - 'test/prosperworks/integration/lead_test.rb'
118
+ - 'test/prosperworks/integration/opportunity_test.rb'
119
+ - 'test/prosperworks/integration/person_test.rb'
120
+ - 'test/prosperworks/integration/project_test.rb'
121
+ - 'test/prosperworks/integration/task_test.rb'
122
+
123
+ # Offense count: 12
124
+ Metrics/AbcSize:
125
+ Max: 21
126
+
127
+ # Offense count: 1
128
+ Metrics/CyclomaticComplexity:
129
+ Max: 10
130
+
131
+ # Offense count: 38
132
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
133
+ # URISchemes: http, https
134
+ Metrics/LineLength:
135
+ Max: 119
136
+
137
+ # Offense count: 1
138
+ # Cop supports --auto-correct.
139
+ Performance/StringReplacement:
140
+ Exclude:
141
+ - 'lib/prosperworks/utils.rb'
142
+
143
+ # Offense count: 1
144
+ Style/AccessorMethodName:
145
+ Exclude:
146
+ - 'lib/prosperworks/base.rb'
147
+
148
+ # Offense count: 6
149
+ # Cop supports --auto-correct.
150
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
151
+ # SupportedStyles: braces, no_braces, context_dependent
152
+ Style/BracesAroundHashParameters:
153
+ Exclude:
154
+ - 'test/prosperworks/integration/company_test.rb'
155
+ - 'test/prosperworks/integration/lead_test.rb'
156
+ - 'test/prosperworks/integration/opportunity_test.rb'
157
+ - 'test/prosperworks/integration/person_test.rb'
158
+ - 'test/prosperworks/integration/project_test.rb'
159
+ - 'test/prosperworks/integration/task_test.rb'
160
+
161
+ # Offense count: 1
162
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
163
+ # SupportedStyles: nested, compact
164
+ Style/ClassAndModuleChildren:
165
+ Exclude:
166
+ - 'test/test_helper.rb'
167
+
168
+ # Offense count: 26
169
+ Style/Documentation:
170
+ Enabled: false
171
+
172
+ # Offense count: 1
173
+ # Cop supports --auto-correct.
174
+ # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
175
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
176
+ Style/HashSyntax:
177
+ Exclude:
178
+ - 'Rakefile'
179
+
180
+ # Offense count: 2
181
+ # Cop supports --auto-correct.
182
+ # Configuration parameters: MaxLineLength.
183
+ Style/IfUnlessModifier:
184
+ Exclude:
185
+ - 'lib/prosperworks/api_operations/connect.rb'
186
+ - 'lib/prosperworks/base.rb'
187
+
188
+ # Offense count: 2
189
+ # Cop supports --auto-correct.
190
+ Style/MutableConstant:
191
+ Exclude:
192
+ - 'lib/prosperworks/configuration.rb'
193
+ - 'lib/prosperworks/version.rb'
194
+
195
+ # Offense count: 15
196
+ # Cop supports --auto-correct.
197
+ # Configuration parameters: Strict.
198
+ Style/NumericLiterals:
199
+ MinDigits: 12
200
+
201
+ # Offense count: 2
202
+ # Cop supports --auto-correct.
203
+ # Configuration parameters: PreferredDelimiters.
204
+ Style/PercentLiteralDelimiters:
205
+ Exclude:
206
+ - 'prosperworks-ruby.gemspec'
207
+
208
+ # Offense count: 9
209
+ # Cop supports --auto-correct.
210
+ Style/RedundantSelf:
211
+ Exclude:
212
+ - 'lib/prosperworks/api_operations/create.rb'
213
+ - 'lib/prosperworks/api_operations/find.rb'
214
+ - 'lib/prosperworks/api_operations/list.rb'
215
+ - 'lib/prosperworks/api_operations/update.rb'
216
+ - 'lib/prosperworks/base.rb'
217
+ - 'lib/prosperworks/utils.rb'
218
+
219
+ # Offense count: 2
220
+ # Cop supports --auto-correct.
221
+ Style/SelfAssignment:
222
+ Exclude:
223
+ - 'lib/prosperworks/api_operations/connect.rb'
224
+ - 'test/test_helper.rb'
225
+
226
+ # Offense count: 195
227
+ # Cop supports --auto-correct.
228
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
229
+ # SupportedStyles: single_quotes, double_quotes
230
+ Style/StringLiterals:
231
+ Enabled: false
232
+
233
+ # Offense count: 2
234
+ # Cop supports --auto-correct.
235
+ # Configuration parameters: MinSize, SupportedStyles.
236
+ # SupportedStyles: percent, brackets
237
+ Style/SymbolArray:
238
+ EnforcedStyle: brackets
239
+
240
+ # Offense count: 9
241
+ # Cop supports --auto-correct.
242
+ # Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
243
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
244
+ Style/TrailingCommaInLiteral:
245
+ Exclude:
246
+ - 'test/prosperworks/integration/webhook_test.rb'
247
+ - 'test/test_helper.rb'
248
+
249
+ # Offense count: 2
250
+ # Cop supports --auto-correct.
251
+ Style/UnneededInterpolation:
252
+ Exclude:
253
+ - 'lib/prosperworks/api_operations/connect.rb'
254
+ - 'test/test_helper.rb'
255
+
256
+ # Offense count: 2
257
+ # Cop supports --auto-correct.
258
+ Style/UnneededPercentQ:
259
+ Exclude:
260
+ - 'prosperworks-ruby.gemspec'
261
+
262
+ # Offense count: 4
263
+ # Cop supports --auto-correct.
264
+ # Configuration parameters: SupportedStyles, MinSize, WordRegex.
265
+ # SupportedStyles: percent, brackets
266
+ Style/WordArray:
267
+ EnforcedStyle: brackets
@@ -1,5 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.0
4
+ - 2.1
5
+ - 2.2
6
+ - 2.3
7
+ - 2.4
5
8
  before_install: gem install bundler -v 1.15.1
@@ -1,6 +1,17 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 0.2.0
5
+ -----
6
+
7
+ - add CustomerSource
8
+ - add Pipeline and PipelineStage
9
+ - add Search for the 6 main entity types
10
+ - add Person.find_by_email
11
+ - support for Ruby 2.1
12
+
13
+ Thanks to @runa and @josh-works for their contributions to this release!
14
+
4
15
  0.1.1
5
16
  -----
6
17
 
@@ -9,4 +20,4 @@ Changelog
9
20
  0.1.0
10
21
  -----
11
22
 
12
- - First release
23
+ - first release
data/Gemfile CHANGED
@@ -1,4 +1,15 @@
1
1
  source "https://rubygems.org"
2
2
 
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
3
8
  # Specify your gem's dependencies in prosperworks-ruby.gemspec
4
9
  gemspec
10
+
11
+ group :test do
12
+ gem 'minitest', '~> 5.0'
13
+ gem 'rubocop', '~> 0.49.1', require: false
14
+ gem 'webmock', '~> 3.0'
15
+ end
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  A lightweight wrapper for interacting with the [ProsperWorks Developer API](https://www.prosperworks.com/developer_api).
4
4
 
5
+ [![Build Status](https://travis-ci.org/soccernee/prosperworks-ruby.svg?branch=master)](https://travis-ci.org/soccernee/prosperworks-ruby)
5
6
 
6
7
  ## Installation
7
8
 
@@ -78,29 +79,40 @@ response = ProsperWorks::Person.update(person, attributes)
78
79
  response = ProsperWorks::Person.delete(person.id)
79
80
 
80
81
  ```
82
+ ### Search
81
83
 
82
- ### List (webhooks only)
84
+ ```
85
+ response = ProsperWorks::Person.search(name: "John Doe")
86
+ ```
87
+
88
+ ### List
83
89
 
84
90
  ```
85
91
  webhooks = ProsperWorks::Webhook.list
86
92
  ```
87
93
 
88
- The following entity types are currently supported:
94
+ The following entity types are currently supported for create, find, update, delete and search:
89
95
  * Person
90
96
  * Lead
91
97
  * Company
92
98
  * Opportunity
93
99
  * Task
94
100
  * Project
101
+
102
+ The following entity types are currently supported for list:
103
+ * Customer Source
104
+ * Pipeline
105
+ * Pipeline Stage
95
106
  * Webhook
96
107
 
97
108
  The response will either be an instance of `ProsperWorks::Errors`, or the entity itself. See the `handle_response` function in [connect.rb](lib/prosperworks/api_operations/connect.rb).
98
109
 
110
+
99
111
  ## Development
100
112
 
101
113
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
102
114
 
103
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
115
+ To install this gem onto your local machine, run `bundle exec rake install`.
104
116
 
105
117
  ## Contributing
106
118
 
@@ -109,11 +121,11 @@ This gem is fairly new, and can benefit from contributions!
109
121
  You can take a look at the [issues](https://github.com/soccernee/prosperworks-ruby/issues) and start by contributing there.
110
122
 
111
123
  Wishlist
112
- - [ ] continuous integration setup
113
- - [ ] add [Rubocop](https://github.com/bbatsov/rubocop)
124
+ - [X] continuous integration setup
125
+ - [X] add [Rubocop](https://github.com/bbatsov/rubocop)
114
126
  - [ ] code cleanup & refactoring
115
127
  - [ ] improved testing
116
- - [ ] search endpoint
128
+ - [X] search endpoint
117
129
  - [ ] Users API
118
130
  - [ ] Activities API
119
131
  - [ ] Related Items API
data/Rakefile CHANGED
@@ -1,5 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
+ require 'rubocop/rake_task'
4
+
5
+ task :default => [:rubocop, :test]
3
6
 
4
7
  Rake::TestTask.new(:test) do |t|
5
8
  t.libs << "test"
@@ -7,4 +10,7 @@ Rake::TestTask.new(:test) do |t|
7
10
  t.test_files = FileList["test/**/*_test.rb"]
8
11
  end
9
12
 
10
- task :default => :test
13
+ desc 'Run rubocop'
14
+ task :rubocop do
15
+ RuboCop::RakeTask.new
16
+ end
@@ -5,6 +5,7 @@ require 'prosperworks/api_operations/create'
5
5
  require 'prosperworks/api_operations/delete'
6
6
  require 'prosperworks/api_operations/find'
7
7
  require 'prosperworks/api_operations/list'
8
+ require 'prosperworks/api_operations/search'
8
9
  require 'prosperworks/api_operations/update'
9
10
 
10
11
  require 'prosperworks/errors/base'
@@ -24,6 +25,9 @@ require 'prosperworks/company'
24
25
  require 'prosperworks/configuration'
25
26
  require 'prosperworks/lead'
26
27
  require 'prosperworks/opportunity'
28
+ require 'prosperworks/pipeline'
29
+ require 'prosperworks/pipeline_stage'
30
+ require 'prosperworks/customer_source'
27
31
  require 'prosperworks/person'
28
32
  require 'prosperworks/project'
29
33
  require 'prosperworks/task'
@@ -44,4 +48,4 @@ module ProsperWorks
44
48
  reset!
45
49
  client.configure(&block)
46
50
  end
47
- end
51
+ end
@@ -23,10 +23,10 @@ module ProsperWorks
23
23
  request = Net::HTTP::Get.new(uri.request_uri, headers)
24
24
  when "post"
25
25
  request = Net::HTTP::Post.new(uri.request_uri, headers)
26
- request.body = entity.serialize_pw_entity
26
+ request.body = entity.to_json
27
27
  when "put"
28
28
  request = Net::HTTP::Put.new(uri.request_uri, headers)
29
- request.body = entity.serialize_pw_entity
29
+ request.body = entity.to_json
30
30
  when "delete"
31
31
  request = Net::HTTP::Delete.new(uri.request_uri, headers)
32
32
  end
@@ -66,6 +66,17 @@ module ProsperWorks
66
66
  end
67
67
  end
68
68
 
69
+ def handle_multiple_response(response)
70
+ result = handle_response(nil, response)
71
+ if result.is_a?(ProsperWorks::Errors)
72
+ # pass the error along
73
+ result
74
+ else
75
+ result.map do |res|
76
+ new(res)
77
+ end
78
+ end
79
+ end
69
80
  end
70
81
  end
71
- end
82
+ end
@@ -13,18 +13,6 @@ module ProsperWorks
13
13
  handle_multiple_response(response)
14
14
  end
15
15
 
16
- def handle_multiple_response(response)
17
- result = handle_response(nil, response)
18
- if result.is_a?(ProsperWorks::Errors)
19
- # pass the error along
20
- result
21
- else
22
- result.map do |webhook|
23
- self.new(webhook)
24
- end
25
- end
26
- end
27
-
28
16
  end
29
17
  end
30
- end
18
+ end
@@ -0,0 +1,16 @@
1
+ module ProsperWorks
2
+ module ApiOperations
3
+ module Search
4
+
5
+ include ApiOperations::Connect
6
+
7
+ def search(params = {})
8
+ uri = get_uri(api_name, 'search')
9
+
10
+ response = send_request("post", uri, params)
11
+ handle_multiple_response(response)
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -15,6 +15,7 @@ module ProsperWorks
15
15
  extend ApiOperations::Delete
16
16
  extend ApiOperations::Find
17
17
  extend ApiOperations::Update
18
+ extend ApiOperations::Search
18
19
 
19
20
  end
20
- end
21
+ end
@@ -6,10 +6,10 @@ module ProsperWorks
6
6
 
7
7
  def headers
8
8
  {
9
- "Content-Type": "application/json",
10
- "X-PW-Application": "developer_api",
11
- "X-PW-UserEmail": configuration.user_email,
12
- "X-PW-AccessToken": configuration.access_token
9
+ "Content-Type" => "application/json",
10
+ "X-PW-Application" => "developer_api",
11
+ "X-PW-UserEmail" => configuration.user_email,
12
+ "X-PW-AccessToken" => configuration.access_token
13
13
  }
14
14
  end
15
15
 
@@ -26,4 +26,4 @@ module ProsperWorks
26
26
  end
27
27
 
28
28
  end
29
- end
29
+ end
@@ -17,4 +17,4 @@ module ProsperWorks
17
17
  end
18
18
 
19
19
  end
20
- end
20
+ end
@@ -0,0 +1,12 @@
1
+ module ProsperWorks
2
+ class CustomerSource < Base
3
+ extend ApiOperations::List
4
+
5
+ attr_accessor :name
6
+
7
+ def self.api_name
8
+ "customer_sources"
9
+ end
10
+
11
+ end
12
+ end
@@ -27,4 +27,4 @@ module ProsperWorks
27
27
  end
28
28
 
29
29
  end
30
- end
30
+ end
@@ -20,4 +20,4 @@ module ProsperWorks
20
20
  end
21
21
 
22
22
  end
23
- end
23
+ end
@@ -24,5 +24,12 @@ module ProsperWorks
24
24
  "people"
25
25
  end
26
26
 
27
+ def self.find_by_email(email)
28
+ uri = get_uri(api_name, 'fetch_by_email')
29
+
30
+ response = send_request("post", uri, email: email)
31
+ handle_response(new, response)
32
+ end
33
+
27
34
  end
28
- end
35
+ end
@@ -0,0 +1,13 @@
1
+ module ProsperWorks
2
+ class Pipeline < Base
3
+ extend ApiOperations::List
4
+
5
+ attr_accessor :name,
6
+ :stages
7
+
8
+ def self.api_name
9
+ "pipelines"
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ module ProsperWorks
2
+ class PipelineStage < Base
3
+ extend ApiOperations::List
4
+
5
+ attr_accessor :name,
6
+ :pipeline_id,
7
+ :win_probability
8
+
9
+ def self.api_name
10
+ "pipeline_stages"
11
+ end
12
+
13
+ end
14
+ end
@@ -9,4 +9,4 @@ module ProsperWorks
9
9
  end
10
10
 
11
11
  end
12
- end
12
+ end
@@ -13,4 +13,4 @@ module ProsperWorks
13
13
  end
14
14
 
15
15
  end
16
- end
16
+ end
@@ -8,7 +8,7 @@ module ProsperWorks
8
8
  #
9
9
  module SerializeEntity
10
10
 
11
- def serialize_pw_entity(*a)
11
+ def to_json(*a)
12
12
  result = {}
13
13
  self.instance_variables.each do |var|
14
14
  trimmed_var = var.to_s.gsub!("@", "")
@@ -1,3 +1,3 @@
1
1
  module ProsperWorks
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -23,6 +23,4 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.15"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "minitest", "~> 5.0"
27
- spec.add_development_dependency "webmock", "~> 3.0"
28
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prosperworks-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj Chandra
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-01 00:00:00.000000000 Z
11
+ date: 2017-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,34 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '5.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '5.0'
55
- - !ruby/object:Gem::Dependency
56
- name: webmock
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.0'
69
41
  description: A lightweight interface for the ProsperWorks Developer API
70
42
  email:
71
43
  - nchandra324@gmail.com
@@ -74,6 +46,8 @@ extensions: []
74
46
  extra_rdoc_files: []
75
47
  files:
76
48
  - ".gitignore"
49
+ - ".rubocop.yml"
50
+ - ".rubocop_todo.yml"
77
51
  - ".travis.yml"
78
52
  - CHANGELOG.md
79
53
  - CODE_OF_CONDUCT.md
@@ -89,12 +63,14 @@ files:
89
63
  - lib/prosperworks/api_operations/delete.rb
90
64
  - lib/prosperworks/api_operations/find.rb
91
65
  - lib/prosperworks/api_operations/list.rb
66
+ - lib/prosperworks/api_operations/search.rb
92
67
  - lib/prosperworks/api_operations/update.rb
93
68
  - lib/prosperworks/base.rb
94
69
  - lib/prosperworks/base_entity.rb
95
70
  - lib/prosperworks/client.rb
96
71
  - lib/prosperworks/company.rb
97
72
  - lib/prosperworks/configuration.rb
73
+ - lib/prosperworks/customer_source.rb
98
74
  - lib/prosperworks/errors/bad_request.rb
99
75
  - lib/prosperworks/errors/base.rb
100
76
  - lib/prosperworks/errors/forbidden.rb
@@ -106,13 +82,14 @@ files:
106
82
  - lib/prosperworks/lead.rb
107
83
  - lib/prosperworks/opportunity.rb
108
84
  - lib/prosperworks/person.rb
85
+ - lib/prosperworks/pipeline.rb
86
+ - lib/prosperworks/pipeline_stage.rb
109
87
  - lib/prosperworks/project.rb
110
88
  - lib/prosperworks/task.rb
111
89
  - lib/prosperworks/utils.rb
112
90
  - lib/prosperworks/version.rb
113
91
  - lib/prosperworks/webhook.rb
114
92
  - prosperworks-ruby.gemspec
115
- - sample.rb
116
93
  homepage: https://rubygems.org/gems/prosperworks-ruby
117
94
  licenses:
118
95
  - MIT
data/sample.rb DELETED
@@ -1,5 +0,0 @@
1
- puts "checking files: "
2
- files = `git ls-files -z`.split("\x0").reject do |f|
3
- f.match(%r{^(test|spec|features)/})
4
- end
5
- puts files