erp_products 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/app/controllers/erp_products/erp_app/desktop/product_manager/base_controller.rb +1 -1
  2. data/app/models/product_type.rb +2 -2
  3. data/lib/erp_products/engine.rb +7 -1
  4. data/lib/erp_products/version.rb +7 -1
  5. data/lib/erp_products.rb +1 -0
  6. data/public/javascripts/erp_app/desktop/applications/product_manager/module.js +713 -718
  7. data/public/javascripts/erp_app/desktop/applications/product_manager/product_list_panel.js +127 -128
  8. data/spec/dummy/Rakefile +7 -0
  9. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  10. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  11. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  12. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  13. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  14. data/spec/dummy/config/application.rb +49 -0
  15. data/spec/dummy/config/boot.rb +10 -0
  16. data/spec/dummy/config/database.yml +8 -0
  17. data/spec/dummy/config/environment.rb +5 -0
  18. data/spec/dummy/config/environments/spec.rb +27 -0
  19. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  20. data/spec/dummy/config/initializers/inflections.rb +10 -0
  21. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  22. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  23. data/spec/dummy/config/initializers/session_store.rb +8 -0
  24. data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
  25. data/spec/dummy/config/locales/en.yml +5 -0
  26. data/spec/dummy/config/routes.rb +3 -0
  27. data/spec/dummy/config.ru +4 -0
  28. data/spec/dummy/public/404.html +26 -0
  29. data/spec/dummy/public/422.html +26 -0
  30. data/spec/dummy/public/500.html +26 -0
  31. data/spec/dummy/public/favicon.ico +0 -0
  32. data/spec/dummy/script/rails +6 -0
  33. data/spec/models/prod_availability_status_type_spec.rb +11 -0
  34. data/spec/models/prod_instance_reln_spec.rb +11 -0
  35. data/spec/models/prod_instance_reln_type_spec.rb +11 -0
  36. data/spec/models/prod_instance_role_type_spec.rb +11 -0
  37. data/spec/models/prod_type_reln_spec.rb +11 -0
  38. data/spec/models/prod_type_reln_type_spec.rb +12 -0
  39. data/spec/models/prod_type_role_type_spec.rb +12 -0
  40. data/spec/models/product_instance_spec.rb +13 -0
  41. data/spec/models/product_offer_spec.rb +12 -0
  42. data/spec/models/product_package_spec.rb +12 -0
  43. data/spec/models/product_type_spec.rb +13 -0
  44. data/spec/models/simple_product_offer_spec.rb +14 -0
  45. data/spec/spec_helper.rb +60 -0
  46. metadata +110 -34
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProdTypeReln do
4
+ it "can be instantiated" do
5
+ ProdTypeReln.new.should be_an_instance_of(ProdTypeReln)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ ProdTypeReln.create().should be_persisted
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProdTypeRelnType do
4
+ it "can be instantiated" do
5
+ ProdTypeRelnType.new.should be_an_instance_of(ProdTypeRelnType)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ ProdTypeRelnType.create().should be_persisted
10
+ end
11
+ end
12
+
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProdTypeRoleType do
4
+ it "can be instantiated" do
5
+ ProdTypeRoleType.new.should be_an_instance_of(ProdTypeRoleType)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ ProdTypeRoleType.create().should be_persisted
10
+ end
11
+ end
12
+
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProductInstance do
4
+ it "can be instantiated" do
5
+ ProductInstance.new.should be_an_instance_of(ProductInstance)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ ProductInstance.create().should be_persisted
10
+ end
11
+ end
12
+
13
+
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProductOffer do
4
+ it "can be instantiated" do
5
+ ProductOffer.new.should be_an_instance_of(ProductOffer)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ ProductOffer.create().should be_persisted
10
+ end
11
+ end
12
+
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProductPackage do
4
+ it "can be instantiated" do
5
+ ProductPackage.new.should be_an_instance_of(ProductPackage)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ ProductPackage.create().should be_persisted
10
+ end
11
+ end
12
+
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProductType do
4
+ it "can be instantiated" do
5
+ ProductType.new.should be_an_instance_of(ProductType)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ ProductType.create().should be_persisted
10
+ end
11
+ end
12
+
13
+
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe SimpleProductOffer do
4
+ it "can be instantiated" do
5
+ SimpleProductOffer.new.should be_an_instance_of(SimpleProductOffer)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ SimpleProductOffer.create().should be_persisted
10
+ end
11
+ end
12
+
13
+
14
+
@@ -0,0 +1,60 @@
1
+ require 'spork'
2
+ require 'rake'
3
+
4
+ Spork.prefork do
5
+ # Loading more in this block will cause your tests to run faster. However,
6
+ # if you change any configuration or code from libraries loaded here, you'll
7
+ # need to restart spork for it take effect.
8
+
9
+ ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
10
+ DUMMY_APP_ROOT=File.join(File.dirname(__FILE__), '/dummy')
11
+
12
+ require 'active_support'
13
+ require 'active_model'
14
+ require 'active_record'
15
+ require 'action_controller'
16
+
17
+ # Configure Rails Envinronment
18
+ ENV["RAILS_ENV"] = "spec"
19
+ require File.expand_path(DUMMY_APP_ROOT + "/config/environment.rb", __FILE__)
20
+
21
+ ActiveRecord::Base.configurations = YAML::load(IO.read(DUMMY_APP_ROOT + "/config/database.yml"))
22
+ ActiveRecord::Base.establish_connection(ENV["DB"] || "spec")
23
+ ActiveRecord::Migration.verbose = false
24
+
25
+ # Requires supporting ruby files with custom matchers and macros, etc,
26
+ # in spec/support/ and its subdirectories.
27
+ Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
28
+
29
+ require 'rspec/rails'
30
+ require 'erp_dev_svcs'
31
+
32
+ RSpec.configure do |config|
33
+ config.use_transactional_fixtures = true
34
+ config.include Sorcery::TestHelpers::Rails
35
+ config.include ErpDevSvcs
36
+ config.include ErpDevSvcs::ControllerSupport, :type => :controller
37
+ end
38
+ end
39
+
40
+ Spork.each_run do
41
+ #We have to execute the migrations from dummy app directory
42
+ Dir.chdir DUMMY_APP_ROOT
43
+ `rake db:drop`
44
+ Dir.chdir ENGINE_RAILS_ROOT
45
+
46
+ #We have to execute the migrations from dummy app directory
47
+ Dir.chdir DUMMY_APP_ROOT
48
+ `rake db:migrate`
49
+ Dir.chdir ENGINE_RAILS_ROOT
50
+
51
+ ErpDevSvcs::FactorySupport.load_engine_factories
52
+
53
+ require 'simplecov'
54
+ SimpleCov.start 'rails' do
55
+ add_filter "spec/"
56
+ end
57
+ #Need to explictly load the files in lib/ until we figure out how to
58
+ #get rails to autoload them for spec like it used to...
59
+ Dir[File.join(ENGINE_RAILS_ROOT, "lib/**/*.rb")].each {|f| load f}
60
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_products
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,41 +9,41 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-06 00:00:00.000000000Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erp_app
16
- requirement: &2161006380 !ruby/object:Gem::Requirement
16
+ requirement: &70708660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - =
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 3.0.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2161006380
24
+ version_requirements: *70708660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: erp_agreements
27
- requirement: &2161005800 !ruby/object:Gem::Requirement
27
+ requirement: &70706130 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - ! '>='
30
+ - - =
31
31
  - !ruby/object:Gem::Version
32
- version: '0'
32
+ version: 3.0.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2161005800
35
+ version_requirements: *70706130
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: erp_dev_svcs
38
- requirement: &2161005120 !ruby/object:Gem::Requirement
38
+ requirement: &70730990 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
- - - ! '>='
41
+ - - =
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: 3.0.1
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2161005120
46
+ version_requirements: *70730990
47
47
  description: ! 'The Products Engine implements ProductType and ProductInstance, as
48
48
  well as a number of classes to support product catalog-type functions and search/shopping
49
49
  scenarios. '
@@ -53,43 +53,81 @@ executables: []
53
53
  extensions: []
54
54
  extra_rdoc_files: []
55
55
  files:
56
- - public/javascripts/erp_app/desktop/applications/product_manager/module.js
57
- - public/javascripts/erp_app/desktop/applications/product_manager/product_list_panel.js
58
56
  - public/stylesheets/erp_app/desktop/applications/product_manager/style.css
59
- - app/assets/javascripts/erp_products/application.js
57
+ - public/javascripts/erp_app/desktop/applications/product_manager/product_list_panel.js
58
+ - public/javascripts/erp_app/desktop/applications/product_manager/module.js
60
59
  - app/assets/stylesheets/erp_products/application.css
61
- - app/controllers/erp_products/erp_app/desktop/product_manager/base_controller.rb
62
- - app/helpers/erp_products/application_helper.rb
60
+ - app/assets/javascripts/erp_products/application.js
61
+ - app/views/layouts/erp_products/application.html.erb
62
+ - app/models/product_package.rb
63
63
  - app/models/prod_availability_status_type.rb
64
- - app/models/prod_instance_reln.rb
65
- - app/models/prod_instance_reln_type.rb
66
64
  - app/models/prod_instance_role_type.rb
67
65
  - app/models/prod_type_reln.rb
68
- - app/models/prod_type_reln_type.rb
69
- - app/models/prod_type_role_type.rb
70
- - app/models/product_instance.rb
71
- - app/models/product_offer.rb
72
- - app/models/product_package.rb
73
66
  - app/models/product_type.rb
67
+ - app/models/product_offer.rb
74
68
  - app/models/simple_product_offer.rb
75
- - app/views/layouts/erp_products/application.html.erb
69
+ - app/models/prod_instance_reln_type.rb
70
+ - app/models/prod_instance_reln.rb
71
+ - app/models/prod_type_role_type.rb
72
+ - app/models/prod_type_reln_type.rb
73
+ - app/models/product_instance.rb
74
+ - app/helpers/erp_products/application_helper.rb
75
+ - app/controllers/erp_products/erp_app/desktop/product_manager/base_controller.rb
76
76
  - config/routes.rb
77
- - db/data_migrations/20110324010232_product_role_types.rb
78
- - db/data_migrations/20110527160807_add_default_prod_avail_types.rb
79
- - db/data_migrations/20110728201730_create_desktop_app_product_manager.rb
80
77
  - db/migrate/20080805000040_base_products.rb
81
78
  - db/migrate/20080805000041_base_products_indexes.rb
79
+ - db/data_migrations/20110527160807_add_default_prod_avail_types.rb
80
+ - db/data_migrations/20110728201730_create_desktop_app_product_manager.rb
81
+ - db/data_migrations/20110324010232_product_role_types.rb
82
82
  - lib/erp_products/engine.rb
83
- - lib/erp_products/extensions/active_record/acts_as_product_instance.rb
84
- - lib/erp_products/extensions/active_record/acts_as_product_offer.rb
85
- - lib/erp_products/extensions/active_record/acts_as_product_type.rb
86
83
  - lib/erp_products/extensions.rb
84
+ - lib/erp_products/extensions/active_record/acts_as_product_type.rb
85
+ - lib/erp_products/extensions/active_record/acts_as_product_offer.rb
86
+ - lib/erp_products/extensions/active_record/acts_as_product_instance.rb
87
87
  - lib/erp_products/version.rb
88
88
  - lib/erp_products.rb
89
89
  - lib/tasks/erp_products_tasks.rake
90
90
  - GPL-3-LICENSE
91
91
  - Rakefile
92
92
  - README.rdoc
93
+ - spec/spec_helper.rb
94
+ - spec/models/prod_type_role_type_spec.rb
95
+ - spec/models/prod_type_reln_spec.rb
96
+ - spec/models/product_package_spec.rb
97
+ - spec/models/prod_instance_reln_type_spec.rb
98
+ - spec/models/prod_instance_role_type_spec.rb
99
+ - spec/models/simple_product_offer_spec.rb
100
+ - spec/models/prod_type_reln_type_spec.rb
101
+ - spec/models/product_instance_spec.rb
102
+ - spec/models/prod_instance_reln_spec.rb
103
+ - spec/models/prod_availability_status_type_spec.rb
104
+ - spec/models/product_offer_spec.rb
105
+ - spec/models/product_type_spec.rb
106
+ - spec/dummy/public/422.html
107
+ - spec/dummy/public/404.html
108
+ - spec/dummy/public/500.html
109
+ - spec/dummy/public/favicon.ico
110
+ - spec/dummy/config.ru
111
+ - spec/dummy/app/assets/stylesheets/application.css
112
+ - spec/dummy/app/assets/javascripts/application.js
113
+ - spec/dummy/app/views/layouts/application.html.erb
114
+ - spec/dummy/app/helpers/application_helper.rb
115
+ - spec/dummy/app/controllers/application_controller.rb
116
+ - spec/dummy/config/routes.rb
117
+ - spec/dummy/config/locales/en.yml
118
+ - spec/dummy/config/boot.rb
119
+ - spec/dummy/config/application.rb
120
+ - spec/dummy/config/environments/spec.rb
121
+ - spec/dummy/config/initializers/mime_types.rb
122
+ - spec/dummy/config/initializers/session_store.rb
123
+ - spec/dummy/config/initializers/backtrace_silencers.rb
124
+ - spec/dummy/config/initializers/wrap_parameters.rb
125
+ - spec/dummy/config/initializers/inflections.rb
126
+ - spec/dummy/config/initializers/secret_token.rb
127
+ - spec/dummy/config/environment.rb
128
+ - spec/dummy/config/database.yml
129
+ - spec/dummy/Rakefile
130
+ - spec/dummy/script/rails
93
131
  homepage: http://development.compassagile.com
94
132
  licenses: []
95
133
  post_install_message:
@@ -116,4 +154,42 @@ specification_version: 3
116
154
  summary: The Products Engine implements ProductType and ProductInstance, as well as
117
155
  a number of classes to support product catalog-type functions and search/shopping
118
156
  scenarios.
119
- test_files: []
157
+ test_files:
158
+ - spec/spec_helper.rb
159
+ - spec/models/prod_type_role_type_spec.rb
160
+ - spec/models/prod_type_reln_spec.rb
161
+ - spec/models/product_package_spec.rb
162
+ - spec/models/prod_instance_reln_type_spec.rb
163
+ - spec/models/prod_instance_role_type_spec.rb
164
+ - spec/models/simple_product_offer_spec.rb
165
+ - spec/models/prod_type_reln_type_spec.rb
166
+ - spec/models/product_instance_spec.rb
167
+ - spec/models/prod_instance_reln_spec.rb
168
+ - spec/models/prod_availability_status_type_spec.rb
169
+ - spec/models/product_offer_spec.rb
170
+ - spec/models/product_type_spec.rb
171
+ - spec/dummy/public/422.html
172
+ - spec/dummy/public/404.html
173
+ - spec/dummy/public/500.html
174
+ - spec/dummy/public/favicon.ico
175
+ - spec/dummy/config.ru
176
+ - spec/dummy/app/assets/stylesheets/application.css
177
+ - spec/dummy/app/assets/javascripts/application.js
178
+ - spec/dummy/app/views/layouts/application.html.erb
179
+ - spec/dummy/app/helpers/application_helper.rb
180
+ - spec/dummy/app/controllers/application_controller.rb
181
+ - spec/dummy/config/routes.rb
182
+ - spec/dummy/config/locales/en.yml
183
+ - spec/dummy/config/boot.rb
184
+ - spec/dummy/config/application.rb
185
+ - spec/dummy/config/environments/spec.rb
186
+ - spec/dummy/config/initializers/mime_types.rb
187
+ - spec/dummy/config/initializers/session_store.rb
188
+ - spec/dummy/config/initializers/backtrace_silencers.rb
189
+ - spec/dummy/config/initializers/wrap_parameters.rb
190
+ - spec/dummy/config/initializers/inflections.rb
191
+ - spec/dummy/config/initializers/secret_token.rb
192
+ - spec/dummy/config/environment.rb
193
+ - spec/dummy/config/database.yml
194
+ - spec/dummy/Rakefile
195
+ - spec/dummy/script/rails