mongoid_collection_snapshot 1.0.0 → 1.0.1

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: 918809b176c7a1430e76767c00aa8e3f59114a68
4
- data.tar.gz: 7cfdc2500575d070f4f525ff84b17f37065477c9
3
+ metadata.gz: 8354fa3558b50530619ef83969005b83f797408b
4
+ data.tar.gz: 545fe63db62763ff9bf579f5880be6cc7759ecfd
5
5
  SHA512:
6
- metadata.gz: f13bc196f4e0e6544cd9dab28715cd3d1fd3fa8a4017daf82488212653a6827869784dbbefd3df4c5307bdabce4349e2fe9b99c9a71df105517e06a73220052b
7
- data.tar.gz: abfbdd42a184eb2e2bc8482b3efd9b8aeff462bfe487b1e5fbc1a797d37b2c9ac5f6f8b809467431828eb4684a84bebeec0a633a6b2d5beaeda2710ffc344fcb
6
+ metadata.gz: 17ee7b9cc0b5da03afce28a44b2455181bafc26bb83e0185071a0b0437aa46f7301db3f67f182335aed9aab1bda2323fe48796a73ec348c14257566f701e725a
7
+ data.tar.gz: 2049669da108f6693b98628cfa24fc0bbfe179b5c8171ee4f36883ddb820845a663f457dc97d55756268c4e999299a467fb0bc8f4bb8e9c99d19ce3af9debbe5
data/.gitignore ADDED
@@ -0,0 +1,54 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # bundler
12
+ .bundle
13
+
14
+ # bundler
15
+ pkg
16
+
17
+ # Gemfile lock
18
+ Gemfile.lock
19
+
20
+ # rvm
21
+ .rvmrc
22
+
23
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
24
+ #
25
+ # * Create a file at ~/.gitignore
26
+ # * Include files you want ignored
27
+ # * Run: git config --global core.excludesfile ~/.gitignore
28
+ #
29
+ # After doing this, these files will be ignored in all your git projects,
30
+ # saving you from having to 'pollute' every project you touch with them
31
+ #
32
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
33
+ #
34
+ # For MacOS:
35
+ #
36
+ #.DS_Store
37
+
38
+ # For TextMate
39
+ *.tmproj
40
+ tmtags
41
+
42
+ # For emacs:
43
+ *~
44
+ \#*
45
+ .\#*
46
+
47
+ # For vim:
48
+ *.swp
49
+
50
+ # For redcar:
51
+ .redcar
52
+
53
+ # For rubinius:
54
+ *.rbc
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  Next Release
2
2
  ------------
3
3
 
4
+ 1.0.1
5
+ -----
6
+
7
+ * [#8](https://github.com/aaw/mongoid_collection_snapshot/pull/8): Fixed .gemspec for compatibility with Mongoid 4.x - [@dblock](https://github.com/dblock).
8
+
9
+ 1.0.0
10
+ -----
11
+
4
12
  * Expose `snapshot_session` for custom snapshot storage - [@joeyAghion](https://github.com/joeyAghion)
5
13
  * Compatibility with Mongoid 4.x - [@dblock](https://github.com/dblock).
6
14
 
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- case version = ENV['MONGOID_VERSION'] || '~> 3.1'
3
+ case version = ENV['MONGOID_VERSION'] || '~> 4.0'
4
4
  when /4/
5
- gem 'mongoid', github: 'mongoid/mongoid'
5
+ gem 'mongoid', '~> 4.0'
6
6
  when /3/
7
7
  gem 'mongoid', '~> 3.1'
8
8
  else
@@ -11,8 +11,8 @@ end
11
11
 
12
12
  gem "mongoid_slug"
13
13
 
14
- group :development do
14
+ group :development, :test do
15
15
  gem "rspec", "~> 2.11.0"
16
- gem "jeweler", "~> 1.8.4"
16
+ gem "rake"
17
17
  end
18
18
 
data/Rakefile CHANGED
@@ -1,7 +1,10 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require 'rubygems'
4
+
4
5
  require 'bundler'
6
+ require 'bundler/gem_tasks'
7
+
5
8
  begin
6
9
  Bundler.setup(:default, :development)
7
10
  rescue Bundler::BundlerError => e
@@ -9,21 +12,8 @@ rescue Bundler::BundlerError => e
9
12
  $stderr.puts "Run `bundle install` to install missing gems"
10
13
  exit e.status_code
11
14
  end
12
- require 'rake'
13
15
 
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "mongoid_collection_snapshot"
18
- gem.homepage = "http://github.com/aaw/mongoid_collection_snapshot"
19
- gem.license = "MIT"
20
- gem.summary = %Q{Easy maintenence of collections of processed data in MongoDB with the Mongoid ODM}
21
- gem.description = %Q{Easy maintenence of collections of processed data in MongoDB with the Mongoid ODM}
22
- gem.email = "aaron.windsor@gmail.com"
23
- gem.authors = ["Aaron Windsor"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
16
+ require 'rake'
27
17
 
28
18
  require 'rspec/core'
29
19
  require 'rspec/core/rake_task'
@@ -0,0 +1,7 @@
1
+ module Mongoid
2
+ module CollectionSnapshot
3
+ VERSION = '1.0.1'
4
+ end
5
+ end
6
+
7
+
@@ -1,16 +1,18 @@
1
+ require 'mongoid_collection_snapshot/version'
2
+
1
3
  module Mongoid::CollectionSnapshot
2
4
  extend ActiveSupport::Concern
3
5
 
4
6
  included do
5
7
  require 'mongoid_slug'
6
-
8
+
7
9
  include Mongoid::Document
8
10
  include Mongoid::Timestamps::Created
9
11
  include Mongoid::Slug
10
12
 
11
13
  field :workspace_basename, default: 'snapshot'
12
14
  slug :workspace_basename
13
-
15
+
14
16
  field :max_collection_snapshot_instances, default: 2
15
17
 
16
18
  before_create :build
@@ -53,5 +55,5 @@ module Mongoid::CollectionSnapshot
53
55
  def snapshot_session
54
56
  Mongoid.default_session
55
57
  end
56
-
58
+
57
59
  end
@@ -1,64 +1,18 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: mongoid_collection_snapshot 1.0.0 ruby lib
1
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
2
+ require 'mongoid_collection_snapshot/version'
6
3
 
7
4
  Gem::Specification.new do |s|
8
- s.name = "mongoid_collection_snapshot"
9
- s.version = "1.0.0"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Aaron Windsor"]
14
- s.date = "2014-06-07"
15
- s.description = "Easy maintenence of collections of processed data in MongoDB with the Mongoid ODM"
16
- s.email = "aaron.windsor@gmail.com"
17
- s.extra_rdoc_files = [
18
- "LICENSE.txt",
19
- "README.md"
20
- ]
21
- s.files = [
22
- ".travis.yml",
23
- "CHANGELOG.md",
24
- "Gemfile",
25
- "LICENSE.txt",
26
- "README.md",
27
- "Rakefile",
28
- "VERSION",
29
- "lib/mongoid_collection_snapshot.rb",
30
- "mongoid_collection_snapshot.gemspec",
31
- "spec/models/artwork.rb",
32
- "spec/models/average_artist_price.rb",
33
- "spec/models/custom_connection_snapshot.rb",
34
- "spec/models/multi_collection_snapshot.rb",
35
- "spec/mongoid/collection_snapshot_spec.rb",
36
- "spec/spec_helper.rb"
37
- ]
38
- s.homepage = "http://github.com/aaw/mongoid_collection_snapshot"
39
- s.licenses = ["MIT"]
40
- s.rubygems_version = "2.2.2"
41
- s.summary = "Easy maintenence of collections of processed data in MongoDB with the Mongoid ODM"
42
-
43
- if s.respond_to? :specification_version then
44
- s.specification_version = 4
45
-
46
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
- s.add_runtime_dependency(%q<mongoid>, ["~> 3.1"])
48
- s.add_runtime_dependency(%q<mongoid_slug>, [">= 0"])
49
- s.add_development_dependency(%q<rspec>, ["~> 2.11.0"])
50
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
51
- else
52
- s.add_dependency(%q<mongoid>, ["~> 3.1"])
53
- s.add_dependency(%q<mongoid_slug>, [">= 0"])
54
- s.add_dependency(%q<rspec>, ["~> 2.11.0"])
55
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
56
- end
57
- else
58
- s.add_dependency(%q<mongoid>, ["~> 3.1"])
59
- s.add_dependency(%q<mongoid_slug>, [">= 0"])
60
- s.add_dependency(%q<rspec>, ["~> 2.11.0"])
61
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
62
- end
5
+ s.name = 'mongoid_collection_snapshot'
6
+ s.version = Mongoid::CollectionSnapshot::VERSION
7
+ s.authors = ['Aaron Windsor']
8
+ s.email = 'aaron.windsor@gmail.com'
9
+ s.platform = Gem::Platform::RUBY
10
+ s.required_rubygems_version = '>= 1.3.6'
11
+ s.files = `git ls-files`.split("\n")
12
+ s.require_paths = ['lib']
13
+ s.homepage = 'http://github.com/aaw/mongoid_collection_snapshot'
14
+ s.licenses = ['MIT']
15
+ s.summary = 'Easy maintenence of collections of processed data in MongoDB with the Mongoid ODM.'
16
+ s.add_dependency 'mongoid', '>= 3.0'
17
+ s.add_dependency 'mongoid_slug'
63
18
  end
64
-
@@ -3,6 +3,10 @@ require 'spec_helper'
3
3
  module Mongoid
4
4
  describe CollectionSnapshot do
5
5
 
6
+ it "has a version" do
7
+ Mongoid::CollectionSnapshot::VERSION.should_not be_nil
8
+ end
9
+
6
10
  context "creating a basic snapshot" do
7
11
 
8
12
  let!(:flowers) { Artwork.create(:name => 'Flowers', :artist => 'Andy Warhol', :price => 3000000) }
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_collection_snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Windsor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-07 00:00:00.000000000 Z
11
+ date: 2014-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
19
+ version: '3.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: '3.1'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mongoid_slug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,51 +38,21 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 2.11.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 2.11.0
55
- - !ruby/object:Gem::Dependency
56
- name: jeweler
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 1.8.4
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 1.8.4
69
- description: Easy maintenence of collections of processed data in MongoDB with the
70
- Mongoid ODM
41
+ description:
71
42
  email: aaron.windsor@gmail.com
72
43
  executables: []
73
44
  extensions: []
74
- extra_rdoc_files:
75
- - LICENSE.txt
76
- - README.md
45
+ extra_rdoc_files: []
77
46
  files:
47
+ - ".gitignore"
78
48
  - ".travis.yml"
79
49
  - CHANGELOG.md
80
50
  - Gemfile
81
51
  - LICENSE.txt
82
52
  - README.md
83
53
  - Rakefile
84
- - VERSION
85
54
  - lib/mongoid_collection_snapshot.rb
55
+ - lib/mongoid_collection_snapshot/version.rb
86
56
  - mongoid_collection_snapshot.gemspec
87
57
  - spec/models/artwork.rb
88
58
  - spec/models/average_artist_price.rb
@@ -107,12 +77,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
77
  requirements:
108
78
  - - ">="
109
79
  - !ruby/object:Gem::Version
110
- version: '0'
80
+ version: 1.3.6
111
81
  requirements: []
112
82
  rubyforge_project:
113
83
  rubygems_version: 2.2.2
114
84
  signing_key:
115
85
  specification_version: 4
116
86
  summary: Easy maintenence of collections of processed data in MongoDB with the Mongoid
117
- ODM
87
+ ODM.
118
88
  test_files: []
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.0.0