fittings 1.0.0 → 3.0.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
2
  SHA256:
3
- metadata.gz: b679fb549952c6427c53415d90f4e0c2d4acd07483062ff3b7b78fa0c4fec455
4
- data.tar.gz: 1718401ee1f52d5da4a52add3fdb1a002ffeb68b469e318604dd3971040dd667
3
+ metadata.gz: b34b7959dc0786ec7cb0a307e047277eec6350dd9d339f30c000debfd4e0beb0
4
+ data.tar.gz: 5cdc9ef6aff8cb263f5c9cc803ec4e05df163e502b84659ee1c4efa24934cabd
5
5
  SHA512:
6
- metadata.gz: 94f30339ca45d20fa0ce9cf9c5aa7bef61c5af8e1e679f057be084f0bb1f36771461f4601366efacbbfca7fe414c9d670dc83af8c9d15d8440312021e461b39b
7
- data.tar.gz: 34d94ac4bdd9d6b462423620b0e321b3cfc4ed18380611c99355e81c78c2ffc2b2b68a1a7c50cc24854411d3ea504b80c0faa5cdf3bfa7636e9bedb84dc8e414
6
+ metadata.gz: 454b0e050fa243b5db905f9809fcad8f64e2c8725c9586d3abe92b8780c1cf8f45df01825f7b65af515296d01606fcdcde8e8197ca75368172085dfbc38884ac
7
+ data.tar.gz: 84d90e2d33fd91a6c7182288550c355049b9e120ed5777faf9d2ef4b68dcd76adfc75dce6430efb95a9cd500a6bebe63a2686d68474ff31f7f562788440ff430
data/.circleci/config.yml CHANGED
@@ -1,11 +1,30 @@
1
1
  # DO NOT MODIFY - this is managed by Git Reduce in goro and generated from build-matrix.json
2
2
  #
3
3
  ---
4
- version: 2
4
+ version: 2.1
5
+
6
+ ############
7
+ ## Github Actions Pipeline Params
8
+ ############
9
+
10
+ parameters:
11
+ GHA_Event:
12
+ type: string
13
+ default: ""
14
+ GHA_Actor:
15
+ type: string
16
+ default: ""
17
+ GHA_Action:
18
+ type: string
19
+ default: ""
20
+ GHA_Meta:
21
+ type: string
22
+ default: ""
23
+
5
24
  jobs:
6
25
  generate-and-push-docs:
7
26
  docker:
8
- - image: cimg/ruby:3.1.2
27
+ - image: cimg/ruby:3.1.3
9
28
  auth:
10
29
  username: "$DOCKERHUB_USERNAME"
11
30
  password: "$DOCKERHUB_PASSWORD"
@@ -26,7 +45,7 @@ jobs:
26
45
  docs:push; fi
27
46
  release:
28
47
  docker:
29
- - image: cimg/ruby:3.1.2
48
+ - image: cimg/ruby:3.1.3
30
49
  auth:
31
50
  username: "$DOCKERHUB_USERNAME"
32
51
  password: "$DOCKERHUB_PASSWORD"
@@ -41,9 +60,9 @@ jobs:
41
60
  - run:
42
61
  name: Build/release gem to artifactory
43
62
  command: bundle exec rake push_artifactory
44
- ruby-3.1.2:
63
+ ruby-3_1_3:
45
64
  docker:
46
- - image: cimg/ruby:3.1.2
65
+ - image: cimg/ruby:3.1.3
47
66
  auth:
48
67
  username: "$DOCKERHUB_USERNAME"
49
68
  password: "$DOCKERHUB_PASSWORD"
@@ -69,9 +88,9 @@ jobs:
69
88
  when: on_fail
70
89
  - store_test_results:
71
90
  path: "/tmp/test-results"
72
- ruby-3.0.4:
91
+ ruby-3_0_5:
73
92
  docker:
74
- - image: cimg/ruby:3.0.4
93
+ - image: cimg/ruby:3.0.5
75
94
  auth:
76
95
  username: "$DOCKERHUB_USERNAME"
77
96
  password: "$DOCKERHUB_PASSWORD"
@@ -104,11 +123,11 @@ workflows:
104
123
  - release:
105
124
  context: org-global
106
125
  requires:
107
- - ruby-3.1.2
108
- - ruby-3.0.4
126
+ - ruby-3_1_3
127
+ - ruby-3_0_5
109
128
  filters:
110
129
  tags:
111
- only: /^[0-9]+\.[0-9]+\.[0-9]+((-|\.)?(RC|rc)[-\.]?\w*)?$/
130
+ only: /^[0-9]+\.[0-9]+\.[0-9]+((-|\.)?(RC|rc)[-.]?\w*)?$/
112
131
  branches:
113
132
  ignore: /.*/
114
133
  - generate-and-push-docs:
@@ -117,29 +136,24 @@ workflows:
117
136
  - release
118
137
  filters:
119
138
  tags:
120
- only: /^[0-9]+\.[0-9]+\.[0-9]+((-|\.)?(RC|rc)[-\.]?\w*)?$/
139
+ only: /^[0-9]+\.[0-9]+\.[0-9]+((-|\.)?(RC|rc)[-.]?\w*)?$/
121
140
  branches:
122
141
  ignore: /.*/
123
- - ruby-3.1.2:
142
+ - ruby-3_1_3:
124
143
  context: org-global
125
144
  filters:
126
145
  tags:
127
146
  only: &1 /.*/
128
- - ruby-3.0.4:
147
+ - ruby-3_0_5:
129
148
  context: org-global
130
149
  filters:
131
150
  tags:
132
151
  only: *1
133
152
  scheduled:
134
- triggers:
135
- - schedule:
136
- cron: 26 18 * * 1,2,3,4,5
137
- filters:
138
- branches:
139
- only:
140
- - main
153
+ when:
154
+ equal: [ "schedule", << pipeline.parameters.GHA_Event >> ]
141
155
  jobs:
142
- - ruby-3.1.2:
156
+ - ruby-3_1_3:
143
157
  context: org-global
144
- - ruby-3.0.4:
158
+ - ruby-3_0_5:
145
159
  context: org-global
@@ -0,0 +1,14 @@
1
+ on:
2
+ schedule:
3
+ - cron: '26 18 * * 1,2,3,4,5'
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ trigger-circleci:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: CircleCI trigger on schedule
11
+ id: step1
12
+ uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5
13
+ env:
14
+ CCI_TOKEN: ${{ secrets.CCI_TOKEN || secrets.CCI_TOKEN_FOR_PUBLIC_REPOS }}
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ ruby-3.0.4
data/fittings.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "fittings"
3
- s.version = "1.0.0"
3
+ s.version = "3.0.0"
4
4
 
5
5
  s.authors = ["Edwin Cruz", "Colin Shield"]
6
6
  s.date = %q{2011-09-06}
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  s.require_paths = ["lib"]
22
22
 
23
+ s.required_ruby_version = ">= 2.4.0"
23
24
  s.add_dependency "hashie"
24
25
  s.add_development_dependency "rspec"
25
26
  s.add_development_dependency "rake"
data/lib/setting.rb CHANGED
@@ -9,11 +9,6 @@ class Setting
9
9
  class AlreadyLoaded < RuntimeError; end
10
10
 
11
11
  include Singleton
12
- NUM_KLASS = if RUBY_VERSION.split(/\./)[0].to_i == 2 && RUBY_VERSION.split(/\./)[1].to_i >= 4
13
- Integer
14
- else
15
- Fixnum
16
- end
17
12
 
18
13
  attr_reader :available_settings
19
14
 
@@ -87,7 +82,7 @@ class Setting
87
82
  #=================================================================
88
83
 
89
84
  def initialize
90
- @available_settings ||= Hashie::Mash.new
85
+ @available_settings ||= Hashie::Mash.quiet(:default).new
91
86
  end
92
87
 
93
88
  def has_key?(key)
@@ -110,7 +105,7 @@ class Setting
110
105
  end
111
106
 
112
107
 
113
- if v.is_a?(NUM_KLASS) && bool
108
+ if v.is_a?(Integer) && bool
114
109
  v.to_i > 0
115
110
  else
116
111
  v
@@ -151,7 +146,7 @@ class Setting
151
146
 
152
147
  def load(params)
153
148
  # reset settings hash
154
- @available_settings = Hashie::Mash.new
149
+ @available_settings = Hashie::Mash.quiet(:default).new
155
150
  @loaded = false
156
151
 
157
152
  files = []
@@ -170,9 +165,9 @@ class Setting
170
165
  # `load` is the behavior we want (in later versions, `load` uses `safe_load`, which doesn't support aliases and
171
166
  # requires allowlisting classes used in files.
172
167
  if Psych::VERSION < '3.3.2'
173
- @available_settings.deep_merge!(YAML::load(ERB.new(IO.read(file)).result) || {}) if File.exists?(file)
168
+ @available_settings.deep_merge!(YAML::load(ERB.new(IO.read(file)).result) || {}) if File.exist?(file)
174
169
  else
175
- @available_settings.deep_merge!(YAML::unsafe_load(ERB.new(IO.read(file)).result) || {}) if File.exists?(file)
170
+ @available_settings.deep_merge!(YAML::unsafe_load(ERB.new(IO.read(file)).result) || {}) if File.exist?(file)
176
171
  end
177
172
  rescue Exception => e
178
173
  raise FileError.new("Error parsing file #{file}, with: #{e.message}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fittings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edwin Cruz
@@ -92,11 +92,11 @@ files:
92
92
  - ".circleci/config.yml"
93
93
  - ".github/CODEOWNERS"
94
94
  - ".github/PULL_REQUEST_TEMPLATE.md"
95
+ - ".github/workflows/scheduled_cci.yml"
95
96
  - ".gitignore"
96
97
  - ".ruby-gemset"
97
98
  - ".ruby-version"
98
99
  - ".travis.yml"
99
- - CHANGELOG.md
100
100
  - CODE_OF_CONDUCT.md
101
101
  - Gemfile
102
102
  - LICENSE.txt
@@ -122,14 +122,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: '0'
125
+ version: 2.4.0
126
126
  required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 3.1.4
132
+ rubygems_version: 3.2.33
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Manage settings per environment
data/CHANGELOG.md DELETED
@@ -1,12 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.0.0]
9
-
10
- ### Added
11
-
12
- - Switched to using `Hashie::Mash` for YAML parsing. This provides behavior that is more consistent, while remaining similar. It did not cause any tests to fail, but may be a breaking change depending on how you are using the gem.