stigg-api-client 0.1.1 → 0.429.0

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: 3682a31cd8aa4a5829cde58b0edad7bd77dc28b9b38a42ab0a9f9a1ed329817a
4
- data.tar.gz: c5c3512b9992d1f5b28f8838469b37298a23359acd76b567e9afb689f80a4cfe
3
+ metadata.gz: a68fdfcb5cf2512178aa31949398bc84089f27d750b808ad4eac47e4e69dbcc1
4
+ data.tar.gz: 757c7847f534396751905638a603e645ac079538a8a07b4dcbb2827782ba20b1
5
5
  SHA512:
6
- metadata.gz: 1a266c7bd536876c55089c7a1c675bdb9f17c4188c32fe22ab46dd02093b60f83739d9e504a09fdfc9fd0bf3da15f2b22ce0b6251efb5c5df71d67836066c0a0
7
- data.tar.gz: abdbfd5826d3d11a914a87ed2952aa2fc5cbf8f80af08eb6ab6dfa9e855cfa47f2b73d65238b584eb43ae9b7d0f4f5dcb0d68a75551f374f489dce56cd491c47
6
+ metadata.gz: 4bda259341f564c03f2f862e163de6734af732da08e6797336cdef05409d97a4a3dd0aeb1de306fab2a949e4023f493946f5f22025e92c5f81f87b13318a9aa8
7
+ data.tar.gz: 836eb4457604b5510ee691da454059765c7bbe1bdb49d177b961b956f568442bdc0f82259509e93788b150a5d0e400db42c6ab9a2e8f39b77885d7d33315ad3f
data/Gemfile CHANGED
@@ -10,3 +10,5 @@ gem "rake", "~> 13.0"
10
10
  gem "rspec", "~> 3.0"
11
11
 
12
12
  gem "rubocop", "~> 1.21"
13
+
14
+ gem "bump", "~> 0.10"
data/Gemfile.lock CHANGED
@@ -1,35 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stigg-api-client (0.1.1)
4
+ stigg-api-client (0.429.0)
5
5
  graphlient (~> 0.7.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (7.0.4)
10
+ activesupport (7.0.4.3)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 1.6, < 2)
13
13
  minitest (>= 5.1)
14
14
  tzinfo (~> 2.0)
15
15
  ast (2.4.2)
16
- concurrent-ruby (1.1.10)
16
+ bump (0.10.0)
17
+ concurrent-ruby (1.2.2)
17
18
  diff-lcs (1.5.0)
18
- faraday (2.6.0)
19
+ faraday (2.7.4)
19
20
  faraday-net_http (>= 2.0, < 3.1)
20
21
  ruby2_keywords (>= 0.0.4)
21
22
  faraday-net_http (3.0.2)
22
23
  graphlient (0.7.0)
23
24
  faraday (~> 2.0)
24
25
  graphql-client
25
- graphql (2.0.15)
26
+ graphql (2.0.20)
26
27
  graphql-client (0.18.0)
27
28
  activesupport (>= 3.0)
28
29
  graphql
29
30
  i18n (1.12.0)
30
31
  concurrent-ruby (~> 1.0)
31
32
  json (2.6.2)
32
- minitest (5.16.3)
33
+ minitest (5.18.0)
33
34
  parallel (1.22.1)
34
35
  parser (3.1.2.1)
35
36
  ast (~> 2.4.1)
@@ -64,14 +65,17 @@ GEM
64
65
  parser (>= 3.1.1.0)
65
66
  ruby-progressbar (1.11.0)
66
67
  ruby2_keywords (0.0.5)
67
- tzinfo (2.0.5)
68
+ tzinfo (2.0.6)
68
69
  concurrent-ruby (~> 1.0)
69
70
  unicode-display_width (2.3.0)
70
71
 
71
72
  PLATFORMS
73
+ arm64-darwin-22
72
74
  x86_64-darwin-21
75
+ x86_64-linux
73
76
 
74
77
  DEPENDENCIES
78
+ bump (~> 0.10)
75
79
  rake (~> 13.0)
76
80
  rspec (~> 3.0)
77
81
  rubocop (~> 1.21)
data/README.md CHANGED
@@ -1,10 +1,7 @@
1
1
  # Stigg::Client
2
2
 
3
- This library provides a Ruby wrapper to [Stigg's GraphQL API](https://docs.stigg.io/docs/graphql-api) based on
4
- the operations the [Stigg's Node.js SDK](https://docs.stigg.io/docs/nodejs-sdk) is using under the hood.
5
-
6
- It leverages the [graphlient](https://github.com/ashkan18/graphlient) library, and utilizes the `Graphlient::Client` class to send the API requests.
7
-
3
+ This Ruby gem provides a wrapper to [Stigg's GraphQL API](https://docs.stigg.io/docs/graphql-api) based on the operations that are in use by the [Stigg's Node.js SDK](https://docs.stigg.io/docs/nodejs-sdk).
4
+ It leverages the [graphlient](https://github.com/ashkan18/graphlient) library under the hood, and utilizes the `Graphlient::Client` class to execute the API requests.
8
5
 
9
6
  ## Documentation
10
7
 
data/lib/stigg/client.rb CHANGED
@@ -19,7 +19,7 @@ module Stigg
19
19
  # @param [String api_url
20
20
  # @return [Client]
21
21
  def create_client(api_key, api_url = "https://api.stigg.io/graphql", request_timeout=30)
22
- schema_path = File.join(__dir__, '../../schema.json').to_s
22
+ schema_path = File.join(__dir__, 'generated/schema.json').to_s
23
23
 
24
24
  client = Graphlient::Client.new(
25
25
  api_url,
data/lib/stigg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stigg
4
- VERSION = "0.1.1"
4
+ VERSION = "0.429.0"
5
5
  end
data/project.json CHANGED
@@ -1,3 +1,36 @@
1
1
  {
2
- "$schema": "../../node_modules/nx/schemas/project-schema.json"
2
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
3
+ "sourceRoot": "packages/api-client-ruby/lib",
4
+ "projectType": "library",
5
+ "implicitDependencies": ["api-client-schema"],
6
+ "targets": {
7
+ "generate": {
8
+ "executor": "@nrwl/workspace:run-commands",
9
+ "options": {
10
+ "command": "./scripts/generate.sh",
11
+ "cwd": "packages/api-client-ruby"
12
+ }
13
+ },
14
+ "publish": {
15
+ "executor": "@nrwl/workspace:run-commands",
16
+ "options": {
17
+ "command": "./scripts/publish.sh {args.ver}",
18
+ "cwd": "packages/api-client-ruby"
19
+ }
20
+ },
21
+ "test": {
22
+ "executor": "@nrwl/workspace:run-commands",
23
+ "options": {
24
+ "command": "bundle exec rake spec",
25
+ "cwd": "packages/api-client-ruby"
26
+ },
27
+ "dependsOn": [
28
+ {
29
+ "projects": "self",
30
+ "target": "generate"
31
+ }
32
+ ]
33
+ }
34
+ },
35
+ "tags": []
3
36
  }
@@ -2,7 +2,7 @@ import * as gql from 'graphql';
2
2
  import fs from 'fs';
3
3
 
4
4
  const schema = fs.readFileSync(
5
- '../api-client-schema/src/schema.graphql',
5
+ '../api-client-schema/src/generated/schema.graphql',
6
6
  'utf8'
7
7
  );
8
8
 
data/scripts/generate.sh CHANGED
@@ -1,14 +1,17 @@
1
+ #!/bin/bash -e
2
+
1
3
  # stitch the operation files together
2
- cat ../api-client-schema/src/operations/fragments.graphql > operations.graphql
3
- cat ../api-client-schema/src/operations/queries.graphql >> operations.graphql
4
- cat ../api-client-schema/src/operations/mutations.graphql >> operations.graphql
4
+ cat ../api-client-schema/src/operations/*.graphql > operations.graphql
5
5
 
6
- cp ../api-client-schema/src/schema.json schema.json
6
+ mkdir -p lib/stigg/generated/
7
7
 
8
- cat <<-EOF > schema.json
9
- $(echo { \"data\": ) $(cat schema.json) $(echo })
8
+ cat <<-EOF > lib/stigg/generated/schema.json
9
+ $(echo { \"data\": ) $(cat ../api-client-schema/src/generated/schema.json) $(echo })
10
10
  EOF
11
11
 
12
12
  node scripts/generate-operations.mjs
13
+ rm operations.graphql
14
+
15
+ bundle exec rubocop -a lib/stigg/generated/operations.rb
13
16
 
14
- rubocop -a lib/stigg/generated/operations.rb
17
+ printf "api-client-ruby generated!\n"
@@ -0,0 +1,31 @@
1
+ #!/bin/bash -e
2
+
3
+ VERSION=$1
4
+
5
+ if [ -z "$VERSION" ]; then
6
+ echo "Usage: ./scripts/publish.sh <version>"
7
+ exit 1
8
+ fi
9
+
10
+ bundle config unset deployment
11
+
12
+ bundle exec bump set "${VERSION}" --no-commit --no-bundle
13
+ git diff
14
+
15
+ echo "Building..."
16
+ bundle exec rake build
17
+
18
+ # create a temporary commit, since it's not possible to
19
+ # release with a dirty working directory
20
+ TAG="v${VERSION}"
21
+ echo "Creating temporary commit and tag (${TAG})..."
22
+ git add .
23
+ git commit --no-verify -m "tmp commit for ruby release"
24
+ git tag "${TAG}"
25
+
26
+ echo "Releasing..."
27
+ bundle exec rake release -v || (git tag -d "${TAG}" ; git reset --soft HEAD~1 ; exit 1)
28
+ git tag -d "${TAG}"
29
+ git reset --soft HEAD~1
30
+
31
+ echo "api-client-ruby published!"
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/stigg/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "stigg-api-client"
7
+ spec.version = Stigg::VERSION
8
+ spec.authors = ["Stigg"]
9
+ spec.email = ["support@stigg.io"]
10
+
11
+ spec.summary = "Stigg API Client"
12
+ spec.description = "Stigg API Client for Ruby"
13
+ spec.homepage = "https://stigg.io"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 3.0.0"
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+
18
+ # Specify which files should be added to the gem when it is released.
19
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20
+ spec.files = Dir.chdir(__dir__) do
21
+ `git ls-files -z`.split("\x0").reject do |f|
22
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
23
+ end
24
+ end
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+
29
+ spec.add_dependency "graphlient", "~> 0.7.0"
30
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stigg-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.429.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stigg
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-13 00:00:00.000000000 Z
11
+ date: 2023-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphlient
@@ -40,19 +40,18 @@ files:
40
40
  - Rakefile
41
41
  - lib/stigg.rb
42
42
  - lib/stigg/client.rb
43
- - lib/stigg/generated/operations.rb
44
43
  - lib/stigg/version.rb
45
- - package.json
46
44
  - project.json
47
- - schema.json
48
45
  - scripts/generate-operations.mjs
49
46
  - scripts/generate.sh
47
+ - scripts/publish.sh
48
+ - stigg-api-client.gemspec
50
49
  homepage: https://stigg.io
51
50
  licenses:
52
51
  - MIT
53
52
  metadata:
54
53
  homepage_uri: https://stigg.io
55
- post_install_message:
54
+ post_install_message:
56
55
  rdoc_options: []
57
56
  require_paths:
58
57
  - lib
@@ -67,8 +66,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0'
69
68
  requirements: []
70
- rubygems_version: 3.2.3
71
- signing_key:
69
+ rubygems_version: 3.4.10
70
+ signing_key:
72
71
  specification_version: 4
73
72
  summary: Stigg API Client
74
73
  test_files: []