core-client 0.2.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55b08a2812ec57c1b541eed060ea958299c4388976ef752be450452da3d24cd5
4
- data.tar.gz: d176a909f78d8948c823a8d2b73f79da9469ee13c0bd1d08e204af8cb582d7a6
3
+ metadata.gz: 854b90778a899450c1bbef5fce155fc1db4f6f004f4b4ea11d4699eb02c85f24
4
+ data.tar.gz: 4e15f2ddbb25f35d650a07f00decb9d6c3a633dd242f35ca0f58be28b68ee4bf
5
5
  SHA512:
6
- metadata.gz: 9442f6609b078f80091711c67d542459238f402f65a9bb34da424188d3ceead6ce970dae68cadd83044f50a559c1894fe01627d9e66df6336a7c6cc48a2adbac
7
- data.tar.gz: 3a6064bfd96e171aca24b06271737510491855d6926f0005a39f3cad7a62e637067a0a85c40b93137b39707649c1aabf1ff4f20697a06d3295bff530c183576f
6
+ metadata.gz: a2b3c31c71a22e5c59676aabae2a5f0a2a33bb7429a5d7f20ac0f16eb4b9ab59d03079994029d580879555cc49c55985a01500854cbe7ee35ef1e914e61cc0eb
7
+ data.tar.gz: 630e54d656a83070d819d3499907cd7859c718e50fdc19fdf7cd0cf3b0bb5371dd05280fff988d539e36d9de9caf2a1b048d9cb2dff748959f0646299f4794a2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- core-client (0.2.3)
4
+ core-client (0.2.4)
5
5
  activesupport (~> 6.0.3, >= 6.0.3.1)
6
6
  dotenv (~> 2.7)
7
7
  json_api_client (~> 1.16)
@@ -11,9 +11,9 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activemodel (6.0.3.1)
15
- activesupport (= 6.0.3.1)
16
- activesupport (6.0.3.1)
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)
@@ -21,47 +21,49 @@ GEM
21
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.0)
25
- concurrent-ruby (1.1.6)
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.5)
30
- faraday (0.17.3)
29
+ dotenv (2.7.6)
30
+ faraday (1.1.0)
31
31
  multipart-post (>= 1.2, < 3)
32
- faraday_middleware (0.14.0)
33
- faraday (>= 0.7.4, < 1.0)
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.3)
38
+ i18n (1.8.9)
38
39
  concurrent-ruby (~> 1.0)
39
- jaro_winkler (1.5.4)
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 (~> 0.15, >= 0.15.2)
45
- faraday_middleware (~> 0.9)
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.2020.0512)
50
- minitest (5.14.1)
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.19.1)
54
- parser (2.7.0.2)
55
- ast (~> 2.4.0)
56
- public_suffix (4.0.5)
53
+ parallel (1.20.1)
54
+ parser (3.0.0.0)
55
+ ast (~> 2.4.1)
56
+ public_suffix (4.0.6)
57
57
  rack (2.2.3)
58
58
  rainbow (3.0.0)
59
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.0)
79
- jaro_winkler (~> 1.5.1)
80
+ rubocop (0.92.0)
80
81
  parallel (~> 1.10)
81
- parser (>= 2.7.0.1)
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, < 1.7)
85
- rubocop-able (0.2.0)
86
- rubocop (~> 0.76)
87
- rubocop-rails (~> 2.3.0)
88
- rubocop-rails (2.3.2)
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.72.0)
91
- ruby-progressbar (1.10.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.7)
101
+ tzinfo (1.2.9)
94
102
  thread_safe (~> 0.1)
95
103
  unf (0.1.4)
96
104
  unf_ext
97
105
  unf_ext (0.0.7.7)
98
- unicode-display_width (1.6.1)
99
- zeitwerk (2.3.0)
106
+ unicode-display_width (1.7.0)
107
+ zeitwerk (2.4.2)
100
108
 
101
109
  PLATFORMS
102
110
  ruby
@@ -106,8 +114,7 @@ DEPENDENCIES
106
114
  core-client!
107
115
  rake (~> 13.0)
108
116
  rspec (~> 3.0)
109
- rubocop (~> 0.76)
110
- rubocop-able (~> 0.2.0)
117
+ rubocop-able (~> 0.2.2)
111
118
 
112
119
  BUNDLED WITH
113
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
@@ -3,4 +3,4 @@ require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
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 = "core-client"
7
- spec.version = Core::Client::VERSION
8
- spec.authors = ["Able"]
9
- spec.email = ["engineering@able.co"]
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 = %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"
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,18 +21,17 @@ 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 = Dir.chdir(File.expand_path('..', __FILE__)) do
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 = "exe"
28
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
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
32
  spec.add_development_dependency "rake", "~> 13.0"
33
33
  spec.add_development_dependency "rspec", "~> 3.0"
34
- spec.add_development_dependency "rubocop", "~> 0.76"
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"
@@ -10,7 +10,7 @@ module Core
10
10
  class << self
11
11
  def client
12
12
  @client ||= RestClient::Resource.new(
13
- "https://core.able.co/api",
13
+ "#{ENV['CORE_URL'] || 'https://core.able.co'}/api",
14
14
  headers: { "Authorization" => "Bearer #{ENV['CORE_API_TOKEN']}" }
15
15
  )
16
16
  end
@@ -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
@@ -7,4 +7,4 @@ module Core
7
7
  end
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -10,4 +10,4 @@ module Core
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -10,4 +10,4 @@ module Core
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -10,4 +10,4 @@ module Core
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -7,4 +7,4 @@ module Core
7
7
  end
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -10,4 +10,4 @@ module Core
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -10,4 +10,4 @@ module Core
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -7,4 +7,4 @@ module Core
7
7
  end
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -1,5 +1,5 @@
1
1
  module Core
2
2
  module Client
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
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.2.3
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: 2020-10-29 00:00:00.000000000 Z
11
+ date: 2021-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -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.0
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.0
68
+ version: 0.2.2
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: dotenv
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -231,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
217
  - !ruby/object:Gem::Version
232
218
  version: '0'
233
219
  requirements: []
234
- rubygems_version: 3.1.2
220
+ rubygems_version: 3.2.3
235
221
  signing_key:
236
222
  specification_version: 4
237
223
  summary: Core API client for Ruby.