nimbleshop_core 0.0.5 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/app/assets/javascripts/admin.js +6 -4
  2. data/app/assets/javascripts/admin/payment_method.js.coffee +26 -0
  3. data/app/assets/javascripts/{product-group-condition.js.coffee → admin/product-group-condition.js.coffee} +0 -0
  4. data/app/assets/javascripts/admin/products/edit.js.coffee +26 -13
  5. data/app/assets/javascripts/admin/shipit.js.coffee +10 -0
  6. data/app/assets/javascripts/{fadeout_success.js.coffee → admin/utils/fadeout_success.js.coffee} +0 -0
  7. data/app/assets/stylesheets/admin_custom.css +4 -4
  8. data/app/controllers/admin_controller.rb +1 -5
  9. data/app/models/order.rb +11 -6
  10. data/app/{observers/order_observer.rb → models/order/payment_transitions.rb} +7 -4
  11. data/app/views/admin/shipping_zones/_form.html.erb +1 -1
  12. data/app/views/mailer/shipment_notification_to_buyer.text.erb +1 -1
  13. data/config/routes.rb +4 -1
  14. data/db/migrate/{20111107035350_create_creditcard_transactions.rb → 20111107035350_create_payment_transactions.rb} +1 -1
  15. data/lib/generators/nimbleshop/app/install_generator.rb +1 -0
  16. data/lib/generators/nimbleshop/app/templates/config/initializers/001_load_nimbleshop_config.rb +10 -0
  17. data/lib/generators/nimbleshop/app/templates/config/initializers/setup_email.rb +2 -2
  18. data/lib/generators/nimbleshop/app/templates/config/nimbleshop.yml +2 -1
  19. data/lib/nimbleshop/engine.rb +5 -4
  20. data/lib/nimbleshop/nimbleshop/util.rb +63 -0
  21. data/lib/nimbleshop/processor/base.rb +9 -2
  22. data/lib/nimbleshop/sampledata/data.rb +14 -12
  23. data/lib/nimbleshop/version.rb +2 -2
  24. data/lib/nimbleshop_core.rb +3 -0
  25. data/test/factories/address_factory.rb +10 -10
  26. data/test/fixtures/payment_methods.yml +5 -5
  27. data/{config/initializers/001_settings_application.rb → test/myshop/config/initializers/001_load_nimbleshop_config.rb} +1 -1
  28. data/test/myshop/config/initializers/carrierwave.rb +2 -3
  29. data/test/myshop/config/initializers/secret_token.rb +1 -1
  30. data/test/myshop/config/initializers/setup_email.rb +4 -13
  31. data/test/myshop/config/nimbleshop.yml +14 -17
  32. data/test/myshop/db/development.sqlite3 +0 -0
  33. data/test/myshop/db/migrate/{20120707041905_create_product_groups.nimbleshop_core.rb → 20120717095234_create_product_groups.nimbleshop_core.rb} +0 -0
  34. data/test/myshop/db/migrate/{20120707041906_create_products.nimbleshop_core.rb → 20120717095235_create_products.nimbleshop_core.rb} +0 -0
  35. data/test/myshop/db/migrate/{20120707041907_create_orders.nimbleshop_core.rb → 20120717095236_create_orders.nimbleshop_core.rb} +0 -0
  36. data/test/myshop/db/migrate/{20120707041908_create_line_items.nimbleshop_core.rb → 20120717095237_create_line_items.nimbleshop_core.rb} +0 -0
  37. data/test/myshop/db/migrate/{20120707041909_create_shops.nimbleshop_core.rb → 20120717095238_create_shops.nimbleshop_core.rb} +0 -0
  38. data/test/myshop/db/migrate/{20120707041910_create_link_groups.nimbleshop_core.rb → 20120717095239_create_link_groups.nimbleshop_core.rb} +0 -0
  39. data/test/myshop/db/migrate/{20120707041911_create_navigations.nimbleshop_core.rb → 20120717095240_create_navigations.nimbleshop_core.rb} +0 -0
  40. data/test/myshop/db/migrate/{20120707041912_create_links.nimbleshop_core.rb → 20120717095241_create_links.nimbleshop_core.rb} +0 -0
  41. data/test/myshop/db/migrate/{20120707041913_create_custom_fields.nimbleshop_core.rb → 20120717095242_create_custom_fields.nimbleshop_core.rb} +0 -0
  42. data/test/myshop/db/migrate/{20120707041914_create_custom_field_answers.nimbleshop_core.rb → 20120717095243_create_custom_field_answers.nimbleshop_core.rb} +0 -0
  43. data/test/myshop/db/migrate/{20120707041915_create_product_group_conditions.nimbleshop_core.rb → 20120717095244_create_product_group_conditions.nimbleshop_core.rb} +0 -0
  44. data/test/myshop/db/migrate/{20120707041916_create_creditcard_transactions.nimbleshop_core.rb → 20120717095245_create_creditcard_transactions.nimbleshop_core.rb} +0 -0
  45. data/test/myshop/db/migrate/{20120707041917_create_addresses.nimbleshop_core.rb → 20120717095246_create_addresses.nimbleshop_core.rb} +0 -0
  46. data/test/myshop/db/migrate/{20120707041918_create_pictures.nimbleshop_core.rb → 20120717095247_create_pictures.nimbleshop_core.rb} +0 -0
  47. data/test/myshop/db/migrate/{20120707041919_create_shipping_methods.nimbleshop_core.rb → 20120717095248_create_shipping_methods.nimbleshop_core.rb} +0 -0
  48. data/test/myshop/db/migrate/{20120707041920_create_shipping_zones.nimbleshop_core.rb → 20120717095249_create_shipping_zones.nimbleshop_core.rb} +0 -0
  49. data/test/myshop/db/migrate/{20120707041921_create_payment_methods.nimbleshop_core.rb → 20120717095250_create_payment_methods.nimbleshop_core.rb} +0 -0
  50. data/test/myshop/db/migrate/{20120707041922_create_preferences.nimbleshop_core.rb → 20120717095251_create_preferences.nimbleshop_core.rb} +0 -0
  51. data/test/myshop/db/migrate/{20120707041923_create_shipments.nimbleshop_core.rb → 20120717095252_create_shipments.nimbleshop_core.rb} +0 -0
  52. data/test/myshop/db/migrate/{20120707041924_create_shipment_carriers.nimbleshop_core.rb → 20120717095253_create_shipment_carriers.nimbleshop_core.rb} +0 -0
  53. data/test/myshop/db/migrate/{20120707041925_create_delayed_jobs.nimbleshop_core.rb → 20120717095254_create_delayed_jobs.nimbleshop_core.rb} +0 -0
  54. data/test/myshop/db/schema.rb +1 -1
  55. data/test/myshop/db/test.sqlite3 +0 -0
  56. data/test/myshop/log/development.log +3 -0
  57. data/test/support/shipping_method_test_helper.rb +1 -1
  58. data/test/test_helper.rb +1 -1
  59. metadata +85 -136
  60. data/app/assets/javascripts/payment_method.js.coffee +0 -19
  61. data/app/assets/javascripts/remove_deletion_of_product_pictures.js.coffee +0 -5
  62. data/app/assets/javascripts/shipit.js.coffee +0 -10
  63. data/app/mailers/mailer.rb +0 -31
  64. data/config/initializers/strip_and_nullify.rb +0 -13
  65. data/lib/nimbleshop/util.rb +0 -60
  66. data/test/integration/checkout/cart_acceptance_test.rb +0 -113
  67. data/test/integration/checkout/payment_confirmation_acceptance_test.rb +0 -24
  68. data/test/integration/checkout/paypal_acceptance_test.rb +0 -34
  69. data/test/integration/checkout/shipping_address_acceptance_test.rb +0 -91
  70. data/test/integration/checkout/shipping_method_acceptance_test.rb +0 -51
  71. data/test/integration/homepage_acceptance_test.rb +0 -24
  72. data/test/integration/products_acceptance_test.rb +0 -12
  73. data/test/integration/static_pages_acceptance_test.rb +0 -13
  74. data/test/mailers/mailer_test.rb +0 -25
  75. data/test/unit/payment_method/authorizedotnet_test.rb +0 -21
  76. data/test/unit/payment_method/paypalwp_test.rb +0 -17
  77. data/test/unit/payment_method/splitable_test.rb +0 -18
  78. data/test/unit/processor/authorize_net_test.rb +0 -236
  79. data/test/unit/processor/paypal_test.rb +0 -40
  80. data/test/unit/processor/splitable_test.rb +0 -123
  81. data/test/vcr_cassettes/authorize_net/authorize-failure.yml +0 -38
  82. data/test/vcr_cassettes/authorize_net/authorize-success.yml +0 -38
  83. data/test/vcr_cassettes/authorize_net/capture-failure.yml +0 -38
  84. data/test/vcr_cassettes/authorize_net/capture-success.yml +0 -38
  85. data/test/vcr_cassettes/authorize_net/purchase-failure.yml +0 -38
  86. data/test/vcr_cassettes/authorize_net/purchase-success.yml +0 -38
  87. data/test/vcr_cassettes/authorize_net/refund-failure.yml +0 -38
  88. data/test/vcr_cassettes/authorize_net/refund-success.yml +0 -38
  89. data/test/vcr_cassettes/authorize_net/void-authorize.yml +0 -38
  90. data/test/vcr_cassettes/authorize_net/void-failure.yml +0 -38
  91. data/test/vcr_cassettes/authorize_net/void-success.yml +0 -38
  92. data/test/vcr_cassettes/splitable/split-create-failure.yml +0 -48
  93. data/test/vcr_cassettes/splitable/split-create-success.yml +0 -50
  94. data/test/vcr_cassettes/splitable/split-draft-create-failure.yml +0 -50
  95. data/test/vcr_cassettes/splitable/split-draft-create-success.yml +0 -50
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://www.splitable.com/api/splits
6
- body:
7
- encoding: US-ASCII
8
- string: total_amount=1311.0&invoice=27376633&shipping=299&tax=12&description=See%20Splitable%20integrates%20nicely%20with%20nimbleShop&amount_1=1000&item_name_1=name2&quantity_1=1&url_1=httpslocalhost%3A3000%2Fproducts%2Fname2&api_key=edb5fd7b39652986&api_notify_url=http%3A%2F%2Flocalhost%3A3000%2Finstant_payment_notifications%2Fsplitable&expires_in=24
9
- headers:
10
- Content-Type:
11
- - application/x-www-form-urlencoded
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 201
19
- message: Created
20
- headers:
21
- Server:
22
- - nginx
23
- Date:
24
- - Wed, 25 Apr 2012 22:51:53 GMT
25
- Content-Type:
26
- - application/json
27
- Connection:
28
- - keep-alive
29
- Strict-Transport-Security:
30
- - max-age=31536000
31
- Content-Length:
32
- - "169"
33
- X-Ua-Compatible:
34
- - IE=Edge,chrome=1
35
- Etag:
36
- - "\"9002b0b48601ba09948887b23138de10\""
37
- Cache-Control:
38
- - max-age=0, private, must-revalidate
39
- X-Request-Id:
40
- - 6658f59fa8f4c91929427eace17a226a
41
- X-Runtime:
42
- - "0.380272"
43
- X-Rack-Cache:
44
- - invalidate, pass
45
- body:
46
- encoding: US-ASCII
47
- string: "{\"split_url\":\"https://checkout.splitable.com/cws/d4439197c134c2a2c2c04ab02b8cf57bb93296d6bd6554127dd7\",\"split_id\":\"d4439197c134c2a2c2c04ab02b8cf57bb93296d6bd6554127dd7\"}"
48
- http_version:
49
- recorded_at: Wed, 25 Apr 2012 22:51:53 GMT
50
- recorded_with: VCR 2.0.0
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://www.splitable-draft.com/api/splits
6
- body:
7
- encoding: US-ASCII
8
- string: total_amount=299.0&invoice=97738347&shipping=299&tax=0&description=See%20Splitable%20integrates%20nicely%20with%20nimbleShop&api_key=92746e4d66cb8993&api_notify_url=http%3A%2F%2Flocalhost%3A3000%2Finstant_payment_notifications%2Fsplitable&expires_in=24
9
- headers:
10
- Content-Type:
11
- - application/x-www-form-urlencoded
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Server:
22
- - nginx
23
- Date:
24
- - Fri, 27 Apr 2012 22:01:21 GMT
25
- Content-Type:
26
- - application/json
27
- Connection:
28
- - keep-alive
29
- Strict-Transport-Security:
30
- - max-age=31536000
31
- Content-Length:
32
- - "49"
33
- X-Ua-Compatible:
34
- - IE=Edge,chrome=1
35
- Etag:
36
- - "\"f63fda0da33b7457d6e2f8a6bba02ff6\""
37
- Cache-Control:
38
- - max-age=0, private, must-revalidate
39
- X-Request-Id:
40
- - c89a8400cde176553933bfd5c81a3ab6
41
- X-Runtime:
42
- - "0.178033"
43
- X-Rack-Cache:
44
- - invalidate, pass
45
- body:
46
- encoding: US-ASCII
47
- string: "{\"error\":\"Order must have atleast one line item\"}"
48
- http_version:
49
- recorded_at: Fri, 27 Apr 2012 22:01:21 GMT
50
- recorded_with: VCR 2.0.0
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://www.splitable-draft.com/api/splits
6
- body:
7
- encoding: US-ASCII
8
- string: total_amount=1311.0&invoice=31347895&shipping=299&tax=12&description=See%20Splitable%20integrates%20nicely%20with%20nimbleShop&amount_1=1000&item_name_1=name2&quantity_1=1&url_1=httpslocalhost%3A3000%2Fproducts%2Fname2&api_key=92746e4d66cb8993&api_notify_url=http%3A%2F%2Flocalhost%3A3000%2Finstant_payment_notifications%2Fsplitable&expires_in=24
9
- headers:
10
- Content-Type:
11
- - application/x-www-form-urlencoded
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 201
19
- message: Created
20
- headers:
21
- Server:
22
- - nginx
23
- Date:
24
- - Fri, 27 Apr 2012 22:01:23 GMT
25
- Content-Type:
26
- - application/json
27
- Connection:
28
- - keep-alive
29
- Strict-Transport-Security:
30
- - max-age=31536000
31
- Content-Length:
32
- - "177"
33
- X-Ua-Compatible:
34
- - IE=Edge,chrome=1
35
- Etag:
36
- - "\"227f59f097dc40ad4b74196ea358ef3e\""
37
- Cache-Control:
38
- - max-age=0, private, must-revalidate
39
- X-Request-Id:
40
- - 0c1a704a8cc305581901e0a4aeefce6f
41
- X-Runtime:
42
- - "0.180585"
43
- X-Rack-Cache:
44
- - invalidate, pass
45
- body:
46
- encoding: US-ASCII
47
- string: "{\"split_url\":\"https://nimbleshop.splitable-draft.com/cws/0a0722b80ce3b662039884060ca49aaa7a1bb4135ea92fa47dc8\",\"split_id\":\"0a0722b80ce3b662039884060ca49aaa7a1bb4135ea92fa47dc8\"}"
48
- http_version:
49
- recorded_at: Fri, 27 Apr 2012 22:01:23 GMT
50
- recorded_with: VCR 2.0.0