mongoid-embedded-errors 2.0.1 → 2.1.1

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: 96ef455929fe07047621a0d5a2e33c576ee05926
4
- data.tar.gz: dff154361af3fac2c963cd4ba7652902b8190441
3
+ metadata.gz: cf676fc1f240e90f81b9e544ab757298062d73ca
4
+ data.tar.gz: e6b81f36c32a1f8da79f99c248c69e9195cff91c
5
5
  SHA512:
6
- metadata.gz: b70add5efeb3f66dd603edd5104537cbead19775fe643afa265b7fc1aef6ff2f308dcba412f0aafb5ae67256bdf86318917bb5a2632f910b254f4f4cd39054a0
7
- data.tar.gz: fd0881ccee8b5243333a6f8e3219c5002d9c2772267db2f438f66c7975c495896edaa66f7da8c2491ba5f67a6fe7c77c0bf16c8fc05ebc47e14336e76f3d450c
6
+ metadata.gz: d4278dd96bebd97e65cf8568f3856a84845edf20d75635686caa8b938fbf80b7e59f36ae49969c273850ee66fa1155b33ac68cb8a1e7eff5620871712fba5e7c
7
+ data.tar.gz: b3af8d97147572f1e1210d0f7f0442f93a6347b75fbf792c6d773fe7332e5c3a90b3f0c50009660d875b9d509a074e6f37375bf550b03aebc94416206130fb68
@@ -0,0 +1,17 @@
1
+ ---
2
+ engines:
3
+ rubocop:
4
+ enabled: true
5
+ bundler-audit:
6
+ enabled: true
7
+ fixme:
8
+ enabled: true
9
+ duplication:
10
+ enabled: true
11
+ config:
12
+ languages:
13
+ - ruby
14
+ - javascript
15
+ ratings:
16
+ paths:
17
+ - Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --require spec_helper
3
+ --format documentation
@@ -0,0 +1,77 @@
1
+ # Use RuboCop RSpec
2
+ require: rubocop-rspec
3
+
4
+ # Common configuration.
5
+ AllCops:
6
+ # Cop names are not displayed in offense messages by default. Change behavior
7
+ # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
8
+ # option.
9
+ DisplayCopNames: true
10
+ Exclude:
11
+ - Guardfile
12
+ - gemfiles/*
13
+ - bin/*
14
+
15
+ Rails:
16
+ Enabled: true
17
+
18
+ Style/FileName:
19
+ Exclude:
20
+ - Appraisals
21
+
22
+ Style/SpaceInsideHashLiteralBraces:
23
+ EnforcedStyle: no_space
24
+ EnforcedStyleForEmptyBraces: no_space
25
+ SupportedStyles:
26
+ - space
27
+ - no_space
28
+
29
+ Metrics/MethodLength:
30
+ CountComments: false # count full line comments?
31
+ Max: 15
32
+
33
+ Metrics/AbcSize:
34
+ Max: 20
35
+
36
+ Style/Documentation:
37
+ Description: 'Document classes and non-namespace modules.'
38
+ Enabled: false
39
+
40
+ Style/AutoResourceCleanup:
41
+ Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
42
+ Enabled: true
43
+
44
+ Style/CollectionMethods:
45
+ Description: 'Preferred collection methods.'
46
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
47
+ Enabled: true
48
+
49
+ Style/MethodCalledOnDoEndBlock:
50
+ Description: 'Avoid chaining a method call on a do...end block.'
51
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
52
+ Enabled: true
53
+
54
+ Style/ExtraSpacing:
55
+ Description: 'Do not use unnecessary spacing.'
56
+ Enabled: true
57
+
58
+ Style/ClassAndModuleChildren:
59
+ # Checks the style of children definitions at classes and modules.
60
+ #
61
+ # Basically there are two different styles:
62
+ #
63
+ # `nested` - have each child on a separate line
64
+ # class Foo
65
+ # class Bar
66
+ # end
67
+ # end
68
+ #
69
+ # `compact` - combine definitions as much as possible
70
+ # class Foo::Bar
71
+ # end
72
+ #
73
+ # The compact style is only forced, for classes / modules with one child.
74
+ EnforcedStyle: compact
75
+ SupportedStyles:
76
+ - nested
77
+ - compact
@@ -0,0 +1,15 @@
1
+ appraise 'mongoid-3' do
2
+ gem 'mongoid', '~> 3.0'
3
+ end
4
+
5
+ appraise 'mongoid-4' do
6
+ gem 'mongoid', '~> 4.0'
7
+ end
8
+
9
+ appraise 'mongoid-5' do
10
+ gem 'mongoid', '~> 5.0'
11
+ end
12
+
13
+ appraise 'mongoid-6' do
14
+ gem 'mongoid', '~> 6.0'
15
+ end
data/Gemfile CHANGED
@@ -1,7 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in mongoid_delorean.gemspec
3
+ # Specify your gem's dependencies in mongoid-embedded-errors.gemspec
4
4
  gemspec
5
5
 
6
- gem "rspec"
7
- gem 'database_cleaner'
6
+ gem 'rspec'
7
+ gem 'rake'
8
+ gem 'database_cleaner'
9
+ gem 'guard-rspec'
10
+ gem 'appraisal'
11
+ gem 'mutant-rspec'
@@ -2,43 +2,167 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  mongoid-embedded-errors (2.0.1)
5
- mongoid (>= 3.0.0)
5
+ mongoid (>= 3.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (3.2.13)
11
- activesupport (= 3.2.13)
12
- builder (~> 3.0.0)
13
- activesupport (3.2.13)
14
- i18n (= 0.6.1)
15
- multi_json (~> 1.0)
16
- builder (3.0.4)
17
- database_cleaner (0.9.1)
18
- diff-lcs (1.1.3)
19
- i18n (0.6.1)
20
- mongoid (3.1.2)
21
- activemodel (~> 3.2)
22
- moped (~> 1.4.2)
23
- origin (~> 1.0)
24
- tzinfo (~> 0.3.22)
25
- moped (1.4.5)
26
- multi_json (1.7.7)
27
- origin (1.1.0)
28
- rspec (2.11.0)
29
- rspec-core (~> 2.11.0)
30
- rspec-expectations (~> 2.11.0)
31
- rspec-mocks (~> 2.11.0)
32
- rspec-core (2.11.1)
33
- rspec-expectations (2.11.3)
34
- diff-lcs (~> 1.1.3)
35
- rspec-mocks (2.11.3)
36
- tzinfo (0.3.37)
10
+ abstract_type (0.0.7)
11
+ activemodel (4.2.6)
12
+ activesupport (= 4.2.6)
13
+ builder (~> 3.1)
14
+ activesupport (4.2.6)
15
+ i18n (~> 0.7)
16
+ json (~> 1.7, >= 1.7.7)
17
+ minitest (~> 5.1)
18
+ thread_safe (~> 0.3, >= 0.3.4)
19
+ tzinfo (~> 1.1)
20
+ adamantium (0.2.0)
21
+ ice_nine (~> 0.11.0)
22
+ memoizable (~> 0.4.0)
23
+ anima (0.3.0)
24
+ abstract_type (~> 0.0.7)
25
+ adamantium (~> 0.2)
26
+ equalizer (~> 0.0.11)
27
+ appraisal (2.1.0)
28
+ bundler
29
+ rake
30
+ thor (>= 0.14.0)
31
+ ast (2.3.0)
32
+ bson (3.2.6)
33
+ builder (3.2.2)
34
+ coderay (1.1.1)
35
+ concord (0.1.5)
36
+ adamantium (~> 0.2.0)
37
+ equalizer (~> 0.0.9)
38
+ connection_pool (2.2.0)
39
+ database_cleaner (1.5.3)
40
+ diff-lcs (1.2.5)
41
+ equalizer (0.0.11)
42
+ ffi (1.9.14)
43
+ formatador (0.2.5)
44
+ guard (2.14.0)
45
+ formatador (>= 0.2.4)
46
+ listen (>= 2.7, < 4.0)
47
+ lumberjack (~> 1.0)
48
+ nenv (~> 0.1)
49
+ notiffany (~> 0.0)
50
+ pry (>= 0.9.12)
51
+ shellany (~> 0.0)
52
+ thor (>= 0.18.1)
53
+ guard-compat (1.2.1)
54
+ guard-rspec (4.7.3)
55
+ guard (~> 2.1)
56
+ guard-compat (~> 1.1)
57
+ rspec (>= 2.99.0, < 4.0)
58
+ i18n (0.7.0)
59
+ ice_nine (0.11.2)
60
+ json (1.8.3)
61
+ listen (3.1.5)
62
+ rb-fsevent (~> 0.9, >= 0.9.4)
63
+ rb-inotify (~> 0.9, >= 0.9.7)
64
+ ruby_dep (~> 1.2)
65
+ lumberjack (1.0.10)
66
+ memoizable (0.4.2)
67
+ thread_safe (~> 0.3, >= 0.3.1)
68
+ method_source (0.8.2)
69
+ minitest (5.9.0)
70
+ mongoid (4.0.2)
71
+ activemodel (~> 4.0)
72
+ moped (~> 2.0.0)
73
+ origin (~> 2.1)
74
+ tzinfo (>= 0.3.37)
75
+ moped (2.0.7)
76
+ bson (~> 3.0)
77
+ connection_pool (~> 2.0)
78
+ optionable (~> 0.2.0)
79
+ morpher (0.2.6)
80
+ abstract_type (~> 0.0.7)
81
+ adamantium (~> 0.2.0)
82
+ anima (~> 0.3.0)
83
+ ast (~> 2.2)
84
+ concord (~> 0.1.5)
85
+ equalizer (~> 0.0.9)
86
+ ice_nine (~> 0.11.0)
87
+ procto (~> 0.0.2)
88
+ mutant (0.8.11)
89
+ abstract_type (~> 0.0.7)
90
+ adamantium (~> 0.2.0)
91
+ anima (~> 0.3.0)
92
+ ast (~> 2.2)
93
+ concord (~> 0.1.5)
94
+ diff-lcs (~> 1.2)
95
+ equalizer (~> 0.0.9)
96
+ ice_nine (~> 0.11.1)
97
+ memoizable (~> 0.4.2)
98
+ morpher (~> 0.2.6)
99
+ parallel (~> 1.3)
100
+ parser (~> 2.3.0, >= 2.3.0.2)
101
+ procto (~> 0.0.2)
102
+ regexp_parser (~> 0.3.6)
103
+ unparser (~> 0.2.5)
104
+ mutant-rspec (0.8.11)
105
+ mutant (~> 0.8.11)
106
+ rspec-core (>= 3.4.0, < 3.6.0)
107
+ nenv (0.3.0)
108
+ notiffany (0.1.1)
109
+ nenv (~> 0.1)
110
+ shellany (~> 0.0)
111
+ optionable (0.2.0)
112
+ origin (2.2.0)
113
+ parallel (1.9.0)
114
+ parser (2.3.1.4)
115
+ ast (~> 2.2)
116
+ procto (0.0.3)
117
+ pry (0.10.4)
118
+ coderay (~> 1.1.0)
119
+ method_source (~> 0.8.1)
120
+ slop (~> 3.4)
121
+ rake (11.3.0)
122
+ rb-fsevent (0.9.7)
123
+ rb-inotify (0.9.7)
124
+ ffi (>= 0.5.0)
125
+ regexp_parser (0.3.6)
126
+ rspec (3.5.0)
127
+ rspec-core (~> 3.5.0)
128
+ rspec-expectations (~> 3.5.0)
129
+ rspec-mocks (~> 3.5.0)
130
+ rspec-core (3.5.3)
131
+ rspec-support (~> 3.5.0)
132
+ rspec-expectations (3.5.0)
133
+ diff-lcs (>= 1.2.0, < 2.0)
134
+ rspec-support (~> 3.5.0)
135
+ rspec-mocks (3.5.0)
136
+ diff-lcs (>= 1.2.0, < 2.0)
137
+ rspec-support (~> 3.5.0)
138
+ rspec-support (3.5.0)
139
+ ruby_dep (1.4.0)
140
+ shellany (0.0.1)
141
+ slop (3.6.0)
142
+ thor (0.19.1)
143
+ thread_safe (0.3.5)
144
+ tzinfo (1.2.2)
145
+ thread_safe (~> 0.1)
146
+ unparser (0.2.5)
147
+ abstract_type (~> 0.0.7)
148
+ adamantium (~> 0.2.0)
149
+ concord (~> 0.1.5)
150
+ diff-lcs (~> 1.2.5)
151
+ equalizer (~> 0.0.9)
152
+ parser (~> 2.3.0)
153
+ procto (~> 0.0.2)
37
154
 
38
155
  PLATFORMS
39
156
  ruby
40
157
 
41
158
  DEPENDENCIES
159
+ appraisal
42
160
  database_cleaner
161
+ guard-rspec
43
162
  mongoid-embedded-errors!
163
+ mutant-rspec
164
+ rake
44
165
  rspec
166
+
167
+ BUNDLED WITH
168
+ 1.13.1
@@ -0,0 +1,42 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ # Note: The cmd option is now required due to the increasing number of ways
19
+ # rspec may be run, below are examples of the most common uses.
20
+ # * bundler: 'bundle exec rspec'
21
+ # * bundler binstubs: 'bin/rspec'
22
+ # * spring: 'bin/rspec' (This will use spring if running and you have
23
+ # installed the spring binstubs per the docs)
24
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
25
+ # * 'just' rspec: 'rspec'
26
+
27
+ guard :rspec, cmd: "bundle exec rspec" do
28
+ require "guard/rspec/dsl"
29
+ dsl = Guard::RSpec::Dsl.new(self)
30
+
31
+ # Feel free to open issues for suggestions and improvements
32
+
33
+ # RSpec files
34
+ rspec = dsl.rspec
35
+ watch(rspec.spec_helper) { rspec.spec_dir }
36
+ watch(rspec.spec_support) { rspec.spec_dir }
37
+ watch(rspec.spec_files)
38
+
39
+ # Ruby files
40
+ ruby = dsl.ruby
41
+ dsl.watch_spec_files_for(ruby.lib_files)
42
+ end
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Mongoid::EmbeddedErrors
2
+ [![Code Climate](https://codeclimate.com/github/glooko/mongoid-embedded-errors/badges/gpa.svg)](https://codeclimate.com/github/glooko/mongoid-embedded-errors)
2
3
 
3
- Easily bubble up errors from embedded documents in Mongoid.
4
+ Easily bubble up errors from embedded documents in Mongoid 3 and newer.
4
5
 
5
6
  ## Installation
6
7
 
@@ -102,8 +103,6 @@ Now, isn't that much nicer? Yeah, I think so to.
102
103
  4. Push to the branch (`git push origin my-new-feature`)
103
104
  5. Create new Pull Request
104
105
 
105
- ## Contributers
106
+ ## Contributors
106
107
 
107
- * Mark Bates
108
- * Evgeniy Denisov
109
- * Nick Plante
108
+ [See here](https://github.com/glooko/mongoid-embedded-errors/graphs/contributors)
data/Rakefile CHANGED
@@ -1,11 +1,13 @@
1
- require 'bundler'
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
2
4
  Bundler::GemHelper.install_tasks
3
5
 
4
- desc "Run tests"
5
- task :default => [:test]
6
+ desc 'Run tests'
7
+ task default: [:test]
6
8
 
7
- task :spec => [:test]
9
+ desc 'Run tests'
10
+ task spec: [:test]
8
11
 
9
- task :test do
10
- system "bundle exec rspec"
11
- end
12
+ desc 'Run tests'
13
+ task(:test) { system 'bundle exec rspec' }
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application '_guard-core' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("guard", "_guard-core")
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'appraisal' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("appraisal", "appraisal")