dragonfly-mongoid_data_store 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7489acaa663c4678b8c995faa12ad684908579ec
4
- data.tar.gz: c8e8dd35531ae09d8d73fc9457b8c4e5e7f9e270
3
+ metadata.gz: b7d1c7670d421a564180805f9a93e9ca1a9f5fd1
4
+ data.tar.gz: 8afa8c87efad24cef26ca8dc96053ba55f6bfda2
5
5
  SHA512:
6
- metadata.gz: ade77f7494432fdc46e8eddab421c384ca690c3619f600c38fe06cbd458b332478b8ab826f34cb2954f8f169842b14ca443759f732b9faf60302ea8a97647a94
7
- data.tar.gz: 023b3246c991ffc5e069b9145f8d62c22fcdda9dd9cef9ed79b088efd6d6756ba2471b0a84ffd22f3d737f822f70dec297862a68537a60a87328653e83594e26
6
+ metadata.gz: 711a9fc0db7f06a59079334f3b9da163deb39a8f110975e8f5e43c1152e0b125d99c331a8e7d81a0418a628a401392ba5613828ef5ad830f23549b9e368d50c2
7
+ data.tar.gz: 0345a11061fecd57313dbf5527755b1d4731b2678fcfb5cf969a2f959b7f3c65bc615ce0221e0081f4c41b76236c6af6377927c5f90227f1a92f5a6fd454de7a
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in dragonfly-mongoid_data_store.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem 'database_cleaner', git: 'https://github.com/DatabaseCleaner/database_cleaner.git'
8
+ end
@@ -6,7 +6,7 @@ require 'dragonfly/mongoid_data_store/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "dragonfly-mongoid_data_store"
8
8
  spec.version = Dragonfly::MongoidDataStore::VERSION
9
- spec.authors = ["Tomas Celizna"]
9
+ spec.authors = ["Tomáš Celizna"]
10
10
  spec.email = ["tomas.celizna@gmail.com"]
11
11
  spec.summary = %q{Dragonfly data store that uses Mongoid::GridFs.}
12
12
  spec.description = %q{Dragonfly data store that uses Mongoid::GridFs.}
@@ -19,12 +19,12 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "dragonfly", "~> 1.0"
22
- spec.add_dependency "mongoid", "~> 4.0"
23
- spec.add_dependency "mongoid-grid_fs", "~> 2.1"
22
+ spec.add_dependency "mongoid", "~> 5.0"
23
+ spec.add_dependency "mongoid-grid_fs"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.6"
26
26
  spec.add_development_dependency "coveralls"
27
- spec.add_development_dependency "database_cleaner"
27
+ spec.add_development_dependency "database_cleaner", ">= 1.5.1"
28
28
  spec.add_development_dependency "guard"
29
29
  spec.add_development_dependency "guard-minitest"
30
30
  spec.add_development_dependency "rake"
@@ -1,5 +1,5 @@
1
1
  module Dragonfly
2
2
  class MongoidDataStore
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -16,7 +16,6 @@ module Dragonfly
16
16
  # ---------------------------------------------------------------------
17
17
 
18
18
  OBJECT_ID = BSON::ObjectId
19
- INVALID_OBJECT_ID = Moped::Errors::InvalidObjectId
20
19
 
21
20
  # =====================================================================
22
21
 
@@ -42,7 +41,7 @@ module Dragonfly
42
41
 
43
42
  [ grid_file.data, meta ]
44
43
 
45
- rescue Mongoid::Errors::DocumentNotFound, INVALID_OBJECT_ID => e
44
+ rescue Mongoid::Errors::DocumentNotFound => e
46
45
  raise DataNotFound, "#{e} - #{uid}"
47
46
  end
48
47
 
@@ -55,4 +54,4 @@ module Dragonfly
55
54
  # ---------------------------------------------------------------------
56
55
 
57
56
  end
58
- end
57
+ end
data/test/test_helper.rb CHANGED
@@ -11,27 +11,8 @@ if ENV["CI"]
11
11
  Coveralls.wear!
12
12
  end
13
13
 
14
- ENV["MONGOID_TEST_HOST"] ||= "localhost"
15
- ENV["MONGOID_TEST_PORT"] ||= "27017"
16
-
17
- HOST = ENV["MONGOID_TEST_HOST"]
18
- PORT = ENV["MONGOID_TEST_PORT"].to_i
19
-
20
- def database_id
21
- "dragonfly-mongoid_data_store_test"
22
- end
23
-
24
- CONFIG = {
25
- sessions: {
26
- default: {
27
- database: database_id,
28
- hosts: [ "#{HOST}:#{PORT}" ]
29
- }
30
- }
31
- }
32
-
33
14
  Mongoid.configure do |config|
34
- config.load_configuration(CONFIG)
15
+ config.connect_to('dragonfly-mongoid_data_store_test')
35
16
  end
36
17
 
37
18
  DatabaseCleaner.orm = :mongoid
@@ -40,4 +21,4 @@ DatabaseCleaner.strategy = :truncation
40
21
  class MiniTest::Spec
41
22
  before(:each) { DatabaseCleaner.start }
42
23
  after(:each) { DatabaseCleaner.clean }
43
- end
24
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly-mongoid_data_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
- - Tomas Celizna
7
+ - Tomáš Celizna
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-01 00:00:00.000000000 Z
11
+ date: 2015-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dragonfly
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
33
+ version: '5.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.0'
40
+ version: '5.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mongoid-grid_fs
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '2.1'
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '2.1'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 1.5.1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 1.5.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: guard
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.2.2
179
+ rubygems_version: 2.4.8
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: Dragonfly data store that uses Mongoid::GridFs.