spree_variant_options 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -4,5 +4,5 @@
4
4
  Gemfile.lock
5
5
  pkg/*
6
6
  public/tmp.html
7
- lib/dummy_hooks/after_migrate.rb
7
+ test/dummy_hooks/after_migrate.rb
8
8
  test/dummy
data/LICENSE CHANGED
@@ -1,25 +1,27 @@
1
- Copyright (c) 2011 Spencer Steffen and Citrus, released under the New BSD License All rights reserved.
1
+ Copyright (c) 2011 Spencer Steffen and Citrus Media Group.
2
+ All rights reserved.
2
3
 
3
- Redistribution and use in source and binary forms, with or without modification,
4
+ Redistribution and use in source and binary forms, with or without modification,
4
5
  are permitted provided that the following conditions are met:
5
6
 
6
- * Redistributions of source code must retain the above copyright notice,
7
+ * Redistributions of source code must retain the above copyright notice,
7
8
  this list of conditions and the following disclaimer.
8
- * Redistributions in binary form must reproduce the above copyright notice,
9
- this list of conditions and the following disclaimer in the documentation
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
10
12
  and/or other materials provided with the distribution.
11
- * Neither the name of the Rails Dog LLC nor the names of its
12
- contributors may be used to endorse or promote products derived from this
13
+
14
+ * Neither the name of Citrus Media Group nor the names of its
15
+ contributors may be used to endorse or promote products derived from this
13
16
  software without specific prior written permission.
14
17
 
15
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
27
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Spree Variant Options
2
2
  =====================
3
3
 
4
- Spree Variant Options is a very simple spree extension that groups your variants by option types and values. To get a better idea let's let a few images do the explaining.
4
+ Spree Variant Options is a very simple spree extension that replaces the radio-button variant selection with groups of option types and values. To get a better idea let's let a few images do the explaining.
5
5
 
6
6
 
7
7
  #### When no selection has been made:
@@ -24,7 +24,7 @@ If you don't already have an existing Spree site, [click here](https://gist.gith
24
24
 
25
25
  To install Spree Variant Options, just add the following to your Gemfile:
26
26
 
27
- gem 'spree_variant_options', '0.1.0'
27
+ gem 'spree_variant_options', '0.1.1'
28
28
 
29
29
 
30
30
  Now, bundle up with:
@@ -39,10 +39,14 @@ If you don't have a custom version of `_cart_form.html.erb` in your application,
39
39
  <%= render 'variant_options' %>
40
40
 
41
41
 
42
+ To tie spree_variant_options in with your product photos just delete your local copy of `product.js` or copy spree_variant_options' `product.js` to your local `public/javascripts` directory.
43
+
44
+
45
+
42
46
  Versions
43
47
  --------
44
48
 
45
- Spree Variant Options works on Spree 0.30.1 and above... Please let me know if you run into any issues.
49
+ Spree Variant Options works on Spree 0.30.x and above... Please let me know if you run into any issues.
46
50
 
47
51
 
48
52
  Testing
@@ -1,4 +1,4 @@
1
- "0.60.x" => { :version => "0.1.0" }
2
- "0.50.x" => { :version => "0.1.0" }
3
- "0.40.x" => { :version => "0.1.0" }
4
- "0.30.x" => { :version => "0.1.0" }
1
+ "0.60.x" => { :version => "0.1.1" }
2
+ "0.50.x" => { :version => "0.1.1" }
3
+ "0.40.x" => { :version => "0.1.1" }
4
+ "0.30.x" => { :version => "0.1.1" }
@@ -14,7 +14,7 @@
14
14
  <% if variants.empty? %>
15
15
  <% classes << "unavailable" %>
16
16
  <% else %>
17
- <% classes << (variants.sum(&:count_on_hand) < 1 ? "out-of-stock" : "in-stock") %>
17
+ <% classes << ( Spree::Config[:allow_backorders] || variants.sum(&:count_on_hand) > 0 ? "in-stock" : "out-of-stock" ) %>
18
18
  <% end %>
19
19
  <% end %>
20
20
  <li>
@@ -30,7 +30,7 @@
30
30
  <%= hidden_field_tag "products[#{@product.id}]", "", :id => "variant_id", :class => "hidden" %>
31
31
  <script type="text/javascript">
32
32
  //<![CDATA[
33
- var variant_options = new VariantOptions(<%== @product.variant_options_hash.to_json %>);
33
+ var variant_options = new VariantOptions(<%== @product.variant_options_hash.to_json %>, <%== Spree::Config[:allow_backorders] %>);
34
34
  //]]>
35
35
  </script>
36
36
 
@@ -6,3 +6,4 @@ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip
6
6
  default: <%= std_opts %> features
7
7
  wip: --tags @wip:3 --wip features
8
8
  rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
9
+ autocuke: --drb --format pretty --strict --tags @wip
@@ -8,14 +8,36 @@ def variant_by_descriptor(descriptor)
8
8
  @product.variants.includes(:option_values).select{|i| i.option_value_ids.sort == values.map(&:id) }.first
9
9
  end
10
10
 
11
+ def random_image
12
+ unless @sample_images
13
+ dir = File.expand_path("../../../test/dummy/db/sample/assets/*", __FILE__)
14
+ @sample_images = Dir[dir]
15
+ end
16
+ image = @sample_images.shuffle.first
17
+ File.open(image)
18
+ end
11
19
 
12
20
  #===============================
13
21
  # Givens
14
22
 
15
- Given /^I have a product( with variants)?$/ do |has_variants|
23
+ Given /^I( don't)? allow backorders$/ do |dont|
24
+ Spree::Config.set(:allow_backorders => dont.nil?)
25
+ end
26
+
27
+ Given /^I have a product( with variants)?( and images)?$/ do |has_variants, has_images|
16
28
  @product = Factory.create(has_variants ? :product_with_variants : :product)
29
+ unless has_images.nil?
30
+ @product.images.create(:attachment => random_image, :alt => @product.name)
31
+ unless has_variants.nil?
32
+ @product.variants.each do |v|
33
+ v.images.create(:attachment => random_image, :alt => v.sku)
34
+ end
35
+ end
36
+ end
17
37
  end
18
38
 
39
+
40
+
19
41
  Given /^the "([^"]*)" variant is out of stock$/ do |descriptor|
20
42
  flunk unless @product
21
43
  @variant = variant_by_descriptor(descriptor)
@@ -55,7 +77,7 @@ end
55
77
  # Thens
56
78
 
57
79
  Then /^the source should contain the options hash$/ do
58
- assert source.include?("VariantOptions(#{@product.variant_options_hash.to_json})")
80
+ assert source.include?("VariantOptions(#{@product.variant_options_hash.to_json}, #{Spree::Config[:allow_backorders]})")
59
81
  end
60
82
 
61
83
  Then /^I should see (enabled|disabled)+ links for the ((?!option).*) option type$/ do |state, option_type|
@@ -103,9 +125,9 @@ end
103
125
 
104
126
  Then /^I should see "([^"]*)" selected within the (first|second|last) set of options$/ do |button, group|
105
127
  parent = case group
106
- when 'first'; '.variant-options.index-0'
128
+ when 'first'; '.variant-options.index-0'
107
129
  when 'second'; '.variant-options.index-1'
108
- when 'last'; ".variant-options.index-#{@product.option_values.length - 1}"
130
+ when 'last'; ".variant-options.index-#{@product.option_values.length - 1}"
109
131
  end
110
132
  within parent do
111
133
  link = find_link(button)
@@ -6,9 +6,9 @@ require File.expand_path("../../support/selectors.rb", __FILE__)
6
6
  def get_parent(parent)
7
7
  case parent.sub(/^the\s/, '')
8
8
  when "flash notice"; ".flash"
9
- when "first set of options"; "#option_type_#{@product.option_types.first.id}"
9
+ when "first set of options"; "#option_type_#{@product.option_types.first.id}"
10
10
  when "second set of options"; "#option_type_#{@product.option_types[1].id}"
11
- when "variant images label"; "#variant-images"
11
+ when "variant images label"; "#variant-images"
12
12
  when "price"; ".prices .price"
13
13
  else "[set-your-parent] #{parent}"
14
14
  end
@@ -1,56 +1,27 @@
1
- # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
2
- # It is recommended to regenerate this file in the future when you upgrade to a
3
- # newer version of cucumber-rails. Consider adding your own code to a new file
4
- # instead of editing this one. Cucumber will automatically load all features/**/*.rb
5
- # files.
1
+ ENV["RAILS_ENV"] = "test"
2
+ ENV["RAILS_ROOT"] = File.expand_path("../../../test/dummy", __FILE__)
6
3
 
7
4
  require 'spork'
8
-
9
- ENV["RAILS_ROOT"] = File.expand_path("../../../test/dummy", __FILE__)
10
5
 
11
6
  Spork.prefork do
12
7
  require 'cucumber/rails'
13
- require 'capybara/rails'
14
- require 'capybara/cucumber'
15
- require 'capybara/session'
16
8
  require 'factory_girl'
17
- require 'faker'
18
9
 
19
10
  I18n.reload!
20
11
 
12
+ ActionController::Base.allow_rescue = false
13
+
21
14
  Capybara.default_driver = :selenium
22
15
  Capybara.default_selector = :css
16
+
17
+ Cucumber::Rails::World.use_transactional_fixtures
18
+ DatabaseCleaner.strategy = :transaction
19
+
20
+ Spree::Config.set(:random => rand(1000))
23
21
  end
24
22
 
25
23
  Spork.each_run do
26
24
 
27
- # By default, any exception happening in your Rails application will bubble up
28
- # to Cucumber so that your scenario will fail. This is a different from how
29
- # your application behaves in the production environment, where an error page will
30
- # be rendered instead.
31
- #
32
- # Sometimes we want to override this default behaviour and allow Rails to rescue
33
- # exceptions and display an error page (just like when the app is running in production).
34
- # Typical scenarios where you want to do this is when you test your error pages.
35
- # There are two ways to allow Rails to rescue exceptions:
36
- #
37
- # 1) Tag your scenario (or feature) with @allow-rescue
38
- #
39
- # 2) Set the value below to true. Beware that doing this globally is not
40
- # recommended as it will mask a lot of errors for you!
41
- #
42
- ActionController::Base.allow_rescue = false
43
-
44
- # doesn't seem to work :/
45
- Cucumber::Rails::World.use_transactional_fixtures = false
46
- # Remove/comment out the lines below if your app doesn't have a database.
47
- # For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
48
- begin
49
- DatabaseCleaner.strategy = :transaction
50
- rescue NameError
51
- raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
52
- end
53
-
54
25
  Dir["#{File.expand_path("../../../", __FILE__)}/test/support/**/*.rb"].each { |f| require f }
55
26
 
56
27
  end
@@ -32,14 +32,14 @@ FactoryGirl.define do
32
32
  factory :option_type do
33
33
  presentation "Size"
34
34
  name { presentation.downcase }
35
- sequence(:position) {|n| n }
35
+ #sequence(:position) {|n| n }
36
36
  end
37
37
 
38
38
  factory :option_value do
39
39
  presentation "Large"
40
40
  name { presentation.downcase }
41
41
  option_type { OptionType.last || Factory.create(:option_type) }
42
- sequence(:position) {|n| n }
42
+ #sequence(:position) {|n| n }
43
43
  end
44
44
 
45
45
  end
@@ -1,108 +1,121 @@
1
1
  @no-txn @javascript
2
2
  Feature: Products should have variant options
3
- A Product's variants should be broken out into options
4
3
 
4
+ A Product's variants should be broken out into options
5
+
5
6
  Scenario: Display options when visiting a product
6
7
  Given I have a product with variants
7
- And I'm on the product page for the first product
8
+ And I'm on the product page for the first product
8
9
  Then the source should contain the options hash
9
- And I should see enabled links for the first option type
10
- And I should see disabled links for the second option type
11
- And I should have a hidden input for the selected variant
12
- And the add to cart button should be disabled
10
+ And I should see enabled links for the first option type
11
+ And I should see disabled links for the second option type
12
+ And I should have a hidden input for the selected variant
13
+ And the add to cart button should be disabled
13
14
 
14
15
  Scenario: Interact with options for a product
15
16
  Given I have a product with variants
16
- And I'm on the product page for the first product
17
+ And I'm on the product page for the first product
17
18
  When I follow "Small" within the first set of options
18
19
  Then I should see enabled links for the second option type
19
- And the add to cart button should be disabled
20
+ And the add to cart button should be disabled
20
21
  When I follow "Green" within the second set of options
21
22
  Then the add to cart button should be enabled
22
23
  When I follow "Medium" within the first set of options
23
- And I should see enabled links for the second option type
24
- And the add to cart button should be disabled
24
+ And I should see enabled links for the second option type
25
+ And the add to cart button should be disabled
25
26
  When I follow "Red" within the second set of options
26
- And the add to cart button should be enabled
27
-
27
+ And the add to cart button should be enabled
28
+
28
29
  Scenario: Should show out of stock for appropriate variants
29
- Given I have a product with variants
30
- And the "Small Green" variant is out of stock
31
- And I'm on the product page for the first product
30
+ Given I don't allow backorders
31
+ And I have a product with variants
32
+ And the "Small Green" variant is out of stock
33
+ And I'm on the product page for the first product
32
34
  When I follow "Small" within the first set of options
33
35
  Then I should see an out-of-stock link for "Green"
34
- And I should see an in-stock link for "Red, Blue, Black, White, Gray"
36
+ And I should see an in-stock link for "Red, Blue, Black, White, Gray"
37
+
38
+ Scenario: Should allow backorders of in stock variants
39
+ Given I allow backorders
40
+ And I have a product with variants
41
+ And the "Small Green" variant is out of stock
42
+ And I'm on the product page for the first product
43
+ When I follow "Small" within the first set of options
44
+ Then I should see an in-stock link for "Green"
45
+ And I should see an in-stock link for "Red, Blue, Black, White, Gray"
35
46
 
36
47
  Scenario: Should clear current selection
37
48
  Given I have a product with variants
38
- And I'm on the product page for the first product
49
+ And I'm on the product page for the first product
39
50
  When I follow "Small" within the first set of options
40
- And I click the current clear button
51
+ And I click the current clear button
41
52
  Then I should see disabled links for the second option type
42
- And I should see enabled links for the first option type
53
+ And I should see enabled links for the first option type
43
54
 
44
55
  Scenario: Should clear current selection and maintain parent selection
45
56
  Given I have a product with variants
46
- And I'm on the product page for the first product
57
+ And I'm on the product page for the first product
47
58
  When I follow "Small" within the first set of options
48
- And I follow "Green" within the second set of options
59
+ And I follow "Green" within the second set of options
49
60
  Then the add to cart button should be enabled
50
- And I click the last clear button
61
+ And I click the last clear button
51
62
  Then I should see "Small" selected within the first set of options
52
- And I should see enabled links for the second option type
53
- And the add to cart button should be disabled
63
+ And I should see enabled links for the second option type
64
+ And the add to cart button should be disabled
54
65
 
55
66
  Scenario: Should clear current selection and parent selection
56
67
  Given I have a product with variants
57
- And I'm on the product page for the first product
68
+ And I'm on the product page for the first product
58
69
  When I follow "Small" within the first set of options
59
- And I follow "Green" within the second set of options
70
+ And I follow "Green" within the second set of options
60
71
  Then the add to cart button should be enabled
61
- And I click the first clear button
72
+ And I click the first clear button
62
73
  Then I should not see a selected option
63
- And I should see disabled links for the second option type
64
- And I should see enabled links for the first option type
65
- And the add to cart button should be disabled
74
+ And I should see disabled links for the second option type
75
+ And I should see enabled links for the first option type
76
+ And the add to cart button should be disabled
66
77
 
67
78
  Scenario: Should add proper variant to cart
68
79
  Given I have a product with variants
69
- And I'm on the product page for the first product
80
+ And I'm on the product page for the first product
70
81
  When I follow "Small" within the first set of options
71
- And I follow "Green" within the second set of options
82
+ And I follow "Green" within the second set of options
72
83
  Then the add to cart button should be enabled
73
- And I press "Add To Cart"
84
+ And I press "Add To Cart"
74
85
  Then I should be on the cart page
75
- And I should see "Size: Small, Color: Green"
86
+ And I should see "Size: Small, Color: Green"
76
87
 
77
88
  Scenario: Should auto-select variant if its the only option
78
89
  Given I have a product with variants
79
- And I have an "XXL Turquoise" variant
80
- And I'm on the product page for the first product
90
+ And I have an "XXL Turquoise" variant
91
+ And I'm on the product page for the first product
81
92
  When I follow "XXL" within the first set of options
82
93
  Then I should see "Turquoise" selected within the second set of options
83
- And the add to cart button should be enabled
94
+ And the add to cart button should be enabled
84
95
  When I follow "Small" within the first set of options
85
96
  Then the add to cart button should be disabled
86
97
 
87
98
  Scenario: Should adjust price according to variant
88
99
  Given I have a product with variants
89
- And I have an "XXS Turquoise" variant for $29.99
90
- And I have an "XXS Pink" variant for $24.99
91
- And I'm on the product page for the first product
100
+ And I have an "XXS Turquoise" variant for $29.99
101
+ And I have an "XXS Pink" variant for $24.99
102
+ And I'm on the product page for the first product
92
103
  When I follow "XXS" within the first set of options
93
104
  Then I should see "$24.99 - $29.99" in the price
94
105
  When I follow "Turquoise" within the second set of options
95
106
  Then I should see "$29.99" in the price
96
- And the add to cart button should be enabled
107
+ And the add to cart button should be enabled
97
108
  When I follow "Pink" within the second set of options
98
109
  Then I should see "$24.99" in the price
99
- And the add to cart button should be enabled
100
-
110
+ And the add to cart button should be enabled
111
+
101
112
  Scenario: Should show variant images when a selection is made
102
- Given I have a product with variants
103
- And I'm on the product page for the first product
113
+ Given I have a product with variants and images
114
+ And I'm on the product page for the first product
104
115
  When I follow "Small" within the first set of options
105
- And I follow "Green" within the second set of options
116
+ And I follow "Green" within the second set of options
106
117
  Then the add to cart button should be enabled
107
- And I should see "Small Green" in the variant images label # its hidden but it's there!
118
+ And I should see "Small Green" in the variant images label
119
+ When I follow "Red" within the second set of options
120
+ Then I should see "Small Red" in the variant images label
108
121
 
@@ -1,3 +1,3 @@
1
1
  module SpreeVariantOptions
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -30,9 +30,10 @@ if (!Array.find_matches) Array.find_matches = function(a) {
30
30
  return m;
31
31
  }
32
32
 
33
- function VariantOptions(options) {
33
+ function VariantOptions(options, allow_backorders) {
34
34
 
35
35
  var options = options;
36
+ var allow_backorders = allow_backorders;
36
37
  var variant, divs, parent, index = 0;
37
38
  var selection = [];
38
39
 
@@ -92,7 +93,9 @@ function VariantOptions(options) {
92
93
  disable($(element).addClass('unavailable locked').unbind('click'));
93
94
  } else if (keys.length == 1) {
94
95
  _var = variants[keys[0]];
95
- $(element).addClass(_var.count ? selection.length == 1 ? 'in-stock auto-click' : 'in-stock' : 'out-of-stock');
96
+ $(element).addClass((allow_backorders || _var.count) ? selection.length == 1 ? 'in-stock auto-click' : 'in-stock' : 'out-of-stock');
97
+ } else if (allow_backorders) {
98
+ $(element).addClass('in-stock');
96
99
  } else {
97
100
  $.each(variants, function(key, value) { count += value.count });
98
101
  $(element).addClass(count ? 'in-stock' : 'out-of-stock');
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
9
9
  s.authors = ["Spencer Steffen"]
10
10
  s.email = ["spencer@citrusme.com"]
11
11
  s.homepage = "https://github.com/citrus/spree_variant_options"
12
- s.summary = %q{Spree Variant Options is a very simple spree extension that groups your variants by option types and values.}
13
- s.description = %q{Spree Variant Options is a very simple spree extension that groups your variants by option types and values. Please see the documentation for more details.}
12
+ s.summary = %q{Spree Variant Options is a simple spree extension that replaces the radio-button variant selection with groups of option types and values.}
13
+ s.description = %q{Spree Variant Options is a simple spree extension that replaces the radio-button variant selection with groups of option types and values. Please see the documentation for more details.}
14
14
 
15
15
  s.rubyforge_project = "spree_variant_options"
16
16
 
@@ -19,19 +19,18 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- # Spree
22
+ # Runtime
23
23
  s.add_dependency('spree_core', '>= 0.30.1')
24
24
 
25
25
  # Development
26
26
  s.add_development_dependency('spree_sample', '>= 0.30.1')
27
- s.add_development_dependency('dummier', '>= 0.1.1')
27
+ s.add_development_dependency('dummier', '>= 0.2.0')
28
28
  s.add_development_dependency('shoulda', '>= 2.11.3')
29
- s.add_development_dependency('spork', '>= 0.9.0.rc8')
30
- s.add_development_dependency('spork-testunit', '>= 0.0.5')
31
29
  s.add_development_dependency('factory_girl', '>= 2.0.0.beta2')
32
- s.add_development_dependency('cucumber-rails', '>= 0.4.1')
33
- s.add_development_dependency('database_cleaner', '>= 0.6.7')
34
- s.add_development_dependency('capybara', '>= 0.4.1')
30
+ s.add_development_dependency('cucumber-rails', '>= 1.0.2')
31
+ s.add_development_dependency('database_cleaner', '>= 0.6.7')
35
32
  s.add_development_dependency('sqlite3', '>= 1.3.3')
33
+ s.add_development_dependency('spork', '>= 0.9.0.rc9')
34
+ s.add_development_dependency('spork-testunit', '>= 0.0.5')
36
35
 
37
36
  end
@@ -0,0 +1,8 @@
1
+ # install spree & spree_sample
2
+ rake "spree_core:install spree_sample:install"
3
+
4
+ # since spree auth isn't installed
5
+ create_file "app/views/shared/_login_bar.html.erb", ""
6
+
7
+ # remove the default product.js
8
+ remove_file "public/javascripts/product.js"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: spree_variant_options
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Spencer Steffen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-14 00:00:00 -07:00
13
+ date: 2011-07-15 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 0.1.1
45
+ version: 0.2.0
46
46
  type: :development
47
47
  prerelease: false
48
48
  version_requirements: *id003
@@ -58,83 +58,72 @@ dependencies:
58
58
  prerelease: false
59
59
  version_requirements: *id004
60
60
  - !ruby/object:Gem::Dependency
61
- name: spork
61
+ name: factory_girl
62
62
  requirement: &id005 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: 0.9.0.rc8
67
+ version: 2.0.0.beta2
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: *id005
71
71
  - !ruby/object:Gem::Dependency
72
- name: spork-testunit
72
+ name: cucumber-rails
73
73
  requirement: &id006 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: 0.0.5
78
+ version: 1.0.2
79
79
  type: :development
80
80
  prerelease: false
81
81
  version_requirements: *id006
82
82
  - !ruby/object:Gem::Dependency
83
- name: factory_girl
83
+ name: database_cleaner
84
84
  requirement: &id007 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.0.0.beta2
89
+ version: 0.6.7
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: *id007
93
93
  - !ruby/object:Gem::Dependency
94
- name: cucumber-rails
94
+ name: sqlite3
95
95
  requirement: &id008 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
- version: 0.4.1
100
+ version: 1.3.3
101
101
  type: :development
102
102
  prerelease: false
103
103
  version_requirements: *id008
104
104
  - !ruby/object:Gem::Dependency
105
- name: database_cleaner
105
+ name: spork
106
106
  requirement: &id009 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ">="
110
110
  - !ruby/object:Gem::Version
111
- version: 0.6.7
111
+ version: 0.9.0.rc9
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: *id009
115
115
  - !ruby/object:Gem::Dependency
116
- name: capybara
116
+ name: spork-testunit
117
117
  requirement: &id010 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 0.4.1
122
+ version: 0.0.5
123
123
  type: :development
124
124
  prerelease: false
125
125
  version_requirements: *id010
126
- - !ruby/object:Gem::Dependency
127
- name: sqlite3
128
- requirement: &id011 !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- version: 1.3.3
134
- type: :development
135
- prerelease: false
136
- version_requirements: *id011
137
- description: Spree Variant Options is a very simple spree extension that groups your variants by option types and values. Please see the documentation for more details.
126
+ description: Spree Variant Options is a simple spree extension that replaces the radio-button variant selection with groups of option types and values. Please see the documentation for more details.
138
127
  email:
139
128
  - spencer@citrusme.com
140
129
  executables: []
@@ -162,8 +151,6 @@ files:
162
151
  - features/support/paths.rb
163
152
  - features/support/selectors.rb
164
153
  - features/variant_options.feature
165
- - lib/dummy_hooks/after_migrate.rb.sample
166
- - lib/dummy_hooks/before_migrate.rb
167
154
  - lib/spree_variant_options.rb
168
155
  - lib/spree_variant_options/version.rb
169
156
  - public/images/out-of-stock.png
@@ -171,6 +158,8 @@ files:
171
158
  - public/javascripts/variant_options.js
172
159
  - public/stylesheets/variant_options.css
173
160
  - spree_variant_options.gemspec
161
+ - test/dummy_hooks/after_migrate.rb.sample
162
+ - test/dummy_hooks/before_migrate.rb
174
163
  - test/test_helper.rb
175
164
  - test/unit/product_test.rb
176
165
  has_rdoc: true
@@ -187,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
176
  requirements:
188
177
  - - ">="
189
178
  - !ruby/object:Gem::Version
190
- hash: 846868964844011928
179
+ hash: -1164613591860939368
191
180
  segments:
192
181
  - 0
193
182
  version: "0"
@@ -196,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
185
  requirements:
197
186
  - - ">="
198
187
  - !ruby/object:Gem::Version
199
- hash: 846868964844011928
188
+ hash: -1164613591860939368
200
189
  segments:
201
190
  - 0
202
191
  version: "0"
@@ -206,7 +195,7 @@ rubyforge_project: spree_variant_options
206
195
  rubygems_version: 1.6.2
207
196
  signing_key:
208
197
  specification_version: 3
209
- summary: Spree Variant Options is a very simple spree extension that groups your variants by option types and values.
198
+ summary: Spree Variant Options is a simple spree extension that replaces the radio-button variant selection with groups of option types and values.
210
199
  test_files:
211
200
  - features/step_definitions/variant_options.rb
212
201
  - features/step_definitions/web_steps.rb
@@ -216,5 +205,7 @@ test_files:
216
205
  - features/support/paths.rb
217
206
  - features/support/selectors.rb
218
207
  - features/variant_options.feature
208
+ - test/dummy_hooks/after_migrate.rb.sample
209
+ - test/dummy_hooks/before_migrate.rb
219
210
  - test/test_helper.rb
220
211
  - test/unit/product_test.rb
@@ -1 +0,0 @@
1
- rake "spree_core:install spree_sample:install"