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.
- data/.gitignore +10 -0
- data/.travis.yml +11 -0
- data/CHANGELOG.md +125 -0
- data/Gemfile +6 -0
- data/README.md +79 -112
- data/Versionfile +7 -0
- data/app/assets/javascripts/{date.js → admin/date.js} +0 -0
- data/app/assets/javascripts/{jquery.autodate.js → admin/jquery.autodate.js} +0 -0
- data/app/assets/javascripts/{jquery.markitup.js → admin/jquery.markitup.js} +1 -1
- data/app/assets/javascripts/{markdown.set.js → admin/markdown.set.js} +0 -0
- data/app/assets/javascripts/admin/spree_essentials.js +1 -0
- data/app/assets/stylesheets/{markitup.css.erb → admin/markitup.css.erb} +5 -0
- data/app/assets/stylesheets/admin/spree_essentials.css +3 -0
- data/app/controllers/spree/admin/markdown_controller.rb +1 -1
- data/app/controllers/spree/admin/uploads_controller.rb +0 -4
- data/app/helpers/spree/admin/spree_essentials_helper.rb +16 -10
- data/app/models/spree/upload.rb +5 -3
- data/app/overrides/admin/spree_essentials.rb +13 -0
- data/app/views/spree/admin/shared/_contents_sub_menu.html.erb +9 -7
- data/app/views/spree/admin/uploads/edit.html.erb +0 -2
- data/app/views/spree/admin/uploads/index.html.erb +0 -1
- data/app/views/spree/admin/uploads/new.html.erb +0 -2
- data/config/routes.rb +5 -4
- 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
- data/lib/generators/spree_essentials/install_generator.rb +16 -6
- data/lib/spree_essentials.rb +5 -24
- data/lib/spree_essentials/engine.rb +25 -0
- data/lib/spree_essentials/{test_helper.rb → testing/integration_case.rb} +13 -30
- data/lib/spree_essentials/testing/test_helper.rb +30 -0
- data/lib/spree_essentials/version.rb +1 -1
- data/spree_essentials.gemspec +34 -0
- data/test/dummy_hooks/after_migrate.rb.sample +1 -0
- data/test/dummy_hooks/before_migrate.rb +30 -0
- data/test/dummy_hooks/templates/admin/all.css +3 -0
- data/test/dummy_hooks/templates/admin/all.js +1 -0
- data/test/dummy_hooks/templates/spree_user_error_fix.rb +3 -0
- data/test/dummy_hooks/templates/store/all.css +3 -0
- data/test/dummy_hooks/templates/store/all.js +1 -0
- data/test/dummy_hooks/templates/store/screen.css +749 -0
- data/test/integration/spree/admin/extension_integration_test.rb +50 -0
- data/test/integration/spree/admin/markdown_integration_test.rb +50 -0
- data/test/integration/spree/admin/upload_integration_test.rb +85 -0
- data/test/integration_test_helper.rb +2 -0
- data/test/spree_essential_example/README.md +3 -0
- data/test/spree_essential_example/app/controllers/spree/admin/examples_controller.rb +26 -0
- data/test/spree_essential_example/app/models/spree/example.rb +2 -0
- data/test/spree_essential_example/app/views/spree/admin/examples/_form.html.erb +21 -0
- data/test/spree_essential_example/app/views/spree/admin/examples/edit.html.erb +12 -0
- data/test/spree_essential_example/app/views/spree/admin/examples/index.html.erb +26 -0
- data/test/spree_essential_example/app/views/spree/admin/examples/new.html.erb +13 -0
- data/test/spree_essential_example/app/views/spree/admin/examples/show.html.erb +8 -0
- data/test/spree_essential_example/config/routes.rb +5 -0
- data/test/spree_essential_example/db/migrate/20120307043727_create_spree_examples.rb +12 -0
- data/test/spree_essential_example/lib/generators/spree_essentials/example_generator.rb +13 -0
- data/test/spree_essential_example/lib/spree_essential_example.rb +18 -0
- data/test/spree_essential_example/lib/spree_essential_example/engine.rb +21 -0
- data/test/spree_essential_example/lib/spree_essential_example/version.rb +3 -0
- data/test/spree_essential_example/spree_essential_example.gemspec +23 -0
- data/test/support/files/1.gif +0 -0
- data/test/support/files/1.jpg +0 -0
- data/test/support/files/1.png +0 -0
- data/test/support/files/2.gif +0 -0
- data/test/support/files/2.jpg +0 -0
- data/test/support/files/2.png +0 -0
- data/test/support/files/3.gif +0 -0
- data/test/support/files/3.jpg +0 -0
- data/test/support/files/3.png +0 -0
- data/test/support/files/test.pdf +0 -0
- data/test/support/files/test.zip +0 -0
- data/test/test_helper.rb +14 -0
- data/test/unit/spree/asset_test.rb +18 -0
- data/test/unit/spree/extension_test.rb +33 -0
- data/test/unit/spree/helpers/admin/spree_essentials_helper_test.rb +38 -0
- data/test/unit/spree/upload_test.rb +52 -0
- data/test/unit/validators/datetime_validator_test.rb +29 -0
- metadata +144 -47
- data/app/overrides/spree_essentials.rb +0 -5
- data/lib/generators/essentials_base.rb +0 -32
@@ -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
|