spree_suppliers 1.0.2 → 1.0.3
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/app/models/supplier.rb +1 -1
 - data/lib/spree_suppliers.rb +1 -1
 - data/spec/factories/suppliers.rb +6 -0
 - data/spec/models/invoice_item_spec.rb +6 -0
 - data/spec/models/supplier_invoice_spec.rb +6 -0
 - data/spec/models/supplier_spec.rb +10 -0
 - data/spree_suppliers-1.0.2.gem +0 -0
 - data/spree_suppliers.gemspec +7 -1
 - metadata +62 -2
 
    
        data/app/models/supplier.rb
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            class Supplier < ActiveRecord::Base
         
     | 
| 
       2 
2 
     | 
    
         
             
              has_many :images, :as => :viewable, :order => :position, :dependent => :destroy
         
     | 
| 
       3 
3 
     | 
    
         
             
              accepts_nested_attributes_for :images
         
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 4 
     | 
    
         
            +
              belongs_to :user
         
     | 
| 
       5 
5 
     | 
    
         
             
              has_many :supplier_invoices
         
     | 
| 
       6 
6 
     | 
    
         
             
              has_and_belongs_to_many :taxons
         
     | 
| 
       7 
7 
     | 
    
         
             
              has_many :products
         
     | 
    
        data/lib/spree_suppliers.rb
    CHANGED
    
    
| 
         Binary file 
     | 
    
        data/spree_suppliers.gemspec
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       3 
3 
     | 
    
         
             
              s.platform    = Gem::Platform::RUBY
         
     | 
| 
       4 
4 
     | 
    
         
             
              s.name        = 'spree_suppliers'
         
     | 
| 
       5 
     | 
    
         
            -
              s.version     = '1.0. 
     | 
| 
      
 5 
     | 
    
         
            +
              s.version     = '1.0.3'
         
     | 
| 
       6 
6 
     | 
    
         
             
              s.summary     = 'This gem adds multiple suppliers to spree, with the ability to associate products with suppliers. Suppliers can be managed from the Admin interface.'
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.description = 'This gem (spree extension) provides support for multiple suppliers in one store. Products should be assigned to the supplier that they belong to, which allows you to select a supplier and view only their products. Suppliers can be associated with Taxons that allow the customer to search for suppliers by taxon. Orders are also broken up into supplier invoices (one for each different supplier in the order), which list only the products that were purchased from that supplier. A mailer is in place to send each supplier their unique invoice descrbing what products they have sold and to who. The spree order mailer has also been modified to show all of the supplier invoices to the customer, along with the standard spree order number and info. The checkout process is combined so the customer only makes one transaction - the transaction can then be divided up amongst the suppliers involved in the transaction, according to the supplier_invoices. There is also an option for the site administrator to charge a percentage fee on each transaction to suppliers (this is currently set to 0%, but can be changed).'
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
         @@ -20,5 +20,11 @@ Gem::Specification.new do |s| 
     | 
|
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
              s.add_dependency 'spree_core', '>= 0.70.3'
         
     | 
| 
       22 
22 
     | 
    
         
             
              s.add_development_dependency 'rspec-rails'
         
     | 
| 
      
 23 
     | 
    
         
            +
              s.add_development_dependency 'cucumber-rails'
         
     | 
| 
      
 24 
     | 
    
         
            +
              s.add_development_dependency 'capybara'
         
     | 
| 
      
 25 
     | 
    
         
            +
              s.add_development_dependency 'database_cleaner'
         
     | 
| 
      
 26 
     | 
    
         
            +
              s.add_development_dependency 'nokogiri'
         
     | 
| 
      
 27 
     | 
    
         
            +
              s.add_development_dependency 'shoulda'
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
       23 
29 
     | 
    
         
             
            end
         
     | 
| 
       24 
30 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            name: spree_suppliers
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
4 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       5 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 5 
     | 
    
         
            +
              version: 1.0.3
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors: 
         
     | 
| 
       8 
8 
     | 
    
         
             
            - JD Warren and Han Dao
         
     | 
| 
         @@ -34,6 +34,61 @@ dependencies: 
     | 
|
| 
       34 
34 
     | 
    
         
             
                    version: "0"
         
     | 
| 
       35 
35 
     | 
    
         
             
              type: :development
         
     | 
| 
       36 
36 
     | 
    
         
             
              version_requirements: *id002
         
     | 
| 
      
 37 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 38 
     | 
    
         
            +
              name: cucumber-rails
         
     | 
| 
      
 39 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 40 
     | 
    
         
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 41 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 42 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 43 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 44 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 45 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 46 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 47 
     | 
    
         
            +
              version_requirements: *id003
         
     | 
| 
      
 48 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 49 
     | 
    
         
            +
              name: capybara
         
     | 
| 
      
 50 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 51 
     | 
    
         
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 52 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 53 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 54 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 55 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 56 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 57 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 58 
     | 
    
         
            +
              version_requirements: *id004
         
     | 
| 
      
 59 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 60 
     | 
    
         
            +
              name: database_cleaner
         
     | 
| 
      
 61 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 62 
     | 
    
         
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 63 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 64 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 65 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 66 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 67 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 68 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 69 
     | 
    
         
            +
              version_requirements: *id005
         
     | 
| 
      
 70 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 71 
     | 
    
         
            +
              name: nokogiri
         
     | 
| 
      
 72 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 73 
     | 
    
         
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 74 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 75 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 76 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 78 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 79 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 80 
     | 
    
         
            +
              version_requirements: *id006
         
     | 
| 
      
 81 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 82 
     | 
    
         
            +
              name: shoulda
         
     | 
| 
      
 83 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 84 
     | 
    
         
            +
              requirement: &id007 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 85 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 86 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 87 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 88 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 89 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 90 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 91 
     | 
    
         
            +
              version_requirements: *id007
         
     | 
| 
       37 
92 
     | 
    
         
             
            description: This gem (spree extension) provides support for multiple suppliers in one store. Products should be assigned to the supplier that they belong to, which allows you to select a supplier and view only their products. Suppliers can be associated with Taxons that allow the customer to search for suppliers by taxon. Orders are also broken up into supplier invoices (one for each different supplier in the order), which list only the products that were purchased from that supplier. A mailer is in place to send each supplier their unique invoice descrbing what products they have sold and to who. The spree order mailer has also been modified to show all of the supplier invoices to the customer, along with the standard spree order number and info. The checkout process is combined so the customer only makes one transaction - the transaction can then be divided up amongst the suppliers involved in the transaction, according to the supplier_invoices. There is also an option for the site administrator to charge a percentage fee on each transaction to suppliers (this is currently set to 0%, but can be changed).
         
     | 
| 
       38 
93 
     | 
    
         
             
            email: jd@isotope11.com
         
     | 
| 
       39 
94 
     | 
    
         
             
            executables: []
         
     | 
| 
         @@ -134,7 +189,12 @@ files: 
     | 
|
| 
       134 
189 
     | 
    
         
             
            - lib/spree_suppliers/engine.rb
         
     | 
| 
       135 
190 
     | 
    
         
             
            - lib/spree_suppliers_hooks.rb
         
     | 
| 
       136 
191 
     | 
    
         
             
            - script/rails
         
     | 
| 
      
 192 
     | 
    
         
            +
            - spec/factories/suppliers.rb
         
     | 
| 
      
 193 
     | 
    
         
            +
            - spec/models/invoice_item_spec.rb
         
     | 
| 
      
 194 
     | 
    
         
            +
            - spec/models/supplier_invoice_spec.rb
         
     | 
| 
      
 195 
     | 
    
         
            +
            - spec/models/supplier_spec.rb
         
     | 
| 
       137 
196 
     | 
    
         
             
            - spec/spec_helper.rb
         
     | 
| 
      
 197 
     | 
    
         
            +
            - spree_suppliers-1.0.2.gem
         
     | 
| 
       138 
198 
     | 
    
         
             
            - spree_suppliers.gemspec
         
     | 
| 
       139 
199 
     | 
    
         
             
            - test/fixtures/.gitkeep
         
     | 
| 
       140 
200 
     | 
    
         
             
            - test/fixtures/invoice_items.yml
         
     | 
| 
         @@ -176,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       176 
236 
     | 
    
         
             
            requirements: 
         
     | 
| 
       177 
237 
     | 
    
         
             
            - none
         
     | 
| 
       178 
238 
     | 
    
         
             
            rubyforge_project: spree_suppliers
         
     | 
| 
       179 
     | 
    
         
            -
            rubygems_version: 1.8. 
     | 
| 
      
 239 
     | 
    
         
            +
            rubygems_version: 1.8.15
         
     | 
| 
       180 
240 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       181 
241 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       182 
242 
     | 
    
         
             
            summary: This gem adds multiple suppliers to spree, with the ability to associate products with suppliers. Suppliers can be managed from the Admin interface.
         
     |