erp_inventory 3.0.0

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.
Files changed (56) hide show
  1. data/GPL-3-LICENSE +674 -0
  2. data/README.rdoc +2 -0
  3. data/Rakefile +32 -0
  4. data/app/assets/javascripts/erp_inventory/application.js +9 -0
  5. data/app/assets/stylesheets/erp_inventory/application.css +7 -0
  6. data/app/controllers/erp_inventory/application_controller.rb +4 -0
  7. data/app/helpers/erp_inventory/application_helper.rb +4 -0
  8. data/app/models/extensions/product_instance.rb +9 -0
  9. data/app/models/extensions/product_type.rb +3 -0
  10. data/app/models/inv_entry_reln.rb +14 -0
  11. data/app/models/inv_entry_reln_type.rb +4 -0
  12. data/app/models/inv_entry_role_type.rb +4 -0
  13. data/app/models/inventory_entry.rb +21 -0
  14. data/app/models/prod_instance_inv_entry.rb +6 -0
  15. data/app/views/layouts/erp_inventory/application.html.erb +14 -0
  16. data/config/routes.rb +2 -0
  17. data/db/migrate/20080805000050_base_inventory.rb +90 -0
  18. data/db/migrate/20080805000051_base_inventory_indexes.rb +47 -0
  19. data/lib/erp_inventory/engine.rb +10 -0
  20. data/lib/erp_inventory/extensions/active_record/acts_as_inventory_entry.rb +56 -0
  21. data/lib/erp_inventory/extensions.rb +1 -0
  22. data/lib/erp_inventory/version.rb +3 -0
  23. data/lib/erp_inventory.rb +5 -0
  24. data/lib/tasks/erp_inventory_tasks.rake +16 -0
  25. data/spec/dummy/Rakefile +7 -0
  26. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  27. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  28. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  29. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  30. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  31. data/spec/dummy/config/application.rb +49 -0
  32. data/spec/dummy/config/boot.rb +10 -0
  33. data/spec/dummy/config/database.yml +8 -0
  34. data/spec/dummy/config/environment.rb +5 -0
  35. data/spec/dummy/config/environments/spec.rb +27 -0
  36. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  37. data/spec/dummy/config/initializers/inflections.rb +10 -0
  38. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  39. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  40. data/spec/dummy/config/initializers/session_store.rb +8 -0
  41. data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
  42. data/spec/dummy/config/locales/en.yml +5 -0
  43. data/spec/dummy/config/routes.rb +4 -0
  44. data/spec/dummy/config.ru +4 -0
  45. data/spec/dummy/public/404.html +26 -0
  46. data/spec/dummy/public/422.html +26 -0
  47. data/spec/dummy/public/500.html +26 -0
  48. data/spec/dummy/public/favicon.ico +0 -0
  49. data/spec/dummy/script/rails +6 -0
  50. data/spec/models/inv_entry_reln_spec.rb +12 -0
  51. data/spec/models/inv_entry_reln_type_spec.rb +13 -0
  52. data/spec/models/inv_entry_role_type_spec.rb +14 -0
  53. data/spec/models/inventory_entry_spec.rb +11 -0
  54. data/spec/models/prod_instance_inv_entry_spec.rb +11 -0
  55. data/spec/spec_helper.rb +60 -0
  56. metadata +202 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe InvEntryReln do
4
+ it "can be instantiated" do
5
+ InvEntryReln.new.should be_an_instance_of(InvEntryReln)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ InvEntryReln.create().should be_persisted
10
+ end
11
+ end
12
+
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe InvEntryRelnType do
4
+ it "can be instantiated" do
5
+ InvEntryRelnType.new.should be_an_instance_of(InvEntryRelnType)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ InvEntryRelnType.create().should be_persisted
10
+ end
11
+ end
12
+
13
+
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe InvEntryRoleType do
4
+ it "can be instantiated" do
5
+ InvEntryRoleType.new.should be_an_instance_of(InvEntryRoleType)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ InvEntryRoleType.create().should be_persisted
10
+ end
11
+ end
12
+
13
+
14
+
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe InventoryEntry do
4
+ it "can be instantiated" do
5
+ InventoryEntry.new.should be_an_instance_of(InventoryEntry)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ InventoryEntry.create().should be_persisted
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe ProdInstanceInvEntry do
4
+ it "can be instantiated" do
5
+ ProdInstanceInvEntry.new.should be_an_instance_of(ProdInstanceInvEntry)
6
+ end
7
+
8
+ it "can be saved successfully" do
9
+ ProdInstanceInvEntry.create().should be_persisted
10
+ end
11
+ end
@@ -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 ADDED
@@ -0,0 +1,202 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: erp_inventory
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Rick Koloski, Russell Holmes
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-01-06 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: erp_app
16
+ requirement: &2157028180 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2157028180
25
+ - !ruby/object:Gem::Dependency
26
+ name: erp_agreements
27
+ requirement: &2157027240 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2157027240
36
+ - !ruby/object:Gem::Dependency
37
+ name: erp_txns_and_accts
38
+ requirement: &2157026100 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *2157026100
47
+ - !ruby/object:Gem::Dependency
48
+ name: erp_orders
49
+ requirement: &2157024240 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *2157024240
58
+ - !ruby/object:Gem::Dependency
59
+ name: erp_products
60
+ requirement: &2157023480 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *2157023480
69
+ - !ruby/object:Gem::Dependency
70
+ name: erp_dev_svcs
71
+ requirement: &2157022720 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *2157022720
80
+ description: The Inventory Engine in CompassAE implements a set of models for storing
81
+ information about the availability and location of ProductTypes and optionally Product
82
+ Instances. It is also the root for yield and revenue management requirements to
83
+ segment and allocate inventory for different purposes.
84
+ email:
85
+ - russonrails@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - app/assets/javascripts/erp_inventory/application.js
91
+ - app/assets/stylesheets/erp_inventory/application.css
92
+ - app/controllers/erp_inventory/application_controller.rb
93
+ - app/helpers/erp_inventory/application_helper.rb
94
+ - app/models/extensions/product_instance.rb
95
+ - app/models/extensions/product_type.rb
96
+ - app/models/inv_entry_reln.rb
97
+ - app/models/inv_entry_reln_type.rb
98
+ - app/models/inv_entry_role_type.rb
99
+ - app/models/inventory_entry.rb
100
+ - app/models/prod_instance_inv_entry.rb
101
+ - app/views/layouts/erp_inventory/application.html.erb
102
+ - config/routes.rb
103
+ - db/migrate/20080805000050_base_inventory.rb
104
+ - db/migrate/20080805000051_base_inventory_indexes.rb
105
+ - lib/erp_inventory/engine.rb
106
+ - lib/erp_inventory/extensions/active_record/acts_as_inventory_entry.rb
107
+ - lib/erp_inventory/extensions.rb
108
+ - lib/erp_inventory/version.rb
109
+ - lib/erp_inventory.rb
110
+ - lib/tasks/erp_inventory_tasks.rake
111
+ - GPL-3-LICENSE
112
+ - Rakefile
113
+ - README.rdoc
114
+ - spec/dummy/app/assets/javascripts/application.js
115
+ - spec/dummy/app/assets/stylesheets/application.css
116
+ - spec/dummy/app/controllers/application_controller.rb
117
+ - spec/dummy/app/helpers/application_helper.rb
118
+ - spec/dummy/app/views/layouts/application.html.erb
119
+ - spec/dummy/config/application.rb
120
+ - spec/dummy/config/boot.rb
121
+ - spec/dummy/config/database.yml
122
+ - spec/dummy/config/environment.rb
123
+ - spec/dummy/config/environments/spec.rb
124
+ - spec/dummy/config/initializers/backtrace_silencers.rb
125
+ - spec/dummy/config/initializers/inflections.rb
126
+ - spec/dummy/config/initializers/mime_types.rb
127
+ - spec/dummy/config/initializers/secret_token.rb
128
+ - spec/dummy/config/initializers/session_store.rb
129
+ - spec/dummy/config/initializers/wrap_parameters.rb
130
+ - spec/dummy/config/locales/en.yml
131
+ - spec/dummy/config/routes.rb
132
+ - spec/dummy/config.ru
133
+ - spec/dummy/public/404.html
134
+ - spec/dummy/public/422.html
135
+ - spec/dummy/public/500.html
136
+ - spec/dummy/public/favicon.ico
137
+ - spec/dummy/Rakefile
138
+ - spec/dummy/script/rails
139
+ - spec/models/inv_entry_reln_spec.rb
140
+ - spec/models/inv_entry_reln_type_spec.rb
141
+ - spec/models/inv_entry_role_type_spec.rb
142
+ - spec/models/inventory_entry_spec.rb
143
+ - spec/models/prod_instance_inv_entry_spec.rb
144
+ - spec/spec_helper.rb
145
+ homepage: http://development.compassagile.com
146
+ licenses: []
147
+ post_install_message:
148
+ rdoc_options: []
149
+ require_paths:
150
+ - lib
151
+ required_ruby_version: !ruby/object:Gem::Requirement
152
+ none: false
153
+ requirements:
154
+ - - ! '>='
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ required_rubygems_version: !ruby/object:Gem::Requirement
158
+ none: false
159
+ requirements:
160
+ - - ! '>='
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ requirements: []
164
+ rubyforge_project:
165
+ rubygems_version: 1.8.10
166
+ signing_key:
167
+ specification_version: 3
168
+ summary: The Inventory Engine in CompassAE implements a set of models for storing
169
+ information about the availability and location of ProductTypes and optionally Product
170
+ Instances.
171
+ test_files:
172
+ - spec/dummy/app/assets/javascripts/application.js
173
+ - spec/dummy/app/assets/stylesheets/application.css
174
+ - spec/dummy/app/controllers/application_controller.rb
175
+ - spec/dummy/app/helpers/application_helper.rb
176
+ - spec/dummy/app/views/layouts/application.html.erb
177
+ - spec/dummy/config/application.rb
178
+ - spec/dummy/config/boot.rb
179
+ - spec/dummy/config/database.yml
180
+ - spec/dummy/config/environment.rb
181
+ - spec/dummy/config/environments/spec.rb
182
+ - spec/dummy/config/initializers/backtrace_silencers.rb
183
+ - spec/dummy/config/initializers/inflections.rb
184
+ - spec/dummy/config/initializers/mime_types.rb
185
+ - spec/dummy/config/initializers/secret_token.rb
186
+ - spec/dummy/config/initializers/session_store.rb
187
+ - spec/dummy/config/initializers/wrap_parameters.rb
188
+ - spec/dummy/config/locales/en.yml
189
+ - spec/dummy/config/routes.rb
190
+ - spec/dummy/config.ru
191
+ - spec/dummy/public/404.html
192
+ - spec/dummy/public/422.html
193
+ - spec/dummy/public/500.html
194
+ - spec/dummy/public/favicon.ico
195
+ - spec/dummy/Rakefile
196
+ - spec/dummy/script/rails
197
+ - spec/models/inv_entry_reln_spec.rb
198
+ - spec/models/inv_entry_reln_type_spec.rb
199
+ - spec/models/inv_entry_role_type_spec.rb
200
+ - spec/models/inventory_entry_spec.rb
201
+ - spec/models/prod_instance_inv_entry_spec.rb
202
+ - spec/spec_helper.rb