graphiti_graphql 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e0393f405900a890b0875cf64d93bb60a0f8a0c2ef52d3536a6faacb0f0d1ca0
4
+ data.tar.gz: 878b11ef0e004c8b5559ee1c09dd2a325f464184cbd2d328f73b46bb1c92f968
5
+ SHA512:
6
+ metadata.gz: 0752a653316c694d9382f0ba4c05e9a0421c8cb77e2fd536413efa9efd0add4e97593135cdb833e26a3e65b1faef41f51cedcc01517592a35e69cafb1ccde555
7
+ data.tar.gz: f3be55e066cef1d8cd79e3d8711b4bc914fb911751f95564ea084ea2f00846d946d198bb5306e140e2f645a526848c984d9723b17d813ca743c732c5f328b5e4
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.2
7
+ before_install: gem install bundler -v 2.0.2
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in graphiti_graphql.gemspec
4
+ gemspec
5
+
6
+ gem "graphiti", path: "../graphiti"
data/Gemfile.lock ADDED
@@ -0,0 +1,144 @@
1
+ PATH
2
+ remote: ../graphiti
3
+ specs:
4
+ graphiti (1.2.31)
5
+ activesupport (>= 4.1)
6
+ concurrent-ruby (~> 1.0)
7
+ dry-types (>= 0.15.0, < 2.0)
8
+ graphiti_errors (~> 1.1.0)
9
+ jsonapi-renderer (~> 0.2, >= 0.2.2)
10
+ jsonapi-serializable (~> 0.3.0)
11
+
12
+ PATH
13
+ remote: .
14
+ specs:
15
+ graphiti_graphql (0.1.0)
16
+ activesupport (>= 4.1)
17
+ graphql (~> 1.12)
18
+
19
+ GEM
20
+ remote: https://rubygems.org/
21
+ specs:
22
+ activemodel (6.1.1)
23
+ activesupport (= 6.1.1)
24
+ activesupport (6.1.1)
25
+ concurrent-ruby (~> 1.0, >= 1.0.2)
26
+ i18n (>= 1.6, < 2)
27
+ minitest (>= 5.1)
28
+ tzinfo (~> 2.0)
29
+ zeitwerk (~> 2.3)
30
+ apollo-federation (1.1.5)
31
+ google-protobuf (~> 3.7)
32
+ graphql (>= 1.9.8)
33
+ ast (2.4.2)
34
+ byebug (11.1.3)
35
+ coderay (1.1.3)
36
+ concurrent-ruby (1.1.8)
37
+ diff-lcs (1.4.4)
38
+ dry-configurable (0.12.0)
39
+ concurrent-ruby (~> 1.0)
40
+ dry-core (~> 0.5, >= 0.5.0)
41
+ dry-container (0.7.2)
42
+ concurrent-ruby (~> 1.0)
43
+ dry-configurable (~> 0.1, >= 0.1.3)
44
+ dry-core (0.5.0)
45
+ concurrent-ruby (~> 1.0)
46
+ dry-inflector (0.2.0)
47
+ dry-logic (1.1.0)
48
+ concurrent-ruby (~> 1.0)
49
+ dry-core (~> 0.5, >= 0.5)
50
+ dry-types (1.5.0)
51
+ concurrent-ruby (~> 1.0)
52
+ dry-container (~> 0.3)
53
+ dry-core (~> 0.5, >= 0.5)
54
+ dry-inflector (~> 0.1, >= 0.1.2)
55
+ dry-logic (~> 1.0, >= 1.0.2)
56
+ google-protobuf (3.15.2)
57
+ graphiti_errors (1.1.2)
58
+ jsonapi-serializable (~> 0.1)
59
+ graphiti_spec_helpers (1.0.5)
60
+ graphiti (>= 1.0.alpha.1)
61
+ rspec (~> 3.0)
62
+ graphql (1.12.3)
63
+ graphql-batch (0.4.3)
64
+ graphql (>= 1.3, < 2)
65
+ promise.rb (~> 0.7.2)
66
+ i18n (1.8.7)
67
+ concurrent-ruby (~> 1.0)
68
+ jsonapi-renderer (0.2.2)
69
+ jsonapi-serializable (0.3.1)
70
+ jsonapi-renderer (~> 0.2.0)
71
+ method_source (1.0.0)
72
+ minitest (5.14.3)
73
+ parallel (1.20.1)
74
+ parser (3.0.0.0)
75
+ ast (~> 2.4.1)
76
+ promise.rb (0.7.4)
77
+ pry (0.13.1)
78
+ coderay (~> 1.1)
79
+ method_source (~> 1.0)
80
+ pry-byebug (3.9.0)
81
+ byebug (~> 11.0)
82
+ pry (~> 0.13.0)
83
+ rainbow (3.0.0)
84
+ rake (10.5.0)
85
+ regexp_parser (2.0.3)
86
+ rexml (3.2.4)
87
+ rspec (3.10.0)
88
+ rspec-core (~> 3.10.0)
89
+ rspec-expectations (~> 3.10.0)
90
+ rspec-mocks (~> 3.10.0)
91
+ rspec-core (3.10.1)
92
+ rspec-support (~> 3.10.0)
93
+ rspec-expectations (3.10.1)
94
+ diff-lcs (>= 1.2.0, < 2.0)
95
+ rspec-support (~> 3.10.0)
96
+ rspec-mocks (3.10.2)
97
+ diff-lcs (>= 1.2.0, < 2.0)
98
+ rspec-support (~> 3.10.0)
99
+ rspec-support (3.10.2)
100
+ rubocop (1.8.1)
101
+ parallel (~> 1.10)
102
+ parser (>= 3.0.0.0)
103
+ rainbow (>= 2.2.2, < 4.0)
104
+ regexp_parser (>= 1.8, < 3.0)
105
+ rexml
106
+ rubocop-ast (>= 1.2.0, < 2.0)
107
+ ruby-progressbar (~> 1.7)
108
+ unicode-display_width (>= 1.4.0, < 3.0)
109
+ rubocop-ast (1.4.1)
110
+ parser (>= 2.7.1.5)
111
+ rubocop-performance (1.9.2)
112
+ rubocop (>= 0.90.0, < 2.0)
113
+ rubocop-ast (>= 0.4.0)
114
+ ruby-progressbar (1.11.0)
115
+ standard (0.12.0)
116
+ rubocop (= 1.8.1)
117
+ rubocop-performance (= 1.9.2)
118
+ standardrb (1.0.0)
119
+ standard
120
+ tzinfo (2.0.4)
121
+ concurrent-ruby (~> 1.0)
122
+ unicode-display_width (2.0.0)
123
+ zeitwerk (2.4.2)
124
+
125
+ PLATFORMS
126
+ ruby
127
+
128
+ DEPENDENCIES
129
+ activemodel (>= 4.1)
130
+ apollo-federation (~> 1.1)
131
+ bundler (~> 2.0)
132
+ graphiti!
133
+ graphiti_graphql!
134
+ graphiti_spec_helpers
135
+ graphql (~> 1.12)
136
+ graphql-batch (~> 0.4)
137
+ pry
138
+ pry-byebug
139
+ rake (~> 10.0)
140
+ rspec (~> 3.0)
141
+ standardrb
142
+
143
+ BUNDLED WITH
144
+ 2.0.2
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # GraphitiGraphql
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/graphiti_graphql`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'graphiti_graphql'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install graphiti_graphql
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/graphiti_graphql.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/bin/bundle ADDED
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'bundle' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "rubygems"
12
+
13
+ m = Module.new do
14
+ module_function
15
+
16
+ def invoked_as_script?
17
+ File.expand_path($0) == File.expand_path(__FILE__)
18
+ end
19
+
20
+ def env_var_version
21
+ ENV["BUNDLER_VERSION"]
22
+ end
23
+
24
+ def cli_arg_version
25
+ return unless invoked_as_script? # don't want to hijack other binstubs
26
+ return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
+ bundler_version = nil
28
+ update_index = nil
29
+ ARGV.each_with_index do |a, i|
30
+ if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
+ bundler_version = a
32
+ end
33
+ next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
+ bundler_version = $1 || ">= 0.a"
35
+ update_index = i
36
+ end
37
+ bundler_version
38
+ end
39
+
40
+ def gemfile
41
+ gemfile = ENV["BUNDLE_GEMFILE"]
42
+ return gemfile if gemfile && !gemfile.empty?
43
+
44
+ File.expand_path("../../Gemfile", __FILE__)
45
+ end
46
+
47
+ def lockfile
48
+ lockfile =
49
+ case File.basename(gemfile)
50
+ when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
+ else "#{gemfile}.lock"
52
+ end
53
+ File.expand_path(lockfile)
54
+ end
55
+
56
+ def lockfile_version
57
+ return unless File.file?(lockfile)
58
+ lockfile_contents = File.read(lockfile)
59
+ return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
+ Regexp.last_match(1)
61
+ end
62
+
63
+ def bundler_version
64
+ @bundler_version ||= begin
65
+ env_var_version || cli_arg_version ||
66
+ lockfile_version || "#{Gem::Requirement.default}.a"
67
+ end
68
+ end
69
+
70
+ def load_bundler!
71
+ ENV["BUNDLE_GEMFILE"] ||= gemfile
72
+
73
+ # must dup string for RG < 1.8 compatibility
74
+ activate_bundler(bundler_version.dup)
75
+ end
76
+
77
+ def activate_bundler(bundler_version)
78
+ if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
79
+ bundler_version = "< 2"
80
+ end
81
+ gem_error = activation_error_handling do
82
+ gem "bundler", bundler_version
83
+ end
84
+ return if gem_error.nil?
85
+ require_error = activation_error_handling do
86
+ require "bundler/version"
87
+ end
88
+ return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
89
+ warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
90
+ exit 42
91
+ end
92
+
93
+ def activation_error_handling
94
+ yield
95
+ nil
96
+ rescue StandardError, LoadError => e
97
+ e
98
+ end
99
+ end
100
+
101
+ m.load_bundler!
102
+
103
+ if m.invoked_as_script?
104
+ load Gem.bin_path("bundler", "bundle")
105
+ end
data/bin/byebug ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'byebug' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("byebug", "byebug")
data/bin/coderay ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'coderay' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("coderay", "coderay")
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "graphiti_graphql"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/graphiti ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'graphiti' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("graphiti", "graphiti")