spree_essentials 0.4.0.rc2 → 0.4.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/.gitignore +10 -0
  2. data/.travis.yml +11 -0
  3. data/CHANGELOG.md +125 -0
  4. data/Gemfile +6 -0
  5. data/README.md +79 -112
  6. data/Versionfile +7 -0
  7. data/app/assets/javascripts/{date.js → admin/date.js} +0 -0
  8. data/app/assets/javascripts/{jquery.autodate.js → admin/jquery.autodate.js} +0 -0
  9. data/app/assets/javascripts/{jquery.markitup.js → admin/jquery.markitup.js} +1 -1
  10. data/app/assets/javascripts/{markdown.set.js → admin/markdown.set.js} +0 -0
  11. data/app/assets/javascripts/admin/spree_essentials.js +1 -0
  12. data/app/assets/stylesheets/{markitup.css.erb → admin/markitup.css.erb} +5 -0
  13. data/app/assets/stylesheets/admin/spree_essentials.css +3 -0
  14. data/app/controllers/spree/admin/markdown_controller.rb +1 -1
  15. data/app/controllers/spree/admin/uploads_controller.rb +0 -4
  16. data/app/helpers/spree/admin/spree_essentials_helper.rb +16 -10
  17. data/app/models/spree/upload.rb +5 -3
  18. data/app/overrides/admin/spree_essentials.rb +13 -0
  19. data/app/views/spree/admin/shared/_contents_sub_menu.html.erb +9 -7
  20. data/app/views/spree/admin/uploads/edit.html.erb +0 -2
  21. data/app/views/spree/admin/uploads/index.html.erb +0 -1
  22. data/app/views/spree/admin/uploads/new.html.erb +0 -2
  23. data/config/routes.rb +5 -4
  24. data/{lib/generators/templates/db/migrate/add_attachment_file_size_to_assets.rb → db/migrate/20120306185618_add_attachment_file_size_to_assets.rb} +0 -0
  25. data/lib/generators/spree_essentials/install_generator.rb +16 -6
  26. data/lib/spree_essentials.rb +5 -24
  27. data/lib/spree_essentials/engine.rb +25 -0
  28. data/lib/spree_essentials/{test_helper.rb → testing/integration_case.rb} +13 -30
  29. data/lib/spree_essentials/testing/test_helper.rb +30 -0
  30. data/lib/spree_essentials/version.rb +1 -1
  31. data/spree_essentials.gemspec +34 -0
  32. data/test/dummy_hooks/after_migrate.rb.sample +1 -0
  33. data/test/dummy_hooks/before_migrate.rb +30 -0
  34. data/test/dummy_hooks/templates/admin/all.css +3 -0
  35. data/test/dummy_hooks/templates/admin/all.js +1 -0
  36. data/test/dummy_hooks/templates/spree_user_error_fix.rb +3 -0
  37. data/test/dummy_hooks/templates/store/all.css +3 -0
  38. data/test/dummy_hooks/templates/store/all.js +1 -0
  39. data/test/dummy_hooks/templates/store/screen.css +749 -0
  40. data/test/integration/spree/admin/extension_integration_test.rb +50 -0
  41. data/test/integration/spree/admin/markdown_integration_test.rb +50 -0
  42. data/test/integration/spree/admin/upload_integration_test.rb +85 -0
  43. data/test/integration_test_helper.rb +2 -0
  44. data/test/spree_essential_example/README.md +3 -0
  45. data/test/spree_essential_example/app/controllers/spree/admin/examples_controller.rb +26 -0
  46. data/test/spree_essential_example/app/models/spree/example.rb +2 -0
  47. data/test/spree_essential_example/app/views/spree/admin/examples/_form.html.erb +21 -0
  48. data/test/spree_essential_example/app/views/spree/admin/examples/edit.html.erb +12 -0
  49. data/test/spree_essential_example/app/views/spree/admin/examples/index.html.erb +26 -0
  50. data/test/spree_essential_example/app/views/spree/admin/examples/new.html.erb +13 -0
  51. data/test/spree_essential_example/app/views/spree/admin/examples/show.html.erb +8 -0
  52. data/test/spree_essential_example/config/routes.rb +5 -0
  53. data/test/spree_essential_example/db/migrate/20120307043727_create_spree_examples.rb +12 -0
  54. data/test/spree_essential_example/lib/generators/spree_essentials/example_generator.rb +13 -0
  55. data/test/spree_essential_example/lib/spree_essential_example.rb +18 -0
  56. data/test/spree_essential_example/lib/spree_essential_example/engine.rb +21 -0
  57. data/test/spree_essential_example/lib/spree_essential_example/version.rb +3 -0
  58. data/test/spree_essential_example/spree_essential_example.gemspec +23 -0
  59. data/test/support/files/1.gif +0 -0
  60. data/test/support/files/1.jpg +0 -0
  61. data/test/support/files/1.png +0 -0
  62. data/test/support/files/2.gif +0 -0
  63. data/test/support/files/2.jpg +0 -0
  64. data/test/support/files/2.png +0 -0
  65. data/test/support/files/3.gif +0 -0
  66. data/test/support/files/3.jpg +0 -0
  67. data/test/support/files/3.png +0 -0
  68. data/test/support/files/test.pdf +0 -0
  69. data/test/support/files/test.zip +0 -0
  70. data/test/test_helper.rb +14 -0
  71. data/test/unit/spree/asset_test.rb +18 -0
  72. data/test/unit/spree/extension_test.rb +33 -0
  73. data/test/unit/spree/helpers/admin/spree_essentials_helper_test.rb +38 -0
  74. data/test/unit/spree/upload_test.rb +52 -0
  75. data/test/unit/validators/datetime_validator_test.rb +29 -0
  76. metadata +144 -47
  77. data/app/overrides/spree_essentials.rb +0 -5
  78. data/lib/generators/essentials_base.rb +0 -32
@@ -1,5 +0,0 @@
1
- Deface::Override.new(:virtual_path => "spree/layouts/admin",
2
- :name => "spree_essential_admin_tabs",
3
- :insert_bottom => "[data-hook='admin_tabs'], #admin_tabs[data-hook]",
4
- :partial => "spree/admin/shared/contents_tab",
5
- :disabled => false)
@@ -1,32 +0,0 @@
1
- module SpreeEssentials
2
- module Generators
3
- class EssentialsBase < Rails::Generators::Base
4
-
5
- include Rails::Generators::Migration
6
-
7
- def self.count
8
- @count ||= 0
9
- (@count += 1) * 3
10
- end
11
-
12
- def self.new_migration_number
13
- (Time.new.utc + self.count).strftime("%Y%m%d%H%M%S")
14
- end
15
-
16
- def self.next_migration_number(path)
17
- @time ||= Time.new.utc
18
- if ActiveRecord::Base.timestamped_migrations
19
- files = Dir.entries(Rails.root.join("db/migrate"))
20
- migration = new_migration_number
21
- while files.join.include?(migration)
22
- migration = new_migration_number
23
- end
24
- migration
25
- else
26
- "%.3d" % (current_migration_number(dirname) + 1)
27
- end
28
- end
29
-
30
- end
31
- end
32
- end