decidim-api 0.10.1 → 0.11.0.pre1

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: 14259b3c77b0977de34c0e579a14726b0d153f722530fb162fe2e764382ec6a7
4
- data.tar.gz: 49626fa629c63b4d493b02b0aa94539fe09006972fc63df3ef4ff0e0c5a140d2
3
+ metadata.gz: e470189674cc55df433f000f798e3fc5c3b84613e62107c91d11a14798ef2f90
4
+ data.tar.gz: ee96040001a1b61ee456925ae0db718618f8dbf8bd444aa13cb9755ebc4504b7
5
5
  SHA512:
6
- metadata.gz: c418ec063e3c5de4026feb06a1daf18f3c4c5755c69c2bca31f057db01afeda1e46026ce31b228ed2c80b6ab49fd90ebf6cab3b71b353420e7dfe798892944a2
7
- data.tar.gz: ef92d83b27841b76f584f18aec17cdd573ab16ac1753d945323f762bfcc774afc37e66a8127d0675868fa328120d436080aba16a4cf99f087cc0f67cfaaf55fc
6
+ metadata.gz: f67db97d977d01e44d09b23e7af7a28b777578be72270ea0f5c0358adb47470d6193b340d1d58c9a28026995be88ac36834a191a9101cbdab78d86cdc93d3c5f
7
+ data.tar.gz: d973598e8d437471bbfbbd9b251b84fabcc9b4cc12667ecd219516a3faf7ac8836cb82beb64f507bb2f0ac6556c4d36c7f376c82af5d156f08aaaba7f1bd7b0a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Decidim::Api
2
2
 
3
- Exposes a [GraphQL](https://facebook.github.io/graphql/) API to programatically interact with the Decidim platform via HTTP.
3
+ Exposes a [GraphQL](https://facebook.github.io/graphql/) API to programmatically interact with the Decidim platform via HTTP.
4
4
 
5
5
  ## Usage
6
6
 
@@ -8,7 +8,7 @@ Including `decidim-api` will get expose two nice endpoints:
8
8
 
9
9
  * `/api`: The main GraphQL endpoint that holds the actual API.
10
10
  * `/api/docs`: Nicely-written docs of the entities of the API.
11
- * `/api/grapiql`: A neat sandbox to interactively play with the API and its capabilities.
11
+ * `/api/graphiql`: A neat sandbox to interactively play with the API and its capabilities.
12
12
 
13
13
  ## Installation
14
14
 
@@ -10,9 +10,9 @@ const fetcherFactory = (path) => {
10
10
  return jQuery.ajax({
11
11
  url: path,
12
12
  data: JSON.stringify({ query }),
13
- method: 'POST',
14
- contentType: 'application/json',
15
- dataType: 'json'
13
+ method: "POST",
14
+ contentType: "application/json",
15
+ dataType: "json"
16
16
  });
17
17
  };
18
18
  }
@@ -20,6 +20,6 @@ const fetcherFactory = (path) => {
20
20
  window.renderDocumentation = (path) => {
21
21
  ReactDOM.render(
22
22
  <GraphQLDocs.GraphQLDocs fetcher={fetcherFactory(path)} />,
23
- document.getElementById('documentation'),
23
+ document.getElementById("documentation"),
24
24
  );
25
25
  };
@@ -1,6 +1,6 @@
1
1
  <div style="text-align: center;">
2
2
  <h1><%= current_organization.name %> API documentation</h1>
3
- <%=link_to "Explore the API interactively with GraphiQL", graphiql_path %>
3
+ <%= link_to "Explore the API interactively with GraphiQL", graphiql_path %>
4
4
  </div>
5
5
 
6
6
  <div id="documentation"></div>
@@ -1,7 +1,7 @@
1
1
  <html>
2
2
  <head>
3
3
  <title><%= current_organization.name %> - API Documentation</title>
4
- <%= javascript_include_tag 'decidim/api/docs' %>
4
+ <%= javascript_include_tag "decidim/api/docs" %>
5
5
  </head>
6
6
  <body>
7
7
  <%= yield %>
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-api version.
5
5
  module Api
6
6
  def self.version
7
- "0.10.1"
7
+ "0.11.0.pre1"
8
8
  end
9
9
  end
10
10
  end
data/lib/decidim/api.rb CHANGED
@@ -15,8 +15,14 @@ module Decidim
15
15
  # graphql-ruby and the way it deals with loading types, in combination with
16
16
  # rail's infamous autoloading.
17
17
  def self.orphan_types
18
- Decidim.feature_manifests.map(&:query_type).map(&:constantize).uniq +
19
- Decidim.participatory_space_manifests.map(&:query_type).map(&:constantize).uniq
18
+ Decidim.component_manifests.map(&:query_type).map(&:constantize).uniq +
19
+ Decidim.participatory_space_manifests.map(&:query_type).map(&:constantize).uniq +
20
+ (@orphan_types || [])
21
+ end
22
+
23
+ def self.add_orphan_type(type)
24
+ @orphan_types ||= []
25
+ @orphan_types += [type]
20
26
  end
21
27
  end
22
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-04-17 00:00:00.000000000 Z
13
+ date: 2018-04-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: graphiql-rails
@@ -74,56 +74,56 @@ dependencies:
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.10.1
77
+ version: 0.11.0.pre1
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.10.1
84
+ version: 0.11.0.pre1
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: decidim-core
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.10.1
91
+ version: 0.11.0.pre1
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.10.1
98
+ version: 0.11.0.pre1
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-dev
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.10.1
105
+ version: 0.11.0.pre1
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - '='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.10.1
112
+ version: 0.11.0.pre1
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-participatory_processes
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.10.1
119
+ version: 0.11.0.pre1
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - '='
125
125
  - !ruby/object:Gem::Version
126
- version: 0.10.1
126
+ version: 0.11.0.pre1
127
127
  description: API engine for decidim
128
128
  email:
129
129
  - josepjaume@gmail.com
@@ -169,9 +169,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
169
  version: '2.3'
170
170
  required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - ">="
172
+ - - ">"
173
173
  - !ruby/object:Gem::Version
174
- version: '0'
174
+ version: 1.3.1
175
175
  requirements: []
176
176
  rubyforge_project:
177
177
  rubygems_version: 2.7.3