graphql_scaffold_fan 0.2.7 → 0.2.8

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: eed7880738bc1e560999cacc4cc80284a4a353eff9ce4db9e804248b6fecc82a
4
- data.tar.gz: ebf38352c1e52f9bba28a8814280b64d7ee7dd5a961397da44cce847950861d4
3
+ metadata.gz: dcfe0933232990b0284c47835fed6627498363ee486604fafa3d5dd60c268aba
4
+ data.tar.gz: ff168a50bb8759d30a95e5f3d346565d75bc350fce76a54dd2348ed1c6070eb0
5
5
  SHA512:
6
- metadata.gz: 37f6663b95a871a0df9ede7b467f9e03eadf789dde0f9ba17aa699dab91f58d9f6abc6b46acc4c13b566451a3a797993fcb7f9a6d1c3163ba7325ee59fc6f7a5
7
- data.tar.gz: 67473a3eb62b1099bfe3f656811a52ba3ca786acd3f9e317726d1a81c2ee072ed6590aa95639e9c73a59ee25de7ef035888f76fab6b88ee7d3559bf607d3914b
6
+ metadata.gz: bbc4d8acb3b29d051c3bc05a01c3e8aeb9c8e7e52f770b48ec311e8f3a8522933855b3f6693169ce4085f1fd184620dc33e46378267e385799a7794d4e48f096
7
+ data.tar.gz: 772501a125b03fa195c19b8cd45881746e31a92a5a485206eeea58f69435f8b6bd5cfb3f1b26f18bd165d3a53f18ca0c9fe040e6788ddc569275bb713eb43a1b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql_scaffold_fan (0.2.7)
4
+ graphql_scaffold_fan (0.2.8)
5
5
  graphql
6
6
  graphql_playground-rails
7
7
 
@@ -122,13 +122,6 @@ module GraphqlScaffold
122
122
  template 'mutation_type.haml', generator_path
123
123
  end
124
124
  end
125
-
126
- def create_test_file
127
- test_dir_path = 'spec/requests/mutations'
128
- test_file_path = test_dir_path + "/#{file_name}_spec.rb"
129
- FileUtils.mkdir_p(test_dir_path) unless File.exist?(test_dir_path)
130
- template 'mutation_test.haml', test_file_path
131
- end
132
125
  end
133
126
  end
134
127
  end
@@ -11,10 +11,12 @@ module GraphqlScaffold
11
11
  dst_dir = 'app/graphql/types/admin'
12
12
  if File.exist?("app/graphql/types/#{file_name}_type.rb")
13
13
  FileUtils.mv(src_file, dst_dir)
14
+ p "Move #{file_name}_type.rb location"
14
15
  file = File.open("#{dst_dir}/#{file_name}_type.rb")
15
16
  file_data = file.read
16
- new_file_data = file_data.insert(21, 'Admin::')
17
+ new_file_data = file_data.insert(52, 'Admin::')
17
18
  File.write(file, new_file_data)
19
+ p "Write to #{file_name}_type.rb"
18
20
  else
19
21
  p "can not find #{file_name}_type file to move"
20
22
  end
@@ -13,7 +13,6 @@ RSpec.describe Mutations::Admin::<%= class_name %>s::Create<%= class_name %>, ty
13
13
  GQL
14
14
 
15
15
  expect do
16
- sign_in admin_user
17
16
  post '/api/admin/graphql', headers: admin_user.create_new_auth_token, params: { query: query, variables: variables }
18
17
  expect(response).to have_http_status(:success)
19
18
  json = JSON.parse(response.body)
@@ -8,8 +8,6 @@ RSpec.describe Mutations::Admin::<%= class_name %>s::Delete<%= class_name %>, ty
8
8
 
9
9
  describe '.resolve' do
10
10
  it 'should delete' do
11
- admin_user = create(:admin_user)
12
- sign_in admin_user
13
11
 
14
12
  variables = <<~GQL
15
13
  {
@@ -8,7 +8,6 @@ RSpec.describe Mutations::Admin::<%= class_name %>s::Update<%= class_name %>, ty
8
8
 
9
9
  describe '.resolve' do
10
10
  it 'should update' do
11
- sign_in admin_user
12
11
 
13
12
  variables = <<~GQL
14
13
  {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GraphqlScaffoldFan
4
- VERSION = '0.2.7'
4
+ VERSION = '0.2.8'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql_scaffold_fan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fan Zhang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-02 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql