seorel 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92ba89393f12235236d43cb2ff0a786b78163de7
4
- data.tar.gz: 264ff61d1cb97041071a7d12490833756285e5a3
3
+ metadata.gz: 6585b1d055ca9a4ac74f5fa13af45fa4a2ba6ae9
4
+ data.tar.gz: 736e21c5bd0c12627d957d5e44b2fd424de8026e
5
5
  SHA512:
6
- metadata.gz: 6de15533b0cb9a5942180f3af60fe308f281f7bf04f7267d98a903ef1669b5fca129bec3a7da62b96ac6bd4b14ce39a39c8f2098a8c8d02b22019028f1a71f55
7
- data.tar.gz: e79d041107245f3d3f016b4ab03762c29a8c8b32c31a1ef8e8b882191a8771015ac700429b0f1a5d5ee93f6347e9c3463463ac98db5042aa7e84a17d05a920ca
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.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 rake seorel:install:migrations
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
@@ -1,3 +1,3 @@
1
1
  module Seorel
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
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.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-28 00:00:00.000000000 Z
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
- - db/migrate/20120822091543_create_seorel_seorels.rb
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
@@ -1,8 +0,0 @@
1
- Description:
2
- Copies Seorel configuration file to your application's initializer directory.
3
-
4
- Example:
5
- rails generate seorel:config
6
-
7
- This will create:
8
- config/initializers/seorel_config.rb
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module Seorel
4
- class ConfigGenerator < Rails::Generators::Base
5
- source_root File.expand_path('../templates', __FILE__)
6
-
7
- def copy_config_file
8
- template 'seorel_config.rb', 'config/initializers/seorel_config.rb'
9
- end
10
- end
11
- end