seorel 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/generators/seorel_generator.rb +25 -0
- data/lib/{generators/seorel/templates/seorel_config.rb → seorel/initializer.rb} +0 -0
- data/{db/migrate/20120822091543_create_seorel_seorels.rb → lib/seorel/migration.rb} +0 -0
- data/lib/seorel/version.rb +1 -1
- metadata +5 -6
- data/lib/generators/seorel/USAGE +0 -8
- data/lib/generators/seorel/config_generator.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6585b1d055ca9a4ac74f5fa13af45fa4a2ba6ae9
|
4
|
+
data.tar.gz: 736e21c5bd0c12627d957d5e44b2fd424de8026e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5e9e395e3919ecae1258b3d3631b940b4d765264e99142cdc00dba63a223183598ac7d696633f86fd7cc4d4caa5203ff6b0c4ee3d5ed388d1f44672edf7e1e6
|
7
|
+
data.tar.gz: 9230156832dde269a8822224d136f70e29bfaa6afaf79f134438daf2cff76732c2a2e5ea8cd24a2d43fbcb7567769b4195b0b94bc2b447efc06cac885281d3ce
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Ruby on Rails SEO Metatags plugins for ActiveRecord models
|
|
12
12
|
`Gemfile.rb`:
|
13
13
|
|
14
14
|
```ruby
|
15
|
-
gem 'seorel', '~> 0.2.
|
15
|
+
gem 'seorel', '~> 0.2.3'
|
16
16
|
|
17
17
|
# the edge version can be had using:
|
18
18
|
# gem 'seorel', github: 'dalpo/seorel'
|
@@ -21,7 +21,7 @@ gem 'seorel', '~> 0.2.2'
|
|
21
21
|
`Console`:
|
22
22
|
```bash
|
23
23
|
$ bundle install
|
24
|
-
$ bundle exec
|
24
|
+
$ bundle exec rails generate seorel
|
25
25
|
$ bundle exec rake db:migrate
|
26
26
|
```
|
27
27
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/active_record'
|
3
|
+
|
4
|
+
# This generator adds a migration and aa configuration initializer
|
5
|
+
class SeorelGenerator < ActiveRecord::Generators::Base
|
6
|
+
# ActiveRecord::Generators::Base inherits from Rails::Generators::NamedBase which requires a NAME parameter for the
|
7
|
+
# new table name. Our generator always uses 'friendly_id_slugs', so we just set a random name here.
|
8
|
+
# argument :name, type: :string, default: 'random_name'
|
9
|
+
|
10
|
+
class_option :'skip-migration', :type => :boolean, :desc => "Don't generate a migration for the seorel table"
|
11
|
+
class_option :'skip-initializer', :type => :boolean, :desc => "Don't generate an initializer"
|
12
|
+
|
13
|
+
source_root File.expand_path('../../seorel', __FILE__)
|
14
|
+
|
15
|
+
# Copies the migration template to db/migrate.
|
16
|
+
def copy_files
|
17
|
+
return if options['skip-migration']
|
18
|
+
migration_template 'migration.rb', 'db/migrate/create_seorel_seorels.rb'
|
19
|
+
end
|
20
|
+
|
21
|
+
def create_initializer
|
22
|
+
return if options['skip-initializer']
|
23
|
+
copy_file 'initializer.rb', 'config/initializers/seorel.rb'
|
24
|
+
end
|
25
|
+
end
|
File without changes
|
File without changes
|
data/lib/seorel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seorel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Dal Ponte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -106,10 +106,7 @@ files:
|
|
106
106
|
- Rakefile
|
107
107
|
- config/locales/en.seorel.yml
|
108
108
|
- config/locales/it.seorel.yml
|
109
|
-
-
|
110
|
-
- lib/generators/seorel/USAGE
|
111
|
-
- lib/generators/seorel/config_generator.rb
|
112
|
-
- lib/generators/seorel/templates/seorel_config.rb
|
109
|
+
- lib/generators/seorel_generator.rb
|
113
110
|
- lib/seorel.rb
|
114
111
|
- lib/seorel/config.rb
|
115
112
|
- lib/seorel/controller/class_methods.rb
|
@@ -117,6 +114,8 @@ files:
|
|
117
114
|
- lib/seorel/controller/params.rb
|
118
115
|
- lib/seorel/engine.rb
|
119
116
|
- lib/seorel/helper.rb
|
117
|
+
- lib/seorel/initializer.rb
|
118
|
+
- lib/seorel/migration.rb
|
120
119
|
- lib/seorel/model/base.rb
|
121
120
|
- lib/seorel/model/class_methods.rb
|
122
121
|
- lib/seorel/model/instance_methods.rb
|
data/lib/generators/seorel/USAGE
DELETED