has_config 0.2.1 → 0.3.0

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
- SHA1:
3
- metadata.gz: b3bd125d9ce2bc159bce3fa604858ff3a3c6824b
4
- data.tar.gz: 43d1c1a074874259b7e5a1db84b3f6037ce28f30
2
+ SHA256:
3
+ metadata.gz: 83a2227a420be3a7b418a9053b4a030ab99f55e450018db1573f1293e51bab3b
4
+ data.tar.gz: 2f4cb743e32abfc7ad4151141231becf81866af07a11d33a88c2673dea77a39c
5
5
  SHA512:
6
- metadata.gz: 76387b9ca3f29f2455c91f88af314a76e191be8778dd1ca98d5bed30122c2da67919e079ca0e81eb3acbb02925726eb08097c1b2c5e2bb6ec53be15f149a8b30
7
- data.tar.gz: 87ce1f9ba6055b761138b894354aec717fefe57db6999fd2286b8466f9f11f58b99b2defe98d9665016bda2b1d62e069ce06a4aa844b3ac96bdedf23da235e22
6
+ metadata.gz: 56e8c6f46afd38171fd29c4771fa41a3da41889b3acebd9b60c0a7503055b50ae1e08732d6760f7731aeabffa35446311aa67b74bfbf5e1690d7ef101d2846f6
7
+ data.tar.gz: ae84037c251aa95a5a99bd4fb26b759f6c8cb8449e2fff74cfa8b2b912a5da2c91b4f924eea825020c6f53516aeb839cf2479ec752e3ff398b19a7349072817a
@@ -1,12 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.7
4
- - 2.4.4
5
- - 2.5.1
3
+ - 2.5.8
4
+ - 2.6.6
5
+ - 2.7.2
6
6
  gemfile:
7
- - gemfiles/4.2.gemfile
8
- - gemfiles/5.1.gemfile
9
7
  - gemfiles/5.2.gemfile
8
+ - gemfiles/6.0.gemfile
10
9
  addons:
11
10
  postgresql: '9.6'
12
11
  before_script:
@@ -1,3 +1,10 @@
1
+ ## 0.3.0 (2020-10-15)
2
+
3
+ * Default git branch is now "main"
4
+ * Deprication warning cleanup
5
+ * Support Ruby 2.5, 2.6, and 2.7
6
+ * Support Rails 5.2 and 6.0
7
+
1
8
  ## 0.2.1 (2018-04-12)
2
9
 
3
10
  * Update requirements of gem (Only currently supported Rubies and Rails tested and supported)
data/Gemfile CHANGED
@@ -3,4 +3,3 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in has_config.gemspec
4
4
  gemspec
5
5
  gem "simplecov"
6
- gem "codeclimate-test-reporter", "~> 1.0.0"
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # HasConfig
2
2
 
3
- [![Build Status](https://travis-ci.org/t27duck/has_config.svg?branch=master)](https://travis-ci.org/t27duck/has_config)
4
- [![Code Climate](https://codeclimate.com/github/t27duck/has_config/badges/gpa.svg)](https://codeclimate.com/github/t27duck/has_config)
5
- [![Test Coverage](https://codeclimate.com/github/t27duck/has_config/badges/coverage.svg)](https://codeclimate.com/github/t27duck/has_config/coverage)
3
+ [![Build Status](https://travis-ci.org/t27duck/has_config.svg?branch=main)](https://travis-ci.org/t27duck/has_config)
6
4
 
7
5
  When working with models in a large Rails project, you sometimes end up with "god objects" which start to be loaded down with several booleans, integers, and strings from select boxes that act as configuration options. As time goes on, you add more and more columns. As your database and user-base grows, adding even a single column more can bring your app to a hang during a deploy due to table locking or a slew of exceptions due to [issues and gotchas like this](https://github.com/rails/rails/issues/12330).
8
6
 
@@ -10,9 +8,9 @@ In an attempt to cut down on cluttering your model with boolean columns, `has_co
10
8
 
11
9
  ## Requirements
12
10
 
13
- Supported Rubies: 2.3, 2.4, 2.5
11
+ Supported Rubies: 2.5, 2.6, 2.7
14
12
 
15
- Supported versions of ActiveRecord: 4.2, 5.1, 5.2
13
+ Supported versions of ActiveRecord: 5.2 - 6.0
16
14
 
17
15
  ## Installation
18
16
 
@@ -1,6 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "activerecord", "~> 5.2.0"
4
- gem "codeclimate-test-reporter", group: :test, require: nil
5
4
 
6
5
  gemspec :path=>"../"
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "activerecord", "~> 6.0.0"
4
+
5
+ gemspec :path=>"../"
@@ -23,11 +23,11 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.required_ruby_version = '>= 2.3.0'
27
- spec.add_dependency 'activerecord', '>= 4.2.0'
28
- spec.add_dependency 'activesupport', '>= 4.2.0'
26
+ spec.required_ruby_version = '>= 2.5.0'
27
+ spec.add_dependency 'activerecord', '>= 5.2.0'
28
+ spec.add_dependency 'activesupport', '>= 5.2.0'
29
29
 
30
30
  spec.add_development_dependency 'bundler'
31
- spec.add_development_dependency 'rake', '~> 10.0'
31
+ spec.add_development_dependency 'rake'
32
32
  spec.add_development_dependency 'pg'
33
33
  end
@@ -16,7 +16,7 @@ module HasConfig
16
16
  configuration = HasConfig::Engine.known_configurations[key.to_sym]
17
17
  if config.present?
18
18
  configuration = if configuration.nil?
19
- HasConfig::Configuration.new(key.to_sym, config)
19
+ HasConfig::Configuration.new(key.to_sym, **config)
20
20
  else
21
21
  HasConfig::Configuration.modify(configuration, config)
22
22
  end
@@ -2,7 +2,7 @@ module HasConfig
2
2
  class Engine
3
3
  class ConfigurationFileReader
4
4
  def has_config(name, config: {})
5
- Engine.register_configuration Configuration.new(name, config)
5
+ Engine.register_configuration Configuration.new(name, **config)
6
6
  end
7
7
  end
8
8
 
@@ -1,3 +1,3 @@
1
1
  module HasConfig
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Drake
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-12 00:00:00.000000000 Z
11
+ date: 2020-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0
19
+ version: 5.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.0
26
+ version: 5.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.0
33
+ version: 5.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.0
40
+ version: 5.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pg
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -102,9 +102,8 @@ files:
102
102
  - Rakefile
103
103
  - bin/console
104
104
  - bin/setup
105
- - gemfiles/4.2.gemfile
106
- - gemfiles/5.1.gemfile
107
105
  - gemfiles/5.2.gemfile
106
+ - gemfiles/6.0.gemfile
108
107
  - has_config.gemspec
109
108
  - lib/has_config.rb
110
109
  - lib/has_config/active_record/model_adapter.rb
@@ -127,15 +126,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
126
  requirements:
128
127
  - - ">="
129
128
  - !ruby/object:Gem::Version
130
- version: 2.3.0
129
+ version: 2.5.0
131
130
  required_rubygems_version: !ruby/object:Gem::Requirement
132
131
  requirements:
133
132
  - - ">="
134
133
  - !ruby/object:Gem::Version
135
134
  version: '0'
136
135
  requirements: []
137
- rubyforge_project:
138
- rubygems_version: 2.6.14
136
+ rubygems_version: 3.0.3
139
137
  signing_key:
140
138
  specification_version: 4
141
139
  summary: Quick record-specific configuration for your models
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "activerecord", "~> 4.2.0"
4
- gem "codeclimate-test-reporter", group: :test, require: nil
5
- gem 'pg', '~> 0.18'
6
- gem 'mysql2', '~> 0.3.18'
7
-
8
- gemspec :path=>"../"
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "activerecord", "~> 5.1.0"
4
- gem "codeclimate-test-reporter", group: :test, require: nil
5
-
6
- gemspec :path=>"../"