Skip to content

Commit

Permalink
specs are failing because of https://jira.mongodb.org/browse/MONGOID-…
Browse files Browse the repository at this point in the history
  • Loading branch information
did committed Oct 10, 2015
1 parent 68ccc37 commit 53f82ac
Show file tree
Hide file tree
Showing 14 changed files with 287 additions and 146 deletions.
1 change: 1 addition & 0 deletions .rspec
@@ -1 +1,2 @@
--colour
--format documentation
8 changes: 4 additions & 4 deletions Gemfile
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
98 changes: 50 additions & 48 deletions 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: .
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -436,22 +440,20 @@ 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)
mime-types (>= 1.0, < 3.0)
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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions app/models/locomotive/concerns/content_entry/csv.rb
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions app/models/locomotive/concerns/content_entry/slug.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/models/locomotive/concerns/page/templatized.rb
Expand Up @@ -199,7 +199,7 @@ def propagate_templatized
}
}

self.collection.find(selector).update(operations, multi: true)
self.collection.find(selector).update_many(operations)
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/locomotive/dependencies.rb
@@ -1,5 +1,5 @@
require 'bson'
require 'moped'
require 'mongo'
require 'mongoid'
require 'mongoid/railtie'
require 'mongoid/tree'
Expand Down
2 changes: 1 addition & 1 deletion lib/locomotive/mongoid/patches.rb
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/locomotive/steam_adaptor.rb
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions locomotive_cms.gemspec
Expand Up @@ -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'
Expand All @@ -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'
Expand Down

0 comments on commit 53f82ac

Please sign in to comment.