core-client 0.1.0 → 0.2.4
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 +4 -4
- data/.gitignore +2 -1
- data/.ruby-version +1 -0
- data/Gemfile.lock +50 -43
- data/README.md +2 -0
- data/Rakefile +1 -1
- data/core-client.gemspec +14 -15
- data/lib/core/client/v1/base.rb +1 -1
- data/lib/core/client/v2/base.rb +2 -2
- data/lib/core/client/v2/cheer.rb +10 -0
- data/lib/core/client/v2/cheer_mention.rb +13 -0
- data/lib/core/client/v2/feedback_highlight.rb +13 -0
- data/lib/core/client/v2/feedback_message.rb +13 -0
- data/lib/core/client/v2/feedback_request.rb +13 -0
- data/lib/core/client/v2/product.rb +1 -1
- data/lib/core/client/v2/product_assignment.rb +1 -1
- data/lib/core/client/v2/product_investment.rb +1 -1
- data/lib/core/client/v2/product_revenue.rb +1 -1
- data/lib/core/client/v2/project.rb +1 -1
- data/lib/core/client/v2/project_allocation.rb +1 -1
- data/lib/core/client/v2/project_role.rb +1 -1
- data/lib/core/client/v2/role.rb +1 -1
- data/lib/core/client/v2/user.rb +4 -1
- data/lib/core/client/version.rb +1 -1
- metadata +23 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 854b90778a899450c1bbef5fce155fc1db4f6f004f4b4ea11d4699eb02c85f24
|
|
4
|
+
data.tar.gz: 4e15f2ddbb25f35d650a07f00decb9d6c3a633dd242f35ca0f58be28b68ee4bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2b3c31c71a22e5c59676aabae2a5f0a2a33bb7429a5d7f20ac0f16eb4b9ab59d03079994029d580879555cc49c55985a01500854cbe7ee35ef1e914e61cc0eb
|
|
7
|
+
data.tar.gz: 630e54d656a83070d819d3499907cd7859c718e50fdc19fdf7cd0cf3b0bb5371dd05280fff988d539e36d9de9caf2a1b048d9cb2dff748959f0646299f4794a2
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.7.1
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
core-client (0.
|
|
5
|
-
activesupport (
|
|
4
|
+
core-client (0.2.4)
|
|
5
|
+
activesupport (~> 6.0.3, >= 6.0.3.1)
|
|
6
6
|
dotenv (~> 2.7)
|
|
7
7
|
json_api_client (~> 1.16)
|
|
8
8
|
rack (~> 2.2)
|
|
@@ -11,57 +11,59 @@ PATH
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
activemodel (6.0.
|
|
15
|
-
activesupport (= 6.0.
|
|
16
|
-
activesupport (6.0.
|
|
14
|
+
activemodel (6.0.3.5)
|
|
15
|
+
activesupport (= 6.0.3.5)
|
|
16
|
+
activesupport (6.0.3.5)
|
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
18
|
i18n (>= 0.7, < 2)
|
|
19
19
|
minitest (~> 5.1)
|
|
20
20
|
tzinfo (~> 1.1)
|
|
21
|
-
zeitwerk (~> 2.2)
|
|
21
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
22
22
|
addressable (2.7.0)
|
|
23
23
|
public_suffix (>= 2.0.2, < 5.0)
|
|
24
|
-
ast (2.4.
|
|
25
|
-
concurrent-ruby (1.1.
|
|
24
|
+
ast (2.4.2)
|
|
25
|
+
concurrent-ruby (1.1.8)
|
|
26
26
|
diff-lcs (1.3)
|
|
27
27
|
domain_name (0.5.20190701)
|
|
28
28
|
unf (>= 0.0.5, < 1.0.0)
|
|
29
|
-
dotenv (2.7.
|
|
30
|
-
faraday (
|
|
29
|
+
dotenv (2.7.6)
|
|
30
|
+
faraday (1.1.0)
|
|
31
31
|
multipart-post (>= 1.2, < 3)
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
ruby2_keywords
|
|
33
|
+
faraday_middleware (1.0.0)
|
|
34
|
+
faraday (~> 1.0)
|
|
34
35
|
http-accept (1.7.0)
|
|
35
36
|
http-cookie (1.0.3)
|
|
36
37
|
domain_name (~> 0.5)
|
|
37
|
-
i18n (1.8.
|
|
38
|
+
i18n (1.8.9)
|
|
38
39
|
concurrent-ruby (~> 1.0)
|
|
39
|
-
|
|
40
|
-
json_api_client (1.16.1)
|
|
40
|
+
json_api_client (1.18.0)
|
|
41
41
|
activemodel (>= 3.2.0)
|
|
42
42
|
activesupport (>= 3.2.0)
|
|
43
43
|
addressable (~> 2.2)
|
|
44
|
-
faraday (
|
|
45
|
-
faraday_middleware (
|
|
44
|
+
faraday (>= 0.15.2, < 1.2.0)
|
|
45
|
+
faraday_middleware (>= 0.9.0, < 1.2.0)
|
|
46
46
|
rack (>= 0.2)
|
|
47
47
|
mime-types (3.3.1)
|
|
48
48
|
mime-types-data (~> 3.2015)
|
|
49
|
-
mime-types-data (3.
|
|
50
|
-
minitest (5.14.
|
|
49
|
+
mime-types-data (3.2021.0212)
|
|
50
|
+
minitest (5.14.3)
|
|
51
51
|
multipart-post (2.1.1)
|
|
52
52
|
netrc (0.11.0)
|
|
53
|
-
parallel (1.
|
|
54
|
-
parser (
|
|
55
|
-
ast (~> 2.4.
|
|
56
|
-
public_suffix (4.0.
|
|
57
|
-
rack (2.2.
|
|
53
|
+
parallel (1.20.1)
|
|
54
|
+
parser (3.0.0.0)
|
|
55
|
+
ast (~> 2.4.1)
|
|
56
|
+
public_suffix (4.0.6)
|
|
57
|
+
rack (2.2.3)
|
|
58
58
|
rainbow (3.0.0)
|
|
59
|
-
rake (
|
|
59
|
+
rake (13.0.1)
|
|
60
|
+
regexp_parser (2.0.3)
|
|
60
61
|
rest-client (2.1.0)
|
|
61
62
|
http-accept (>= 1.7.0, < 2.0)
|
|
62
63
|
http-cookie (>= 1.0.2, < 2.0)
|
|
63
64
|
mime-types (>= 1.16, < 4.0)
|
|
64
65
|
netrc (~> 0.8)
|
|
66
|
+
rexml (3.2.4)
|
|
65
67
|
rspec (3.9.0)
|
|
66
68
|
rspec-core (~> 3.9.0)
|
|
67
69
|
rspec-expectations (~> 3.9.0)
|
|
@@ -75,28 +77,34 @@ GEM
|
|
|
75
77
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
76
78
|
rspec-support (~> 3.9.0)
|
|
77
79
|
rspec-support (3.9.2)
|
|
78
|
-
rubocop (0.
|
|
79
|
-
jaro_winkler (~> 1.5.1)
|
|
80
|
+
rubocop (0.92.0)
|
|
80
81
|
parallel (~> 1.10)
|
|
81
|
-
parser (>= 2.7.
|
|
82
|
+
parser (>= 2.7.1.5)
|
|
82
83
|
rainbow (>= 2.2.2, < 4.0)
|
|
84
|
+
regexp_parser (>= 1.7)
|
|
85
|
+
rexml
|
|
86
|
+
rubocop-ast (>= 0.5.0)
|
|
83
87
|
ruby-progressbar (~> 1.7)
|
|
84
|
-
unicode-display_width (>= 1.4.0, <
|
|
85
|
-
rubocop-able (0.2.
|
|
86
|
-
rubocop (
|
|
87
|
-
rubocop-rails (~> 2.
|
|
88
|
-
rubocop-
|
|
88
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
89
|
+
rubocop-able (0.2.2)
|
|
90
|
+
rubocop (= 0.92)
|
|
91
|
+
rubocop-rails (~> 2.8.1)
|
|
92
|
+
rubocop-ast (1.4.1)
|
|
93
|
+
parser (>= 2.7.1.5)
|
|
94
|
+
rubocop-rails (2.8.1)
|
|
95
|
+
activesupport (>= 4.2.0)
|
|
89
96
|
rack (>= 1.1)
|
|
90
|
-
rubocop (>= 0.
|
|
91
|
-
ruby-progressbar (1.
|
|
97
|
+
rubocop (>= 0.87.0)
|
|
98
|
+
ruby-progressbar (1.11.0)
|
|
99
|
+
ruby2_keywords (0.0.4)
|
|
92
100
|
thread_safe (0.3.6)
|
|
93
|
-
tzinfo (1.2.
|
|
101
|
+
tzinfo (1.2.9)
|
|
94
102
|
thread_safe (~> 0.1)
|
|
95
103
|
unf (0.1.4)
|
|
96
104
|
unf_ext
|
|
97
|
-
unf_ext (0.0.7.
|
|
98
|
-
unicode-display_width (1.
|
|
99
|
-
zeitwerk (2.
|
|
105
|
+
unf_ext (0.0.7.7)
|
|
106
|
+
unicode-display_width (1.7.0)
|
|
107
|
+
zeitwerk (2.4.2)
|
|
100
108
|
|
|
101
109
|
PLATFORMS
|
|
102
110
|
ruby
|
|
@@ -104,10 +112,9 @@ PLATFORMS
|
|
|
104
112
|
DEPENDENCIES
|
|
105
113
|
bundler (~> 2.0)
|
|
106
114
|
core-client!
|
|
107
|
-
rake (~>
|
|
115
|
+
rake (~> 13.0)
|
|
108
116
|
rspec (~> 3.0)
|
|
109
|
-
rubocop (~> 0.
|
|
110
|
-
rubocop-able (~> 0.2.0)
|
|
117
|
+
rubocop-able (~> 0.2.2)
|
|
111
118
|
|
|
112
119
|
BUNDLED WITH
|
|
113
|
-
2.
|
|
120
|
+
2.1.4
|
data/README.md
CHANGED
|
@@ -33,6 +33,8 @@ Or install it yourself as:
|
|
|
33
33
|
|
|
34
34
|
To use the Core API you need a token, which can be request via Slack in the `#core` channel. This token needs to be set in an ENV variable called `CORE_API_TOKEN`. `Core::Client` will automatically use that ENV variable to sign all the requests sent through the gem.
|
|
35
35
|
|
|
36
|
+
To use a different Core environment, you need to set the `CORE_API_URL` variable. `Core::Client` will automatically sent all the requests to the value in that ENV variable.
|
|
37
|
+
|
|
36
38
|
Both versions (v1 and v2) share similar methods to access the resources:
|
|
37
39
|
- `.all` returns an array of resources
|
|
38
40
|
- `.first` returns the first element of `.all`
|
data/Rakefile
CHANGED
data/core-client.gemspec
CHANGED
|
@@ -3,15 +3,15 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
3
3
|
require "core/client/version"
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name
|
|
7
|
-
spec.version
|
|
8
|
-
spec.authors
|
|
9
|
-
spec.email
|
|
6
|
+
spec.name = "core-client"
|
|
7
|
+
spec.version = Core::Client::VERSION
|
|
8
|
+
spec.authors = ["Able"]
|
|
9
|
+
spec.email = ["engineering@able.co"]
|
|
10
10
|
|
|
11
|
-
spec.summary
|
|
12
|
-
spec.description
|
|
13
|
-
spec.homepage
|
|
14
|
-
spec.license
|
|
11
|
+
spec.summary = %q{Core API client for Ruby.}
|
|
12
|
+
spec.description = %q{Core API client for Ruby. Supports v1 and v2.}
|
|
13
|
+
spec.homepage = "https://core.able.co"
|
|
14
|
+
spec.license = "MIT"
|
|
15
15
|
|
|
16
16
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
17
17
|
|
|
@@ -21,21 +21,20 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
|
|
22
22
|
# Specify which files should be added to the gem when it is released.
|
|
23
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
24
|
-
spec.files
|
|
24
|
+
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
|
25
25
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
26
26
|
end
|
|
27
|
-
spec.bindir
|
|
28
|
-
spec.executables
|
|
27
|
+
spec.bindir = "exe"
|
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
29
29
|
spec.require_paths = ["lib"]
|
|
30
30
|
|
|
31
31
|
spec.add_development_dependency "bundler", "~> 2.0"
|
|
32
|
-
spec.add_development_dependency "rake", "~>
|
|
32
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
|
33
33
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
34
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
|
35
|
-
spec.add_development_dependency "rubocop-able", "~> 0.2.0"
|
|
34
|
+
spec.add_development_dependency "rubocop-able", "~> 0.2.2"
|
|
36
35
|
spec.add_dependency "dotenv", "~> 2.7"
|
|
37
36
|
spec.add_dependency "json_api_client", "~> 1.16"
|
|
38
37
|
spec.add_dependency "rest-client", "~> 2.1"
|
|
39
|
-
spec.add_dependency "activesupport", "6.0.
|
|
38
|
+
spec.add_dependency "activesupport", "~> 6.0.3", ">= 6.0.3.1"
|
|
40
39
|
spec.add_dependency "rack", "~> 2.2"
|
|
41
40
|
end
|
data/lib/core/client/v1/base.rb
CHANGED
data/lib/core/client/v2/base.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Core
|
|
|
5
5
|
module Client
|
|
6
6
|
module V2
|
|
7
7
|
class Base < JsonApiClient::Resource
|
|
8
|
-
self.site = "https://core.able.co/api/v2"
|
|
8
|
+
self.site = "#{ENV['CORE_URL'] || 'https://core.able.co'}/api/v2"
|
|
9
9
|
self.raise_on_blank_find_param = true
|
|
10
10
|
|
|
11
11
|
class << self
|
|
@@ -18,4 +18,4 @@ module Core
|
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
Core::Client::V2::Base.connection_options[:headers] = { "Authorization" => "Bearer #{ENV['CORE_API_TOKEN']}" }
|
|
21
|
+
Core::Client::V2::Base.connection_options[:headers] = { "Authorization" => "Bearer #{ENV['CORE_API_TOKEN']}" }
|
data/lib/core/client/v2/role.rb
CHANGED
data/lib/core/client/v2/user.rb
CHANGED
data/lib/core/client/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: core-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Able
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-02-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '13.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
|
-
version: '
|
|
40
|
+
version: '13.0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rspec
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -52,34 +52,20 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '3.0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: rubocop
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0.76'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0.76'
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
56
|
name: rubocop-able
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
72
58
|
requirements:
|
|
73
59
|
- - "~>"
|
|
74
60
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 0.2.
|
|
61
|
+
version: 0.2.2
|
|
76
62
|
type: :development
|
|
77
63
|
prerelease: false
|
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
65
|
requirements:
|
|
80
66
|
- - "~>"
|
|
81
67
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 0.2.
|
|
68
|
+
version: 0.2.2
|
|
83
69
|
- !ruby/object:Gem::Dependency
|
|
84
70
|
name: dotenv
|
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -126,16 +112,22 @@ dependencies:
|
|
|
126
112
|
name: activesupport
|
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
|
128
114
|
requirements:
|
|
129
|
-
- -
|
|
115
|
+
- - "~>"
|
|
130
116
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 6.0.
|
|
117
|
+
version: 6.0.3
|
|
118
|
+
- - ">="
|
|
119
|
+
- !ruby/object:Gem::Version
|
|
120
|
+
version: 6.0.3.1
|
|
132
121
|
type: :runtime
|
|
133
122
|
prerelease: false
|
|
134
123
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
124
|
requirements:
|
|
136
|
-
- -
|
|
125
|
+
- - "~>"
|
|
126
|
+
- !ruby/object:Gem::Version
|
|
127
|
+
version: 6.0.3
|
|
128
|
+
- - ">="
|
|
137
129
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 6.0.
|
|
130
|
+
version: 6.0.3.1
|
|
139
131
|
- !ruby/object:Gem::Dependency
|
|
140
132
|
name: rack
|
|
141
133
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -161,6 +153,7 @@ files:
|
|
|
161
153
|
- ".gitignore"
|
|
162
154
|
- ".rspec"
|
|
163
155
|
- ".rubocop.yml"
|
|
156
|
+
- ".ruby-version"
|
|
164
157
|
- ".travis.yml"
|
|
165
158
|
- CHANGELOG.md
|
|
166
159
|
- CODE_OF_CONDUCT.md
|
|
@@ -186,6 +179,11 @@ files:
|
|
|
186
179
|
- lib/core/client/v1/role.rb
|
|
187
180
|
- lib/core/client/v1/user.rb
|
|
188
181
|
- lib/core/client/v2/base.rb
|
|
182
|
+
- lib/core/client/v2/cheer.rb
|
|
183
|
+
- lib/core/client/v2/cheer_mention.rb
|
|
184
|
+
- lib/core/client/v2/feedback_highlight.rb
|
|
185
|
+
- lib/core/client/v2/feedback_message.rb
|
|
186
|
+
- lib/core/client/v2/feedback_request.rb
|
|
189
187
|
- lib/core/client/v2/product.rb
|
|
190
188
|
- lib/core/client/v2/product_assignment.rb
|
|
191
189
|
- lib/core/client/v2/product_investment.rb
|
|
@@ -219,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
219
217
|
- !ruby/object:Gem::Version
|
|
220
218
|
version: '0'
|
|
221
219
|
requirements: []
|
|
222
|
-
rubygems_version: 3.
|
|
220
|
+
rubygems_version: 3.2.3
|
|
223
221
|
signing_key:
|
|
224
222
|
specification_version: 4
|
|
225
223
|
summary: Core API client for Ruby.
|