settingson 0.0.11 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3110928e0387d2cc9987ea0ec42e833cd589dfbb
4
- data.tar.gz: 0b37c6bde4f1fe4c2a1364c03e1a63bc89f966c2
3
+ metadata.gz: 4aadf4bccff98b7ced078c972968db8547fd11a8
4
+ data.tar.gz: 15f349ef414bea02b78b773332a4f7551741cb53
5
5
  SHA512:
6
- metadata.gz: 8ebbaffc534be59859bf9fc23372fb735ccdd473c7703357ebb0892cab074817406d4f45e5825a8ac9ce0d21b8f2f17c22d76ea3922180c422542909481fc398
7
- data.tar.gz: 883732c4cf8900556b9264ddfa1faec6f4dad5b79c4c2e8d52562be0de3c55e1c1d5f6d6e89e2bf78ab794d2ceecb85e45d743f02513650403e057773a06f13b
6
+ metadata.gz: 73e0a0cf95d25aa59f6d32816448a91c79e9f2c4b0e6f4ebad44ede858b8932e793bc7be565873ca34ad8b28a94a84b30820827ee1c5c2ab4df96f6081a43d73
7
+ data.tar.gz: 0031c12cc60702bef5c440d993afd2b3513436c979063f63c20768138798fbde19f8ae4070c1511d8df2d982b448c4ff11034fdb81188dad3ad66cec2f17e716
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Gem Version](https://badge.fury.io/rb/settingson.svg)](http://badge.fury.io/rb/settingson)
2
+
1
3
  # Settingson
2
4
 
3
5
  Settings management for Ruby on Rails 4 applications (ActiveRecord)
@@ -27,7 +29,13 @@ Or install it yourself as:
27
29
  ```console
28
30
  rails g settingson MODEL
29
31
  ```
30
- Replace MODEL by the class name used for the applications settings, it's frequently `Settings` but could also be `Configuration`. This will create a model (if one does not exist) and configure it with default options. Next, you'll usually run `rake db:migrate` as the generator will have created a migration file (if your ORM supports them).
32
+ Replace MODEL by the class name used for the applications settings, it's frequently `Settings` but could also be `Configuration`. This will create a model (if one does not exist) and configure it with default options.
33
+
34
+ Next, you'll usually run
35
+ ```console
36
+ rake db:migrate
37
+ ```
38
+ as the generator will have created a migration file (if your ORM supports them).
31
39
 
32
40
  ## Contributing
33
41
 
@@ -0,0 +1,7 @@
1
+ class SettingsonGenerator < Rails::Generators::NamedBase
2
+ desc "This generator creates a model and his migration"
3
+ def create_migration
4
+ generate(:model, "#{name.camelize} name:string value:text")
5
+ inject_into_class "app/models/#{name.downcase}.rb", name.camelize, "\tinclude Settingson::Base\n"
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Settingson
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settingson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - dan
@@ -51,6 +51,7 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - app/models/concerns/settingson/base.rb
54
+ - lib/generators/settingson/settingson_generator.rb
54
55
  - lib/settingson.rb
55
56
  - lib/settingson/engine.rb
56
57
  - lib/settingson/version.rb