ledermann-rails-settings 2.2.0 → 2.2.1

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: 52c95388606a87927fda30bf3da02f2d530f6143
4
- data.tar.gz: e21c14935226687e5d01676e48108629f8df6b81
3
+ metadata.gz: 36a283476edb425a05d5ab93dd84917961c1f7f1
4
+ data.tar.gz: 2edc040a3634bba291c15467b83e34a9652ce3ad
5
5
  SHA512:
6
- metadata.gz: 4e7143ee981010ad0c9123bd0348742c9cb4833a750d1c50c88af32ab16bc2a847cf41543cd777118b08c56a8e483372ec003a030c670e5a49cd771505a221e6
7
- data.tar.gz: be08c695d558779710887e971f7aa41575b62480813687e0273c15b60641d5f1a6a21eaafee663755874542010b9676d88e311052f41e6d2a0536136749d1548
6
+ metadata.gz: 7175a627b62d0fcbbaa771e76a08b1c6cd5e352c65fd6e70e1c9d4cb2374f18bc03d4844b1d659319aaed75f7fc944664f392f8332f9c5183402b611b1035a8c
7
+ data.tar.gz: c4823aad4b4edd91f116cbb21de4a180ef4932ad705923fa9cf56764b42fd3dd0c0eacef746218ef4bd6c6c3c1fd99db4449228721f15e95c0fb58e04c5aaa32
@@ -2,6 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.1.0
5
6
  gemfile:
6
7
  - ci/Gemfile-rails-3-1
7
8
  - ci/Gemfile-rails-3-2
@@ -11,3 +12,4 @@ env:
11
12
  - DB=mysql
12
13
  before_script:
13
14
  - "mysql -e 'create database rails_settings_test;' >/dev/null"
15
+ before_install: gem update bundler
data/README.md CHANGED
@@ -58,7 +58,7 @@ or
58
58
  ```ruby
59
59
  user = User.find(1)
60
60
  user.settings(:dashboard).update_attributes! :theme => 'black'
61
- user.settings(:calendar).update_attributes! :scope => 'all', :display => 'dialy'
61
+ user.settings(:calendar).update_attributes! :scope => 'all', :display => 'daily'
62
62
  ```
63
63
 
64
64
 
@@ -96,7 +96,7 @@ User.without_settings_for(:calendar)
96
96
 
97
97
  ## Requirements
98
98
 
99
- * Ruby 1.9.3 or 2.0.0
99
+ * Ruby 1.9.3 or newer
100
100
  * Rails 3.1 or greater (including Rails 4)
101
101
 
102
102
 
@@ -122,6 +122,11 @@ Version 2 is a complete rewrite and has a new DSL, so it's **not** compatible wi
122
122
  If you don't want to upgrade, you find the old version in the [1.x](https://github.com/ledermann/rails-settings/commits/1.x) branch. But don't expect any updates there.
123
123
 
124
124
 
125
+ ## Changelog
126
+
127
+ See https://github.com/ledermann/rails-settings/releases
128
+
129
+
125
130
  ## License
126
131
 
127
132
  MIT License
@@ -36,7 +36,7 @@ module RailsSettings
36
36
  end
37
37
 
38
38
  def to_settings_hash
39
- settings_hash = self.class.default_settings
39
+ settings_hash = self.class.default_settings.dup
40
40
  settings_hash.each do |var, vals|
41
41
  settings_hash[var] = settings_hash[var].merge(settings(var.to_sym).value)
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module RailsSettings
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.1'
3
3
  end
@@ -23,6 +23,10 @@ end
23
23
  require 'active_record'
24
24
  require 'rails-settings'
25
25
 
26
+ if I18n.respond_to?(:enforce_available_locales=)
27
+ I18n.enforce_available_locales = false
28
+ end
29
+
26
30
  class User < ActiveRecord::Base
27
31
  has_settings do |s|
28
32
  s.key :dashboard, :defaults => { :theme => 'blue', :view => 'monthly', :filter => true }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ledermann-rails-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Ledermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-29 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -89,7 +89,6 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".travis.yml"
92
- - Changelog.md
93
92
  - Gemfile
94
93
  - MIT-LICENSE
95
94
  - README.md
@@ -135,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
134
  version: '0'
136
135
  requirements: []
137
136
  rubyforge_project:
138
- rubygems_version: 2.0.14
137
+ rubygems_version: 2.2.1
139
138
  signing_key:
140
139
  specification_version: 4
141
140
  summary: Ruby gem to handle settings for ActiveRecord instances by storing them as
@@ -1,81 +0,0 @@
1
- # Changelog
2
-
3
- ## Version 2.2.0 (2013-11-29)
4
-
5
- - Added RailsSettings::Base#to_settings_hash (thanks to @mguymon)
6
-
7
-
8
- ## Version 2.1.0 (2013-09-13)
9
-
10
- - Support for Rails 4
11
- - Removed support for Ruby 1.8.7
12
-
13
-
14
- ## Version 2.0.3 (2013-04-16)
15
-
16
- - Fixed bug with setting getter when settings are booleans and default is true (thanks to @mduong)
17
-
18
-
19
- ## Version 2.0.2 (2013-03-17)
20
-
21
- - Changed database schema to allow NULL for column `value` to fix serialization
22
- bug with MySQL. Thanks to @steventen for pointing this out in issue #31.
23
-
24
- IMPORTANT: The migration generator of version 2.0.0 and 2.0.1 was broken. If
25
- you use MySQL it's required to update your database schema like
26
- this:
27
-
28
- class FixSettings < ActiveRecord::Migration
29
- def up
30
- change_column :settings, :value, :text, :null => true
31
- end
32
-
33
- def down
34
- change_column :settings, :value, :text, :null => false
35
- end
36
- end
37
-
38
-
39
- ## Version 2.0.1 (2013-03-08)
40
-
41
- - Added mass assignment security by protecting all regular attributes
42
-
43
-
44
- ## Version 2.0.0 (2013-03-07)
45
-
46
- - Complete rewrite
47
- - New DSL (see README.md)
48
- - No global defaults anymore. Defaults are defined per ActiveRecord class
49
- - No more storing defaults in the database
50
- - Rails >= 3.1 needed (Rails 2.3 not supported anymore)
51
- - Threadsafe
52
- - Switched to RSpec for testing
53
-
54
-
55
- ## Version 1.2.1 (2013-02-09)
56
-
57
- - Quick and dirty fix for design flaw in target scope implementation (thanks to Yves-Eric Martin)
58
- - Use Thread.current instead of cattr_accessor to be threadsafe
59
- - Code cleanup
60
-
61
-
62
- ## Version 1.2.0 (2012-07-21)
63
-
64
- - Added model-level settings (thanks to Jim Ryan)
65
-
66
-
67
- ## Version 1.1.0 (2012-06-01)
68
-
69
- - Added caching (thanks to Matthew McEachen)
70
-
71
-
72
- ## Version 1.0.1 (2011-11-05)
73
-
74
- - Gemspec: Fixed missing dependency
75
-
76
-
77
- ## Version 1.0.0 (2011-11-05)
78
-
79
- - Conversion from Plugin to Gem
80
- - Destroying false values (thanks to @Pavling)
81
- - Testing with Travis