settingson 0.0.11 → 0.0.15
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 +4 -4
- data/README.md +9 -1
- data/lib/generators/settingson/settingson_generator.rb +7 -0
- data/lib/settingson/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4aadf4bccff98b7ced078c972968db8547fd11a8
|
4
|
+
data.tar.gz: 15f349ef414bea02b78b773332a4f7551741cb53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73e0a0cf95d25aa59f6d32816448a91c79e9f2c4b0e6f4ebad44ede858b8932e793bc7be565873ca34ad8b28a94a84b30820827ee1c5c2ab4df96f6081a43d73
|
7
|
+
data.tar.gz: 0031c12cc60702bef5c440d993afd2b3513436c979063f63c20768138798fbde19f8ae4070c1511d8df2d982b448c4ff11034fdb81188dad3ad66cec2f17e716
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[](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.
|
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
|
data/lib/settingson/version.rb
CHANGED
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.
|
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
|