spree_sample 2.0.3 → 2.0.4
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.
- checksums.yaml +4 -4
- data/db/samples/assets.rb +1 -0
- data/db/samples/line_items.rb +0 -15
- data/db/samples/orders.rb +22 -6
- data/db/samples/products.rb +18 -0
- data/db/samples/taxons.rb +1 -1
- metadata +4 -5
- data/db/samples/shipments.rb +0 -18
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 79d60525fdc78c2d424d76b34a53fcb6c46e52c4
         | 
| 4 | 
            +
              data.tar.gz: bbe6ba2d4cf57c645b1411a69734789f8fe190ee
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3726b23b0a598e23bed3bfb714dbb80d0649f2fba1206a418b1dccfad0915a7ae08f5b8b34c08f06a889fdebbb0ecc2d367324159aca4e7be62165dc7732ba9a
         | 
| 7 | 
            +
              data.tar.gz: 0502d5a123c1cf4ac7c317d05b7ab05d5a17674da00c515a5fc3f3f4c47b668f51620be1523e02137dafdfa24f362b568d227ecd468c34e72855197a8e007a00
         | 
    
        data/db/samples/assets.rb
    CHANGED
    
    
    
        data/db/samples/line_items.rb
    CHANGED
    
    | @@ -1,16 +1 @@ | |
| 1 1 | 
             
            Spree::Sample.load_sample("orders")
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            first_order = Spree::Order.find_by_number!("R123456789")
         | 
| 4 | 
            -
            last_order = Spree::Order.find_by_number!("R987654321")
         | 
| 5 | 
            -
             | 
| 6 | 
            -
            first_order.line_items.create!({
         | 
| 7 | 
            -
              :variant => Spree::Product.find_by_name!("Ruby on Rails Tote").master,
         | 
| 8 | 
            -
              :quantity => 1,
         | 
| 9 | 
            -
              :price => 15.99
         | 
| 10 | 
            -
            }, :without_protection => true)
         | 
| 11 | 
            -
             | 
| 12 | 
            -
            last_order.line_items.create!({
         | 
| 13 | 
            -
              :variant => Spree::Product.find_by_name!("Ruby on Rails Bag").master,
         | 
| 14 | 
            -
              :quantity => 1,
         | 
| 15 | 
            -
              :price => 22.99
         | 
| 16 | 
            -
            }, :without_protection => true)
         | 
    
        data/db/samples/orders.rb
    CHANGED
    
    | @@ -1,6 +1,7 @@ | |
| 1 1 | 
             
            Spree::Sample.load_sample("addresses")
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 3 | 
            +
            orders = []
         | 
| 4 | 
            +
            orders << Spree::Order.create!({
         | 
| 4 5 | 
             
              :number => "R123456789",
         | 
| 5 6 | 
             
              :email => "spree@example.com",
         | 
| 6 7 | 
             
              :item_total => 150.95,
         | 
| @@ -9,10 +10,8 @@ order = Spree::Order.create!({ | |
| 9 10 | 
             
              :shipping_address => Spree::Address.first,
         | 
| 10 11 | 
             
              :billing_address => Spree::Address.last
         | 
| 11 12 | 
             
            }, :without_protection => true)
         | 
| 12 | 
            -
            order.state = "complete"
         | 
| 13 | 
            -
            order.save!
         | 
| 14 13 |  | 
| 15 | 
            -
             | 
| 14 | 
            +
            orders << Spree::Order.create!({
         | 
| 16 15 | 
             
              :number => "R987654321",
         | 
| 17 16 | 
             
              :email => "spree@example.com",
         | 
| 18 17 | 
             
              :item_total => 15.95,
         | 
| @@ -21,6 +20,23 @@ order = Spree::Order.create!({ | |
| 21 20 | 
             
              :shipping_address => Spree::Address.first,
         | 
| 22 21 | 
             
              :billing_address => Spree::Address.last
         | 
| 23 22 | 
             
            }, :without_protection => true)
         | 
| 24 | 
            -
            order.state = "complete"
         | 
| 25 | 
            -
            order.save!
         | 
| 26 23 |  | 
| 24 | 
            +
            orders[0].line_items.create!({
         | 
| 25 | 
            +
              :variant => Spree::Product.find_by_name!("Ruby on Rails Tote").master,
         | 
| 26 | 
            +
              :quantity => 1,
         | 
| 27 | 
            +
              :price => 15.99
         | 
| 28 | 
            +
            }, :without_protection => true)
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            orders[1].line_items.create!({
         | 
| 31 | 
            +
              :variant => Spree::Product.find_by_name!("Ruby on Rails Bag").master,
         | 
| 32 | 
            +
              :quantity => 1,
         | 
| 33 | 
            +
              :price => 22.99
         | 
| 34 | 
            +
            }, :without_protection => true)
         | 
| 35 | 
            +
             | 
| 36 | 
            +
            orders.each(&:create_proposed_shipments)
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            orders.each do |order|
         | 
| 39 | 
            +
              order.state = "complete"
         | 
| 40 | 
            +
              order.completed_at = Time.now - 1.day
         | 
| 41 | 
            +
              order.save!
         | 
| 42 | 
            +
            end
         | 
    
        data/db/samples/products.rb
    CHANGED
    
    | @@ -1,6 +1,8 @@ | |
| 1 1 | 
             
            Spree::Sample.load_sample("tax_categories")
         | 
| 2 | 
            +
            Spree::Sample.load_sample("shipping_categories")
         | 
| 2 3 |  | 
| 3 4 | 
             
            clothing = Spree::TaxCategory.find_by_name!("Clothing")
         | 
| 5 | 
            +
            shipping_category = Spree::ShippingCategory.find_by_name!("Default Shipping")
         | 
| 4 6 |  | 
| 5 7 | 
             
            default_attrs = {
         | 
| 6 8 | 
             
              :description => Faker::Lorem.paragraph,
         | 
| @@ -11,30 +13,35 @@ products = [ | |
| 11 13 | 
             
              {
         | 
| 12 14 | 
             
                :name => "Ruby on Rails Tote",
         | 
| 13 15 | 
             
                :tax_category => clothing,
         | 
| 16 | 
            +
                :shipping_category => shipping_category,
         | 
| 14 17 | 
             
                :price => 15.99,
         | 
| 15 18 | 
             
                :eur_price => 14,
         | 
| 16 19 | 
             
              },
         | 
| 17 20 | 
             
              {
         | 
| 18 21 | 
             
                :name => "Ruby on Rails Bag",
         | 
| 19 22 | 
             
                :tax_category => clothing,
         | 
| 23 | 
            +
                :shipping_category => shipping_category,
         | 
| 20 24 | 
             
                :price => 22.99,
         | 
| 21 25 | 
             
                :eur_price => 19,
         | 
| 22 26 | 
             
              },
         | 
| 23 27 | 
             
              {
         | 
| 24 28 | 
             
                :name => "Ruby on Rails Baseball Jersey",
         | 
| 25 29 | 
             
                :tax_category => clothing,
         | 
| 30 | 
            +
                :shipping_category => shipping_category,
         | 
| 26 31 | 
             
                :price => 19.99,
         | 
| 27 32 | 
             
                :eur_price => 16
         | 
| 28 33 | 
             
              },
         | 
| 29 34 | 
             
              {
         | 
| 30 35 | 
             
                :name => "Ruby on Rails Jr. Spaghetti",
         | 
| 31 36 | 
             
                :tax_category => clothing,
         | 
| 37 | 
            +
                :shipping_category => shipping_category,
         | 
| 32 38 | 
             
                :price => 19.99,
         | 
| 33 39 | 
             
                :eur_price => 16
         | 
| 34 40 |  | 
| 35 41 | 
             
              },
         | 
| 36 42 | 
             
              {
         | 
| 37 43 | 
             
                :name => "Ruby on Rails Ringer T-Shirt",
         | 
| 44 | 
            +
                :shipping_category => shipping_category,
         | 
| 38 45 | 
             
                :tax_category => clothing,
         | 
| 39 46 | 
             
                :price => 19.99,
         | 
| 40 47 | 
             
                :eur_price => 16
         | 
| @@ -42,62 +49,73 @@ products = [ | |
| 42 49 | 
             
              {
         | 
| 43 50 | 
             
                :name => "Ruby Baseball Jersey",
         | 
| 44 51 | 
             
                :tax_category => clothing,
         | 
| 52 | 
            +
                :shipping_category => shipping_category,
         | 
| 45 53 | 
             
                :price => 19.99,
         | 
| 46 54 | 
             
                :eur_price => 16
         | 
| 47 55 | 
             
              },
         | 
| 48 56 | 
             
              {
         | 
| 49 57 | 
             
                :name => "Apache Baseball Jersey",
         | 
| 50 58 | 
             
                :tax_category => clothing,
         | 
| 59 | 
            +
                :shipping_category => shipping_category,
         | 
| 51 60 | 
             
                :price => 19.99,
         | 
| 52 61 | 
             
                :eur_price => 16
         | 
| 53 62 | 
             
              },
         | 
| 54 63 | 
             
              {
         | 
| 55 64 | 
             
                :name => "Spree Baseball Jersey",
         | 
| 56 65 | 
             
                :tax_category => clothing,
         | 
| 66 | 
            +
                :shipping_category => shipping_category,
         | 
| 57 67 | 
             
                :price => 19.99,
         | 
| 58 68 | 
             
                :eur_price => 16
         | 
| 59 69 | 
             
              },
         | 
| 60 70 | 
             
              {
         | 
| 61 71 | 
             
                :name => "Spree Jr. Spaghetti",
         | 
| 62 72 | 
             
                :tax_category => clothing,
         | 
| 73 | 
            +
                :shipping_category => shipping_category,
         | 
| 63 74 | 
             
                :price => 19.99,
         | 
| 64 75 | 
             
                :eur_price => 16
         | 
| 65 76 | 
             
              },
         | 
| 66 77 | 
             
              {
         | 
| 67 78 | 
             
                :name => "Spree Ringer T-Shirt",
         | 
| 68 79 | 
             
                :tax_category => clothing,
         | 
| 80 | 
            +
                :shipping_category => shipping_category,
         | 
| 69 81 | 
             
                :price => 19.99,
         | 
| 70 82 | 
             
                :eur_price => 16
         | 
| 71 83 | 
             
              },
         | 
| 72 84 | 
             
              {
         | 
| 73 85 | 
             
                :name => "Spree Tote",
         | 
| 74 86 | 
             
                :tax_category => clothing,
         | 
| 87 | 
            +
                :shipping_category => shipping_category,
         | 
| 75 88 | 
             
                :price => 15.99,
         | 
| 76 89 | 
             
                :eur_price => 14,
         | 
| 77 90 | 
             
              },
         | 
| 78 91 | 
             
              {
         | 
| 79 92 | 
             
                :name => "Spree Bag",
         | 
| 80 93 | 
             
                :tax_category => clothing,
         | 
| 94 | 
            +
                :shipping_category => shipping_category,
         | 
| 81 95 | 
             
                :price => 22.99,
         | 
| 82 96 | 
             
                :eur_price => 19
         | 
| 83 97 | 
             
              },
         | 
| 84 98 | 
             
              {
         | 
| 85 99 | 
             
                :name => "Ruby on Rails Mug",
         | 
| 100 | 
            +
                :shipping_category => shipping_category,
         | 
| 86 101 | 
             
                :price => 13.99,
         | 
| 87 102 | 
             
                :eur_price => 12
         | 
| 88 103 | 
             
              },
         | 
| 89 104 | 
             
              {
         | 
| 90 105 | 
             
                :name => "Ruby on Rails Stein",
         | 
| 106 | 
            +
                :shipping_category => shipping_category,
         | 
| 91 107 | 
             
                :price => 16.99,
         | 
| 92 108 | 
             
                :eur_price => 14
         | 
| 93 109 | 
             
              },
         | 
| 94 110 | 
             
              {
         | 
| 95 111 | 
             
                :name => "Spree Stein",
         | 
| 112 | 
            +
                :shipping_category => shipping_category,
         | 
| 96 113 | 
             
                :price => 16.99,
         | 
| 97 114 | 
             
                :eur_price => 14,
         | 
| 98 115 | 
             
              },
         | 
| 99 116 | 
             
              {
         | 
| 100 117 | 
             
                :name => "Spree Mug",
         | 
| 118 | 
            +
                :shipping_category => shipping_category,
         | 
| 101 119 | 
             
                :price => 13.99,
         | 
| 102 120 | 
             
                :eur_price => 12
         | 
| 103 121 | 
             
              }
         | 
    
        data/db/samples/taxons.rb
    CHANGED
    
    | @@ -116,6 +116,6 @@ taxons = [ | |
| 116 116 | 
             
            taxons.each do |taxon_attrs|
         | 
| 117 117 | 
             
              if taxon_attrs[:parent]
         | 
| 118 118 | 
             
                taxon_attrs[:parent] = Spree::Taxon.find_by_name!(taxon_attrs[:parent])
         | 
| 119 | 
            +
                Spree::Taxon.create!(taxon_attrs, :without_protection => true)
         | 
| 119 120 | 
             
              end
         | 
| 120 | 
            -
              Spree::Taxon.create!(taxon_attrs, :without_protection => true)
         | 
| 121 121 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: spree_sample
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.0. | 
| 4 | 
            +
              version: 2.0.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Sean Schofield
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2013- | 
| 11 | 
            +
            date: 2013-08-05 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: spree_core
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - '='
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 2.0. | 
| 19 | 
            +
                    version: 2.0.4
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - '='
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: 2.0. | 
| 26 | 
            +
                    version: 2.0.4
         | 
| 27 27 | 
             
            description: Required dependency for Spree
         | 
| 28 28 | 
             
            email: sean@spreecommerce.com
         | 
| 29 29 | 
             
            executables: []
         | 
| @@ -79,7 +79,6 @@ files: | |
| 79 79 | 
             
            - db/samples/product_properties.rb
         | 
| 80 80 | 
             
            - db/samples/products.rb
         | 
| 81 81 | 
             
            - db/samples/prototypes.rb
         | 
| 82 | 
            -
            - db/samples/shipments.rb
         | 
| 83 82 | 
             
            - db/samples/shipping_categories.rb
         | 
| 84 83 | 
             
            - db/samples/shipping_methods.rb
         | 
| 85 84 | 
             
            - db/samples/stock.rb
         | 
    
        data/db/samples/shipments.rb
    DELETED
    
    | @@ -1,18 +0,0 @@ | |
| 1 | 
            -
            first_order = Spree::Order.find_by_number!("R123456789")
         | 
| 2 | 
            -
            last_order = Spree::Order.find_by_number!("R987654321")
         | 
| 3 | 
            -
             | 
| 4 | 
            -
            Spree::Shipment.create!({
         | 
| 5 | 
            -
              :order => first_order,
         | 
| 6 | 
            -
              :number => Array.new(11){rand(11)}.join,
         | 
| 7 | 
            -
              :shipping_method => Spree::ShippingMethod.find_by_name!("UPS Ground (USD)"),
         | 
| 8 | 
            -
              :address => Spree::Address.first,
         | 
| 9 | 
            -
              :state => "pending"
         | 
| 10 | 
            -
            }, :without_protection => true)
         | 
| 11 | 
            -
             | 
| 12 | 
            -
            Spree::Shipment.create!({
         | 
| 13 | 
            -
              :order => last_order,
         | 
| 14 | 
            -
              :number => Array.new(11){rand(11)}.join,
         | 
| 15 | 
            -
              :shipping_method => Spree::ShippingMethod.find_by_name!("UPS Ground (USD)"),
         | 
| 16 | 
            -
              :address => Spree::Address.first,
         | 
| 17 | 
            -
              :state => "pending"
         | 
| 18 | 
            -
            }, :without_protection => true)
         |