Skip to content

Commit

Permalink
Move GraphiQL license attribution into README.
Browse files Browse the repository at this point in the history
Previously it was appended to `LICENSE.txt` but GitHub's automatic
license detection isn't able to detect that it's an MIT license.

The `licensee` gem, which GitHub uses for license detection, shows the problem:

```
$ licensee detect https://github.com/block/elasticgraph
License:        NOASSERTION
Matched files:  LICENSE.txt
LICENSE.txt:
  Content hash:  73812563c638c8691288d777f43f7d738fef02b1
  License:       NOASSERTION
  Closest non-matching licenses:
    MIT similarity:      75.61%
    NCSA similarity:     66.18%
    BSL-1.0 similarity:  64.38%
$ licensee diff https://github.com/block/elasticgraph --license=MIT
Comparing to MIT License:
Input Length:      1213
License length:    1020
Similarity:      75.61%
diff --git a/LICENSE b/LICENSE
index 49b0d1f..0cf6233 100644
--- a/LICENSE
+++ b/LICENSE
@@ -11,4 +11,7 @@ merchantability, fitness for a particular purpose and noninfringement. in no
event shall the authors or copyright holders be liable for any claim, damages or
other liability, whether in an action of contract, tort or otherwise, arising
from, out of or in connection with the software or the use or other dealings in
the software. {+part of the distributed code+}
{+(elasticgraph-rack/lib/elastic_graph/rack/graphiql/index.html) comes from the+}
{+graphiql project, licensed under the mit license. copyright (c) graphql+}
{+contributors.+}
```

GitHub[^1] recommends putting this extra bit of license info in the README:

> To have your license detected, simplify your LICENSE file and note the complexity somewhere else, such as your repository's README file.

[^1]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository#detecting-a-license
  • Loading branch information
myronmarston committed Nov 2, 2024
1 parent 651fc20 commit 5f1557a
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
3 changes: 0 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Part of the distributed code (elasticgraph-rack/lib/elastic_graph/rack/graphiql/index.html)
comes from the GraphiQL project, licensed under the MIT License. Copyright (c) GraphQL Contributors.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,11 @@ to follow SemVer with a `0.MAJOR.MINOR.PATCH` versioning scheme.
Note that _all_ gems in this repository share the same version number. Every time we cut a release, we increment the version
for _all_ gems and release _all_ gems, even if a gem has had no changes since the last release. This is simpler to work with
than the alternatives.

## License

ElasticGraph is released under the [MIT License](https://opensource.org/licenses/MIT).

[Part of the distributed code](elasticgraph-rack/lib/elastic_graph/rack/graphiql/index.html)
comes from the [GraphiQL project](https://github.com/graphql/graphiql), also licensed under the
MIT License, Copyright (c) GraphQL Contributors.
3 changes: 0 additions & 3 deletions elasticgraph-rack/LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Part of the distributed code (lib/elastic_graph/rack/graphiql/index.html)
comes from the GraphiQL project, licensed under the MIT License. Copyright (c) GraphQL Contributors.
8 changes: 8 additions & 0 deletions elasticgraph-rack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ run ElasticGraph::Rack::GraphiQL.new(graphql)
```

Run this with `rackup` (after installing the `rackup` gem) or any other rack-compatible server.

## License

elasticgraph-rack is released under the [MIT License](https://opensource.org/licenses/MIT).

[Part of the distributed code](lib/elastic_graph/rack/graphiql/index.html)
comes from the [GraphiQL project](https://github.com/graphql/graphiql), also licensed under the
MIT License, Copyright (c) GraphQL Contributors.
10 changes: 6 additions & 4 deletions elasticgraph-rack/lib/elastic_graph/rack/graphiql/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
## GraphiQL for ElasticGraph

This directory provides the GraphiQL in browser UI for working with ElasticGraph
applications. The GraphiQL license is included in `LICENSE.txt`, copied verbatim
from:

https://github.com/graphql/graphiql/blob/graphiql%402.4.0/LICENSE
applications.

The `index.html` file is copied from:

Expand Down Expand Up @@ -36,3 +33,8 @@ index 55cf5d05..a672ead9 100644
defaultEditorToolsVisibility: true,
}),
```

## License

[index.html](index.html) comes from the [GraphiQL project](https://github.com/graphql/graphiql),
licensed under the MIT License, Copyright (c) GraphQL Contributors.
8 changes: 8 additions & 0 deletions script/update_readme
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,11 @@ to follow SemVer with a `0.MAJOR.MINOR.PATCH` versioning scheme.
Note that _all_ gems in this repository share the same version number. Every time we cut a release, we increment the version
for _all_ gems and release _all_ gems, even if a gem has had no changes since the last release. This is simpler to work with
than the alternatives.

## License

ElasticGraph is released under the [MIT License](https://opensource.org/licenses/MIT).

[Part of the distributed code](elasticgraph-rack/lib/elastic_graph/rack/graphiql/index.html)
comes from the [GraphiQL project](https://github.com/graphql/graphiql), also licensed under the
MIT License, Copyright (c) GraphQL Contributors.

0 comments on commit 5f1557a

Please sign in to comment.