Skip to content

Commit 5a9dc74

Browse files
authored
Merge pull request #85 from joeapearson/fix-warnings-3
Thank you!
2 parents 6b3be9d + 06437dc commit 5a9dc74

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

lib/mongo/grid_fs/bucket.ex

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,15 @@ defmodule Mongo.GridFs.Bucket do
122122
end
123123

124124
@doc """
125-
Finds one file document with the file_id as a string
125+
Finds one file document by `file_id` specified either as a string or `BSON.ObjectId`.
126126
"""
127+
def find_one(bucket, file_id)
128+
127129
@spec find_one(Bucket.t, String.t) :: BSON.document | nil
128130
def find_one(%Bucket{} = bucket, file_id) when is_binary(file_id) do
129131
find_one(bucket, ObjectId.decode!(file_id))
130132
end
131133

132-
@doc """
133-
Finds one file document with the file_id as an ObjectID-struct
134-
"""
135134
@spec find_one(Bucket.t, BSON.ObjectId.t) :: BSON.document | nil
136135
def find_one(%Bucket{topology_pid: topology_pid, opts: opts} = bucket, %BSON.ObjectId{} = oid) do
137136
Mongo.find_one(topology_pid, files_collection_name(bucket), %{"_id" => oid}, opts)

mix.exs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ defmodule Mongodb.Mixfile do
2828
defp elixirc_paths(_), do: ["lib"]
2929

3030
def application() do
31-
[applications: applications(Mix.env),
32-
mod: {Mongo.App, []},
33-
env: []]
31+
[
32+
applications: applications(Mix.env),
33+
env: [],
34+
extra_applications: [:crypto, :ssl],
35+
mod: {Mongo.App, []}
36+
]
3437
end
3538

3639
def applications(:test), do: [:logger, :connection, :db_connection]

0 commit comments

Comments
 (0)