artemis 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +53 -0
  3. data/Appraisals +22 -16
  4. data/CHANGELOG.md +63 -6
  5. data/Gemfile +2 -1
  6. data/README.md +62 -32
  7. data/artemis.gemspec +7 -8
  8. data/banner.png +0 -0
  9. data/gemfiles/rails_50.gemfile +6 -3
  10. data/gemfiles/rails_51.gemfile +5 -3
  11. data/gemfiles/rails_52.gemfile +5 -3
  12. data/gemfiles/rails_60.gemfile +13 -0
  13. data/gemfiles/{rails_42.gemfile → rails_61.gemfile} +5 -4
  14. data/gemfiles/rails_edge.gemfile +2 -1
  15. data/lib/artemis/adapters/abstract_adapter.rb +6 -1
  16. data/lib/artemis/adapters/curb_adapter.rb +2 -2
  17. data/lib/artemis/adapters/multi_domain_adapter.rb +43 -0
  18. data/lib/artemis/adapters/net_http_adapter.rb +1 -3
  19. data/lib/artemis/adapters/net_http_persistent_adapter.rb +1 -1
  20. data/lib/artemis/adapters/test_adapter.rb +1 -1
  21. data/lib/artemis/adapters.rb +1 -0
  22. data/lib/artemis/client.rb +45 -19
  23. data/lib/artemis/graphql_endpoint.rb +24 -6
  24. data/lib/artemis/railtie.rb +15 -13
  25. data/lib/artemis/test_helper.rb +41 -14
  26. data/lib/artemis/version.rb +1 -1
  27. data/lib/artemis.rb +32 -1
  28. data/lib/generators/artemis/install/install_generator.rb +2 -2
  29. data/lib/generators/artemis/mutation/templates/mutation.graphql +1 -1
  30. data/lib/generators/artemis/query/query_generator.rb +13 -1
  31. data/lib/generators/artemis/query/templates/fixture.yml +19 -0
  32. data/lib/generators/artemis/query/templates/query.graphql +1 -1
  33. data/lib/tasks/artemis.rake +3 -3
  34. data/spec/adapters_spec.rb +56 -10
  35. data/spec/callbacks_spec.rb +14 -0
  36. data/spec/client_spec.rb +26 -1
  37. data/spec/fixtures/responses/{artist.yml → metaphysics/artist.yml} +7 -0
  38. data/spec/fixtures/responses/{artwork.json → metaphysics/artwork.json} +0 -0
  39. data/spec/fixtures/responses/spotify_client/artist.yml +5 -0
  40. data/spec/spec_helper.rb +1 -0
  41. data/spec/test_helper_spec.rb +34 -4
  42. metadata +36 -46
  43. data/.travis.yml +0 -34
@@ -1,3 +1,3 @@
1
1
  module Artemis
2
- VERSION = "0.4.0"
2
+ VERSION = "0.6.0"
3
3
  end
data/lib/artemis.rb CHANGED
@@ -1,3 +1,34 @@
1
1
  require "artemis/version"
2
2
  require "artemis/client"
3
- require "artemis/railtie" if defined?(Rails)
3
+ require "artemis/railtie" if defined?(Rails)
4
+
5
+ module Artemis
6
+ def self.config_for_graphql(app)
7
+ if app.respond_to?(:config_for)
8
+ app.config_for(:graphql)
9
+ else
10
+ config_for(:graphql, app: app)
11
+ end
12
+ end
13
+
14
+ # backported from https://github.com/rails/rails/blob/b9ca94ca/railties/lib/rails/application.rb#L226
15
+ # TODO: Remove once dropping Rails <= 4.1 support
16
+ def self.config_for(name, app:, env: Rails.env)
17
+ if name.is_a?(Pathname)
18
+ yaml = name
19
+ else
20
+ yaml = Pathname.new("#{app.paths["config"].existent.first}/#{name}.yml")
21
+ end
22
+
23
+ if yaml.exist?
24
+ require "erb"
25
+ (YAML.load(ERB.new(yaml.read).result) || {})[env] || {}
26
+ else
27
+ raise "Could not load configuration. No such file - #{yaml}"
28
+ end
29
+ rescue Psych::SyntaxError => e
30
+ raise "YAML syntax error occurred while parsing #{yaml}. " \
31
+ "Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
32
+ "Error: #{e.message}"
33
+ end
34
+ end
@@ -56,7 +56,7 @@ YAML
56
56
  end
57
57
 
58
58
  def client_file_name
59
- if mountable_engine?
59
+ if respond_to?(:mountable_engine?) && mountable_engine?
60
60
  "app/operations/#{namespaced_path}/#{file_name}.rb"
61
61
  else
62
62
  "app/operations/#{file_name}.rb"
@@ -64,7 +64,7 @@ YAML
64
64
  end
65
65
 
66
66
  def query_dir_gitkeep
67
- if mountable_engine?
67
+ if respond_to?(:mountable_engine?) && mountable_engine?
68
68
  "app/operations/#{namespaced_path}/#{file_name}/.gitkeep"
69
69
  else
70
70
  "app/operations/#{file_name}/.gitkeep"
@@ -1,4 +1,4 @@
1
- mutation<%= arguments.present? && "(#{ arguments.map {|name, type| "$#{name}: #{type.type}" }.join(", ") })" %> {
1
+ mutation<%= arguments.present? && "(#{ arguments.map {|name, type| "$#{name}: #{type.type.to_type_signature}" }.join(", ") })" %> {
2
2
  <%= target_mutation.name %><%= arguments.present? && "(#{ arguments.map {|name, type| "#{name}: $#{name}" }.join(", ") })" %> {
3
3
  # Add fields here...
4
4
  }
@@ -14,6 +14,10 @@ class Artemis::QueryGenerator < Rails::Generators::Base
14
14
  template "query.graphql", graphql_file_path
15
15
  end
16
16
 
17
+ # def generate_text_fixture_file
18
+ # template "fixture.yml", text_fixture_path
19
+ # end
20
+
17
21
  private
18
22
 
19
23
  def query_name
@@ -21,7 +25,11 @@ class Artemis::QueryGenerator < Rails::Generators::Base
21
25
  end
22
26
 
23
27
  def graphql_file_path
24
- "app/operations/#{service_name.underscore}/#{graphql_file_name.presence || query_name}.graphql"
28
+ "app/operations/#{service_name.underscore}/#{qualified_name}.graphql"
29
+ end
30
+
31
+ def text_fixture_path
32
+ File.join(Artemis::Railtie.config.artemis.fixture_path, service_name.underscore, "#{qualified_name}.yml")
25
33
  end
26
34
 
27
35
  def arguments
@@ -49,4 +57,8 @@ class Artemis::QueryGenerator < Rails::Generators::Base
49
57
  end
50
58
  end
51
59
  end
60
+
61
+ def qualified_name
62
+ graphql_file_name.presence || query_name
63
+ end
52
64
  end
@@ -0,0 +1,19 @@
1
+ # You can stub GraphQL queries by calling the `stub_graphql' method in test:
2
+ #
3
+ # stub_graphql(<%= service_name.camelize %>, :<%= qualified_name.underscore %>).to_return(:<%= target_query.name %>_1)
4
+ #
5
+ # Or with a arguments matcher:
6
+ #
7
+ # stub_graphql(<%= service_name.camelize %>, :<%= qualified_name.underscore %>, <%= arguments.map {|name, _| "#{name}: \"...\"" }.join(", ") %>).to_return(:<%= target_query.name %>_2)
8
+ #
9
+
10
+ <%= target_query.name %>_1:
11
+ data:
12
+ <% target_query.type.fields.values.each do |field| -%>
13
+ <%= field.name %>: # type: <%= field.type.to_type_signature %>
14
+ <% end %>
15
+ <%= target_query.name %>_2:
16
+ data:
17
+ <% target_query.type.fields.values.each do |field| -%>
18
+ <%= field.name %>: # type: <%= field.type.to_type_signature %>
19
+ <% end %>
@@ -1,4 +1,4 @@
1
- query<%= arguments.present? && "(#{ arguments.map {|name, type| "$#{name}: #{type.type}" }.join(", ") })" %> {
1
+ query<%= arguments.present? && "(#{ arguments.map {|name, type| "$#{name}: #{type.type.to_type_signature}" }.join(", ") })" %> {
2
2
  <%= target_query.name %><%= arguments.present? && "(#{ arguments.map {|name, type| "#{name}: $#{name}" }.join(", ") })" %> {
3
3
  # Add fields here...
4
4
  }
@@ -12,7 +12,7 @@ namespace :graphql do
12
12
  service = if ENV['SERVICE']
13
13
  ENV['SERVICE']
14
14
  else
15
- services = Rails.application.config_for(:graphql).keys
15
+ services = Artemis.config_for_graphql(Rails.application).keys
16
16
 
17
17
  if services.size == 1
18
18
  services.first
@@ -22,7 +22,7 @@ namespace :graphql do
22
22
  end
23
23
 
24
24
  headers = ENV['AUTHORIZATION'] ? { Authorization: ENV['AUTHORIZATION'] } : {}
25
- service_class = service.camelize.constantize
25
+ service_class = service.to_s.camelize.constantize
26
26
  schema_path = service_class.endpoint.schema_path
27
27
  schema = service_class.connection
28
28
  .execute(
@@ -44,4 +44,4 @@ namespace :graphql do
44
44
  end
45
45
  end
46
46
  end
47
- end
47
+ end
@@ -1,20 +1,31 @@
1
1
  require 'json'
2
2
  require 'rack'
3
+ require 'webrick'
3
4
 
4
5
  describe 'Adapters' do
5
6
  FakeServer = ->(env) {
6
7
  case env['PATH_INFO']
7
8
  when '/slow_server'
8
- sleep 2.1
9
+ sleep 1.1
9
10
 
10
11
  [200, {}, ['{}']]
11
12
  when '/500'
12
13
  [500, {}, ['Server error']]
14
+ when '/test_multi_domain'
15
+ body = {
16
+ data: {
17
+ body: "Endpoint switched.",
18
+ },
19
+ errors: [],
20
+ extensions: {}
21
+ }.to_json
22
+
23
+ [200, {}, [body]]
13
24
  else
14
25
  body = {
15
26
  data: {
16
27
  body: JSON.parse(env['rack.input'].read),
17
- headers: env.select {|key, val| key.start_with?('HTTP_') }
28
+ headers: env.select {|key, val| key.match("^HTTP.*|^CONTENT.*|^AUTHORIZATION.*") }
18
29
  .collect {|key, val| [key.gsub(/^HTTP_/, ''), val.downcase] }
19
30
  .to_h,
20
31
  },
@@ -69,6 +80,8 @@ describe 'Adapters' do
69
80
  expect(response['data']['body']['query']).to eq(GraphQL::Client::IntrospectionDocument.to_query_string)
70
81
  expect(response['data']['body']['variables']).to eq('id' => 'yayoi-kusama')
71
82
  expect(response['data']['body']['operationName']).to eq('IntrospectionQuery')
83
+ expect(response['data']['headers']['CONTENT_TYPE']).to eq('application/json')
84
+ expect(response['data']['headers']['ACCEPT']).to eq('application/json')
72
85
  expect(response['errors']).to eq([])
73
86
  expect(response['extensions']).to eq({})
74
87
  end
@@ -92,23 +105,56 @@ describe 'Adapters' do
92
105
  end
93
106
 
94
107
  describe Artemis::Adapters::NetHttpAdapter do
95
- let(:adapter) { Artemis::Adapters::NetHttpAdapter.new('http://localhost:8000', service_name: nil, timeout: 2, pool_size: 5) }
108
+ let(:adapter) { Artemis::Adapters::NetHttpAdapter.new('http://localhost:8000', service_name: nil, timeout: 0.5, pool_size: 5) }
96
109
  let(:timeout_error) { Net::ReadTimeout }
97
110
 
98
111
  it_behaves_like 'an adapter'
99
112
  end
100
113
 
101
114
  describe Artemis::Adapters::NetHttpPersistentAdapter do
102
- let(:adapter) { Artemis::Adapters::NetHttpPersistentAdapter.new('http://localhost:8000', service_name: nil, timeout: 2, pool_size: 5) }
103
- let(:timeout_error) { Net::HTTP::Persistent::Error }
115
+ let(:adapter) { Artemis::Adapters::NetHttpPersistentAdapter.new('http://localhost:8000', service_name: nil, timeout: 0.5, pool_size: 5) }
116
+ let(:timeout_error) { Net::ReadTimeout }
104
117
 
105
118
  it_behaves_like 'an adapter'
106
119
  end
107
120
 
108
- describe Artemis::Adapters::CurbAdapter do
109
- let(:adapter) { Artemis::Adapters::CurbAdapter.new('http://localhost:8000', service_name: nil, timeout: 2, pool_size: 5) }
110
- let(:timeout_error) { Curl::Err::TimeoutError }
121
+ describe Artemis::Adapters::MultiDomainAdapter do
122
+ let(:adapter) { Artemis::Adapters::MultiDomainAdapter.new('ignored', service_name: nil, timeout: 0.5, pool_size: 5, adapter_options: { adapter: :net_http }) }
111
123
 
112
- it_behaves_like 'an adapter'
124
+ it 'makes an actual HTTP request' do
125
+ response = adapter.execute(document: GraphQL::Client::IntrospectionDocument, context: { url: 'http://localhost:8000/test_multi_domain' })
126
+
127
+ expect(response['data']['body']).to eq("Endpoint switched.")
128
+ expect(response['errors']).to eq([])
129
+ expect(response['extensions']).to eq({})
130
+ end
131
+
132
+ it 'raises an error when context.url is not specified' do
133
+ expect do
134
+ adapter.execute(document: GraphQL::Client::IntrospectionDocument)
135
+ end.to raise_error(ArgumentError, 'The MultiDomain adapter requires a url on every request. Please specify a ' \
136
+ 'url with a context: Client.with_context(url: "https://awesomeshop.domain.conm")')
137
+ end
138
+
139
+ it 'raises an error when it receives a server error' do
140
+ expect do
141
+ adapter.execute(document: GraphQL::Client::IntrospectionDocument, context: { url: 'http://localhost:8000/500' })
142
+ end.to raise_error(Artemis::GraphQLServerError, "Received server error status 500: Server error")
143
+ end
144
+
145
+ it 'allows for overriding timeout' do
146
+ expect do
147
+ adapter.execute(document: GraphQL::Client::IntrospectionDocument, context: { url: 'http://localhost:8000/slow_server' })
148
+ end.to raise_error(Net::ReadTimeout)
149
+ end
150
+ end
151
+
152
+ if RUBY_ENGINE == 'ruby'
153
+ describe Artemis::Adapters::CurbAdapter do
154
+ let(:adapter) { Artemis::Adapters::CurbAdapter.new('http://localhost:8000', service_name: nil, timeout: 2, pool_size: 5) }
155
+ let(:timeout_error) { Curl::Err::TimeoutError }
156
+
157
+ it_behaves_like 'an adapter'
158
+ end
113
159
  end
114
- end
160
+ end
@@ -19,6 +19,20 @@ describe "#{GraphQL::Client} Callbacks" do
19
19
  end
20
20
  end
21
21
 
22
+ Spotify = Class.new(Artemis::Client) do
23
+ def self.name
24
+ 'Spotify'
25
+ end
26
+
27
+ before_execute do
28
+ raise "this callback should not get invoked"
29
+ end
30
+
31
+ after_execute do
32
+ raise "this callback should not get invoked"
33
+ end
34
+ end
35
+
22
36
  describe ".before_execute" do
23
37
  it "gets invoked before executing" do
24
38
  Client.artist(id: 'yayoi-kusama', context: { user_id: 'yuki24' })
data/spec/client_spec.rb CHANGED
@@ -97,6 +97,31 @@ describe GraphQL::Client do
97
97
  GRAPHQL
98
98
  end
99
99
 
100
+ it "can make a GraphQL request with #execute" do
101
+ Metaphysics.execute(:artist, id: "yayoi-kusama")
102
+
103
+ request = requests[0]
104
+
105
+ expect(request.operation_name).to eq('Metaphysics__Artist')
106
+ expect(request.variables).to eq('id' => 'yayoi-kusama')
107
+ expect(request.context).to eq({})
108
+ expect(request.document.to_query_string).to eq(<<~GRAPHQL.strip)
109
+ query Metaphysics__Artist($id: String!) {
110
+ artist(id: $id) {
111
+ name
112
+ bio
113
+ birthday
114
+ }
115
+ }
116
+ GRAPHQL
117
+ end
118
+
119
+ it "can make a GraphQL request with #execute" do
120
+ expect { Metaphysics.execute(:does_not_exist) }
121
+ .to raise_error(Artemis::GraphQLFileNotFound)
122
+ .with_message(/Query does_not_exist\.graphql not found/)
123
+ end
124
+
100
125
  it "assigns context to the request when provided as an argument" do
101
126
  context = { headers: { Authorization: 'bearer ...' } }
102
127
 
@@ -158,4 +183,4 @@ describe GraphQL::Client do
158
183
  ensure
159
184
  files.each {|file| File.delete(file) }
160
185
  end
161
- end
186
+ end
@@ -15,3 +15,10 @@ yuki:
15
15
  artist:
16
16
  name: Yuki Nishijima
17
17
  birthday: <%= Date.today.year %>/01/01
18
+
19
+ yoshiki:
20
+ data:
21
+ artist:
22
+ id: artist-yoshiki
23
+ name: Artist Yoshiki
24
+ birthday: null
@@ -0,0 +1,5 @@
1
+ yoshiki:
2
+ data:
3
+ artist:
4
+ id: pianist-yoshiki
5
+ name: Pianist Yoshiki
data/spec/spec_helper.rb CHANGED
@@ -12,6 +12,7 @@ require 'pry-byebug' if RUBY_ENGINE == 'ruby'
12
12
  # The only method that doesn't need test coverage is +Artemis::Client.query_paths+. The rest of the methods should be
13
13
  # tested, but we don't have any test setup for that yet.
14
14
  Artemis::Client.query_paths = [File.join(__dir__, 'fixtures')]
15
+ Artemis::GraphQLEndpoint.suppress_warnings_on_schema_load = true
15
16
  Artemis::GraphQLEndpoint.register!(:metaphysics, adapter: :test, url: '', schema_path: 'spec/fixtures/metaphysics/schema.json')
16
17
  Artemis::GraphQLEndpoint.lookup(:metaphysics).load_schema!
17
18
 
@@ -1,7 +1,7 @@
1
1
  require 'artemis/test_helper'
2
2
  require 'date'
3
3
 
4
- describe GraphQL::Client do
4
+ describe Artemis::TestHelper do
5
5
  include Artemis::TestHelper
6
6
 
7
7
  def graphql_fixture_path
@@ -53,12 +53,42 @@ describe GraphQL::Client do
53
53
  it "can mock a GraphQL request for a query that has a query name"
54
54
 
55
55
  it "raises an exception if the specified fixture file does not exist" do
56
- expect { stub_graphql(Metaphysics, :does_not_exist) }
57
- .to raise_error(Artemis::FixtureNotFound, %r|spec/fixtures/responses/does_not_exist.{yml,json}|)
56
+ expect { stub_graphql(Metaphysics, :does_not_exist).to_return(:data) }
57
+ .to raise_error(Artemis::FixtureNotFound, %r|does_not_exist.{yml,json}|)
58
58
  end
59
59
 
60
60
  it "raises an exception if the specified fixture file exists but fixture key does not exist" do
61
61
  expect { stub_graphql(Metaphysics, :artist).to_return(:does_not_exist) }
62
- .to raise_error(Artemis::FixtureNotFound, %r|spec/fixtures/responses/artist.yml|)
62
+ .to raise_error(Artemis::FixtureNotFound, %r|spec/fixtures/responses/metaphysics/artist.yml|)
63
+ end
64
+
65
+ it "picks up the fixture for the given different service if multiple services have the exact same fixture" do
66
+ stub_graphql(Metaphysics, :artist).to_return(:yoshiki)
67
+
68
+ yoshiki = Metaphysics.artist(id: "artist-yoshiki")
69
+
70
+ expect(yoshiki.data.artist.name).to eq("Artist Yoshiki")
71
+ end
72
+
73
+ it "can mock separate GraphQL queries with the same arguments" do
74
+ stub_graphql("SpotifyClient", :artist, id: "yoshiki").to_return(:yoshiki)
75
+ stub_graphql(Metaphysics, :artist, id: "yoshiki").to_return(:yoshiki)
76
+
77
+ yoshiki = Metaphysics.artist(id: "yoshiki")
78
+
79
+ expect(yoshiki.data.artist.name).to eq("Artist Yoshiki")
80
+ end
81
+
82
+ it "allows to get raw fixture data as a Hash" do
83
+ data = stub_graphql("SpotifyClient", :artist).get(:yoshiki)
84
+
85
+ expect(data).to eq({
86
+ "data" => {
87
+ "artist" => {
88
+ "id" => "pianist-yoshiki",
89
+ "name" => "Pianist Yoshiki"
90
+ }
91
+ }
92
+ })
63
93
  end
64
94
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artemis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Allured
8
8
  - Yuki Nishijima
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-30 00:00:00.000000000 Z
12
+ date: 2021-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -17,138 +17,124 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 4.2.0
20
+ version: 4.0.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 4.2.0
27
+ version: 4.0.0
28
28
  - !ruby/object:Gem::Dependency
29
- name: graphql
29
+ name: railties
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '1.8'
34
+ version: 4.0.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '1.8'
41
+ version: 4.0.0
42
42
  - !ruby/object:Gem::Dependency
43
- name: graphql-client
43
+ name: graphql
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: 0.13.0
48
+ version: '1.8'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 0.13.0
55
+ version: '1.8'
56
56
  - !ruby/object:Gem::Dependency
57
- name: railties
57
+ name: graphql-client
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 4.2.0
62
+ version: 0.13.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 4.2.0
69
+ version: 0.13.0
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: appraisal
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '2.2'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '2.2'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: bundler
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - "~>"
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '1.16'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '1.16'
98
- - !ruby/object:Gem::Dependency
99
- name: curb
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - "~>"
103
- - !ruby/object:Gem::Version
104
- version: 0.9.6
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: 0.9.6
112
98
  - !ruby/object:Gem::Dependency
113
99
  name: net-http-persistent
114
100
  requirement: !ruby/object:Gem::Requirement
115
101
  requirements:
116
- - - "~>"
102
+ - - ">="
117
103
  - !ruby/object:Gem::Version
118
104
  version: '3.0'
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
108
  requirements:
123
- - - "~>"
109
+ - - ">="
124
110
  - !ruby/object:Gem::Version
125
111
  version: '3.0'
126
112
  - !ruby/object:Gem::Dependency
127
113
  name: rake
128
114
  requirement: !ruby/object:Gem::Requirement
129
115
  requirements:
130
- - - "~>"
116
+ - - ">="
131
117
  - !ruby/object:Gem::Version
132
118
  version: '10.0'
133
119
  type: :development
134
120
  prerelease: false
135
121
  version_requirements: !ruby/object:Gem::Requirement
136
122
  requirements:
137
- - - "~>"
123
+ - - ">="
138
124
  - !ruby/object:Gem::Version
139
125
  version: '10.0'
140
126
  - !ruby/object:Gem::Dependency
141
127
  name: rspec
142
128
  requirement: !ruby/object:Gem::Requirement
143
129
  requirements:
144
- - - "~>"
130
+ - - ">="
145
131
  - !ruby/object:Gem::Version
146
132
  version: '3.8'
147
133
  type: :development
148
134
  prerelease: false
149
135
  version_requirements: !ruby/object:Gem::Requirement
150
136
  requirements:
151
- - - "~>"
137
+ - - ">="
152
138
  - !ruby/object:Gem::Version
153
139
  version: '3.8'
154
140
  description: GraphQL client on Rails + Convention over Configuration = ❤️
@@ -159,9 +145,9 @@ executables: []
159
145
  extensions: []
160
146
  extra_rdoc_files: []
161
147
  files:
148
+ - ".github/workflows/ruby.yml"
162
149
  - ".gitignore"
163
150
  - ".rspec"
164
- - ".travis.yml"
165
151
  - Appraisals
166
152
  - CHANGELOG.md
167
153
  - CODE_OF_CONDUCT.md
@@ -170,20 +156,23 @@ files:
170
156
  - README.md
171
157
  - Rakefile
172
158
  - artemis.gemspec
159
+ - banner.png
173
160
  - bin/console
174
161
  - bin/setup
175
162
  - doc/CHANGELOG.md.erb
176
163
  - doc/changelog_generator.rb
177
164
  - gemfiles/.bundle/config
178
- - gemfiles/rails_42.gemfile
179
165
  - gemfiles/rails_50.gemfile
180
166
  - gemfiles/rails_51.gemfile
181
167
  - gemfiles/rails_52.gemfile
168
+ - gemfiles/rails_60.gemfile
169
+ - gemfiles/rails_61.gemfile
182
170
  - gemfiles/rails_edge.gemfile
183
171
  - lib/artemis.rb
184
172
  - lib/artemis/adapters.rb
185
173
  - lib/artemis/adapters/abstract_adapter.rb
186
174
  - lib/artemis/adapters/curb_adapter.rb
175
+ - lib/artemis/adapters/multi_domain_adapter.rb
187
176
  - lib/artemis/adapters/net_http_adapter.rb
188
177
  - lib/artemis/adapters/net_http_persistent_adapter.rb
189
178
  - lib/artemis/adapters/test_adapter.rb
@@ -203,6 +192,7 @@ files:
203
192
  - lib/generators/artemis/mutation/templates/mutation.graphql
204
193
  - lib/generators/artemis/query/USAGE
205
194
  - lib/generators/artemis/query/query_generator.rb
195
+ - lib/generators/artemis/query/templates/fixture.yml
206
196
  - lib/generators/artemis/query/templates/query.graphql
207
197
  - lib/tasks/artemis.rake
208
198
  - spec/adapters_spec.rb
@@ -216,8 +206,9 @@ files:
216
206
  - spec/fixtures/metaphysics/artists.graphql
217
207
  - spec/fixtures/metaphysics/artwork.graphql
218
208
  - spec/fixtures/metaphysics/schema.json
219
- - spec/fixtures/responses/artist.yml
220
- - spec/fixtures/responses/artwork.json
209
+ - spec/fixtures/responses/metaphysics/artist.yml
210
+ - spec/fixtures/responses/metaphysics/artwork.json
211
+ - spec/fixtures/responses/spotify_client/artist.yml
221
212
  - spec/spec_helper.rb
222
213
  - spec/test_helper_spec.rb
223
214
  - tmp/.gitkeep
@@ -225,7 +216,7 @@ homepage: https://github.com/yuki24/artemis
225
216
  licenses:
226
217
  - MIT
227
218
  metadata: {}
228
- post_install_message:
219
+ post_install_message:
229
220
  rdoc_options: []
230
221
  require_paths:
231
222
  - lib
@@ -240,9 +231,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
231
  - !ruby/object:Gem::Version
241
232
  version: '0'
242
233
  requirements: []
243
- rubyforge_project:
244
- rubygems_version: 2.7.6
245
- signing_key:
234
+ rubygems_version: 3.2.26
235
+ signing_key:
246
236
  specification_version: 4
247
237
  summary: GraphQL on Rails
248
238
  test_files: []