graphql 1.8.12 → 1.8.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +5 -5
  2. data/lib/graphql/language/lexer.rb +14 -14
  3. data/lib/graphql/language/lexer.rl +2 -2
  4. data/lib/graphql/version.rb +1 -1
  5. data/spec/graphql/language/lexer_spec.rb +8 -0
  6. data/spec/integration/tmp/app/graphql/types/bird_type.rb +7 -0
  7. data/spec/integration/tmp/dummy/Gemfile +34 -29
  8. data/spec/integration/tmp/dummy/README.rdoc +15 -248
  9. data/spec/integration/tmp/dummy/Rakefile +1 -2
  10. data/spec/integration/tmp/dummy/app/assets/javascripts/application.js +5 -4
  11. data/spec/integration/tmp/dummy/app/assets/stylesheets/application.css +6 -4
  12. data/spec/integration/tmp/dummy/app/controllers/application_controller.rb +3 -1
  13. data/spec/integration/tmp/dummy/app/views/layouts/application.html.erb +2 -2
  14. data/spec/integration/tmp/dummy/bin/bundle +3 -0
  15. data/spec/integration/tmp/dummy/bin/rails +4 -0
  16. data/spec/integration/tmp/dummy/bin/rake +4 -0
  17. data/spec/integration/tmp/dummy/bin/setup +29 -0
  18. data/spec/integration/tmp/dummy/config.ru +2 -2
  19. data/spec/integration/tmp/dummy/config/application.rb +7 -43
  20. data/spec/integration/tmp/dummy/config/boot.rb +1 -4
  21. data/spec/integration/tmp/dummy/config/environment.rb +3 -3
  22. data/spec/integration/tmp/dummy/config/environments/development.rb +20 -13
  23. data/spec/integration/tmp/dummy/config/environments/production.rb +43 -31
  24. data/spec/integration/tmp/dummy/config/environments/test.rb +19 -12
  25. data/spec/integration/tmp/dummy/config/initializers/assets.rb +11 -0
  26. data/spec/integration/tmp/dummy/config/initializers/cookies_serializer.rb +3 -0
  27. data/spec/integration/tmp/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  28. data/spec/integration/tmp/dummy/config/initializers/inflections.rb +6 -5
  29. data/spec/integration/tmp/dummy/config/initializers/mime_types.rb +0 -1
  30. data/spec/integration/tmp/dummy/config/initializers/session_store.rb +1 -6
  31. data/spec/integration/tmp/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
  32. data/spec/integration/tmp/dummy/config/initializers/wrap_parameters.rb +2 -3
  33. data/spec/integration/tmp/dummy/config/locales/en.yml +20 -2
  34. data/spec/integration/tmp/dummy/config/routes.rb +22 -26
  35. data/spec/integration/tmp/dummy/config/secrets.yml +22 -0
  36. data/spec/integration/tmp/dummy/public/404.html +54 -13
  37. data/spec/integration/tmp/dummy/public/422.html +54 -13
  38. data/spec/integration/tmp/dummy/public/500.html +53 -12
  39. data/spec/integration/tmp/dummy/public/robots.txt +2 -2
  40. metadata +23 -30
  41. data/spec/integration/tmp/app/graphql/types/winged_creature_type.rb +0 -4
  42. data/spec/integration/tmp/dummy/app/assets/images/rails.png +0 -0
  43. data/spec/integration/tmp/dummy/config/initializers/secret_token.rb +0 -7
  44. data/spec/integration/tmp/dummy/doc/README_FOR_APP +0 -2
  45. data/spec/integration/tmp/dummy/public/index.html +0 -241
  46. data/spec/integration/tmp/dummy/script/rails +0 -6
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -1,15 +1,16 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
6
7
  # inflect.plural /^(ox)$/i, '\1en'
7
8
  # inflect.singular /^(ox)en/i, '\1'
8
9
  # inflect.irregular 'person', 'people'
9
10
  # inflect.uncountable %w( fish sheep )
10
11
  # end
11
- #
12
+
12
13
  # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
14
15
  # inflect.acronym 'RESTful'
15
16
  # end
@@ -2,4 +2,3 @@
2
2
 
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,8 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
-
5
- # Use the database for sessions instead of the cookie-based default,
6
- # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Preserve the timezone of the receiver when calling to `to_time`.
4
+ # Ruby 2.4 will change the behavior of `to_time` to preserve the timezone
5
+ # when converting to an instance of `Time` instead of the previous behavior
6
+ # of converting to the local system timezone.
7
+ #
8
+ # Rails 5.0 introduced this config option so that apps made with earlier
9
+ # versions of Rails are not affected when upgrading.
10
+ ActiveSupport.to_time_preserves_timezone = true
@@ -1,10 +1,9 @@
1
1
  # Be sure to restart your server when you modify this file.
2
- #
2
+
3
3
  # This file contains settings for ActionController::ParamsWrapper which
4
4
  # is enabled by default.
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
9
  end
10
-
@@ -1,5 +1,23 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
3
21
 
4
22
  en:
5
23
  hello: "Hello world"
@@ -1,26 +1,25 @@
1
- Dummy::Application.routes.draw do
1
+ Rails.application.routes.draw do
2
2
  if Rails.env.development?
3
3
  mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql"
4
4
  end
5
5
 
6
-
7
6
  post "/graphql", to: "graphql#execute"
7
+ # The priority is based upon order of creation: first created -> highest priority.
8
+ # See how all your routes lay out with "rake routes".
8
9
 
9
- # The priority is based upon order of creation:
10
- # first created -> highest priority.
10
+ # You can have the root of your site routed with "root"
11
+ # root 'welcome#index'
11
12
 
12
- # Sample of regular route:
13
- # match 'products/:id' => 'catalog#view'
14
- # Keep in mind you can assign values other than :controller and :action
13
+ # Example of regular route:
14
+ # get 'products/:id' => 'catalog#view'
15
15
 
16
- # Sample of named route:
17
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
18
- # This route can be invoked with purchase_url(:id => product.id)
16
+ # Example of named route that can be invoked with purchase_url(id: product.id)
17
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
19
18
 
20
- # Sample resource route (maps HTTP verbs to controller actions automatically):
19
+ # Example resource route (maps HTTP verbs to controller actions automatically):
21
20
  # resources :products
22
21
 
23
- # Sample resource route with options:
22
+ # Example resource route with options:
24
23
  # resources :products do
25
24
  # member do
26
25
  # get 'short'
@@ -32,34 +31,31 @@ Dummy::Application.routes.draw do
32
31
  # end
33
32
  # end
34
33
 
35
- # Sample resource route with sub-resources:
34
+ # Example resource route with sub-resources:
36
35
  # resources :products do
37
36
  # resources :comments, :sales
38
37
  # resource :seller
39
38
  # end
40
39
 
41
- # Sample resource route with more complex sub-resources
40
+ # Example resource route with more complex sub-resources:
42
41
  # resources :products do
43
42
  # resources :comments
44
43
  # resources :sales do
45
- # get 'recent', :on => :collection
44
+ # get 'recent', on: :collection
46
45
  # end
47
46
  # end
48
47
 
49
- # Sample resource route within a namespace:
48
+ # Example resource route with concerns:
49
+ # concern :toggleable do
50
+ # post 'toggle'
51
+ # end
52
+ # resources :posts, concerns: :toggleable
53
+ # resources :photos, concerns: :toggleable
54
+
55
+ # Example resource route within a namespace:
50
56
  # namespace :admin do
51
57
  # # Directs /admin/products/* to Admin::ProductsController
52
58
  # # (app/controllers/admin/products_controller.rb)
53
59
  # resources :products
54
60
  # end
55
-
56
- # You can have the root of your site routed with "root"
57
- # just remember to delete public/index.html.
58
- # root :to => 'welcome#index'
59
-
60
- # See how all your routes lay out with "rake routes"
61
-
62
- # This is a legacy wild controller route that's not recommended for RESTful applications.
63
- # Note: This route will make all actions in every controller accessible via GET requests.
64
- # match ':controller(/:action(/:id))(.:format)'
65
61
  end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: d92c353ef60fd37bf3f90859c802939a5c6ae816ff0cd63e36bec94e33f2e55d0f377e95392478ca76dfbec213def919536f445915b5d0729701f7e4b76ee8ed
15
+
16
+ test:
17
+ secret_key_base: 3ac62e5231ffed7b9cf1436483b6bc75291cf3e7ee0175d4988c95d29c637a0b084b16bfabbcd29ab982fe8cff5199cbc50310a74718a4a6bb6304c5952b0f2b
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -2,25 +2,66 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>The page you were looking for doesn't exist (404)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
16
54
  </style>
17
55
  </head>
18
56
 
19
57
  <body>
20
58
  <!-- This file lives in public/404.html -->
21
59
  <div class="dialog">
22
- <h1>The page you were looking for doesn't exist.</h1>
23
- <p>You may have mistyped the address or the page may have moved.</p>
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
24
65
  </div>
25
66
  </body>
26
67
  </html>
@@ -2,25 +2,66 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>The change you wanted was rejected (422)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
16
54
  </style>
17
55
  </head>
18
56
 
19
57
  <body>
20
58
  <!-- This file lives in public/422.html -->
21
59
  <div class="dialog">
22
- <h1>The change you wanted was rejected.</h1>
23
- <p>Maybe you tried to change something you didn't have access to.</p>
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
24
65
  </div>
25
66
  </body>
26
67
  </html>
@@ -2,24 +2,65 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>We're sorry, but something went wrong (500)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
16
54
  </style>
17
55
  </head>
18
56
 
19
57
  <body>
20
58
  <!-- This file lives in public/500.html -->
21
59
  <div class="dialog">
22
- <h1>We're sorry, but something went wrong.</h1>
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
23
64
  </div>
24
65
  </body>
25
66
  </html>
@@ -1,5 +1,5 @@
1
- # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
2
  #
3
3
  # To ban all spiders from the entire site uncomment the next two lines:
4
- # User-Agent: *
4
+ # User-agent: *
5
5
  # Disallow: /