diff --git a/Gemfile b/Gemfile index c0ce8601..3578fbdd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,22 +1,22 @@ source 'http://rubygems.org' -gem 'rails', '3.0.0.beta4' +gem 'rails', '3.0.0' gem 'sqlite3-ruby', :require => 'sqlite3' -gem 'haml', '>= 3.0.0' +gem 'haml', '~> 3.0.18' -gem 'will_paginate', :git => 'http://github.com/mislav/will_paginate.git', :branch => 'rails3' +gem 'will_paginate', '~> 3.0.pre2' -gem 'rdiscount' +gem 'rdiscount', '~> 1.6.5' -gem 'compass', '>= 0.10.1' +gem 'compass', '~> 0.10.1' group :development do gem 'mysql' end group :test do - gem 'rspec-rails', '>= 2.0.0.beta.8' - gem 'factory_girl_rails' + gem 'rspec-rails', '~> 2.0.0.beta.22' + gem 'factory_girl_rails', '~> 1.0' end diff --git a/Gemfile.lock b/Gemfile.lock index 7c475e15..b2a42b57 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,131 +1,103 @@ ---- -hash: a126f60340d5ff8894e44c49aca44bfd89843564 -sources: -- Git: - git: http://github.com/mislav/will_paginate.git - branch: rails3 - uri: http://github.com/mislav/will_paginate.git - ref: 60aa1c7b2ef03ee7c7a5ed657efb479a69f7d128 -- Rubygems: - uri: http://rubygems.org -specs: -- rake: - version: 0.8.7 -- abstract: - version: 1.0.0 -- activesupport: - version: 3.0.0.beta4 -- builder: - version: 2.1.2 -- i18n: - version: 0.4.1 -- activemodel: - version: 3.0.0.beta4 -- erubis: - version: 2.6.6 -- rack: - version: 1.1.0 -- rack-mount: - version: 0.6.6 -- rack-test: - version: 0.5.4 -- tzinfo: - version: 0.3.22 -- actionpack: - version: 3.0.0.beta4 -- mime-types: - version: "1.16" -- polyglot: - version: 0.3.1 -- treetop: - version: 1.4.8 -- mail: - version: 2.2.5 -- actionmailer: - version: 3.0.0.beta4 -- arel: - version: 0.4.0 -- activerecord: - version: 3.0.0.beta4 -- activeresource: - version: 3.0.0.beta4 -- bundler: - version: 0.9.26 -- haml: - version: 3.0.17 -- compass: - version: 0.10.4 -- diff-lcs: - version: 1.1.2 -- factory_girl: - version: 1.3.1 -- thor: - version: 0.13.7 -- railties: - version: 3.0.0.beta4 -- rails: - version: 3.0.0.beta4 -- factory_girl_rails: - version: "1.0" -- mysql: - version: 2.8.1 -- nokogiri: - version: 1.4.3.1 -- rdiscount: - version: 1.6.5 -- rspec-core: - version: 2.0.0.beta.16 -- rspec-expectations: - version: 2.0.0.beta.16 -- rspec-mocks: - version: 2.0.0.beta.16 -- rspec: - version: 2.0.0.beta.16 -- webrat: - version: 0.7.1 -- rspec-rails: - version: 2.0.0.beta.16 -- sqlite3-ruby: - version: 1.3.1 -- will_paginate: - version: 3.0.pre - source: 0 -dependencies: - rails: - version: = 3.0.0.beta4 - group: - - :default - sqlite3-ruby: - version: ">= 0" - group: - - :default - require: - - sqlite3 - haml: - version: ">= 3.0.0" - group: - - :default - will_paginate: - version: ">= 0" - group: - - :default - rdiscount: - version: ">= 0" - group: - - :default - compass: - version: ">= 0.10.1" - group: - - :default - mysql: - version: ">= 0" - group: - - :development - rspec-rails: - version: ">= 2.0.0.beta.8" - group: - - :test - factory_girl_rails: - version: ">= 0" - group: - - :test +GEM + remote: http://rubygems.org/ + specs: + abstract (1.0.0) + actionmailer (3.0.0) + actionpack (= 3.0.0) + mail (~> 2.2.5) + actionpack (3.0.0) + activemodel (= 3.0.0) + activesupport (= 3.0.0) + builder (~> 2.1.2) + erubis (~> 2.6.6) + i18n (~> 0.4.1) + rack (~> 1.2.1) + rack-mount (~> 0.6.12) + rack-test (~> 0.5.4) + tzinfo (~> 0.3.23) + activemodel (3.0.0) + activesupport (= 3.0.0) + builder (~> 2.1.2) + i18n (~> 0.4.1) + activerecord (3.0.0) + activemodel (= 3.0.0) + activesupport (= 3.0.0) + arel (~> 1.0.0) + tzinfo (~> 0.3.23) + activeresource (3.0.0) + activemodel (= 3.0.0) + activesupport (= 3.0.0) + activesupport (3.0.0) + arel (1.0.1) + activesupport (~> 3.0.0) + builder (2.1.2) + compass (0.10.5) + haml (>= 3.0.4) + diff-lcs (1.1.2) + erubis (2.6.6) + abstract (>= 1.0.0) + factory_girl (1.3.2) + factory_girl_rails (1.0) + factory_girl (~> 1.3) + rails (>= 3.0.0.beta4) + haml (3.0.21) + i18n (0.4.1) + mail (2.2.6.1) + activesupport (>= 2.3.6) + mime-types + treetop (>= 1.4.5) + mime-types (1.16) + mysql (2.8.1) + polyglot (0.3.1) + rack (1.2.1) + rack-mount (0.6.13) + rack (>= 1.0.0) + rack-test (0.5.6) + rack (>= 1.0) + rails (3.0.0) + actionmailer (= 3.0.0) + actionpack (= 3.0.0) + activerecord (= 3.0.0) + activeresource (= 3.0.0) + activesupport (= 3.0.0) + bundler (~> 1.0.0) + railties (= 3.0.0) + railties (3.0.0) + actionpack (= 3.0.0) + activesupport (= 3.0.0) + rake (>= 0.8.4) + thor (~> 0.14.0) + rake (0.8.7) + rdiscount (1.6.5) + rspec (2.0.0.beta.22) + rspec-core (= 2.0.0.beta.22) + rspec-expectations (= 2.0.0.beta.22) + rspec-mocks (= 2.0.0.beta.22) + rspec-core (2.0.0.beta.22) + rspec-expectations (2.0.0.beta.22) + diff-lcs (>= 1.1.2) + rspec-mocks (2.0.0.beta.22) + rspec-core (= 2.0.0.beta.22) + rspec-expectations (= 2.0.0.beta.22) + rspec-rails (2.0.0.beta.22) + rspec (= 2.0.0.beta.22) + sqlite3-ruby (1.3.1) + thor (0.14.2) + treetop (1.4.8) + polyglot (>= 0.3.1) + tzinfo (0.3.23) + will_paginate (3.0.pre2) + +PLATFORMS + ruby + +DEPENDENCIES + compass (~> 0.10.1) + factory_girl_rails (~> 1.0) + haml (~> 3.0.18) + mysql + rails (= 3.0.0) + rdiscount (~> 1.6.5) + rspec-rails (~> 2.0.0.beta.22) + sqlite3-ruby + will_paginate (~> 3.0.pre2) diff --git a/Rakefile b/Rakefile index 9cb20464..fb3c6050 100644 --- a/Rakefile +++ b/Rakefile @@ -7,4 +7,4 @@ require 'rake' require 'rake/testtask' require 'rake/rdoctask' -Rails::Application.load_tasks +OpenneoImpressItems::Application.load_tasks diff --git a/config/environments/development.rb b/config/environments/development.rb index f7a5b528..3a320a36 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -16,6 +16,8 @@ OpenneoImpressItems::Application.configure do # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false + + config.active_support.deprecation = :log end RemoteImpressHost = 'beta.impress.openneo.net' diff --git a/config/environments/production.rb b/config/environments/production.rb index 9468321e..45a88589 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -39,6 +39,8 @@ OpenneoImpressItems::Application.configure do # Enable threaded mode # config.threadsafe! + + config.active_support.deprecation = :log end RemoteImpressHost = 'impress.openneo.net' diff --git a/config/environments/test.rb b/config/environments/test.rb index e56e3b4b..beff96cf 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -26,6 +26,8 @@ OpenneoImpressItems::Application.configure do # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql + + config.active_support.deprecation = :stderr end RemoteImpressHost = 'impress.openneo.net' diff --git a/config/initializers/compass.rb b/config/initializers/compass.rb index 4375914d..d24ab3ab 100644 --- a/config/initializers/compass.rb +++ b/config/initializers/compass.rb @@ -1,5 +1,5 @@ require 'compass' -rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s -Compass.add_project_configuration(File.join(rails_root, "config", "compass.rb")) +rails_root = Rails.root.to_s +Compass.add_project_configuration(Rails.root.join(rails_root, "config", "compass.rb")) Compass.configure_sass_plugin! Compass.handle_configuration_change! diff --git a/config/initializers/cookie_verification_secret.rb b/config/initializers/cookie_verification_secret.rb index 0379f066..3497703e 100644 --- a/config/initializers/cookie_verification_secret.rb +++ b/config/initializers/cookie_verification_secret.rb @@ -4,4 +4,4 @@ # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -Rails.application.config.cookie_secret = '03a62dcef9d831912de9f0c1815e6226981b880195184893803ae0d3c4e696c52102f2deb611ccbeb2c7b90bd9d30a78c7fad62fec908a20d048449e6d10b7f9' +Rails.application.config.secret_token = '03a62dcef9d831912de9f0c1815e6226981b880195184893803ae0d3c4e696c52102f2deb611ccbeb2c7b90bd9d30a78c7fad62fec908a20d048449e6d10b7f9' diff --git a/spec/models/item_spec.rb b/spec/models/item_spec.rb index ea1bf4db..dc55883d 100644 --- a/spec/models/item_spec.rb +++ b/spec/models/item_spec.rb @@ -24,6 +24,8 @@ describe Item do end specify "should have many swf_assets through parent_swf_asset_relationships" do + SwfAsset.delete_all + ParentSwfAssetRelationship.delete_all 3.times do |n| swf_asset = Factory.create :swf_asset, :id => n, :url => "http://images.neopets.com/#{n}.swf", :type => 'object' ParentSwfAssetRelationship.create :swf_asset => swf_asset, :item => @item, :swf_asset_type => 'object' @@ -39,6 +41,10 @@ describe Item do end context "class" do + before :each do + Item.delete_all # don't want search returning results from previous tests + end + specify "should search name for word" do query_should 'blue', :return => [ @@ -160,10 +166,10 @@ describe Item do Factory.create :item, :name => 'not mall', :rarity_index => 400 Factory.create :item, :name => 'also not mall', :rarity_index => 101 Item.search('is:nc').map(&:name).should == ['mall', 'also mall', 'only mall'] - Item.search('!is:nc').map(&:name).should == ['not mall', 'also not mall'] + Item.search('-is:nc').map(&:name).should == ['not mall', 'also not mall'] end - specify "is:(anything but 'nc') should throw ArgumentError" do + specify "is:[not 'nc' or 'pb'] should throw ArgumentError" do lambda { Item.search('is:nc') }.should_not raise_error(ArgumentError) lambda { Item.search('is:awesome') }.should raise_error(ArgumentError) end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 65b115b6..26b9118a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -23,7 +23,7 @@ Rspec.configure do |config| # config.use_transactional_examples = false def query_should(query, sets) - sets = sets.each { |k,v| sets[k] = v.map { |x| x.is_a?(Array) ? x : [x, ''] } } + sets.each { |k,v| sets[k] = v.map { |x| x.is_a?(Array) ? x : [x, ''] } } all_sets = sets[:return] + sets[:not_return] all_sets.each { |s| Factory.create :item, :name => s[0], :description => s[1]} returned_sets = Item.search(query).all.map { |i| [i.name, i.description] }.sort diff --git a/test/factories/item.rb b/test/factories/item.rb index 24513e69..cd71bef3 100644 --- a/test/factories/item.rb +++ b/test/factories/item.rb @@ -11,5 +11,5 @@ Factory.define :item do |i| i.weight_lbs 0 i.species_support_ids '' i.sold_in_mall false - i.last_spidered 0 + i.last_spidered Time.now end diff --git a/vendor/cache/actionmailer-3.0.0.beta4.gem b/vendor/cache/actionmailer-3.0.0.beta4.gem deleted file mode 100644 index a200ea38..00000000 Binary files a/vendor/cache/actionmailer-3.0.0.beta4.gem and /dev/null differ diff --git a/vendor/cache/actionpack-3.0.0.beta4.gem b/vendor/cache/actionpack-3.0.0.beta4.gem deleted file mode 100644 index c5ec7dea..00000000 Binary files a/vendor/cache/actionpack-3.0.0.beta4.gem and /dev/null differ diff --git a/vendor/cache/activemodel-3.0.0.beta4.gem b/vendor/cache/activemodel-3.0.0.beta4.gem deleted file mode 100644 index 7d3e0c4f..00000000 Binary files a/vendor/cache/activemodel-3.0.0.beta4.gem and /dev/null differ diff --git a/vendor/cache/activerecord-3.0.0.beta4.gem b/vendor/cache/activerecord-3.0.0.beta4.gem deleted file mode 100644 index b2a9525b..00000000 Binary files a/vendor/cache/activerecord-3.0.0.beta4.gem and /dev/null differ diff --git a/vendor/cache/activeresource-3.0.0.beta4.gem b/vendor/cache/activeresource-3.0.0.beta4.gem deleted file mode 100644 index b9c807be..00000000 Binary files a/vendor/cache/activeresource-3.0.0.beta4.gem and /dev/null differ diff --git a/vendor/cache/activesupport-3.0.0.beta4.gem b/vendor/cache/activesupport-3.0.0.beta4.gem deleted file mode 100644 index 0e3d26c2..00000000 Binary files a/vendor/cache/activesupport-3.0.0.beta4.gem and /dev/null differ diff --git a/vendor/cache/arel-0.4.0.gem b/vendor/cache/arel-0.4.0.gem deleted file mode 100644 index 9967cf7c..00000000 Binary files a/vendor/cache/arel-0.4.0.gem and /dev/null differ diff --git a/vendor/cache/bundler-0.9.26.gem b/vendor/cache/bundler-0.9.26.gem deleted file mode 100644 index d4719e9c..00000000 Binary files a/vendor/cache/bundler-0.9.26.gem and /dev/null differ diff --git a/vendor/cache/compass-0.10.4.gem b/vendor/cache/compass-0.10.4.gem deleted file mode 100644 index c6448b99..00000000 Binary files a/vendor/cache/compass-0.10.4.gem and /dev/null differ diff --git a/vendor/cache/factory_girl-1.3.1.gem b/vendor/cache/factory_girl-1.3.1.gem deleted file mode 100644 index a36cfea4..00000000 Binary files a/vendor/cache/factory_girl-1.3.1.gem and /dev/null differ diff --git a/vendor/cache/haml-3.0.17.gem b/vendor/cache/haml-3.0.17.gem deleted file mode 100644 index eaf02cfd..00000000 Binary files a/vendor/cache/haml-3.0.17.gem and /dev/null differ diff --git a/vendor/cache/mail-2.2.5.gem b/vendor/cache/mail-2.2.5.gem deleted file mode 100644 index c65e21ce..00000000 Binary files a/vendor/cache/mail-2.2.5.gem and /dev/null differ diff --git a/vendor/cache/nokogiri-1.4.3.1.gem b/vendor/cache/nokogiri-1.4.3.1.gem deleted file mode 100644 index 72db7010..00000000 Binary files a/vendor/cache/nokogiri-1.4.3.1.gem and /dev/null differ diff --git a/vendor/cache/query_diet-0.2.0.gem b/vendor/cache/query_diet-0.2.0.gem deleted file mode 100644 index 8311fbad..00000000 Binary files a/vendor/cache/query_diet-0.2.0.gem and /dev/null differ diff --git a/vendor/cache/rack-1.1.0.gem b/vendor/cache/rack-1.1.0.gem deleted file mode 100644 index 4a73511e..00000000 Binary files a/vendor/cache/rack-1.1.0.gem and /dev/null differ diff --git a/vendor/cache/rack-mount-0.6.6.gem b/vendor/cache/rack-mount-0.6.6.gem deleted file mode 100644 index 4874fed5..00000000 Binary files a/vendor/cache/rack-mount-0.6.6.gem and /dev/null differ diff --git a/vendor/cache/rack-test-0.5.4.gem b/vendor/cache/rack-test-0.5.4.gem deleted file mode 100644 index f237608c..00000000 Binary files a/vendor/cache/rack-test-0.5.4.gem and /dev/null differ diff --git a/vendor/cache/rails-3.0.0.beta4.gem b/vendor/cache/rails-3.0.0.beta4.gem deleted file mode 100644 index 46b5d819..00000000 Binary files a/vendor/cache/rails-3.0.0.beta4.gem and /dev/null differ diff --git a/vendor/cache/railties-3.0.0.beta4.gem b/vendor/cache/railties-3.0.0.beta4.gem deleted file mode 100644 index a4d9a779..00000000 Binary files a/vendor/cache/railties-3.0.0.beta4.gem and /dev/null differ diff --git a/vendor/cache/rspec-2.0.0.beta.16.gem b/vendor/cache/rspec-2.0.0.beta.16.gem deleted file mode 100644 index ee1b77d8..00000000 Binary files a/vendor/cache/rspec-2.0.0.beta.16.gem and /dev/null differ diff --git a/vendor/cache/rspec-core-2.0.0.beta.16.gem b/vendor/cache/rspec-core-2.0.0.beta.16.gem deleted file mode 100644 index f875b63b..00000000 Binary files a/vendor/cache/rspec-core-2.0.0.beta.16.gem and /dev/null differ diff --git a/vendor/cache/rspec-expectations-2.0.0.beta.16.gem b/vendor/cache/rspec-expectations-2.0.0.beta.16.gem deleted file mode 100644 index 609191be..00000000 Binary files a/vendor/cache/rspec-expectations-2.0.0.beta.16.gem and /dev/null differ diff --git a/vendor/cache/rspec-mocks-2.0.0.beta.16.gem b/vendor/cache/rspec-mocks-2.0.0.beta.16.gem deleted file mode 100644 index 211bec59..00000000 Binary files a/vendor/cache/rspec-mocks-2.0.0.beta.16.gem and /dev/null differ diff --git a/vendor/cache/rspec-rails-2.0.0.beta.16.gem b/vendor/cache/rspec-rails-2.0.0.beta.16.gem deleted file mode 100644 index b86821d9..00000000 Binary files a/vendor/cache/rspec-rails-2.0.0.beta.16.gem and /dev/null differ diff --git a/vendor/cache/thor-0.13.7.gem b/vendor/cache/thor-0.13.7.gem deleted file mode 100644 index f4853f4f..00000000 Binary files a/vendor/cache/thor-0.13.7.gem and /dev/null differ diff --git a/vendor/cache/tzinfo-0.3.22.gem b/vendor/cache/tzinfo-0.3.22.gem deleted file mode 100644 index 64997649..00000000 Binary files a/vendor/cache/tzinfo-0.3.22.gem and /dev/null differ diff --git a/vendor/cache/webrat-0.7.1.gem b/vendor/cache/webrat-0.7.1.gem deleted file mode 100644 index 82a03b4f..00000000 Binary files a/vendor/cache/webrat-0.7.1.gem and /dev/null differ