mock_graphql_ai 1.0.2 → 1.0.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: eb274ab2dd29c721291b5a461e01bb84a33d84bcb4de379d8834a4450d573659
4
- data.tar.gz: e84b1dd3126af1e1956cc7d45ca7ac72a015861034c6182ee6d461f7893b587d
3
+ metadata.gz: bc76561ab75b8fa4646d98737559285a790e3ee961643bdc44558092cbc885a1
4
+ data.tar.gz: 32a1e0f3fec394745dd10aa54df7e6fd160481e5b428347a0a689832dcebba19
5
5
  SHA512:
6
- metadata.gz: 992d197a6c19f9f25ef863fe3b65253e7e30fa2e0a933a54a2983492ffa081f6140e30285fbc25b37eca71b0311ae17f3db152be58c7714612dc98e2fdfecf80
7
- data.tar.gz: 803fe30465606aa611b0af9b5f12e3fd7e04209db86781dc80fd8b4c2990c45fdd76eb2b521a53616345e239752715bcb976594720b5dc16f224d1f79ea6dfaf
6
+ metadata.gz: 74d93dbc1bf31910495a9baf022acd8ac356c496b840d6f098707335f8c8b55b3a863e5447dc29ac90f08970413394bdb74438e6666fc4ea3d3c67eb8eff9d7a
7
+ data.tar.gz: 064ed835690f84f6824dc1590e1f3bc37c86ca8e63a8a8d90add371bfb4cbb2ebcd7c705ba7067d79f37502003a8c8ec93b3169d70dea8e869250b989cc06d0d
@@ -0,0 +1,21 @@
1
+ require 'rails/generators'
2
+
3
+ module MockGraphqlAi
4
+ module Generators
5
+ class InstallGenerator < Rails::Generators::Base
6
+ source_root(File.expand_path('../templates', __dir__))
7
+
8
+ def copy_module_file
9
+ copy_file('mockable.rb', 'app/controllers/concerns/mockable.rb')
10
+ end
11
+
12
+ def copy_controller_file
13
+ copy_file('graphql_mocks_controller.rb', 'app/controllers/graphql_mocks_controller.rb')
14
+ end
15
+
16
+ def register_controller_main_route
17
+ route "get '/imitate_graphql', to: 'graphql_mocks#imitate', as: :imitate_graphql"
18
+ end
19
+ end
20
+ end
21
+ end
@@ -4,6 +4,6 @@ module Mockable
4
4
  private
5
5
 
6
6
  def bypass_graphql
7
- redirect_to(imitate_path(query: params[:query]))
7
+ redirect_to(imitate_graphql_path(query: params[:query]))
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module MockGraphqlAi
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mock_graphql_ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moiz Ali
@@ -182,8 +182,9 @@ files:
182
182
  - README.md
183
183
  - Rakefile
184
184
  - lib/generators/mock_controller.rb
185
+ - lib/generators/mock_graphql_ai/install_generator.rb
185
186
  - lib/generators/mock_module.rb
186
- - lib/generators/templates/controllers/graphql_mocks_controller.rb
187
+ - lib/generators/templates/graphql_mocks_controller.rb
187
188
  - lib/generators/templates/mockable.rb
188
189
  - lib/mock_graphql_ai.rb
189
190
  - lib/mock_graphql_ai/version.rb