flexite 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +12 -0
  4. data/Rakefile +40 -0
  5. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  6. data/app/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  7. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  8. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  9. data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  10. data/app/assets/images/flexite/glyphicons-halflings-white.png +0 -0
  11. data/app/assets/images/flexite/glyphicons-halflings.png +0 -0
  12. data/app/assets/javascripts/flexite/application.js +18 -0
  13. data/app/assets/javascripts/flexite/bootstrap.min.js +7 -0
  14. data/app/assets/javascripts/flexite/common.js.erb +2 -0
  15. data/app/assets/javascripts/flexite/jquery.min.js +2 -0
  16. data/app/assets/javascripts/flexite/tree.js.erb +83 -0
  17. data/app/assets/javascripts/flexite/treeview.js +1335 -0
  18. data/app/assets/stylesheets/flexite/application.css +29 -0
  19. data/app/assets/stylesheets/flexite/bootstrap-treeview.min.css +1 -0
  20. data/app/assets/stylesheets/flexite/bootstrap.min.css +5 -0
  21. data/app/assets/stylesheets/flexite/configs.css +8 -0
  22. data/app/assets/stylesheets/flexite/entries.css +4 -0
  23. data/app/assets/stylesheets/flexite/tree.css +21 -0
  24. data/app/assets/stylesheets/scaffold.css +56 -0
  25. data/app/controllers/flexite/application_controller.rb +25 -0
  26. data/app/controllers/flexite/configs_controller.rb +61 -0
  27. data/app/controllers/flexite/entries_controller.rb +82 -0
  28. data/app/factories/flexite/base_factory.rb +7 -0
  29. data/app/factories/flexite/service_factory.rb +19 -0
  30. data/app/forms/flexite/base_form.rb +24 -0
  31. data/app/forms/flexite/config/form.rb +12 -0
  32. data/app/forms/flexite/entry/array_form.rb +11 -0
  33. data/app/forms/flexite/entry/form.rb +16 -0
  34. data/app/helpers/flexite/application_helper.rb +15 -0
  35. data/app/helpers/flexite/configs_helper.rb +4 -0
  36. data/app/helpers/flexite/entries_helper.rb +46 -0
  37. data/app/models/flexite/arr_entry.rb +35 -0
  38. data/app/models/flexite/bool_entry.rb +19 -0
  39. data/app/models/flexite/config.rb +64 -0
  40. data/app/models/flexite/entry.rb +30 -0
  41. data/app/models/flexite/int_entry.rb +13 -0
  42. data/app/models/flexite/str_entry.rb +2 -0
  43. data/app/models/flexite/sym_entry.rb +17 -0
  44. data/app/services/flexite/action_service/result.rb +44 -0
  45. data/app/services/flexite/action_service.rb +30 -0
  46. data/app/services/flexite/config/create_service.rb +25 -0
  47. data/app/services/flexite/config/update_service.rb +28 -0
  48. data/app/services/flexite/data/hash.rb +17 -0
  49. data/app/services/flexite/data/migrators/yaml.rb +62 -0
  50. data/app/services/flexite/data/new.rb +87 -0
  51. data/app/services/flexite/entry/array_create_service.rb +69 -0
  52. data/app/services/flexite/entry/array_update_service.rb +69 -0
  53. data/app/services/flexite/entry/create_service.rb +31 -0
  54. data/app/services/flexite/entry/destroy_array_entry_service.rb +25 -0
  55. data/app/services/flexite/entry/destroy_service.rb +22 -0
  56. data/app/services/flexite/entry/update_service.rb +26 -0
  57. data/app/simple_form/array_input.rb +13 -0
  58. data/app/views/flexite/application/index.html.haml +14 -0
  59. data/app/views/flexite/configs/_form.html.haml +7 -0
  60. data/app/views/flexite/configs/create.js.haml +3 -0
  61. data/app/views/flexite/configs/edit.js.haml +1 -0
  62. data/app/views/flexite/configs/index.json.erb +10 -0
  63. data/app/views/flexite/configs/new.js.haml +1 -0
  64. data/app/views/flexite/configs/update.js.haml +2 -0
  65. data/app/views/flexite/entries/_form.html.haml +11 -0
  66. data/app/views/flexite/entries/_new_array_entry_form.html.haml +7 -0
  67. data/app/views/flexite/entries/_popup.html.haml +18 -0
  68. data/app/views/flexite/entries/_types_dropdown.html.haml +8 -0
  69. data/app/views/flexite/entries/create.js.haml +4 -0
  70. data/app/views/flexite/entries/destroy.js.haml +4 -0
  71. data/app/views/flexite/entries/destroy_array_entry.js.haml +6 -0
  72. data/app/views/flexite/entries/edit.js.haml +1 -0
  73. data/app/views/flexite/entries/new.js.haml +1 -0
  74. data/app/views/flexite/entries/new_array_entry.js.haml +1 -0
  75. data/app/views/flexite/entries/select_type.js.haml +1 -0
  76. data/app/views/flexite/entries/types/_arr_entry.html.haml +19 -0
  77. data/app/views/flexite/entries/types/_bool_entry.html.haml +4 -0
  78. data/app/views/flexite/entries/types/_int_entry.html.haml +4 -0
  79. data/app/views/flexite/entries/types/_str_entry.html.haml +4 -0
  80. data/app/views/flexite/entries/types/_sym_entry.html.haml +1 -0
  81. data/app/views/flexite/entries/update.js.haml +1 -0
  82. data/app/views/flexite/shared/_messages.html.haml +5 -0
  83. data/app/views/flexite/shared/_show_flash.js.haml +5 -0
  84. data/app/views/layouts/flexite/application.html.haml +11 -0
  85. data/config/initializers/simple_form.rb +143 -0
  86. data/config/initializers/simple_form_bootstrap.rb +43 -0
  87. data/config/locales/simple_form.en.yml +26 -0
  88. data/config/routes.rb +17 -0
  89. data/db/migrate/20180503102555_create_flexite_configs.rb +14 -0
  90. data/db/migrate/20180503103109_create_flexite_entries.rb +14 -0
  91. data/lib/flexite/cached_node.rb +19 -0
  92. data/lib/flexite/configuration.rb +24 -0
  93. data/lib/flexite/engine.rb +18 -0
  94. data/lib/flexite/flexy.rb +13 -0
  95. data/lib/flexite/nodes_hash.rb +5 -0
  96. data/lib/flexite/version.rb +3 -0
  97. data/lib/flexite.rb +44 -0
  98. data/lib/tasks/flexite_tasks.rake +20 -0
  99. data/test/dummy/README.rdoc +261 -0
  100. data/test/dummy/Rakefile +7 -0
  101. data/test/dummy/app/assets/javascripts/application.js +15 -0
  102. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  103. data/test/dummy/app/controllers/application_controller.rb +3 -0
  104. data/test/dummy/app/helpers/application_helper.rb +2 -0
  105. data/test/dummy/config/application.rb +59 -0
  106. data/test/dummy/config/application.yml +599 -0
  107. data/test/dummy/config/boot.rb +10 -0
  108. data/test/dummy/config/database.yml +25 -0
  109. data/test/dummy/config/environment.rb +5 -0
  110. data/test/dummy/config/environments/development.rb +40 -0
  111. data/test/dummy/config/environments/production.rb +67 -0
  112. data/test/dummy/config/environments/test.rb +37 -0
  113. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  114. data/test/dummy/config/initializers/flexite.rb +5 -0
  115. data/test/dummy/config/initializers/inflections.rb +15 -0
  116. data/test/dummy/config/initializers/mime_types.rb +5 -0
  117. data/test/dummy/config/initializers/secret_token.rb +7 -0
  118. data/test/dummy/config/initializers/session_store.rb +8 -0
  119. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  120. data/test/dummy/config/locales/en.yml +5 -0
  121. data/test/dummy/config/routes.rb +3 -0
  122. data/test/dummy/config.ru +4 -0
  123. data/test/dummy/db/development.sqlite3 +0 -0
  124. data/test/dummy/db/schema.rb +39 -0
  125. data/test/dummy/db/seeds.rb +3 -0
  126. data/test/dummy/db/test.sqlite3 +0 -0
  127. data/test/dummy/log/development.log +86588 -0
  128. data/test/dummy/public/404.html +26 -0
  129. data/test/dummy/public/422.html +26 -0
  130. data/test/dummy/public/500.html +25 -0
  131. data/test/dummy/public/favicon.ico +0 -0
  132. data/test/dummy/script/rails +6 -0
  133. data/test/dummy/tmp/cache/assets/C67/060/sprockets%2Ffaf176441f0544dd2b51901280044b40 +0 -0
  134. data/test/dummy/tmp/cache/assets/C9D/530/sprockets%2Fdcd49c063327c12052812f41c20a8e74 +0 -0
  135. data/test/dummy/tmp/cache/assets/CA3/270/sprockets%2F502b740063f8ec15e7e12811da71c772 +0 -0
  136. data/test/dummy/tmp/cache/assets/CDC/060/sprockets%2F8ff1d307d1b36810549d0829722b7aea +0 -0
  137. data/test/dummy/tmp/cache/assets/CDE/120/sprockets%2F5fd8b3fa3724451579552aed373410ce +0 -0
  138. data/test/dummy/tmp/cache/assets/CF8/980/sprockets%2F4e5077b95460dc34d7c9d7d9880e7b47 +0 -0
  139. data/test/dummy/tmp/cache/assets/D00/4C0/sprockets%2F603c6d7b825c2f4a6422b3d4af4e6203 +0 -0
  140. data/test/dummy/tmp/cache/assets/D00/C40/sprockets%2F999847c008fb4ce26fff5607c39d8358 +0 -0
  141. data/test/dummy/tmp/cache/assets/D09/A30/sprockets%2F2a71e20a2f3544acb51956504cd8d8e9 +0 -0
  142. data/test/dummy/tmp/cache/assets/D0D/E60/sprockets%2F90ea9eaa4671ec2d76703bae31972634 +0 -0
  143. data/test/dummy/tmp/cache/assets/D2A/160/sprockets%2Fbe17d4d0be4b381500e2824bbe273d70 +0 -0
  144. data/test/dummy/tmp/cache/assets/D2E/700/sprockets%2Fb21f85e0940bbcb3a8914c9cb0b07218 +0 -0
  145. data/test/dummy/tmp/cache/assets/D39/CD0/sprockets%2F0e8f6981475e49ea9fe14698fa57e4e9 +0 -0
  146. data/test/dummy/tmp/cache/assets/D40/590/sprockets%2F181dd5673b58f1ec4c89e50028bfad60 +0 -0
  147. data/test/dummy/tmp/cache/assets/D46/870/sprockets%2Fd880bdf72c5d0009b88fda8521439dc8 +0 -0
  148. data/test/dummy/tmp/cache/assets/D48/5F0/sprockets%2Fe6a83afb2d92f4692ffb391b5285a518 +0 -0
  149. data/test/dummy/tmp/cache/assets/D4B/A20/sprockets%2Febde89014596e655c35df9c4a01ee636 +0 -0
  150. data/test/dummy/tmp/cache/assets/D54/A50/sprockets%2Ff49839d906f69fd92904ebac07a3a38e +0 -0
  151. data/test/dummy/tmp/cache/assets/D69/B50/sprockets%2F4186e2787004e19ceb0c4afed46cf04b +0 -0
  152. data/test/dummy/tmp/cache/assets/D6D/C20/sprockets%2F112e96fea93f5f1e31d2077f1cdaf283 +0 -0
  153. data/test/dummy/tmp/cache/assets/D7A/8F0/sprockets%2F8eefc5f9824d950317a5c4a2e68b3c4e +0 -0
  154. data/test/dummy/tmp/cache/assets/DB3/360/sprockets%2F24b1f98ad736884b91d6ebeb2fc68ed8 +0 -0
  155. data/test/dummy/tmp/cache/assets/DD2/E90/sprockets%2Ff01f48c96ba588d15b20dd57ed3ccb7f +0 -0
  156. data/test/dummy/tmp/cache/assets/DEE/0C0/sprockets%2Feedcd74856542eedb5ea3ab1b1502ca4 +0 -0
  157. data/test/dummy/tmp/cache/assets/DF1/210/sprockets%2Ff4fe7dba1445ba1b668aaa1bd34ca984 +0 -0
  158. data/test/dummy/tmp/cache/assets/E44/790/sprockets%2Fefb8d8ea9e97da9d675a8bfa1d5de343 +0 -0
  159. data/test/fixtures/flexite/configs.yml +7 -0
  160. data/test/fixtures/flexite/entries.yml +13 -0
  161. data/test/flexite_test.rb +7 -0
  162. data/test/functional/flexite/configs_controller_test.rb +51 -0
  163. data/test/functional/flexite/entries_controller_test.rb +51 -0
  164. data/test/integration/navigation_test.rb +10 -0
  165. data/test/test_helper.rb +15 -0
  166. data/test/unit/flexite/config_test.rb +9 -0
  167. data/test/unit/flexite/entry_test.rb +9 -0
  168. data/test/unit/helpers/flexite/configs_helper_test.rb +6 -0
  169. data/test/unit/helpers/flexite/entries_helper_test.rb +6 -0
  170. metadata +366 -0
@@ -0,0 +1,599 @@
1
+ defaults: &default
2
+
3
+ client: corevist
4
+ time_zone: EST #only for translation
5
+ RFC_version: '3'
6
+ announce_system_maintenance: 10 # number of days in advance
7
+ system_maintenance_warning: 15 # number of minutes in advance
8
+ languages: [ en_US, de_DE, es_ES, fr_CA, fr_FR, nl_BE, nl_NL, sv_SE, zh_CN ]
9
+ microsites: [ b2b_microsite1 ] #Setting up a new microsite? Follow the steps: https://b2b2dot0.centraldesktop.com/development/doc/5640912
10
+ microsite_languages:
11
+ # first listed language is used for communications with the microsite
12
+ b2b_microsite1: [ en_US, de_DE, es_ES, fr_CA, fr_FR, nl_BE, nl_NL, sv_SE, zh_CN ]
13
+ login_url: # E9
14
+ b2b_microsite1: [ https://core.b2b2dot0.biz, :b2b_app ]
15
+
16
+ rfc_ashost: "/H/saprouter.1stbasis.com/H/172.20.3.2"
17
+ rfc_sysnr: "00"
18
+ rfc_client: "300"
19
+ rfc_user: "core_cpic"
20
+ rfc_passwd: "b2b4you"
21
+ rfc_lang: EN
22
+ rfc_trace: 0
23
+
24
+ new_features:
25
+ # :order_change: true
26
+
27
+ suppress_browser_update: false
28
+ duplicate_return_code: "011"
29
+
30
+ surveys:
31
+ b2b_microsite1:
32
+ :activated: true
33
+ # should always have some date specified
34
+ :show_survey_on_home_page_until: 12/31/2099
35
+ :show_survey_on_help_page: true
36
+ en_US:
37
+ # site survey URL - if a url appears here it is eligible to be displayed on the home page (if date is OK) and the help page (if flag is set)
38
+ :survey_url: http://www.surveymonkey.com/s.aspx?sm=2yQpkHt3mGN4O5euWZ975w_3d_3d
39
+ :survey_results_url: http://www.surveymonkey.com/sr.aspx?sm=USLtBmy5BZSEQ9L59cVTlabNSQjIL5E_2fq9sVejV36ic_3d
40
+ de_DE:
41
+ # site survey URL - if a url appears here it is eligible to be displayed on the home page (if date is OK) and the help page (if flag is set)
42
+ :survey_url: http://www.surveymonkey.com/s.aspx?sm=2yQpkHt3mGN4O5euWZ975w_3d_3d
43
+ :survey_results_url: http://www.surveymonkey.com/sr.aspx?sm=USLtBmy5BZSEQ9L59cVTlabNSQjIL5E_2fq9sVejV36ic_3d
44
+
45
+ # The URL to this app
46
+ catalog_redirect: /sap/redirect/b2bref/?ref=
47
+ catalog_log_out: false # sap/redirect/endsession #typical URL for magento plugin
48
+ add_to_cart_url: cart/add_to_cart
49
+ return_to_cart_url: cart/shop
50
+
51
+ #E41 new Magento add to cart behavior to store the user_is as the key to the soap_cart table
52
+ user_id_is_key_to_soap_cart: true
53
+ auto_save_shopping_cart_after_loading_from_soap_cart: true
54
+ load_from_soap_cart: false
55
+
56
+ # Product image URLs (no catalog) - the product number will be added to generate the exact URL. If set to false the column will not show up in the cart. For customers we need a URL like http://evergreen_inc.com/images/products/
57
+ product_image_url: false
58
+
59
+ # Product Detail Page URLs (Magento catalog in play)
60
+ product_detail_page_url: false
61
+ product_thumbnail_image_url: false
62
+
63
+ # microsite-independent address (because user is not known)
64
+ helpdesk_email: app.admin@b2b2dot0.com
65
+
66
+ # smtp settings
67
+ use_customer_smtp_server: true #true/false if false, send emails via 1and1
68
+ smtp:
69
+ :address: smtp.1and1.com
70
+ :port: 25
71
+ :domain: b2b2dot0.biz
72
+ :authentication: :login
73
+ :user_name: app.admin@b2b2dot0.biz
74
+ support_email: support@corevist.com
75
+ :password: b2b2d0t04y0u
76
+
77
+ #gmail smtp settings
78
+ # smtp:
79
+ # :address: smtp.gmail.com
80
+ # :port: 25
81
+ # :domain: www.google.com
82
+ # :authentication: :login
83
+ # :enable_starttls_auto: true
84
+ # :user_name: support@b2b2dot0.com
85
+ # :password: b2b4you!
86
+
87
+ raw_data_messages: {} # either empty hash or as below
88
+ # :cart: [ adrian.zehnder@b2b2dot0.com ]
89
+ # :cart_all_messages: true
90
+ # :payment: [ adrian.zehnder@b2b2dot0.com, ray.mannion@b2b2dot0.com ]
91
+ # :payment_all_messages: true # otherwise only generic messages
92
+
93
+ us_states:
94
+ - [ AL, Alabama ]
95
+ - [ AK, Alaska ]
96
+ - [ AZ, Arizona ]
97
+ - [ AR, Arkansas ]
98
+ - [ CA, California ]
99
+ - [ CO, Colorado ]
100
+ - [ CT, Connecticut ]
101
+ - [ DE, Delaware ]
102
+ - [ DC, District of Columbia ]
103
+ - [ FL, Florida ]
104
+ - [ GA, Georgia ]
105
+ - [ HI, Hawaii ]
106
+ - [ ID, Idaho ]
107
+ - [ IL, Illinois ]
108
+ - [ IN, Indiana ]
109
+ - [ IA, Iowa ]
110
+ - [ KS, Kansas ]
111
+ - [ KY, Kentucky ]
112
+ - [ LA, Louisiana ]
113
+ - [ ME, Maine ]
114
+ - [ MD, Maryland ]
115
+ - [ MA, Massachusetts ]
116
+ - [ MI, Michigan ]
117
+ - [ MN, Minnesota ]
118
+ - [ MS, Mississippi ]
119
+ - [ MO, Missouri ]
120
+ - [ MT, Montana ]
121
+ - [ NE, Nebraska ]
122
+ - [ NV, Nevada ]
123
+ - [ NH, New Hampshire ]
124
+ - [ NJ, New Jersey ]
125
+ - [ NM, New Mexico ]
126
+ - [ NY, New York ]
127
+ - [ NC, North Carolina ]
128
+ - [ ND, North Dakota ]
129
+ - [ OH, Ohio ]
130
+ - [ OK, Oklahoma ]
131
+ - [ OR, Oregon ]
132
+ - [ PA, Pennsylvania ]
133
+ - [ RI, Rhode Island ]
134
+ - [ SC, South Carolina ]
135
+ - [ SD, South Dakota ]
136
+ - [ TN, Tennessee ]
137
+ - [ TX, Texas ]
138
+ - [ UT, Utah ]
139
+ - [ VT, Vermont ]
140
+ - [ VA, Virginia ]
141
+ - [ WA, Washington ]
142
+ - [ WV, West Virginia ]
143
+ - [ WI, Wisconsin ]
144
+ - [ WY, Wyoming ]
145
+
146
+ # Roles
147
+ roles_assigned_to_microsites: false
148
+ # privileges
149
+ general_privileges:
150
+ - :suppress_pricing
151
+ - :pilot_feature
152
+ - :cart_short_cut
153
+ - :order_requestor
154
+ - :customer_master_maintenance
155
+ - :upload_users
156
+ sales_area_privileges:
157
+ - :place_holder # here nothing is really required by the app
158
+ salesdoc_type_privileges:
159
+ - :create_doc
160
+ - :change_doc
161
+ - :change_pricing # these are required by the app
162
+ # it makes sense to display less, if some of them are not supposed to show up at all
163
+ display_categories:
164
+ - C # std.orders
165
+ - I # del.free of charge, ( K: credit memo request, L: debit memo request: probably never)
166
+ - H # returns
167
+ - M # invoice
168
+ - O # credit memo
169
+ - P # debit memo
170
+ - U # pro forma invoice (N: invoice cancellation, S: credit memo cancellation: doesn't make sense)
171
+ - B # quote
172
+ - A # RfQ
173
+ customer_admins_maintain_SP_or_SH: true
174
+ employee_admins_can_create_admins:
175
+ b2b_microsite1: true
176
+
177
+ # Sales Areas
178
+ sales_areas: [ '30001000', '30001200', '30001400',
179
+ '10001000' ]
180
+ inactive_sales_areas: []
181
+ # Role sales areas have to list every sales area which has to be displayed in roles
182
+ # Currently only masking at the sales org level is supported (has to end with xxxx)
183
+ # role_sales_areas: [ '80000112', '80000114', '80000131', '99000131', '86000131', '8500xxxx', '8600xxxx', '9500xxxx', '9900xxxx' ]
184
+
185
+ # Sales rep
186
+ territories:
187
+ b2b_microsite1:
188
+ - [ 'US blue chips, North West', W01 ]
189
+ - [ 'US blue chips, South West', W02 ]
190
+ - [ 'US SME, West', W03 ]
191
+ - [ 'US blue chips, North East', E01 ]
192
+ - [ 'US blue chips, South East', E02 ]
193
+ - [ 'US SME, East', E01 ]
194
+ - [ 'Europe blue chips', EU1 ]
195
+ - [ 'Europe SME', EU2 ]
196
+
197
+ company_codes:
198
+ :all: [ '3000', '1000' ]
199
+ # from table TVKO: sales org is assigned to company code
200
+ '3000': '3000'
201
+ '1000': '1000'
202
+ use_currency_symbols: #by microsite E11
203
+ b2b_microsite1: true
204
+
205
+ # http://www.xe.com/symbols.php
206
+ currency_symbols:
207
+ USD: $
208
+ EUR: €
209
+ GBP: £
210
+ CAD: C$
211
+ # General app
212
+ qty_with_dec: false
213
+ assign_ship_tos: true # by assigning ship-tos you also activate sales doc entry by ship-to
214
+ partners_with_street_address: [ WE ]
215
+ # other partner functions used and where they are stored in SAP (so overlapping numbers in the partner cache can be avoided)
216
+ partner_functions:
217
+ RE: :customer
218
+ LF: :vendor
219
+ SP: :vendor
220
+ add_to_cart_quantity: 1000 # means 1
221
+ document_cache_size: 20 # if the customer has huge documents (>500 items), this should be looked at
222
+ b2c_catalogs: true # true/false
223
+
224
+ sap_monitor:
225
+ :number_of_failures: 3 # consecutive failures
226
+ :number_of_successes: 2 # consecutive successes
227
+ :downtime: 30 # minutes
228
+ :extend_downtime: 10 # minutes before it runs out
229
+ :email_recipients: [ errors@corevist.com ]
230
+ :haproxy: localhost:8100 # address/host of haproxy
231
+ :max_time: 50 # time out for haproxy call in seconds
232
+
233
+ mongrel_monitor:
234
+ :number_of_failures: 4 # consecutive failures
235
+
236
+ # Login related
237
+ # # at least 6 chars, at least 1 digit, one character
238
+ # password_strength_regexp: '((?=.*\d)(?=.*[a-zA-Z]).{6,})'
239
+ # at least 6 chars, at least 1 digit, at least 1 non-digit (so it'll also work for non-Western alphabets)
240
+ password_strength_regexp: '((?=.*\d)(?=.*[\D]).{6,})'
241
+ # # at least 6 chars, at least 1 digit, at least 1 non-digit, no spaces
242
+ # password_strength_regexp: '((?=.*\d)(?!.*\s)(?=.*[\D]).{6,})' default_password: b2b4you # mainly for tests, but also for rake job creating users
243
+ default_password: b2b4you # mainly for tests, but also for rake job creating users
244
+ activate_forgotten_password: true
245
+ activate_registration: true
246
+ use_greeter: false # whether or not popup it displayed for first time user logins
247
+ no_reuse_of_x_passwords: false # number of historic passwords or false
248
+ forced_password_change_after_x_days: false # number of days or false
249
+ lock_out_after_x_failed_logins: 5 # number or false
250
+ send_lock_out_notification: true # true or false
251
+ db_user_phone_number_required: false # true or false NOTE: before setting a client's project to true, you need to ensure that all existing users have a phone number entered in the DB or "ALL" logins will fail!
252
+ db_user_id_cannot_equal_password: true # true or false #E22
253
+ login_via_cookie: false # true/false or number of days
254
+
255
+ # Summary
256
+ # to turn it off, set all type_of_xxx to N
257
+ type_of_salesdocs: U # U=recently placed orders of user, P=recently placed orders of partner (sold-to, ship-to), N=no sales docs
258
+ number_of_salesdocs: 5 # number, A=all
259
+ empl_type_of_salesdocs: U # employees: currently only U, N
260
+ empl_number_of_salesdocs: 5
261
+ type_of_deliveries: R # R=recent deliveries of sold-to/ship-to, N=no deliveries
262
+ number_of_deliveries: 10 # for R: since x days
263
+ type_of_invoices: O # O=overdue, D=due, N=no invoices
264
+ number_of_invoices: A # number, A=all
265
+
266
+ # Home page
267
+ keep_news_closed: true
268
+ approval_functionality:
269
+ b2b_microsite1: false #true
270
+
271
+ # thin cart
272
+ thin_cart:
273
+ :atp_check: true
274
+ :price_check: true
275
+ :doc_type: TA
276
+ :based_on: :sold_to # :sold_to / :ship_to
277
+ :atp_date: :material_availability_date # :material_availability_date, :ship_date, :delivery_date
278
+ :add_to_cart: true
279
+ :pricing_rule: V # E31
280
+
281
+ place_order:
282
+ by_proxy_login: false #Z5380
283
+ admin:
284
+ #temp solution
285
+ sub_menus: [:user_maintenance, :role_maintenance, :proxy_login, :monitoring, :content_maintenance, :sap_maintenance] #Z5513
286
+
287
+
288
+ # Sales Document Search
289
+ salesdoc_search_options: [ Last_7d, Last_30d, Last_90d ]
290
+ salesdocs_max_results: 12000
291
+ salesdocs_max_display: 100
292
+ salesdocs_max_display_options: [ 50, 100, 200, 300, 400, 500 ] #ZD6483
293
+ salesdoc_search_by:
294
+ :sold_to: true
295
+ :ship_to: true
296
+ :material: true
297
+ :po: true
298
+ :delivery: true
299
+ :invoice: true
300
+ :order: true
301
+ :eta: true
302
+ :backorders: true
303
+ :openorders: true
304
+ :advanced: false
305
+ # Default must be enabled in the list above
306
+ salesdoc_search_by_default: :po
307
+ backorders:
308
+ :since: 360 # how far back to search for backorders
309
+ :cut_off: 1 # today + x: order with RDD older than cut off is considered a backorder
310
+ salesdocs_by_eta:
311
+ :max_results: 300
312
+ :orders_since: 365 # how many days before today
313
+ :deliveries_since: 10 # how many days before today
314
+ display_reference_document: false # displays e.g. the quote number. Only makes sense if create with reference to something is active
315
+
316
+ # Sales Document Display
317
+ carriers: # lists the SAP numbers of carriers and links them to a tracking URL
318
+ '123456': Fedex
319
+ '7118794': UPS
320
+ tracking_URLs:
321
+ Fedex: http://www.fedex.com/Tracking?action=track&tracknumbers=TrackingNumber
322
+ UPS: http://wwwapps.ups.com/etracking/tracking.cgi?TypeOfInquiryNumber=T&InquiryNumber1=TrackingNumber
323
+ UPSltl: 'http://ltl.upsfreight.com/shipping/tracking/trackResults.aspx?track=PTrackingNumber,' # needs to be enclosed in quotes because the comma at the end was causing a unterminated string error in the HTML generated by link_to_function
324
+ Conway: https://www.con-way.com/webapp/manifestrpts_p_app/Tracking/TrackingRS.jsp?PRO=TrackingNumber
325
+ YellowFreight: http://my.yrc.com/dynamic/national/servlet?CONTROLLER=com.rdwy.ec.rextracking.http.controller.ProcessPublicTrackingController&PRONumber=TrackingNumber
326
+ EstesExpress: http://www.estes-express.com/cgi-dta/edn419.mbr/output?search_criteria=TrackingNumber
327
+ JPExpress: http://www.myjpexpress.com/freightbill.aspx?number=TrackingNumber
328
+ # SCAC codes - industry standard:
329
+ # Might try here: http://www.track-trace.com/bol
330
+ # Or, here: http://www.nmfta.org/pages/scac
331
+ DAFG: https://www.daytonfreight.com/Tracking/TrackingDetail.aspx?proNum=TrackingNumber
332
+ FDEG: http://www.fedex.com/Tracking?action=track&tracknumbers=TrackingNumber
333
+ CWCE: https://www.con-way.com/webapp/manifestrpts_p_app/Tracking/TrackingRS.jsp?PRO=TrackingNumber
334
+ EXLA: http://www.estes-express.com/cgi-dta/edn419.mbr/output?search_criteria=TrackingNumber
335
+ FEDX: http://www.fedex.com/Tracking?action=track&tracknumbers=TrackingNumber
336
+ HMES: http://www.expresstracking.org/holland/holland-tracking-result/?no=TrackingNumber
337
+ JPXS: http://www.myjpexpress.com/freightbill.aspx?number=TrackingNumber
338
+ LMEL: http://www.lme4me.com/webapp/Shipping/ShippingStatusURL?stype=PRO&snum=TrackingNumber
339
+ RBTN: http://www.expresstracking.org/chrobinson/c-h-robinson-tracking-result/?no=TrackingNumber
340
+ ODFL: http://www.expresstracking.org/old-dominion/old-dominion-tracking-result/?no=TrackingNumber
341
+ PITD: http://works.pittohio.com/mypittohio/sv_ground/OT_ShipmentTraceDetails.asp?pro=TrackingNumber
342
+ # RL_CARRIERS: http://www.expresstracking.org/rlcarriers/rl-carriers-tracking-result/?no=TrackingNumber
343
+ #RL_CARRIERS: http://www.rlcarriers.com/shiptrace.asp?traceseek=PRO&TRACENUM=TrackingNumber
344
+ SAIA: http://www.saia.com/Tracing/AjaxProstatusByPro.aspx?m=2&UID=&PWD=&PRONum1=TrackingNumber
345
+ UPSI: http://wwwapps.ups.com/etracking/tracking.cgi?TypeOfInquiryNumber=T&InquiryNumber1=TrackingNumber
346
+ UPS_FREIGHT: 'http://ltl.upsfreight.com/shipping/tracking/trackResults.aspx?track=PTrackingNumber,' # needs to be enclosed in quotes because the comma at the end was causing a
347
+
348
+ output_types:
349
+ # method based on link used in Google Analytics, special method (spool, pdf, idoc, state), printer_id (#requires SAP transport EH6K900170 or higher)
350
+ ZB10: [ :generate_pdf, :salesdoc, :order_confirmation, :otf, :LP01 ]
351
+ ZB11: [ :generate_pdf, :invoice, :invoice, :otf ]
352
+ QU00: [ :generate_pdf, :salesdoc, :quote ]
353
+ BA00: [ :generate_pdf, :salesdoc, :order_confirmation, :pdf, :LP01 ]
354
+ PL00: [ :generate_pdf, :delivery, :packing_list, :spool ]
355
+ LD00: [ :generate_pdf, :delivery, :bill_of_lading, :spool ]
356
+ RD00: [ :generate_pdf, :invoice, :invoice, :pdf, :LP01 ]
357
+ ZPRO: [ :generate_pdf, :order_based_proforma_invoice, :proforma_invoice, :spool ] # E25
358
+ BOL: [ :client_specific, :shipment, :bol ]
359
+ SAP13: [ :generate_pdf, :statement, :statement, :state ] #E50
360
+ invoice: inv
361
+ order_confirmation: oc
362
+ packing_list: pl
363
+ bill_of_lading: bol
364
+ quote: qu
365
+
366
+ # Sales Document Creation
367
+ salesdoc_type_sequence: [ TA, KL ]
368
+ quote_type_sequence: [ AG ]
369
+ rfq_type_sequence: [ AF ]
370
+ return_type_sequence: [ RE ] # E30
371
+ create_salesdoc_types: # if role_sales_areas: have to refer to them, otherwise to sales_areas
372
+ TA: [ '30001000', '10001000' ]
373
+ KL: [ '30001000', '10001000' ]
374
+ RE: [ '30001000', '10001000' ] # E30
375
+ # AG: [ US01ST01, EU01ST01 ]
376
+ # AF: [ US01ST01, EU01ST01 ]
377
+ # AB: [ US01ST01 ]
378
+ inactive_salesdoc_types: {}
379
+ # KL: [ EU01SA01 ] # so the functions and partners can already be prepared
380
+ min_qty: 1
381
+ max_qty:
382
+ :default: 1000 #Can be by microsite RPM20150126
383
+ customer_materials: true
384
+ simulate_after_return_from_catalog: false
385
+ ipc_active: false
386
+ # the default behavior is that a header RDD change overwrites ALL item RDDs:
387
+ # this flag only makes sense if all item RDDs are always equal to the header RDD (i.e. no entry of item RDDs)
388
+ suppress_header_rdd_change_pop_up: false
389
+ no_rdd_in_upload: false
390
+
391
+ # Customer Creation E4
392
+ # reference_sold_to: '70000010' # dev
393
+ # reference_ship_to: '80000000' # dev
394
+ reference_sold_to: '3251' # QA
395
+ reference_ship_to: '3251' # QA
396
+ with_tax_jurisdiction_codes: false # true/false
397
+
398
+ sap_validation:
399
+ max_length:
400
+ po_number: 35
401
+
402
+ search_criteria:
403
+ max_length:
404
+ number: 10
405
+ postal_code: 10
406
+ city: 25
407
+ name: 35
408
+ material: 18
409
+ description: 40
410
+ po_number: 35
411
+ state: 3
412
+ phone: 14
413
+
414
+ # Material Search
415
+ materials_max_results: 100
416
+ material_search_requirements: # {} # for not activated yet
417
+ # [^\*]{3}: sequence of 3 non-wildcard characters anywhere
418
+ # ^[^\*]{3}: sequence of 3 non-wildcard characters at the beginning
419
+ material: '^[^\*]{3}'
420
+ description: '[^\*]{3}'
421
+ #E52: Search for materials using material determination
422
+ material_search_determination:
423
+ b2b_microsite1: false
424
+ #E27: allow search by customer material, by microsite
425
+ material_search_by_customer_material:
426
+ b2b_microsite1: true
427
+ prepopulate_material_search_materials:
428
+ b2b_microsite1: false
429
+
430
+ # Partner Search
431
+ partners_max_results: 100
432
+ partner_search_requirements: # {} # for not activated yet
433
+ number: '^[^\*]{3}'
434
+ name1: '[^\*]{3}'
435
+ city: '[^\*]{3}'
436
+ postal_code: '^[^\*]{3}'
437
+ phone_for_search: '[^\*]{3}'
438
+
439
+ # PO wildcard search requirements for order and invoice search by PO the validation code assumes that wildcards will not be allowed at the beginning
440
+ po_wildcard_search: false # false if not used, '^[^\*]{4}' for min of 4 characters without a wildcard in the front
441
+
442
+ # Invoice Search
443
+ invoice_search_options: [ Last_7d, Last_30d, Last_90d ]
444
+ invoices_max_results: 12000
445
+ invoices_max_display: 100
446
+ invoices_max_display_options: [ 50, 100, 200, 300, 400, 500 ] #ZD6483
447
+ invoice_search_by:
448
+ :payer: true
449
+ :material: true
450
+ :po: true
451
+ :delivery: true
452
+ :invoice: true
453
+ :order: true
454
+ :advanced: false
455
+ # Default must be enabled in the list above
456
+ invoice_search_by_default: :payer
457
+
458
+ # Open items
459
+ due_totals_in_multiple_currencies: true # true/false
460
+ due_in_days: 10 # display balance due in x days
461
+
462
+ # paymetric:
463
+ # :tokenization: false
464
+ # :xipay: false
465
+ # # working DI configs from Blount QA
466
+ # :di_guid: a519e565-469d-4cdd-a585-e8af0276353e
467
+ # :di_key: 3Tc?Py*8-L6x9tE$+G7pg4!B2}DznX5_
468
+ # :di_url: https://qaapp02.xisecurenet.com/DIeComm
469
+
470
+
471
+ #E39 Bank of America Web AR
472
+ #Maintain settings: https://demo.globalgatewaye4.firstdata.com/payment_pages/edit/65378 user b816
473
+ #Note that locally, it expects port 3017 uness you specify a different "Payment page" which is the :x_login variable below
474
+ bank_of_america:
475
+ :url: "https://demo.globalgatewaye4.firstdata.com/payment"
476
+ :x_login: "WSP-B2B2D-A0@wcQA9lw" # Take from Payment Page ID in Payment Pages interface
477
+ :transaction_key: "AoJQ9BG5yERwism5W037" # Take from Payment Pages configuration interface
478
+
479
+ # Web AR
480
+ web_ar:
481
+ '3000':
482
+ :document_type: DZ
483
+ :echeck_action: LO # O like Omega
484
+ :echecks: :by_payer_comp_code # :by_user, false
485
+ :country: US
486
+ :type_of_account: X
487
+ :display_partials: true
488
+ :display_credits: true
489
+ :allow_partial_payments: false # smallest amount (100) or false
490
+ :routing_number_length: 9
491
+ :suppress_sap_posting: false #true for biolabs
492
+ :payment_processor: :bofa #:paymetric, :bofa
493
+ # :payment_method_options: [ 'invoice', 'credit card', 'echeck' ]
494
+
495
+ # Payments Search
496
+ payments_search_options: [ Last_7d, Last_30d, Last_90d ]
497
+
498
+
499
+ #E50 Assign correspondences by company code
500
+ statements:
501
+ 3000: SAP13
502
+
503
+ # Reporting
504
+ log_cart_short_cut: true # other values: false
505
+ log_abandoned_cart: true # other values: false, :email, :email_and_log
506
+
507
+ # Google Analytics
508
+ send_order_data: true
509
+ send_user_data: true
510
+ google_analytics_url: https://www.google.com/analytics/home
511
+
512
+ # RFCs used:
513
+ rfc_prefix: Z_B2B_
514
+ text_format_fieldname: 'FORMAT'
515
+ RFCs:
516
+ get_short_dump: READ_SHORT_DUMPS
517
+ get_partner: PARTNER_DATA
518
+ get_sales_partners: SALES_PARTNERS
519
+ sim_or_create: SALESDOC_CREATE
520
+ get_salesdoc: SALESDOC_DISPLAY
521
+ get_salesdoc_list: SALESDOC_LIST
522
+ load_assigned_partners: ASSIGNED_PARTNERS
523
+ material_search: MATERIAL_SEARCH
524
+ partner_search: PARTNER_SEARCH
525
+ generate_pdf: GET_PDF
526
+ get_summary: SUMMARY
527
+ get_invoice: INVOICE_DISPLAY
528
+ get_invoice_list: INVOICE_LIST
529
+ get_open_items: OPEN_ITEMS
530
+ pay_bill: PAY_BILL
531
+ get_payments: PAYMENTS
532
+ get_tax_jurisdiction_codes: GET_TXJCD
533
+ get_availability: MATERIALS_AVAILABILITY
534
+ change_order: SALESDOC_CHANGE
535
+ maintain_customer: MAINTAIN_CMD
536
+ get_customer_address: GET_CUSTOMER_ADDRESS
537
+ get_cross_sell_items: CROSS_SELL_ITEMS_GET
538
+ get_price_report: REPORT_SUBMIT
539
+ without_version: [ ]
540
+ preload_RFCs: [ :sim_or_create, :get_salesdoc, :get_invoice, :load_assigned_partners, :get_salesdoc_list ]
541
+ # which log level is used to log errors and infos (the environment-config log level determines whether it gets logged at that level or not)
542
+ RFC_error_log_level: :info
543
+ RFC_info_log_level: :info
544
+
545
+ # User Defaults
546
+ user_defaults:
547
+ b2b_microsite1:
548
+ user_type: customer
549
+ date_format: '%m/%d/%Y'
550
+ time_format: '%I:%M:%S %p'
551
+ number_format: '.,'
552
+ language: en_US
553
+
554
+ # Menu structure:
555
+ menu_tabs:
556
+ # name, controller, action
557
+ - [ :tab_home, :login, :home ]
558
+ - [ :tab_dashboard, :login, :home ]
559
+ - [ :tab_purchasing, :purchasing, :determine_next_screen ]
560
+ - [ :tab_invoices, :invoicing, :determine_next_screen ]
561
+ - [ :tab_admin, :admin, :determine_next_screen ]
562
+ - [ :tab_profile, :profile, :determine_next_screen ]
563
+ - [ :tab_back_to_catalog, :login, :redirect_back_to_catalog ]
564
+ - [ :tab_help, :help, :show ]
565
+ sub_menus:
566
+ tab_purchasing:
567
+ # name controller action
568
+ - [ :search_for_salesdoc, :purchasing, :search_for_salesdoc ]
569
+ - [ :create_salesdoc, :cart, :shop ]
570
+ - [ :change_order, :order_change, :change ]
571
+ - [ :display_quotes, :purchasing, :list_quotes ]
572
+ # - [ :create_quote, :quote, :shop ]
573
+ - [ :create_rfq, :rfq, :shop ]
574
+ - [ :create_return, :return, :shop ]
575
+ tab_invoices:
576
+ - [ :search_for_invoice, :invoicing, :search_for_invoice ]
577
+ - [ :open_items, :open_items, :show ]
578
+ - [ :pay_invoices, :open_items, :pay_invoices ]
579
+ - [ :search_for_payment, :payments, :search_for_payment ]
580
+ tab_admin:
581
+ - [ :user_maintenance, :admin, :user_maintenance ]
582
+ - [ :site_settings, admin/site_settings, :index ]
583
+ # - [ :role_maintenance, :admin, :role_maintenance ] # every admin gets it
584
+ - [ :proxy_login, :admin, :proxy_login ]
585
+ - [ :monitoring, :admin, :monitoring ]
586
+ - [ :content_maintenance, :admin, :content_maintenance ]
587
+
588
+ show_admin_info: false
589
+ upload_file_limit: 4
590
+
591
+ suppress_get_summary: # true or false
592
+ ws_call: false
593
+ standard_call: false
594
+
595
+ turn_on_fullstory: false # by default it is turned on at produciton and qa
596
+
597
+ suppress_get_summary: # true or false
598
+ ws_call: false
599
+ standard_call: false
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,40 @@
1
+ require 'active_support/core_ext/numeric/bytes'
2
+
3
+ Dummy::Application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb
5
+
6
+ # In the development environment your application's code is reloaded on
7
+ # every request. This slows down response time but is perfect for development
8
+ # since you don't have to restart the web server when you make code changes.
9
+ config.cache_classes = false
10
+
11
+ # Log error messages when you accidentally call methods on nil.
12
+ config.whiny_nils = true
13
+
14
+ # Show full error reports and disable caching
15
+ config.consider_all_requests_local = true
16
+ config.action_controller.perform_caching = false
17
+
18
+ # Don't care if the mailer can't send
19
+ config.action_mailer.raise_delivery_errors = false
20
+
21
+ # Print deprecation notices to the Rails logger
22
+ config.active_support.deprecation = :log
23
+
24
+ # Only use best-standards-support built into browsers
25
+ config.action_dispatch.best_standards_support = :builtin
26
+
27
+ # Raise exception on mass assignment protection for Active Record models
28
+ config.active_record.mass_assignment_sanitizer = :strict
29
+
30
+ # Log the query plan for queries taking more than this (works
31
+ # with SQLite, MySQL, and PostgreSQL)
32
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
33
+
34
+ config.cache_store = :memory_store, { size: 64.megabytes }
35
+ # Do not compress assets
36
+ config.assets.compress = false
37
+
38
+ # Expands the lines which load the assets
39
+ config.assets.debug = true
40
+ end