configs 1.4.0 → 1.5.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: f0cb8a0af98b77c44d098ee3b9fee751752bedaf
4
- data.tar.gz: f3bfc5866fc28430d81abfd07fa99f740142ee79
2
+ SHA256:
3
+ metadata.gz: de0e2b901b6f5da20a315913a8b32e037ad94ef51cbc46354934d7850ac2c81d
4
+ data.tar.gz: fd7b364e6fe10d4ecfc08fcce38c5f45a4f095a38b9d357124bdff8430b92933
5
5
  SHA512:
6
- metadata.gz: ac77c7e01574889e97b7ed8db84e11b54d4d35f53916cc78a8b98ee0c01bf31a1dde4fb58cfe69ec5b9ebfc1db31b09135802d6dea6c877a57faf6a98da3da78
7
- data.tar.gz: 83483782bb7a2be66c2ea649fe22021e2eadf5f5d144f2777bf6df88fffa1f807648d8bad3fd4ebbe3ec5566782055de84cb26797cda953d322af2d5ffb9d8ca
6
+ metadata.gz: 47e2945d7ec363b35b4c1f89788b5defbc4ad58a41d81abd85bc2947cb684937b5d21eb0fa2bc133f2fd2fbc27dabf32159da461698c2fbad8d9e5d9ebec82bc
7
+ data.tar.gz: cb8b46fd96bf1520262b3b90787b25f6092a5d8ff73cbf618868a47fbcd9de857037bec8c98c56f29285f7b35754c26c1308c41a917872edc9dabbb79078c4d1
@@ -0,0 +1,19 @@
1
+ name: Setup RubyGems
2
+ description: Setup RubyGems credentials
3
+ inputs:
4
+ rubygems_api_key:
5
+ description: RubyGems API key
6
+ required: true
7
+ runs:
8
+ using: composite
9
+ steps:
10
+ - run: mkdir -p ~/.gem
11
+ shell: bash
12
+ - run: |
13
+ cat <<-YAML > ~/.gem/credentials
14
+ ---
15
+ :rubygems_api_key: ${{ inputs.rubygems_api_key }}
16
+ YAML
17
+ shell: bash
18
+ - run: chmod 0600 ~/.gem/credentials
19
+ shell: bash
@@ -0,0 +1,15 @@
1
+ name: Test
2
+ description: Run tests
3
+ inputs:
4
+ activesupport-version:
5
+ description: ActiveSupport version constraint
6
+ required: true
7
+ runs:
8
+ using: composite
9
+ steps:
10
+ - run: bundle add activesupport -v '${{ inputs.activesupport-version }}'
11
+ shell: bash
12
+ - run: bundle install
13
+ shell: bash
14
+ - run: bundle exec rake
15
+ shell: bash
@@ -0,0 +1,49 @@
1
+ name: Test and Release
2
+ on:
3
+ pull_request:
4
+ push:
5
+ release:
6
+ types:
7
+ - published
8
+ jobs:
9
+ test:
10
+ name: >-
11
+ Test
12
+ [Ruby ${{ matrix.ruby-version }},
13
+ ActiveSupport ${{ matrix.activesupport-version }}]
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ activesupport-version:
18
+ - ~> 3.2
19
+ - ~> 4.0
20
+ - ~> 5.0
21
+ - ~> 6.0
22
+ - ~> 7.0
23
+ ruby-version:
24
+ - "3.1"
25
+ - "3.2"
26
+ steps:
27
+ - uses: actions/checkout@v3
28
+ - uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby-version }}
31
+ - uses: ./.github/actions/test
32
+ with:
33
+ activesupport-version: ${{ matrix.activesupport-version }}
34
+ push:
35
+ name: Publish Gem
36
+ if: ${{ github.event.release }}
37
+ needs:
38
+ - test
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v3
42
+ - uses: ruby/setup-ruby@v1
43
+ with:
44
+ ruby-version: "3.2"
45
+ - uses: ./.github/actions/setup-rubygems
46
+ with:
47
+ rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
48
+ - run: bundle install
49
+ - run: bundle exec rake gem:push
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  *.rbc
3
3
  .bundle
4
4
  .config
5
+ .ruby-version
5
6
  .yardoc
6
7
  Gemfile.lock
7
8
  InstalledFiles
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Configs
2
2
 
3
+ [![Test and Release](https://github.com/kickstarter/configs/actions/workflows/test-release.yml/badge.svg)](https://github.com/kickstarter/configs/actions/workflows/test-release.yml)
4
+
3
5
  Loads and manages config/*.yml files.
4
6
 
5
7
  Searches through a few locations to find the right environment config:
@@ -9,9 +11,6 @@ Searches through a few locations to find the right environment config:
9
11
  3. config/$name/default.yml
10
12
  3. config/$name.yml (with 'default' key)
11
13
 
12
- [![Build
13
- Status](https://travis-ci.org/kickstarter/configs.png?branch=master)](https://travis-ci.org/kickstarter/configs)
14
-
15
14
  ## Installation
16
15
 
17
16
  Add this line to your application's Gemfile:
data/Rakefile CHANGED
@@ -1,11 +1,31 @@
1
1
  #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
2
+ require 'bundler/gem_tasks'
3
+
4
+ task :default => :test
3
5
 
4
6
  require 'rake/testtask'
5
7
  Rake::TestTask.new do |t|
6
- t.libs << "test"
8
+ t.libs << 'test'
7
9
  t.test_files = FileList['test/*test.rb']
8
- t.verbose = true
10
+ t.verbose = true
9
11
  end
10
12
 
11
- task :default => :test
13
+ namespace :gem do
14
+ require 'bundler/gem_tasks'
15
+
16
+ @gem = "pkg/configs-#{ Configs::VERSION }.gem"
17
+
18
+ desc "Push #{ @gem } to rubygems.org"
19
+ task :push => %i[test build git:check] do
20
+ sh %{gem push #{ @gem }}
21
+ end
22
+ end
23
+
24
+ namespace :git do
25
+ desc 'Check git workspace'
26
+ task :check do
27
+ sh %{git diff HEAD --quiet} do |ok|
28
+ abort "\e[31mRefusing to continue - git workspace is dirty\e[0m" unless ok
29
+ end
30
+ end
31
+ end
data/configs.gemspec CHANGED
@@ -2,20 +2,23 @@
2
2
  require File.expand_path('../lib/configs/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Lance Ivy"]
6
- gem.email = ["lance@cainlevy.net"]
5
+ gem.authors = ['Lance Ivy']
6
+ gem.email = ['lance@cainlevy.net']
7
7
  gem.description = "Easy (easier?) management of config/*.yml files. Defines a lookup priority for the current environment's settings."
8
- gem.summary = "Easy (easier?) management of config/*.yml files."
9
- gem.homepage = "http://github.com/kickstarter/configs"
8
+ gem.summary = 'Easy (easier?) management of config/*.yml files.'
9
+ gem.homepage = 'http://github.com/kickstarter/configs'
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
13
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "configs"
15
- gem.require_paths = ["lib"]
14
+ gem.name = 'configs'
15
+ gem.require_paths = ['lib']
16
16
  gem.version = Configs::VERSION
17
17
  gem.license = 'MIT'
18
18
 
19
- gem.add_dependency 'activesupport', '>3.0'
20
- gem.add_development_dependency "rake"
19
+ gem.add_dependency 'activesupport', '> 3.0'
20
+ gem.add_development_dependency 'minitest', '> 4', '< 5.19'
21
+ gem.add_development_dependency 'rake'
22
+
23
+ gem.required_ruby_version = '~> 3.1'
21
24
  end
@@ -1,3 +1,3 @@
1
1
  module Configs
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
data/lib/configs.rb CHANGED
@@ -64,7 +64,7 @@ module Configs
64
64
  def yml_file(name)
65
65
  path = config_dir.join(name + '.yml')
66
66
  contents = ERB.new(File.read(path)).result(binding)
67
- YAML.load(contents).with_indifferent_access
67
+ YAML.load(contents, aliases: true).with_indifferent_access
68
68
  rescue Errno::ENOENT
69
69
  # If file is missing, return nil
70
70
  nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lance Ivy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-26 00:00:00.000000000 Z
11
+ date: 2023-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -24,6 +24,26 @@ dependencies:
24
24
  - - ">"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">"
32
+ - !ruby/object:Gem::Version
33
+ version: '4'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '5.19'
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">"
42
+ - !ruby/object:Gem::Version
43
+ version: '4'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.19'
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: rake
29
49
  requirement: !ruby/object:Gem::Requirement
@@ -46,16 +66,15 @@ executables: []
46
66
  extensions: []
47
67
  extra_rdoc_files: []
48
68
  files:
69
+ - ".github/actions/setup-rubygems/action.yml"
70
+ - ".github/actions/test/action.yml"
71
+ - ".github/workflows/test-release.yml"
49
72
  - ".gitignore"
50
- - ".ruby-version"
51
- - ".travis.yml"
52
73
  - Gemfile
53
74
  - LICENSE
54
75
  - README.md
55
76
  - Rakefile
56
77
  - configs.gemspec
57
- - gemfiles/activesupport3.2
58
- - gemfiles/activesupport4.0
59
78
  - lib/configs.rb
60
79
  - lib/configs/railtie.rb
61
80
  - lib/configs/version.rb
@@ -73,17 +92,16 @@ require_paths:
73
92
  - lib
74
93
  required_ruby_version: !ruby/object:Gem::Requirement
75
94
  requirements:
76
- - - ">="
95
+ - - "~>"
77
96
  - !ruby/object:Gem::Version
78
- version: '0'
97
+ version: '3.1'
79
98
  required_rubygems_version: !ruby/object:Gem::Requirement
80
99
  requirements:
81
100
  - - ">="
82
101
  - !ruby/object:Gem::Version
83
102
  version: '0'
84
103
  requirements: []
85
- rubyforge_project:
86
- rubygems_version: 2.4.8
104
+ rubygems_version: 3.4.10
87
105
  signing_key:
88
106
  specification_version: 4
89
107
  summary: Easy (easier?) management of config/*.yml files.
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.1.2
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.0
6
-
7
- gemfile:
8
- - gemfiles/activesupport3.2
9
- - gemfiles/activesupport4.0
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
- gemspec path: '../'
3
-
4
- gem 'activesupport', '~> 3.2.0'
5
- gem 'minitest', '~> 4.7.5'
@@ -1,4 +0,0 @@
1
- source "https://rubygems.org"
2
- gemspec path: '../'
3
-
4
- gem 'activesupport', '~> 4.0.0'