trackoid_mongoid4 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 394a49795942287b9f6a9fb49747c21c4a6c0b84
4
- data.tar.gz: 6e8126f53f026badca56b404775b8bbdedb9fb9a
3
+ metadata.gz: 8c8d73874a1a1c43b7e88c883fb82e8b24ef98a0
4
+ data.tar.gz: 941c43bd597412082e82ed345c3c99a9ae65066e
5
5
  SHA512:
6
- metadata.gz: bbe2bd55a986274f89ec38fec284252317178c734e5170fffd4d5f603ad4adcd401484d5693b610d261c75ac28d87615be0e83fc1a9fc07ffc21aee7b97215ee
7
- data.tar.gz: 7398f8e2df15685d3992643c006bd89e6bbe716ca2240191eb53652443935a1e2decbca3702396a9af34afb8146b0aea1b0099828a9aa5eb995a5aa5eb551c74
6
+ metadata.gz: a8f4b28be95bb61c71bed7a0fd05b6d3d7caa10ef22f3fdaa655bdf9e3458b96b786aac9fd9fdbc0358aa25613d7d48595418a97bfb3511ab63d9aacd51fba1c
7
+ data.tar.gz: 8aa66bffd4605d5825fcd052c037e0f27347a0dea8bda684b6c461a22df9e0f15eb1fe63b4e70e011fb630c9eab3818fbab6cc71fa775ed309aed8ecfbdff9dd
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source "http://rubygems.org"
5
5
  # development dependencies will be added by default to the :development group.
6
6
  gemspec
7
7
 
8
- gem "mongoid", "~> 4.0.1"
9
- gem 'byebug'
10
- gem 'pry-byebug'
8
+ gem "mongoid", "~> 5.0.0"
9
+ #gem 'byebug'
10
+ gem 'pry'
11
11
 
data/config/mongoid.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  test:
2
- sessions:
2
+ clients:
3
3
  default:
4
4
  database: trackoid_test
5
5
  hosts:
@@ -55,7 +55,7 @@ module Mongoid #:nodoc:
55
55
  selector = { fk => @owner.id, ns: k, key: token.to_s }
56
56
 
57
57
  docs = @owner.aggregate_klass.collection.find(selector)
58
- docs.upsert("$inc" => update_hash(how_much.abs, date))
58
+ docs.update_one({"$inc" => update_hash(how_much.abs, date)}, {:upsert => true})
59
59
  end
60
60
  end
61
61
 
@@ -87,7 +87,7 @@ module Mongoid #:nodoc:
87
87
  selector = { fk => @owner.id, ns: k, key: token.to_s }
88
88
 
89
89
  docs = @owner.aggregate_klass.collection.find(selector)
90
- docs.upsert("$set" => update_hash(how_much.abs, date))
90
+ docs.update_one({"$set" => update_hash(how_much.abs, date)}, {:upsert => true})
91
91
  end
92
92
  end
93
93
 
@@ -104,7 +104,7 @@ module Mongoid #:nodoc:
104
104
  fk = @owner.class.name.to_s.foreign_key.to_sym
105
105
  selector = { fk => @owner.id, ns: k }
106
106
  docs = @owner.aggregate_klass.collection.find(selector)
107
- docs.update_all("$set" => update_hash(how_much.abs, date))
107
+ docs.update_many("$set" => update_hash(how_much.abs, date))
108
108
  end
109
109
  end
110
110
 
@@ -124,7 +124,7 @@ module Mongoid #:nodoc:
124
124
  selector = { fk => @owner.id, ns: k }
125
125
 
126
126
  docs = @owner.aggregate_klass.collection.find(selector)
127
- docs.update_all("$unset" => update_hash(1, date))
127
+ docs.update_many("$unset" => update_hash(1, date))
128
128
  end
129
129
  end
130
130
 
@@ -240,4 +240,4 @@ module Mongoid #:nodoc:
240
240
  end
241
241
 
242
242
  end
243
- end
243
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Trackoid #:nodoc:
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
5
  require 'mongoid'
6
6
  require 'trackoid_mongoid4'
7
7
  require 'rspec'
8
- require 'pry'
8
+ #require 'pry'
9
9
 
10
10
  RSpec.configure do |config|
11
11
  config.before(:suite) do
@@ -267,7 +267,7 @@ describe Mongoid::Tracking do
267
267
  end
268
268
 
269
269
  it "A value set at 10am on Madrid should appear as 01am on San Francisco (Using offsets)" do
270
- pending "Time.getlocal isn't implemented in JRuby" if RUBY_ENGINE == 'jruby'
270
+ #pending "Time.getlocal isn't implemented in JRuby" if RUBY_ENGINE == 'jruby'
271
271
 
272
272
  ENV["TZ"] = "Europe/Madrid"
273
273
 
@@ -283,7 +283,7 @@ describe Mongoid::Tracking do
283
283
  end
284
284
 
285
285
  it "A value set now on Madrid should appear shifted 9 hours on San Francisco (Using offsets)" do
286
- pending "Time.getlocal isn't implemented in JRuby" if RUBY_ENGINE == 'jruby'
286
+ #pending "Time.getlocal isn't implemented in JRuby" if RUBY_ENGINE == 'jruby'
287
287
 
288
288
  ENV["TZ"] = "Europe/Madrid"
289
289
 
@@ -17,8 +17,8 @@ Gem::Specification.new do |s|
17
17
  s.files = `git ls-files`.split("\n")
18
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- s.add_runtime_dependency 'mongoid', '~> 4.0'
21
- s.add_development_dependency 'rake'
20
+ s.add_runtime_dependency 'mongoid', '~> 5.0'
21
+ s.add_development_dependency 'rake', '~> 0'
22
22
  s.add_development_dependency 'rspec','~> 3.0'
23
23
  s.add_development_dependency 'mocha', '~> 0'
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackoid_mongoid4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Krett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -16,26 +16,26 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '5.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.4.5
128
+ rubygems_version: 2.4.5.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Trackoid is an easy scalable analytics tracker using MongoDB and Mongoid