From 53f82aceef93f64e286baa6717b112c0c9ffc394 Mon Sep 17 00:00:00 2001 From: did Date: Fri, 9 Oct 2015 23:59:55 -0500 Subject: [PATCH] specs are failing because of https://jira.mongodb.org/browse/MONGOID-4159 --- .rspec | 1 + Gemfile | 8 +- Gemfile.lock | 98 +++++----- .../locomotive/concerns/content_entry/csv.rb | 4 + .../locomotive/concerns/content_entry/slug.rb | 2 - .../locomotive/concerns/page/templatized.rb | 2 +- lib/locomotive/dependencies.rb | 2 +- lib/locomotive/mongoid/patches.rb | 2 +- lib/locomotive/steam_adaptor.rb | 2 +- locomotive_cms.gemspec | 8 +- spec/dummy/config/mongoid.yml | 173 ++++++++++-------- spec/dummy/config/mongoid_4_0_0.yml | 117 ++++++++++++ spec/models/locomotive/content_entry_spec.rb | 12 +- spec/support/mongoid.rb | 2 + 14 files changed, 287 insertions(+), 146 deletions(-) create mode 100644 spec/dummy/config/mongoid_4_0_0.yml create mode 100644 spec/support/mongoid.rb diff --git a/.rspec b/.rspec index 53607ea52b..7438fbe51d 100644 --- a/.rspec +++ b/.rspec @@ -1 +1,2 @@ --colour +--format documentation diff --git a/Gemfile b/Gemfile index c935c57609..c91198ecba 100755 --- a/Gemfile +++ b/Gemfile @@ -18,11 +18,11 @@ end group :development do # gem 'custom_fields', path: '../custom_fields' - # gem 'custom_fields', path: '../gems/custom_fields' # for Developers + gem 'custom_fields', path: '../gems/custom_fields' # for Developers # gem 'custom_fields', github: 'locomotivecms/custom_fields', ref: '15cceb66ed' - # gem 'locomotivecms_steam', path: '../in_progress/steam', require: false - gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: '552b013e147ef', require: false + gem 'locomotivecms_steam', path: '../in_progress/steam', require: false + # gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: '552b013e147ef', require: false # gem 'locomotive-aloha-rails', path: '../gems/aloha-rails' # for Developers # gem 'locomotive-tinymce-rails', path: '../gems/tinymce-rails' # for Developers @@ -63,7 +63,7 @@ group :test do gem 'factory_girl_rails' gem 'pickle' gem 'json_spec', '~> 1.1.4' - gem 'database_cleaner', '~> 1.4.1' + gem 'database_cleaner', git: 'https://github.com/DatabaseCleaner/database_cleaner.git' gem 'timecop', '~> 0.7.1' # gem 'debugger', git: 'git://github.com/cldwalker/debugger.git' diff --git a/Gemfile.lock b/Gemfile.lock index 9bca2c9163..4bed8cb841 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,30 +1,8 @@ GIT - remote: git://github.com/locomotivecms/steam.git - revision: 552b013e147ef7c0e4c4119a1156bee1503156c7 - ref: 552b013e147ef + remote: https://github.com/DatabaseCleaner/database_cleaner.git + revision: b87f00320f8aa0f7e499d183128f05ce29cedc33 specs: - locomotivecms_steam (1.0.0.pre.beta.3) - RedCloth (~> 4.2.9) - chronic (~> 0.10.2) - coffee-script (~> 2.4.1) - compass (~> 1.0.3) - dragonfly (~> 1.0.12) - haml (~> 4.0.6) - httparty (~> 0.13.6) - kramdown (~> 1.8.0) - locomotivecms-solid (~> 4.0.0.alpha2) - locomotivecms_common (~> 0.0.5) - mime-types (~> 2.6.1) - mimetype-fu (~> 0.1.2) - moneta (~> 0.8.0) - morphine (~> 0.1.1) - rack-cache (~> 1.2) - rack-rewrite (~> 1.5.1) - rack_csrf (~> 2.5.0) - sanitize (~> 4.0.0) - sprockets (~> 2.12.3) - sprockets-less (~> 0.6.1) - sprockets-sass (~> 1.3.1) + database_cleaner (1.5.1) PATH remote: . @@ -36,10 +14,9 @@ PATH bazaar (~> 0.0.2) bootstrap-kaminari-views (~> 0.0.5) bootstrap-sass (~> 3.3.3) - carrierwave-mongoid (~> 0.7.1) + carrierwave-mongoid (~> 0.8.1) codemirror-rails (~> 5.6) compass-rails (= 2.0.4) - custom_fields (~> 2.4.0.rc5) devise (~> 3.5.1) devise-encryptable (~> 0.2.0) dragonfly (~> 1.0.7) @@ -52,11 +29,10 @@ PATH jquery-rails (~> 4.0.3) jquery-ui-rails (~> 5.0.3) kaminari (~> 0.16.3) - locomotivecms_steam (~> 1.0.0.pre.beta.3) mime-types (~> 2.5) mimetype-fu (~> 0.1.2) mongo_session_store-rails4 (~> 6.0.0) - mongoid (~> 4.0.2) + mongoid (~> 5.0.0) mongoid-tree (~> 2.0.1) multi_json (~> 1.11.0) net-ssh (~> 2.10.1.rc1) @@ -72,10 +48,45 @@ PATH slim (~> 3.0.6) stringex (~> 2.5.2) +PATH + remote: ../gems/custom_fields + specs: + custom_fields (2.5.0.rc1) + activesupport (~> 4.2.4) + carrierwave-mongoid (~> 0.8.1) + monetize (~> 1.1.0) + mongoid (~> 5.0.0) + +PATH + remote: ../in_progress/steam + specs: + locomotivecms_steam (1.0.0.pre.beta.3) + RedCloth (~> 4.2.9) + chronic (~> 0.10.2) + coffee-script (~> 2.4.1) + compass (~> 1.0.3) + dragonfly (~> 1.0.12) + haml (~> 4.0.6) + httparty (~> 0.13.6) + kramdown (~> 1.8.0) + locomotivecms-solid (~> 4.0.0.alpha2) + locomotivecms_common (~> 0.0.5) + mime-types (~> 2.6.1) + mimetype-fu (~> 0.1.2) + moneta (~> 0.8.0) + morphine (~> 0.1.1) + rack-cache (~> 1.2) + rack-rewrite (~> 1.5.1) + rack_csrf (~> 2.5.0) + sanitize (~> 4.0.0) + sprockets (~> 2.12.3) + sprockets-less (~> 0.6.1) + sprockets-sass (~> 1.3.1) + GEM remote: https://rubygems.org/ specs: - CFPropertyList (2.3.1) + CFPropertyList (2.3.2) RedCloth (4.2.9) actionmailer (4.2.4) actionpack (= 4.2.4) @@ -143,7 +154,7 @@ GEM bootstrap-sass (3.3.5.1) autoprefixer-rails (>= 5.0.0.1) sass (>= 3.3.0) - bson (3.2.4) + bson (3.2.6) builder (3.2.2) byebug (5.0.0) columnize (= 0.9.0) @@ -158,9 +169,9 @@ GEM activesupport (>= 3.2.0) json (>= 1.7) mime-types (>= 1.16) - carrierwave-mongoid (0.7.1) + carrierwave-mongoid (0.8.1) carrierwave (>= 0.8.0, < 0.11.0) - mongoid (>= 3.0, < 5.0) + mongoid (>= 3.0, < 6.0) mongoid-grid_fs (>= 1.3, < 3.0) chronic (0.10.2) chunky_png (1.3.4) @@ -196,7 +207,6 @@ GEM compass (~> 1.0.0) sass-rails (<= 5.0.1) sprockets (< 2.13) - connection_pool (2.2.0) coveralls (0.7.12) multi_json (~> 1.10) rest-client (>= 1.6.8, < 2) @@ -213,12 +223,6 @@ GEM multi_test (>= 0.1.2) cucumber-core (1.3.0) gherkin3 (~> 3.1.0) - custom_fields (2.4.0.rc5) - activesupport (~> 4.2.1) - carrierwave-mongoid (~> 0.7.1) - monetize (~> 1.1.0) - mongoid (~> 4.0.2) - database_cleaner (1.4.1) debug_inspector (0.0.2) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) @@ -436,11 +440,13 @@ GEM money (~> 6.5.0) money (6.5.1) i18n (>= 0.6.4, <= 0.7.0) + mongo (2.1.1) + bson (~> 3.0) mongo_session_store-rails4 (6.0.0) actionpack (>= 3.1) - mongoid (4.0.2) + mongoid (5.0.0) activemodel (~> 4.0) - moped (~> 2.0.0) + mongo (~> 2.1) origin (~> 2.1) tzinfo (>= 0.3.37) mongoid-grid_fs (2.2.1) @@ -448,10 +454,6 @@ GEM mongoid (>= 3.0, < 6.0) mongoid-tree (2.0.1) mongoid (>= 4.0, < 6.0) - moped (2.0.7) - bson (~> 3.0) - connection_pool (~> 2.0) - optionable (~> 0.2.0) morphine (0.1.1) multi_json (1.11.2) multi_test (0.1.2) @@ -465,7 +467,6 @@ GEM nokogumbo (1.4.1) nokogiri nprogress-rails (0.1.6.7) - optionable (0.2.0) origin (2.1.1) orm_adapter (0.5.0) pickle (0.5.1) @@ -641,7 +642,8 @@ DEPENDENCIES capybara (~> 2.4.4) coffee-rails (~> 4.1.0) coveralls (~> 0.7.2) - database_cleaner (~> 1.4.1) + custom_fields! + database_cleaner! factory_girl_rails faye-websocket grape-entity-matchers diff --git a/app/models/locomotive/concerns/content_entry/csv.rb b/app/models/locomotive/concerns/content_entry/csv.rb index 7f7a2aca0a..14b671ee31 100644 --- a/app/models/locomotive/concerns/content_entry/csv.rb +++ b/app/models/locomotive/concerns/content_entry/csv.rb @@ -56,6 +56,10 @@ module ClassMethods # @return [ String ] The well-generated CSV document # def to_csv(options = {}) + puts "to_csv #{all.count.inspect} / #{all.first.inspect}" + puts "#{all.first.content_type_id.inspect}" + puts "#{all.first.content_type.inspect}" + binding.pry content_type = options.delete(:content_type) || all.first.try(:content_type) csv_options = options.select do |k, v| CSV::DEFAULT_OPTIONS.keys.include?(k.to_sym) diff --git a/app/models/locomotive/concerns/content_entry/slug.rb b/app/models/locomotive/concerns/content_entry/slug.rb index c4c037f91f..aab6f3dc64 100644 --- a/app/models/locomotive/concerns/content_entry/slug.rb +++ b/app/models/locomotive/concerns/content_entry/slug.rb @@ -65,8 +65,6 @@ def similar_slug(slug) _last = self.class.where(:_id.ne => self._id, _slug: /^#{slug}-?\d*$/i) .only(:_slug) .order_by(:_id.desc) - .context - .query .first if _last diff --git a/app/models/locomotive/concerns/page/templatized.rb b/app/models/locomotive/concerns/page/templatized.rb index 4e0f9adfd6..23694a5b9c 100644 --- a/app/models/locomotive/concerns/page/templatized.rb +++ b/app/models/locomotive/concerns/page/templatized.rb @@ -199,7 +199,7 @@ def propagate_templatized } } - self.collection.find(selector).update(operations, multi: true) + self.collection.find(selector).update_many(operations) end end diff --git a/lib/locomotive/dependencies.rb b/lib/locomotive/dependencies.rb index 0b9e9de4dd..81c980e5ff 100644 --- a/lib/locomotive/dependencies.rb +++ b/lib/locomotive/dependencies.rb @@ -1,5 +1,5 @@ require 'bson' -require 'moped' +require 'mongo' require 'mongoid' require 'mongoid/railtie' require 'mongoid/tree' diff --git a/lib/locomotive/mongoid/patches.rb b/lib/locomotive/mongoid/patches.rb index d1da39b60c..9f32e7b657 100644 --- a/lib/locomotive/mongoid/patches.rb +++ b/lib/locomotive/mongoid/patches.rb @@ -98,7 +98,7 @@ def indexed_max(field) fields = _criteria.options[:fields] sort = _criteria.options[:sort] - document = collection.find(selector).select(fields).sort(sort).limit(1).first + document = collection.find(selector).projection(fields).sort(sort).limit(1).first document ? document[field.to_s].to_i : nil end diff --git a/lib/locomotive/steam_adaptor.rb b/lib/locomotive/steam_adaptor.rb index 7e2dcdab24..1fbec3d81a 100644 --- a/lib/locomotive/steam_adaptor.rb +++ b/lib/locomotive/steam_adaptor.rb @@ -14,7 +14,7 @@ end # rely on Mongoid for the connection information - if mongoid = Mongoid.configure.sessions[:default] + if mongoid = Mongoid.configure.clients[:default] options = mongoid[:uri] ? mongoid.slice(:uri) : mongoid.slice(:database, :hosts, :username, :password) config.adapter = { name: :'mongoDB' }.merge(options.symbolize_keys) end diff --git a/locomotive_cms.gemspec b/locomotive_cms.gemspec index 0266c944f3..cb36063bb6 100755 --- a/locomotive_cms.gemspec +++ b/locomotive_cms.gemspec @@ -29,14 +29,14 @@ Gem::Specification.new do |s| s.add_dependency 'pundit', '~> 1.0.0' - s.add_dependency 'mongoid', '~> 4.0.2' + s.add_dependency 'mongoid', '~> 5.0.0' s.add_dependency 'mongoid-tree', '~> 2.0.1' s.add_dependency 'mongo_session_store-rails4', '~> 6.0.0' s.add_dependency 'mime-types', '~> 2.5' - s.add_dependency 'custom_fields', '~> 2.4.0.rc5' + # s.add_dependency 'custom_fields', '~> 2.4.0.rc5' - s.add_dependency 'locomotivecms_steam', '~> 1.0.0-beta.3' + # s.add_dependency 'locomotivecms_steam', '~> 1.0.0-beta.3' s.add_dependency 'slim', '~> 3.0.6' s.add_dependency 'simple_form', '~> 3.2.0' @@ -61,7 +61,7 @@ Gem::Specification.new do |s| s.add_dependency 'stringex', '~> 2.5.2' s.add_dependency 'bazaar', '~> 0.0.2' - s.add_dependency 'carrierwave-mongoid', '~> 0.7.1' + s.add_dependency 'carrierwave-mongoid', '~> 0.8.1' s.add_dependency 'fog', '~> 1.34.0' s.add_dependency 'dragonfly', '~> 1.0.7' s.add_dependency 'rack-cache', '~> 1.1' diff --git a/spec/dummy/config/mongoid.yml b/spec/dummy/config/mongoid.yml index cc279429cd..4a093af0ea 100644 --- a/spec/dummy/config/mongoid.yml +++ b/spec/dummy/config/mongoid.yml @@ -1,48 +1,116 @@ development: - # Configure available database sessions. (required) - sessions: - # Defines the default session. (required) + # Configure available database clients. (required) + clients: + # Defines the default client. (required) default: # Defines the name of the default database that Mongoid can connect to. # (required). # database: locomotive_engine_wagon_dev database: locomotive_engine_dev - # Provides the hosts the default session can connect to. Must be an array + # Provides the hosts the default client can connect to. Must be an array # of host:port pairs. (required) hosts: - localhost:27017 - # uri: 'mongodb://localhost:27017/locomotive_engine_coal_dev' options: - # Change whether the session persists in safe mode by default. - # (default: false) - # safe: false - - # Change the default consistency model to :eventual or :strong. - # :eventual will send reads to secondaries, :strong sends everything - # to master. (default: :eventual) - # consistency: :strong - # Configure Mongoid specific options. (optional) - options: - # Configuration for whether or not to allow access to fields that do - # not have a field definition on the model. (default: true) - # allow_dynamic_fields: true + # Change the default write concern. (default = { w: 1 }) + # write: + # w: 1 + + # Change the default read preference. Valid options for mode are: :secondary, + # :secondary_preferred, :primary, :primary_preferred, :nearest + # (default: primary) + # read: + # mode: :secondary_preferred + + # The name of the user for authentication. + # user: 'user' + + # The password of the user for authentication. + # password: 'password' + + # The user's database roles. + # roles: + # - 'dbOwner' + + # Change the default authentication mechanism. Valid options are: :scram, + # :mongodb_cr, :mongodb_x509, and :plain. (default on 3.0 is :scram, default + # on 2.4 and 2.6 is :plain) + # auth_mech: :scram + + # The database or source to authenticate the user against. (default: admin) + # auth_source: admin + + # Force a the driver cluster to behave in a certain manner instead of auto- + # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct + # when connecting to hidden members of a replica set. + # connect: :direct + + # Changes the default time in seconds the server monitors refresh their status + # via ismaster commands. (default: 10) + # heartbeat_frequency: 10 + + # The time in seconds for selecting servers for a near read preference. (default: 5) + # local_threshold: 5 + + # The timeout in seconds for selecting a server for an operation. (default: 30) + # server_selection_timeout: 30 + + # The maximum number of connections in the connection pool. (default: 5) + # max_pool_size: 5 + + # The minimum number of connections in the connection pool. (default: 1) + # min_pool_size: 1 + + # The time to wait, in seconds, in the connection pool for a connection + # to be checked in before timing out. (default: 5) + # wait_queue_timeout: 5 + + # The time to wait to establish a connection before timing out, in seconds. + # (default: 5) + # connect_timeout: 5 + + # The timeout to wait to execute operations on a socket before raising an error. + # (default: 5) + # socket_timeout: 5 + + # The name of the replica set to connect to. Servers provided as seeds that do + # not belong to this replica set will be ignored. + # replica_set: name + + # Whether to connect to the servers via ssl. (default: false) + # ssl: true + + # The certificate file used to identify the connection against MongoDB. + # ssl_cert: /path/to/my.cert - # Enable the identity map, needed for eager loading. (default: false) - # identity_map_enabled: true + # The private keyfile used to identify the connection against MongoDB. + # Note that even if the key is stored in the same file as the certificate, + # both need to be explicitly specified. + # ssl_key: /path/to/my.key + # A passphrase for the private key. + # ssl_key_pass_phrase: password + + # Whether or not to do peer certification validation. (default: false) + # ssl_verify: true + + # The file containing a set of concatenated certification authority certifications + # used to validate certs passed from the other end of the connection. + # ssl_ca_cert: /path/to/ca.cert + + + # Configure Mongoid specific options. (optional) + options: # Includes the root model name in json serialization. (default: false) # include_root_in_json: false - # Include the _type field in serializaion. (default: false) + # Include the _type field in serialization. (default: false) # include_type_for_serialization: false # Preload all models in development, needed when models use # inheritance. (default: false) # preload_models: false - # Protect id and type from mass assignment. (default: true) - # protect_sensitive_fields: true - # Raise an error when performing a #find and the document is not found. # (default: true) # raise_not_found_error: true @@ -51,67 +119,16 @@ development: # existing method. (default: false) # scope_overwrite_exception: false - # Skip the database version check, used when connecting to a db without - # admin access. (default: false) - # skip_version_check: false - - # User Active Support's time zone in conversions. (default: true) + # Use Active Support's time zone in conversions. (default: true) # use_activesupport_time_zone: true # Ensure all times are UTC in the app side. (default: false) # use_utc: false - -profile: - sessions: - default: - database: locomotive_engine_profile - hosts: - - localhost:27017 - options: - # consistency: :strong - # identity_map_enabled: true - test: - sessions: + clients: default: database: locomotive_engine_test hosts: - localhost:27017 options: - # consistency: :strong - # identity_map_enabled: true - -production: - sessions: - default: - database: locomotive_engine_prod - hosts: - - localhost:27017 - options: - # consistency: :strong - # identity_map_enabled: true - - -# defaults: &defaults -# host: localhost -# port: 27017 -# # slaves: -# # - host: slave1.local -# # port: 27018 -# # - host: slave2.local -# # port: 27019 - -# development: -# <<: *defaults -# database: locomotive_engine_dev -# identity_map_enabled: true - -# test: -# <<: *defaults -# database: locomotive_engine_test -# identity_map_enabled: true - -# production: -# <<: *defaults -# identity_map_enabled: true -# database: locomotive_engine_production + max_pool_size: 1 diff --git a/spec/dummy/config/mongoid_4_0_0.yml b/spec/dummy/config/mongoid_4_0_0.yml new file mode 100644 index 0000000000..cc279429cd --- /dev/null +++ b/spec/dummy/config/mongoid_4_0_0.yml @@ -0,0 +1,117 @@ +development: + # Configure available database sessions. (required) + sessions: + # Defines the default session. (required) + default: + # Defines the name of the default database that Mongoid can connect to. + # (required). + # database: locomotive_engine_wagon_dev + database: locomotive_engine_dev + # Provides the hosts the default session can connect to. Must be an array + # of host:port pairs. (required) + hosts: + - localhost:27017 + # uri: 'mongodb://localhost:27017/locomotive_engine_coal_dev' + options: + # Change whether the session persists in safe mode by default. + # (default: false) + # safe: false + + # Change the default consistency model to :eventual or :strong. + # :eventual will send reads to secondaries, :strong sends everything + # to master. (default: :eventual) + # consistency: :strong + # Configure Mongoid specific options. (optional) + options: + # Configuration for whether or not to allow access to fields that do + # not have a field definition on the model. (default: true) + # allow_dynamic_fields: true + + # Enable the identity map, needed for eager loading. (default: false) + # identity_map_enabled: true + + # Includes the root model name in json serialization. (default: false) + # include_root_in_json: false + + # Include the _type field in serializaion. (default: false) + # include_type_for_serialization: false + + # Preload all models in development, needed when models use + # inheritance. (default: false) + # preload_models: false + + # Protect id and type from mass assignment. (default: true) + # protect_sensitive_fields: true + + # Raise an error when performing a #find and the document is not found. + # (default: true) + # raise_not_found_error: true + + # Raise an error when defining a scope with the same name as an + # existing method. (default: false) + # scope_overwrite_exception: false + + # Skip the database version check, used when connecting to a db without + # admin access. (default: false) + # skip_version_check: false + + # User Active Support's time zone in conversions. (default: true) + # use_activesupport_time_zone: true + + # Ensure all times are UTC in the app side. (default: false) + # use_utc: false + +profile: + sessions: + default: + database: locomotive_engine_profile + hosts: + - localhost:27017 + options: + # consistency: :strong + # identity_map_enabled: true + +test: + sessions: + default: + database: locomotive_engine_test + hosts: + - localhost:27017 + options: + # consistency: :strong + # identity_map_enabled: true + +production: + sessions: + default: + database: locomotive_engine_prod + hosts: + - localhost:27017 + options: + # consistency: :strong + # identity_map_enabled: true + + +# defaults: &defaults +# host: localhost +# port: 27017 +# # slaves: +# # - host: slave1.local +# # port: 27018 +# # - host: slave2.local +# # port: 27019 + +# development: +# <<: *defaults +# database: locomotive_engine_dev +# identity_map_enabled: true + +# test: +# <<: *defaults +# database: locomotive_engine_test +# identity_map_enabled: true + +# production: +# <<: *defaults +# identity_map_enabled: true +# database: locomotive_engine_production diff --git a/spec/models/locomotive/content_entry_spec.rb b/spec/models/locomotive/content_entry_spec.rb index f6e14bddca..3dd639c0e3 100644 --- a/spec/models/locomotive/content_entry_spec.rb +++ b/spec/models/locomotive/content_entry_spec.rb @@ -163,13 +163,13 @@ context 'set of entries' do before(:each) do - @content_type.save + @content_type.save! 3.times { build_content_entry(file: FixturedAsset.open('5k.png')).save! } end subject { @content_type.ordered_entries.to_csv(host: 'example.com').split("\n") } - it { expect(subject.size).to eq(4) } + it { puts @content_type.ordered_entries.first.content_type.inspect; expect(subject.size).to eq(4) } it { expect(subject.first).to eq("Title,Description,Visible ?,File,Published at,Created at") } it { expect(subject.last).to match(/^Locomotive,Lorem ipsum....,false,http:\/\/example.com\/sites\/[0-9a-f]+\/content_entry[0-9a-f]+\/[0-9a-f]+\/files\/5k.png,\"\",\"July 05, 2013 00:00\"$/) } @@ -388,12 +388,12 @@ end - it_should_behave_like 'model scoped by a site' do + # it_should_behave_like 'model scoped by a site' do - let(:model) { build_content_entry } - let(:attribute) { :content_version } + # let(:model) { build_content_entry } + # let(:attribute) { :content_version } - end + # end def localize_content_type(content_type) content_type.entries_custom_fields.first.localized = true diff --git a/spec/support/mongoid.rb b/spec/support/mongoid.rb new file mode 100644 index 0000000000..5d66d8283b --- /dev/null +++ b/spec/support/mongoid.rb @@ -0,0 +1,2 @@ +Mongoid.logger.level = Logger::DEBUG +Mongo::Logger.logger.level = Logger::DEBUG