close 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +12 -2
- data/README.md +17 -2
- data/lib/close/filter.rb +2 -1
- data/lib/close/version.rb +1 -1
- metadata +7 -8
- data/close-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed73fa2146fd8957db21a0496e0ba480122cd352f6eca97661286593ec4ad374
|
4
|
+
data.tar.gz: 70a0800988e93bf3ce2e6cb26408d13a9841692c25015691c36edb5d09add831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3803b9d1d73b2f29d0ef73cdc2500b358e09f552aee4fc2bbba1da45362636ac46cfaa8bc2370117878d85dfd3cf1e90234cf47245848a05014107d93c843934
|
7
|
+
data.tar.gz: 82b88a593e72097347966567530e7b648dac5875b360e5347e251189bba8af1901e182b1db47340869e2848b897393057973b8e22853d6bbd9d09a4f36a5431d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,38 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.2.0](https://www.github.com/joynerd/close/compare/v0.1.5...v0.2.0) (2022-10-20)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* Added auto deploy on pr ([3172ac5](https://www.github.com/joynerd/close/commit/3172ac52f2de593b97e1e6283294761a1e0d0bec))
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* removed ci from GH ([1c6c56b](https://www.github.com/joynerd/close/commit/1c6c56b7e1f96cfaaa313b1cb8f080144d1a6618))
|
14
|
+
|
15
|
+
### [0.1.5](https://www.github.com/joynerd/close/compare/v0.1.4...v0.1.5) (2022-10-20)
|
16
|
+
|
17
|
+
|
18
|
+
### Bug Fixes
|
19
|
+
|
20
|
+
* updated action to use ruby@v1 ([aefcafb](https://www.github.com/joynerd/close/commit/aefcafb020d48ffcdfd1317189660c5562206c72))
|
21
|
+
|
22
|
+
### [0.1.4](https://www.github.com/joynerd/close/compare/v0.1.3...v0.1.4) (2022-10-20)
|
23
|
+
|
24
|
+
|
25
|
+
### Bug Fixes
|
26
|
+
|
27
|
+
* added support for actions ([b61d1d2](https://www.github.com/joynerd/close/commit/b61d1d2b31db786ef5ce9e18983226a47269643c))
|
28
|
+
|
29
|
+
### [0.1.3](https://www.github.com/joynerd/close/compare/v0.1.2...v0.1.3) (2022-10-20)
|
30
|
+
|
31
|
+
|
32
|
+
### Bug Fixes
|
33
|
+
|
34
|
+
* use master in workflows ([c2f0652](https://www.github.com/joynerd/close/commit/c2f0652310f69c2749763ba62500f201f99d1016))
|
35
|
+
|
3
36
|
## [0.1.0] - 2022-10-04
|
4
37
|
|
5
38
|
- Initial release
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
close (0.
|
5
|
-
faraday
|
4
|
+
close (0.2.0)
|
5
|
+
faraday (>= 2.0.0)
|
6
6
|
ostruct
|
7
7
|
|
8
8
|
GEM
|
@@ -14,6 +14,7 @@ GEM
|
|
14
14
|
crack (0.4.5)
|
15
15
|
rexml
|
16
16
|
diff-lcs (1.5.0)
|
17
|
+
docile (1.4.0)
|
17
18
|
faraday (2.6.0)
|
18
19
|
faraday-net_http (>= 2.0, < 3.1)
|
19
20
|
ruby2_keywords (>= 0.0.4)
|
@@ -61,6 +62,12 @@ GEM
|
|
61
62
|
parser (>= 3.1.1.0)
|
62
63
|
ruby-progressbar (1.11.0)
|
63
64
|
ruby2_keywords (0.0.5)
|
65
|
+
simplecov (0.21.2)
|
66
|
+
docile (~> 1.1)
|
67
|
+
simplecov-html (~> 0.11)
|
68
|
+
simplecov_json_formatter (~> 0.1)
|
69
|
+
simplecov-html (0.12.3)
|
70
|
+
simplecov_json_formatter (0.1.4)
|
64
71
|
sinatra (3.0.2)
|
65
72
|
mustermann (~> 3.0)
|
66
73
|
rack (~> 2.2, >= 2.2.4)
|
@@ -75,6 +82,8 @@ GEM
|
|
75
82
|
|
76
83
|
PLATFORMS
|
77
84
|
arm64-darwin-21
|
85
|
+
ruby
|
86
|
+
x86_64-linux
|
78
87
|
|
79
88
|
DEPENDENCIES
|
80
89
|
close!
|
@@ -82,6 +91,7 @@ DEPENDENCIES
|
|
82
91
|
rake (~> 13.0)
|
83
92
|
rspec (~> 3.0)
|
84
93
|
rubocop (~> 1.21)
|
94
|
+
simplecov
|
85
95
|
sinatra
|
86
96
|
webmock
|
87
97
|
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Close
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/close.svg)](https://badge.fury.io/rb/close) [![Test Coverage](https://api.codeclimate.com/v1/badges/d83380e81bfb459ea027/test_coverage)](https://codeclimate.com/github/joynerd/close/test_coverage)
|
4
|
+
|
3
5
|
This a ruby gem that provides a robust way to interact with the Close
|
4
6
|
CRM API.
|
5
7
|
|
@@ -59,13 +61,12 @@ leads = Close::Lead.list
|
|
59
61
|
# Get a single lead
|
60
62
|
lead = Close::Lead.retrieve('lead_id')
|
61
63
|
|
62
|
-
# Update the name
|
64
|
+
# Update the name (and other attributes) of a lead. These are not persisted to the API until you call save.
|
63
65
|
lead.name = 'New Name'
|
64
66
|
|
65
67
|
# Save the changes
|
66
68
|
lead.save
|
67
69
|
|
68
|
-
|
69
70
|
```
|
70
71
|
|
71
72
|
## Supported Resources
|
@@ -84,9 +85,15 @@ An example of an advanced filter query:
|
|
84
85
|
# Run a prebuilt query
|
85
86
|
Close::AdvancedFilter.run('find_leads_by_email', {email: 'buster.bluth@gmail.com'})
|
86
87
|
|
88
|
+
# Add a new query
|
89
|
+
Close::AdvancedFilter.add('find_leads_by_phone_number', {phone_number: '%PHONE_NUMBER%'})
|
87
90
|
|
91
|
+
# Run the new query
|
92
|
+
Close::AdvancedFilter.run('find_leads_by_phone_number', {phone_number: '555-555-5555'})
|
88
93
|
```
|
89
94
|
|
95
|
+
If you think you have a common query or one that would be useful to others, please open an issue with a new query and I will add it to the gem. Or you can submit a PR with the JSON for the query added to the repo.
|
96
|
+
|
90
97
|
### Leads
|
91
98
|
[Close API Docs](https://developer.close.com/resources/leads/)
|
92
99
|
|
@@ -133,6 +140,14 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
133
140
|
|
134
141
|
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
135
142
|
|
143
|
+
## Testing
|
144
|
+
|
145
|
+
Tests are setup using RSpec. They do require a live API key on first run to generate a VCR cassette. After that, the cassette will be used for all tests.
|
146
|
+
|
147
|
+
```bash
|
148
|
+
CLOSE_API_KEY=YOUR_API_KEY bundle exec rspec
|
149
|
+
```
|
150
|
+
|
136
151
|
## Contributing
|
137
152
|
|
138
153
|
Bug reports and pull requests are welcome on GitHub at https://github.com/JoyNerd/close. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/JoyNerd/close/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/close/filter.rb
CHANGED
@@ -81,7 +81,8 @@ module Close
|
|
81
81
|
# @raise [Close::QueryNotFoundError] if the file does not exist.
|
82
82
|
def self.load_query_from_file(name)
|
83
83
|
begin
|
84
|
-
file = File.read("
|
84
|
+
file = File.read(File.join(File.dirname(__FILE__), "data/filters/#{name}.json"))
|
85
|
+
#file = File.read(File.expand_path("lib/close/data/filters/#{name}.json", __dir__))
|
85
86
|
rescue Errno::ENOENT
|
86
87
|
raise Close::QueryNotFoundError.new("Query #{name} not found.")
|
87
88
|
end
|
data/lib/close/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: close
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JoyNerd LLC
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ostruct
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.0.0
|
41
41
|
description: A ruby wrapper for the close.com API that offers caching.
|
42
42
|
email:
|
43
43
|
- developers@joynerd.io
|
@@ -54,7 +54,6 @@ files:
|
|
54
54
|
- LICENSE.txt
|
55
55
|
- README.md
|
56
56
|
- Rakefile
|
57
|
-
- close-0.1.0.gem
|
58
57
|
- lib/close.rb
|
59
58
|
- lib/close/api_operations.rb
|
60
59
|
- lib/close/api_resource.rb
|
@@ -77,7 +76,7 @@ metadata:
|
|
77
76
|
homepage_uri: https://github.com/joynerd/close
|
78
77
|
source_code_uri: https://github.com/joynerd/close.git
|
79
78
|
changelog_uri: https://github.com/joynerd/changelog.md
|
80
|
-
post_install_message:
|
79
|
+
post_install_message:
|
81
80
|
rdoc_options: []
|
82
81
|
require_paths:
|
83
82
|
- lib
|
@@ -93,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
92
|
version: '0'
|
94
93
|
requirements: []
|
95
94
|
rubygems_version: 3.2.3
|
96
|
-
signing_key:
|
95
|
+
signing_key:
|
97
96
|
specification_version: 4
|
98
97
|
summary: A ruby wrapper for the close.com API
|
99
98
|
test_files: []
|
data/close-0.1.0.gem
DELETED
Binary file
|