fittings 0.2.1 → 0.2.4
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 +5 -5
- data/.circleci/config.yml +145 -0
- data/.github/CODEOWNERS +4 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +7 -0
- data/.gitignore +5 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +5 -3
- data/README.rdoc +1 -1
- data/build-matrix.json +4 -0
- data/fittings.gemspec +2 -2
- data/lib/setting.rb +13 -1
- data/owners.json +7 -0
- metadata +25 -7
- data/Gemfile.lock +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 493b1379d6d0b0a55dce9c8c6bc9e570ea772c0c410557f66af5b3c1be2459a7
|
4
|
+
data.tar.gz: 37ebe4de56774c3c3c6c15c89d2e05a709feeb64ca64a16805b1ee05eb918cd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b43a7b9becd16de4fea88608e9726f94d1b46a7832bf880b8237f4664c2018e9020b06ab6a4ea54bfd21eaa533df0bf4c8568443a48a7cbe66a7b998dfd4489c
|
7
|
+
data.tar.gz: 9b477222f062079e001d230e41554c9523868c12a738f0e15e8e26ba898661a41053c6bb3feeadb58c5c3fd29f3c252961c2a535a92374be02fba2f7812eefa9
|
@@ -0,0 +1,145 @@
|
|
1
|
+
# DO NOT MODIFY - this is managed by Git Reduce in goro and generated from build-matrix.json
|
2
|
+
#
|
3
|
+
---
|
4
|
+
version: 2
|
5
|
+
jobs:
|
6
|
+
generate-and-push-docs:
|
7
|
+
docker:
|
8
|
+
- image: cimg/ruby:3.0.3
|
9
|
+
auth:
|
10
|
+
username: "$DOCKERHUB_USERNAME"
|
11
|
+
password: "$DOCKERHUB_PASSWORD"
|
12
|
+
steps:
|
13
|
+
- checkout
|
14
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
15
|
+
- run: bundle install
|
16
|
+
- run:
|
17
|
+
name: Generate documentation
|
18
|
+
command: ' if [[ $(bundle exec rake -T docs:generate:custom) ]]; then echo
|
19
|
+
"Generating docs using rake task docs:generate:custom" ; bundle exec rake
|
20
|
+
docs:generate:custom ; elif [[ $(bundle exec rake -T docs:generate) ]];
|
21
|
+
then echo "Generating docs using rake task docs:generate" ; bundle exec
|
22
|
+
rake docs:generate ; else echo "Skipping doc generation" ; exit 0 ; fi '
|
23
|
+
- run:
|
24
|
+
name: Push documentation to Unwritten
|
25
|
+
command: if [[ $(bundle exec rake -T docs:push) ]]; then bundle exec rake
|
26
|
+
docs:push; fi
|
27
|
+
release:
|
28
|
+
docker:
|
29
|
+
- image: cimg/ruby:3.0.3
|
30
|
+
auth:
|
31
|
+
username: "$DOCKERHUB_USERNAME"
|
32
|
+
password: "$DOCKERHUB_PASSWORD"
|
33
|
+
steps:
|
34
|
+
- checkout
|
35
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
36
|
+
- run: bundle install
|
37
|
+
- run:
|
38
|
+
name: Artifactory login
|
39
|
+
command: mkdir -p ~/.gem && curl -u$ARTIFACTORY_USER:$ARTIFACTORY_TOKEN https://stitchfix01.jfrog.io/stitchfix01/api/gems/eng-gems/api/v1/api_key.yaml
|
40
|
+
> ~/.gem/credentials && chmod 0600 ~/.gem/credentials
|
41
|
+
- run:
|
42
|
+
name: Build/release gem to artifactory
|
43
|
+
command: bundle exec rake push_artifactory
|
44
|
+
ruby-3.0.3:
|
45
|
+
docker:
|
46
|
+
- image: cimg/ruby:3.0.3
|
47
|
+
auth:
|
48
|
+
username: "$DOCKERHUB_USERNAME"
|
49
|
+
password: "$DOCKERHUB_PASSWORD"
|
50
|
+
working_directory: "~/fittings"
|
51
|
+
steps:
|
52
|
+
- checkout
|
53
|
+
- run:
|
54
|
+
name: Check for Gemfile.lock presence
|
55
|
+
command: ' if (test -f Gemfile.lock) then echo "Dont commit Gemfile.lock (see
|
56
|
+
https://github.com/stitchfix/eng-wiki/blob/main/architecture-decisions/0009-rubygem-dependencies-will-be-managed-more-explicitly.md)"
|
57
|
+
1>&2 ; exit 1 ; else exit 0 ; fi '
|
58
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
59
|
+
- run: bundle install
|
60
|
+
- run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml
|
61
|
+
--format=doc
|
62
|
+
- run:
|
63
|
+
name: Run Additional CI Steps
|
64
|
+
command: if [ -e bin/additional-ci-steps ]; then bin/additional-ci-steps;
|
65
|
+
fi
|
66
|
+
- run:
|
67
|
+
name: Notify Pager Duty
|
68
|
+
command: bundle exec y-notify "eng-runtime-info"
|
69
|
+
when: on_fail
|
70
|
+
- store_test_results:
|
71
|
+
path: "/tmp/test-results"
|
72
|
+
ruby-2.7.5:
|
73
|
+
docker:
|
74
|
+
- image: cimg/ruby:2.7.5
|
75
|
+
auth:
|
76
|
+
username: "$DOCKERHUB_USERNAME"
|
77
|
+
password: "$DOCKERHUB_PASSWORD"
|
78
|
+
working_directory: "~/fittings"
|
79
|
+
steps:
|
80
|
+
- checkout
|
81
|
+
- run:
|
82
|
+
name: Check for Gemfile.lock presence
|
83
|
+
command: ' if (test -f Gemfile.lock) then echo "Dont commit Gemfile.lock (see
|
84
|
+
https://github.com/stitchfix/eng-wiki/blob/main/architecture-decisions/0009-rubygem-dependencies-will-be-managed-more-explicitly.md)"
|
85
|
+
1>&2 ; exit 1 ; else exit 0 ; fi '
|
86
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
87
|
+
- run: bundle install
|
88
|
+
- run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml
|
89
|
+
--format=doc
|
90
|
+
- run:
|
91
|
+
name: Run Additional CI Steps
|
92
|
+
command: if [ -e bin/additional-ci-steps ]; then bin/additional-ci-steps;
|
93
|
+
fi
|
94
|
+
- run:
|
95
|
+
name: Notify Pager Duty
|
96
|
+
command: bundle exec y-notify "eng-runtime-info"
|
97
|
+
when: on_fail
|
98
|
+
- store_test_results:
|
99
|
+
path: "/tmp/test-results"
|
100
|
+
workflows:
|
101
|
+
version: 2
|
102
|
+
on-commit:
|
103
|
+
jobs:
|
104
|
+
- release:
|
105
|
+
context: org-global
|
106
|
+
requires:
|
107
|
+
- ruby-3.0.3
|
108
|
+
- ruby-2.7.5
|
109
|
+
filters:
|
110
|
+
tags:
|
111
|
+
only: /^[0-9]+\.[0-9]+\.[0-9]+(\.?(RC|rc)[-\.]?\w*)?$/
|
112
|
+
branches:
|
113
|
+
ignore: /.*/
|
114
|
+
- generate-and-push-docs:
|
115
|
+
context: org-global
|
116
|
+
requires:
|
117
|
+
- release
|
118
|
+
filters:
|
119
|
+
tags:
|
120
|
+
only: /^[0-9]+\.[0-9]+\.[0-9]+(\.?(RC|rc)[-\.]?\w*)?$/
|
121
|
+
branches:
|
122
|
+
ignore: /.*/
|
123
|
+
- ruby-3.0.3:
|
124
|
+
context: org-global
|
125
|
+
filters:
|
126
|
+
tags:
|
127
|
+
only: &1 /.*/
|
128
|
+
- ruby-2.7.5:
|
129
|
+
context: org-global
|
130
|
+
filters:
|
131
|
+
tags:
|
132
|
+
only: *1
|
133
|
+
scheduled:
|
134
|
+
triggers:
|
135
|
+
- schedule:
|
136
|
+
cron: 26 18 * * 1,2,3,4,5
|
137
|
+
filters:
|
138
|
+
branches:
|
139
|
+
only:
|
140
|
+
- main
|
141
|
+
jobs:
|
142
|
+
- ruby-3.0.3:
|
143
|
+
context: org-global
|
144
|
+
- ruby-2.7.5:
|
145
|
+
context: org-global
|
data/.github/CODEOWNERS
ADDED
data/.gitignore
CHANGED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
fittings
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.2
|
data/.travis.yml
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= fittings
|
2
2
|
|
3
|
-
This is a fork of ModCloth's mc-settings gem which has gone unmaintained and has
|
3
|
+
This is a fork of ModCloth's mc-settings gem which has gone unmaintained and has deprecation warnings. This modernizes that and will be maintained.
|
4
4
|
|
5
5
|
== Install
|
6
6
|
|
data/build-matrix.json
ADDED
data/fittings.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "fittings"
|
3
|
-
s.version = "0.2.
|
3
|
+
s.version = "0.2.4"
|
4
4
|
|
5
5
|
s.authors = ["Edwin Cruz", "Colin Shield"]
|
6
6
|
s.date = %q{2011-09-06}
|
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_development_dependency "rspec"
|
24
24
|
s.add_development_dependency "rake"
|
25
25
|
s.add_development_dependency "rdoc"
|
26
|
+
s.add_development_dependency('rspec_junit_formatter')
|
26
27
|
end
|
27
|
-
|
data/lib/setting.rb
CHANGED
@@ -71,6 +71,11 @@ class Setting
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
def self.respond_to?(method_name, include_private = false)
|
75
|
+
self.instance.available_settings.has_key?(method_name.to_s.sub(/\?\z/, '')) ||
|
76
|
+
super
|
77
|
+
end
|
78
|
+
|
74
79
|
# In [] invocation syntax, we return settings value 'as is' without
|
75
80
|
# Hash conversions.
|
76
81
|
#
|
@@ -175,7 +180,14 @@ class Setting
|
|
175
180
|
|
176
181
|
files.flatten.each do |file|
|
177
182
|
begin
|
178
|
-
|
183
|
+
# Ruby versions before 3.0.3 include Psych < 3.3.2, which does not include `unsafe_load`. In those versions,
|
184
|
+
# `load` is the behavior we want (in later versions, `load` uses `safe_load`, which doesn't support aliases and
|
185
|
+
# requires allowlisting classes used in files.
|
186
|
+
if Psych::VERSION < '3.3.2'
|
187
|
+
@available_settings.recursive_merge!(YAML::load(ERB.new(IO.read(file)).result) || {}) if File.exists?(file)
|
188
|
+
else
|
189
|
+
@available_settings.recursive_merge!(YAML::unsafe_load(ERB.new(IO.read(file)).result) || {}) if File.exists?(file)
|
190
|
+
end
|
179
191
|
rescue Exception => e
|
180
192
|
raise FileError.new("Error parsing file #{file}, with: #{e.message}")
|
181
193
|
end
|
data/owners.json
ADDED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fittings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edwin Cruz
|
8
8
|
- Colin Shield
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
12
|
date: 2011-09-06 00:00:00.000000000 Z
|
@@ -53,6 +53,20 @@ dependencies:
|
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec_junit_formatter
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
56
70
|
description: implement custom keys independently of environment
|
57
71
|
email: eng@stitchfix.com
|
58
72
|
executables: []
|
@@ -61,26 +75,31 @@ extra_rdoc_files:
|
|
61
75
|
- LICENSE.txt
|
62
76
|
- README.rdoc
|
63
77
|
files:
|
78
|
+
- ".circleci/config.yml"
|
79
|
+
- ".github/CODEOWNERS"
|
80
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
64
81
|
- ".gitignore"
|
82
|
+
- ".ruby-gemset"
|
65
83
|
- ".ruby-version"
|
66
84
|
- ".travis.yml"
|
67
85
|
- CODE_OF_CONDUCT.md
|
68
86
|
- Gemfile
|
69
|
-
- Gemfile.lock
|
70
87
|
- LICENSE.txt
|
71
88
|
- README.rdoc
|
72
89
|
- Rakefile
|
73
90
|
- bin/rake
|
74
91
|
- bin/rspec
|
92
|
+
- build-matrix.json
|
75
93
|
- fittings.gemspec
|
76
94
|
- lib/fittings.rb
|
77
95
|
- lib/mc-settings.rb
|
78
96
|
- lib/setting.rb
|
97
|
+
- owners.json
|
79
98
|
homepage: http://github.com/stitchfix/fittings
|
80
99
|
licenses:
|
81
100
|
- MIT
|
82
101
|
metadata: {}
|
83
|
-
post_install_message:
|
102
|
+
post_install_message:
|
84
103
|
rdoc_options: []
|
85
104
|
require_paths:
|
86
105
|
- lib
|
@@ -95,9 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
114
|
- !ruby/object:Gem::Version
|
96
115
|
version: '0'
|
97
116
|
requirements: []
|
98
|
-
|
99
|
-
|
100
|
-
signing_key:
|
117
|
+
rubygems_version: 3.2.5
|
118
|
+
signing_key:
|
101
119
|
specification_version: 4
|
102
120
|
summary: Manage settings per environment
|
103
121
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
fittings (0.2.1)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: http://rubygems.org/
|
8
|
-
specs:
|
9
|
-
diff-lcs (1.3)
|
10
|
-
rake (12.1.0)
|
11
|
-
rdoc (5.1.0)
|
12
|
-
rspec (3.6.0)
|
13
|
-
rspec-core (~> 3.6.0)
|
14
|
-
rspec-expectations (~> 3.6.0)
|
15
|
-
rspec-mocks (~> 3.6.0)
|
16
|
-
rspec-core (3.6.0)
|
17
|
-
rspec-support (~> 3.6.0)
|
18
|
-
rspec-expectations (3.6.0)
|
19
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
-
rspec-support (~> 3.6.0)
|
21
|
-
rspec-mocks (3.6.0)
|
22
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
-
rspec-support (~> 3.6.0)
|
24
|
-
rspec-support (3.6.0)
|
25
|
-
|
26
|
-
PLATFORMS
|
27
|
-
ruby
|
28
|
-
|
29
|
-
DEPENDENCIES
|
30
|
-
fittings!
|
31
|
-
rake
|
32
|
-
rdoc
|
33
|
-
rspec
|
34
|
-
|
35
|
-
BUNDLED WITH
|
36
|
-
1.15.4
|