quby-mongoid 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 70220331943dbda29441a85632195da76d5729f9
4
+ data.tar.gz: 87652dcfc72e8a603542ec96374c48d0d2627867
5
+ SHA512:
6
+ metadata.gz: b14a4a1996bae474b9d55757b4b505b7d0613b169959fed23356b0e8f1c065852b31724156ec8aecb961f41306a79989b5a1ce91476ff7359b75e227a9a42ef5
7
+ data.tar.gz: 101159251fe39af39c79528535b2f5603e237f660fdb2286e76362a175dcad7d4338f843747dbe08a45c03dae866d613c4ac8bc7189f90c5fff0019c99b2f774
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/.rubocop.yml ADDED
@@ -0,0 +1,97 @@
1
+ inherit_from: rubocop-todo.yml
2
+
3
+ AllCops:
4
+ Excludes:
5
+ - 'config/**'
6
+ - 'db/**'
7
+ - 'script/**'
8
+ - 'tmp/**'
9
+ - 'vendor/**'
10
+ - 'spec/fixtures/*.rb'
11
+ - 'spec/dummy/**'
12
+ RunRailsCops: true
13
+
14
+ # Use UTF-8 as the source file encoding.
15
+ Encoding:
16
+ Enabled: false
17
+
18
+ # Limit lines to 80 characters.
19
+ LineLength:
20
+ Max: 120
21
+
22
+ # Avoid methods longer than 10 lines of code
23
+ MethodLength:
24
+ CountComments: false # count full line comments?
25
+ Max: 20
26
+
27
+ BracesAroundHashParameters:
28
+ Enabled: false
29
+
30
+ SpaceInsideBlockBraces:
31
+ EnforcedStyle: space
32
+ EnforcedStyleForEmptyBraces: space
33
+
34
+ AmbiguousRegexpLiteral:
35
+ Exclude:
36
+ - 'spec/**'
37
+
38
+ CyclomaticComplexity:
39
+ Max: 15 # should be set to 6, too many for now
40
+
41
+ ################################################################## DISABLED COPS
42
+ # These cops are disabled because we think they are a Bad Idea. If you add one
43
+ # here, make sure to add a comment describing what the cop does, and why this
44
+ # is a bad idea.
45
+
46
+ # Forces the argument names of the block given to #reduce to be `a, e`. Only
47
+ # applies on single-line blocks, but why would we want to force people to use
48
+ # less descriptive names?
49
+ SingleLineBlockParams:
50
+ Enabled: false
51
+
52
+ # Complains than multiline ternary expressions should be if/else statements
53
+ # Ternary are still often more readable.
54
+ MultilineTernaryOperator:
55
+ Enabled: false
56
+
57
+ # disallows `class Quby::Items::Text` style definitions.
58
+ # Why waste all that indentation?
59
+ ClassAndModuleChildren:
60
+ Enabled: false
61
+
62
+ # This is not universally a better idea, it depends greatly on whether the
63
+ # condition is to handle an edge-case or not. We prefer leaving this up to
64
+ # code review instead of Rubocop.
65
+ IfUnlessModifier:
66
+ Enabled: false
67
+
68
+ # before_filter must be renamed to before_action.
69
+ # can't enable this until we drop support for rails 3.
70
+ ActionFilter:
71
+ Enabled: false
72
+
73
+ # Use single quotes for strings that don't do string interpolation. Makes it
74
+ # harder to later add an interpolated value.
75
+ StringLiterals:
76
+ Enabled: false
77
+
78
+ # This forces the use of the English library instead of $: etc. We think that some
79
+ # of these Perl-vars are quite succinct.
80
+ SpecialGlobalVars:
81
+ Enabled: false
82
+
83
+ # This forces the use of %r{.. } when a regexp contains more than one slash.
84
+ # If a regex is unreadable, code review will catch it, otherwise it's not
85
+ # a function of how many slashes are in it.
86
+ RegexpLiteral:
87
+ Enabled: false
88
+
89
+ # Requires you a space inside the braces of a Hash literal. I have never ever done this before and
90
+ # do not think it makes for more readable code.
91
+ SpaceInsideHashLiteralBraces:
92
+ Enabled: false
93
+
94
+ # can only use %w(..)
95
+ # Stupid rule, the whole idea of the %w is to be able to use something that will not be in the string.
96
+ PercentLiteralDelimiters:
97
+ Enabled: false
data/Appraisals ADDED
@@ -0,0 +1,13 @@
1
+ appraise "mongoid2" do
2
+ gem 'mongoid', '~> 2.8'
3
+ gem 'bson_ext'
4
+ end
5
+
6
+ appraise "mongoid3" do
7
+ gem 'mongoid', '~> 3.0'
8
+ end
9
+
10
+ appraise "mongoid4" do
11
+ gem 'mongoid', '~> 4.0.0.beta1'
12
+ end
13
+
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in quby-mongoid.gemspec
4
+ gemspec
5
+
6
+ # Quby is not pushed to rubygems.org, so we specify its source here explicitly.
7
+ gem 'quby', git: 'git@github.com:roqua/quby_engine.git', ref: '1a6ee38bb2499fd9938dbdb4bf8e8033920f6659'
8
+ # gem 'quby', path: '../quby'
9
+
10
+ gem 'appraisal', '1.0.0.beta3'
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 RoQua
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Quby::Mongoid
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'quby-mongoid'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ ## Usage
16
+
17
+ To configure Quby to use this database adapter for storage, perform the following somewhere during your application's initialization process:
18
+
19
+ Quby.answer_repo = Quby::AnswerRepos::MongoidRepo.new
20
+
21
+ ## Development guide
22
+
23
+ * Install all dependencies using `bundle exec appraisal install`
24
+ * Run full spec suite (all mongoid versions) using `bundle exec appraisal rake spec`
25
+
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it ( https://github.com/[my-github-username]/quby-mongoid/fork )
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ # Bundler tasks
5
+ require "bundler/gem_tasks"
6
+
7
+ # Rspec tasks
8
+ require 'rspec/core/rake_task'
9
+ RSpec::Core::RakeTask.new(:spec)
data/circle.yml ADDED
@@ -0,0 +1,28 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.1.1
4
+ dependencies:
5
+ override:
6
+ - "echo 'ruby-2.1.1' > .ruby-version"
7
+ - "bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --clean"
8
+ - "bundle check --path=../vendor/bundle --gemfile='gemfiles/mongoid2.gemfile' || bundle install --path=../vendor/bundle --gemfile='gemfiles/mongoid2.gemfile'"
9
+ - "bundle check --path=../vendor/bundle --gemfile='gemfiles/mongoid3.gemfile' || bundle install --path=../vendor/bundle --gemfile='gemfiles/mongoid3.gemfile'"
10
+ - "bundle check --path=../vendor/bundle --gemfile='gemfiles/mongoid4.gemfile' || bundle install --path=../vendor/bundle --gemfile='gemfiles/mongoid4.gemfile'"
11
+ test:
12
+ override:
13
+ - bundle exec rspec spec:
14
+ environment:
15
+ BUNDLE_GEMFILE: gemfiles/mongoid2.gemfile
16
+ RAILS_ENV: test
17
+ RACK_ENV: test
18
+ - bundle exec rspec spec:
19
+ environment:
20
+ BUNDLE_GEMFILE: gemfiles/mongoid3.gemfile
21
+ RAILS_ENV: test
22
+ RACK_ENV: test
23
+ - bundle exec rspec spec:
24
+ environment:
25
+ BUNDLE_GEMFILE: gemfiles/mongoid4.gemfile
26
+ RAILS_ENV: test
27
+ RACK_ENV: test
28
+ - bundle exec rubocop
@@ -0,0 +1,3 @@
1
+ test:
2
+ host: localhost
3
+ database: quby_mongoid_test
@@ -0,0 +1,10 @@
1
+ test:
2
+ host: localhost
3
+ database: <%= ENV['MONGOID_DATABASE'] || 'quby_mongoid_test' %>
4
+ autocreate_indexes: true
5
+ persist_in_safe_mode: true
6
+ sessions:
7
+ default:
8
+ database: <%= ENV['MONGOID_DATABASE'] || 'quby_mongoid_test' %>
9
+ hosts:
10
+ - localhost:27017
@@ -0,0 +1,10 @@
1
+ test:
2
+ host: localhost
3
+ database: <%= ENV['MONGOID_DATABASE'] || 'quby_mongoid_test' %>
4
+ autocreate_indexes: true
5
+ persist_in_safe_mode: true
6
+ sessions:
7
+ default:
8
+ database: <%= ENV['MONGOID_DATABASE'] || 'quby_mongoid_test' %>
9
+ hosts:
10
+ - localhost:27017
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "quby", :git=>"git@github.com:roqua/quby_engine.git", :ref=>"1a6ee38bb2499fd9938dbdb4bf8e8033920f6659"
6
+ gem "appraisal", "1.0.0.beta3"
7
+ gem "mongoid", "~> 2.8"
8
+ gem "bson_ext"
9
+
10
+ gemspec :path=>".././"
@@ -0,0 +1,210 @@
1
+ GIT
2
+ remote: git@github.com:roqua/quby_engine.git
3
+ revision: 1a6ee38bb2499fd9938dbdb4bf8e8033920f6659
4
+ ref: 1a6ee38bb2499fd9938dbdb4bf8e8033920f6659
5
+ specs:
6
+ quby (1.0.0)
7
+ addressable
8
+ coffee-rails
9
+ compass-rails
10
+ haml
11
+ jquery-rails (~> 2.2.1)
12
+ json
13
+ maruku (= 0.6.1)
14
+ opencpu (~> 0.6.0)
15
+ rails (>= 3.2, < 5.0)
16
+ ryansch-andand
17
+ sass-rails (>= 3.2, < 5.0)
18
+ susy (~> 1.0.rc)
19
+ virtus (~> 1.0)
20
+
21
+ PATH
22
+ remote: .././
23
+ specs:
24
+ quby-mongoid (0.0.1)
25
+ mongoid (>= 2.2, < 5.0)
26
+ quby
27
+
28
+ GEM
29
+ remote: https://rubygems.org/
30
+ specs:
31
+ actionmailer (3.2.18)
32
+ actionpack (= 3.2.18)
33
+ mail (~> 2.5.4)
34
+ actionpack (3.2.18)
35
+ activemodel (= 3.2.18)
36
+ activesupport (= 3.2.18)
37
+ builder (~> 3.0.0)
38
+ erubis (~> 2.7.0)
39
+ journey (~> 1.0.4)
40
+ rack (~> 1.4.5)
41
+ rack-cache (~> 1.2)
42
+ rack-test (~> 0.6.1)
43
+ sprockets (~> 2.2.1)
44
+ activemodel (3.2.18)
45
+ activesupport (= 3.2.18)
46
+ builder (~> 3.0.0)
47
+ activerecord (3.2.18)
48
+ activemodel (= 3.2.18)
49
+ activesupport (= 3.2.18)
50
+ arel (~> 3.0.2)
51
+ tzinfo (~> 0.3.29)
52
+ activeresource (3.2.18)
53
+ activemodel (= 3.2.18)
54
+ activesupport (= 3.2.18)
55
+ activesupport (3.2.18)
56
+ i18n (~> 0.6, >= 0.6.4)
57
+ multi_json (~> 1.0)
58
+ addressable (2.3.6)
59
+ appraisal (1.0.0.beta3)
60
+ bundler
61
+ rake
62
+ thor (>= 0.14.0)
63
+ arel (3.0.3)
64
+ axiom-types (0.1.1)
65
+ descendants_tracker (~> 0.0.4)
66
+ ice_nine (~> 0.11.0)
67
+ thread_safe (~> 0.3, >= 0.3.1)
68
+ bson (1.9.2)
69
+ bson_ext (1.9.2)
70
+ bson (~> 1.9.2)
71
+ builder (3.0.4)
72
+ chunky_png (1.3.1)
73
+ coderay (1.1.0)
74
+ coercible (1.0.0)
75
+ descendants_tracker (~> 0.0.1)
76
+ coffee-rails (3.2.1)
77
+ coffee-script (>= 2.2.0)
78
+ railties (~> 3.2.0.beta)
79
+ coffee-script (2.2.0)
80
+ coffee-script-source
81
+ execjs
82
+ coffee-script-source (1.7.0)
83
+ compass (0.12.6)
84
+ chunky_png (~> 1.2)
85
+ fssm (>= 0.2.7)
86
+ sass (~> 3.2.19)
87
+ compass-rails (1.1.7)
88
+ compass (>= 0.12.2)
89
+ sprockets (<= 2.11.0)
90
+ database_cleaner (1.2.0)
91
+ descendants_tracker (0.0.4)
92
+ thread_safe (~> 0.3, >= 0.3.1)
93
+ diff-lcs (1.2.5)
94
+ equalizer (0.0.9)
95
+ erubis (2.7.0)
96
+ execjs (2.2.0)
97
+ fssm (0.2.10)
98
+ haml (4.0.5)
99
+ tilt
100
+ hike (1.2.3)
101
+ httparty (0.13.1)
102
+ json (~> 1.8)
103
+ multi_xml (>= 0.5.2)
104
+ i18n (0.6.9)
105
+ ice_nine (0.11.0)
106
+ journey (1.0.4)
107
+ jquery-rails (2.2.2)
108
+ railties (>= 3.0, < 5.0)
109
+ thor (>= 0.14, < 2.0)
110
+ json (1.8.1)
111
+ mail (2.5.4)
112
+ mime-types (~> 1.16)
113
+ treetop (~> 1.4.8)
114
+ maruku (0.6.1)
115
+ syntax (>= 1.0.0)
116
+ method_source (0.8.2)
117
+ mime-types (1.25.1)
118
+ mongo (1.9.2)
119
+ bson (~> 1.9.2)
120
+ mongoid (2.8.1)
121
+ activemodel (~> 3.1)
122
+ mongo (~> 1.9)
123
+ tzinfo (~> 0.3.22)
124
+ multi_json (1.10.1)
125
+ multi_xml (0.5.5)
126
+ opencpu (0.6.2)
127
+ httparty (~> 0.13, >= 0.13.1)
128
+ yajl-ruby (~> 1.2, >= 1.2.0)
129
+ polyglot (0.3.5)
130
+ pry (0.10.0)
131
+ coderay (~> 1.1.0)
132
+ method_source (~> 0.8.1)
133
+ slop (~> 3.4)
134
+ rack (1.4.5)
135
+ rack-cache (1.2)
136
+ rack (>= 0.4)
137
+ rack-ssl (1.3.4)
138
+ rack
139
+ rack-test (0.6.2)
140
+ rack (>= 1.0)
141
+ rails (3.2.18)
142
+ actionmailer (= 3.2.18)
143
+ actionpack (= 3.2.18)
144
+ activerecord (= 3.2.18)
145
+ activeresource (= 3.2.18)
146
+ activesupport (= 3.2.18)
147
+ bundler (~> 1.0)
148
+ railties (= 3.2.18)
149
+ railties (3.2.18)
150
+ actionpack (= 3.2.18)
151
+ activesupport (= 3.2.18)
152
+ rack-ssl (~> 1.3.2)
153
+ rake (>= 0.8.7)
154
+ rdoc (~> 3.4)
155
+ thor (>= 0.14.6, < 2.0)
156
+ rake (10.3.2)
157
+ rdoc (3.12.2)
158
+ json (~> 1.4)
159
+ rspec (2.14.1)
160
+ rspec-core (~> 2.14.0)
161
+ rspec-expectations (~> 2.14.0)
162
+ rspec-mocks (~> 2.14.0)
163
+ rspec-core (2.14.8)
164
+ rspec-expectations (2.14.5)
165
+ diff-lcs (>= 1.1.3, < 2.0)
166
+ rspec-mocks (2.14.6)
167
+ ryansch-andand (1.3.2)
168
+ sass (3.2.19)
169
+ sass-rails (3.2.6)
170
+ railties (~> 3.2.0)
171
+ sass (>= 3.1.10)
172
+ tilt (~> 1.3)
173
+ slop (3.5.0)
174
+ sprockets (2.2.2)
175
+ hike (~> 1.2)
176
+ multi_json (~> 1.0)
177
+ rack (~> 1.0)
178
+ tilt (~> 1.1, != 1.3.0)
179
+ susy (1.0.9)
180
+ compass (>= 0.12.2)
181
+ sass (>= 3.2.0)
182
+ syntax (1.2.0)
183
+ thor (0.19.1)
184
+ thread_safe (0.3.4)
185
+ tilt (1.4.1)
186
+ treetop (1.4.15)
187
+ polyglot
188
+ polyglot (>= 0.3.1)
189
+ tzinfo (0.3.39)
190
+ virtus (1.0.2)
191
+ axiom-types (~> 0.1)
192
+ coercible (~> 1.0)
193
+ descendants_tracker (~> 0.0.3)
194
+ equalizer (~> 0.0.9)
195
+ yajl-ruby (1.2.1)
196
+
197
+ PLATFORMS
198
+ ruby
199
+
200
+ DEPENDENCIES
201
+ appraisal (= 1.0.0.beta3)
202
+ bson_ext
203
+ bundler (~> 1.6)
204
+ database_cleaner
205
+ mongoid (~> 2.8)
206
+ pry
207
+ quby!
208
+ quby-mongoid!
209
+ rake
210
+ rspec (~> 2.14.0)