spree 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spree might be problematic. Click here for more details.

data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.4.1
2
+
3
+ * #94 - User must be logged in to empty cart
4
+ * #89 - Cannot run specs for custom extensions
5
+ * #88 - Gateway Configuration Gives Error
6
+
1
7
  == 0.4.0
2
8
 
3
9
  * Initial support for initialization
@@ -5,7 +5,7 @@
5
5
  # ENV['RAILS_ENV'] ||= 'production'
6
6
 
7
7
  # Specifies gem version of Rails to use when vendor/rails is not present
8
- SPREE_GEM_VERSION = '0.4.0' unless defined? SPREE_GEM_VERSION
8
+ SPREE_GEM_VERSION = '0.4.1' unless defined? SPREE_GEM_VERSION
9
9
  RAILS_GEM_VERSION = "2.1.0" unless defined? RAILS_GEM_VERSION
10
10
 
11
11
  # Bootstrap the Rails environment, frameworks, and default configuration
@@ -9,23 +9,13 @@ module Spree
9
9
  base.class_eval do
10
10
  alias :draw_without_plugin_routes :draw
11
11
  alias :draw :draw_with_plugin_routes
12
- alias :rails_reload :reload
13
- alias :reload :force_reload
14
12
  end
15
13
  end
16
14
 
17
- def force_reload
18
- if RAILS_ENV == 'development'
19
- load!
20
- else
21
- rails_reload
22
- end
23
- end
24
-
25
15
  def draw_with_plugin_routes
26
16
  draw_without_plugin_routes do |mapper|
27
- yield mapper
28
17
  add_extension_routes(mapper)
18
+ yield mapper
29
19
  end
30
20
  end
31
21
 
@@ -9,7 +9,7 @@ unless defined? Spree::Version
9
9
  module Version
10
10
  Major = '0'
11
11
  Minor = '4'
12
- Tiny = '0'
12
+ Tiny = '1'
13
13
 
14
14
  class << self
15
15
  def to_s
@@ -81,9 +81,22 @@ namespace :db do
81
81
  end
82
82
 
83
83
  namespace :spec do
84
- desc "Runs specs on all available Spree extensions, pass EXT=extension_name to test a single extension"
84
+ desc "Runs specs on all available extensions in the current /vendor/extensions directory, pass EXT=extension_name to test a single extension"
85
85
  task :extensions => "db:test:prepare" do
86
- extension_roots = Spree::Extension.descendants.map(&:root)
86
+
87
+ current_extensions_path = File.join(File.expand_path(Dir.pwd), 'vendor/extensions')
88
+ all_extension_names = Spree::Extension.descendants
89
+ all_extension_names.collect!{ |x| x.extension_name.tr(' ', '').underscore }
90
+ verified_extension_paths = []
91
+
92
+ all_extension_names.each do |ext_name|
93
+ extension_path = File.join(current_extensions_path, ext_name)
94
+ if File.directory?(extension_path)
95
+ verified_extension_paths << extension_path
96
+ end
97
+ end
98
+
99
+ extension_roots = verified_extension_paths
87
100
  if ENV["EXT"]
88
101
  extension_roots = extension_roots.select {|x| /\/(\d+_)?#{ENV["EXT"]}$/ === x }
89
102
  if extension_roots.empty?
@@ -1,40 +1,65 @@
1
- # This file is copied to ~/spec when you run 'ruby script/generate rspec'
2
- # from the project root directory.
3
- ENV["RAILS_ENV"] = "test"
4
- require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
5
- require 'spec'
6
- require 'spec/rails'
7
- require File.expand_path(File.dirname(__FILE__) + "/preference_factory")
8
-
9
- Spec::Runner.configure do |config|
10
- # If you're not using ActiveRecord you should remove these
11
- # lines, delete config/database.yml and disable :active_record
12
- # in your config/boot.rb
13
- config.use_transactional_fixtures = true
14
- config.use_instantiated_fixtures = false
15
- config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
16
-
17
- # == Fixtures
18
- #
19
- # You can declare fixtures for each example_group like this:
20
- # describe "...." do
21
- # fixtures :table_a, :table_b
22
- #
23
- # Alternatively, if you prefer to declare them only once, you can
24
- # do so right here. Just uncomment the next line and replace the fixture
25
- # names with your fixtures.
26
- #
27
- # config.global_fixtures = :table_a, :table_b
28
- #
29
- # If you declare global fixtures, be aware that they will be declared
30
- # for all of your examples, even those that don't use them.
31
- #
32
- # == Mock Framework
33
- #
34
- # RSpec uses it's own mocking framework by default. If you prefer to
35
- # use mocha, flexmock or RR, uncomment the appropriate line:
36
- #
37
- # config.mock_with :mocha
38
- # config.mock_with :flexmock
39
- # config.mock_with :rr
1
+ unless defined? SPEC_ROOT
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ SPEC_ROOT = File.expand_path(File.dirname(__FILE__))
5
+
6
+ unless defined? SPREE_ROOT
7
+ if env_file = ENV["SPREE_ENV_FILE"]
8
+ require env_file
9
+ else
10
+ require File.expand_path(SPEC_ROOT + "/../config/environment")
11
+ end
12
+ end
13
+ require 'spec'
14
+ require 'spec/rails'
15
+ # require 'scenarios'
16
+ require File.expand_path(File.dirname(__FILE__) + "/preference_factory")
17
+
18
+ class Test::Unit::TestCase
19
+ class << self
20
+ # Class method for test helpers
21
+ def test_helper(*names)
22
+ names.each do |name|
23
+ name = name.to_s
24
+ name = $1 if name =~ /^(.*?)_test_helper$/i
25
+ name = name.singularize
26
+ first_time = true
27
+ begin
28
+ constant = (name.camelize + 'TestHelper').constantize
29
+ self.class_eval { include constant }
30
+ rescue NameError
31
+ filename = File.expand_path(SPEC_ROOT + '/../test/helpers/' + name + '_test_helper.rb')
32
+ require filename if first_time
33
+ first_time = false
34
+ retry
35
+ end
36
+ end
37
+ end
38
+ alias :test_helpers :test_helper
39
+ end
40
+ end
41
+
42
+ Dir[SPREE_ROOT + '/spec/matchers/*_matcher.rb'].each do |matcher|
43
+ require matcher
44
+ end
45
+
46
+ # Scenario.load_paths.unshift "#{SPREE_ROOT}/spec/scenarios"
47
+
48
+ Spec::Runner.configure do |config|
49
+ config.use_transactional_fixtures = true
50
+ config.use_instantiated_fixtures = false
51
+ config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
52
+
53
+ # You can declare fixtures for each behaviour like this:
54
+ # describe "...." do
55
+ # fixtures :table_a, :table_b
56
+ #
57
+ # Alternatively, if you prefer to declare them only once, you can
58
+ # do so here, like so ...
59
+ #
60
+ # config.global_fixtures = :table_a, :table_b
61
+ #
62
+ # If you declare global fixtures, be aware that they will be declared
63
+ # for all of your examples, even those that don't use them.
64
+ end
40
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -9,7 +9,7 @@ autorequire: spree
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-02 00:00:00 -04:00
12
+ date: 2008-10-14 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -2053,7 +2053,6 @@ files:
2053
2053
  - vendor/plugins/resource_controller/test/test/unit/something_test.rb
2054
2054
  - vendor/plugins/resource_controller/test/test/unit/tag_test.rb
2055
2055
  - vendor/plugins/resource_controller/test/test/unit/urligence_test.rb
2056
- - vendor/plugins/resource_controller/test/tmp
2057
2056
  - vendor/plugins/resource_controller/test/vendor
2058
2057
  - vendor/plugins/resource_controller/test/vendor/plugins
2059
2058
  - vendor/plugins/resource_controller/test/vendor/plugins/shoulda
@@ -2809,6 +2808,8 @@ rdoc_options:
2809
2808
  - --exclude
2810
2809
  - log
2811
2810
  - --exclude
2811
+ - pkg
2812
+ - --exclude
2812
2813
  - public
2813
2814
  - --exclude
2814
2815
  - script