ecm_products 0.0.5.pre → 0.0.6.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +25 -6
- data/lib/ecm/products/configuration.rb +16 -0
- data/lib/ecm/products/version.rb +1 -1
- data/lib/ecm_products.rb +7 -0
- data/lib/generators/ecm/products/install/install_generator.rb +15 -0
- data/lib/generators/ecm/products/install/templates/ecm_products.rb +2 -0
- data/lib/generators/ecm/products/locales/locales_generator.rb +29 -0
- metadata +8 -4
data/README.rdoc
CHANGED
@@ -2,16 +2,35 @@
|
|
2
2
|
|
3
3
|
= Installation
|
4
4
|
|
5
|
+
Add the gem to your bundle:
|
6
|
+
|
7
|
+
# Gemfile
|
5
8
|
gem 'ecm_products'
|
6
|
-
|
7
|
-
bundle install
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
Install your bundle:
|
11
|
+
|
12
|
+
> bundle install
|
13
|
+
|
14
|
+
Generate initializer:
|
15
|
+
|
16
|
+
> rails generate ecm:products:install
|
17
|
+
|
18
|
+
Add migrations:
|
19
|
+
|
20
|
+
> rake ecm_products_engine:install:migrations
|
21
|
+
|
22
|
+
Migrate:
|
23
|
+
|
24
|
+
> rake db:migrate
|
25
|
+
|
26
|
+
Add the routes:
|
27
|
+
|
28
|
+
# config/routes.rb
|
29
|
+
Ecm::Products::Routing.routes(self)
|
30
|
+
|
13
31
|
= Create sample data
|
14
32
|
|
15
33
|
rake ecm_products:db:populate
|
16
34
|
|
17
35
|
This project rocks and uses MIT-LICENSE.
|
36
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'active_support/core_ext/module/delegation'
|
2
|
+
require 'active_support/core_ext/module/attribute_accessors'
|
3
|
+
require 'active_support/hash_with_indifferent_access'
|
4
|
+
|
5
|
+
module Ecm
|
6
|
+
module Products
|
7
|
+
module Configuration
|
8
|
+
def configure
|
9
|
+
yield self
|
10
|
+
end
|
11
|
+
|
12
|
+
# mattr_accessor :foo
|
13
|
+
# @@foo = nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/ecm/products/version.rb
CHANGED
data/lib/ecm_products.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
module Ecm
|
2
|
+
module Products
|
3
|
+
module Generators
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
desc "Generates the intializer"
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
def generate_intializer
|
10
|
+
copy_file "ecm_products.rb", "config/initializers/ecm_products.rb"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Ecm
|
2
|
+
module Products
|
3
|
+
module Generators
|
4
|
+
class LocalesGenerator < Rails::Generators::Base
|
5
|
+
desc "Copies the locale files to your application"
|
6
|
+
|
7
|
+
source_root File.expand_path('../../../../../../config/locales', __FILE__)
|
8
|
+
|
9
|
+
def generate_locales
|
10
|
+
copy_file "ecm.products.en.yml", "config/locales/ecm.products.en.yml"
|
11
|
+
copy_file "ecm.products.de.yml", "config/locales/ecm.products.de.yml"
|
12
|
+
|
13
|
+
copy_file "ecm.products.routes.en.yml", "config/locales/ecm.products.routes.en.yml"
|
14
|
+
copy_file "ecm.products.routes.de.yml", "config/locales/ecm.products.routes.de.yml"
|
15
|
+
|
16
|
+
copy_file "ecm.products.product.en.yml", "config/locales/ecm.products.product.en.yml"
|
17
|
+
copy_file "ecm.products.product.de.yml", "config/locales/ecm.products.product.de.yml"
|
18
|
+
|
19
|
+
copy_file "ecm.products.product_category.en.yml", "config/locales/ecm.products.product_category.en.yml"
|
20
|
+
copy_file "ecm.products.product_category.de.yml", "config/locales/ecm.products.product_category.de.yml"
|
21
|
+
|
22
|
+
copy_file "ecm.products.product_link.en.yml", "config/locales/ecm.products.product_link.en.yml"
|
23
|
+
copy_file "ecm.products.product_link.de.yml", "config/locales/ecm.products.product_link.de.yml"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_products
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 961915996
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
9
|
+
- 6
|
10
10
|
- pre
|
11
|
-
version: 0.0.
|
11
|
+
version: 0.0.6.pre
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Roberto Vasquez Angel
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-09-
|
19
|
+
date: 2012-09-18 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -407,6 +407,9 @@ files:
|
|
407
407
|
- db/migrate/001_create_ecm_products_product_categories.rb
|
408
408
|
- db/migrate/003_create_ecm_products_product_links.rb
|
409
409
|
- lib/ecm_products.rb
|
410
|
+
- lib/generators/ecm/products/locales/locales_generator.rb
|
411
|
+
- lib/generators/ecm/products/install/install_generator.rb
|
412
|
+
- lib/generators/ecm/products/install/templates/ecm_products.rb
|
410
413
|
- lib/tasks/ecm_products_tasks.rake
|
411
414
|
- lib/ecm/products/active_admin/ecm_products_product_categories.rb
|
412
415
|
- lib/ecm/products/active_admin/ecm_products_product_links.rb
|
@@ -414,6 +417,7 @@ files:
|
|
414
417
|
- lib/ecm/products/engine.rb
|
415
418
|
- lib/ecm/products/version.rb
|
416
419
|
- lib/ecm/products/routing.rb
|
420
|
+
- lib/ecm/products/configuration.rb
|
417
421
|
- MIT-LICENSE
|
418
422
|
- Rakefile
|
419
423
|
- README.rdoc
|