json_schematize 0.6.1 → 0.6.2

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: d0b80648f60c06f94a7530ba812d49891e57d28549cd63f1ba42e7adfd74cb03
4
- data.tar.gz: 0b97d3b638941ce37b2907640840759fc9462df4447d04f3828847bcb580aa8d
3
+ metadata.gz: 51e2681baf728aedcec1f36235ec2c80ba340228da15d8445b64d1f520c0226d
4
+ data.tar.gz: b0423051b51cce86508bc2e554365d7df66f88824124ad0157087e9b11577733
5
5
  SHA512:
6
- metadata.gz: cb8ac2f474f45303d6c9f17924ba1a92de71cb6cd645382ec12579e2d69274039ba8bc67c528c08f3fad0f2103265ac2792c8c88f12aec37b754b47a61f71691
7
- data.tar.gz: 3f49f060c7fbcefd0705256e23853eb4220c5d63636c75be1e15f721b3fa2d0d631965424101e69cee1c4108d1976191a4717d1643ff15250a746b48d0794002
6
+ metadata.gz: b84409952c29690b3e9f731dcd4bdf15cf5b63ca494875b319d383640ebd4197f4ec3b59b0d96721d9b6ae26d4784f40a1afbb4ade69911944530f3032a7451e
7
+ data.tar.gz: 786329f8de424b9a83a4eb7ac12884fa1f352f8eef62f4c65fb23b11e5561b10a2a3c204ccaf7cd4adda1988b9ca9bb2576a83df44bbbd8e88acc74a2ed6f710
data/.circleci/config.yml CHANGED
@@ -1,202 +1,29 @@
1
1
  version: 2.1
2
2
 
3
- # Declare the orbs that we'll use in our config.
4
- # read more about orbs: https://circleci.com/docs/2.0/using-orbs/
5
3
  orbs:
6
4
  ruby: circleci/ruby@1.0
5
+ node: circleci/node@2
6
+ cst: cst/framework@1
7
7
 
8
- common_envs: &common_envs
9
- environment:
10
- APP_BUNDLER_VERSION: "2.3.8"
11
- REDIS_URL: "redis://127.0.0.1"
12
-
13
- executors:
14
- gem:
15
- parameters:
16
- ruby-version:
17
- default: "3.0.0"
18
- type: string
19
- docker:
20
- - image: cimg/ruby:<< parameters.ruby-version >>
21
- - image: circleci/redis:6.0
22
-
23
- <<: *common_envs
24
-
25
- commands:
26
- bundler-preamble:
27
- description: "Install ruby and the Gemfile dependencies"
28
- parameters:
29
- ruby-version:
30
- type: string
31
- default: "3"
32
- description: "Ruby Gem version"
33
- key-name:
34
- type: string
35
- default: ""
36
- description: Custom name to add to the cache key
37
- cache-breaker:
38
- type: string
39
- default: "0"
40
- description: "Cache breaker to force new cache instantiation"
41
- keep-lock-file:
42
- type: boolean
43
- default: false
44
- description: "Retain lock file when bit is set to true. Otherwise generate a new one specific for this build"
45
- steps:
46
- - checkout
47
- - attach_workspace:
48
- at: workspace
49
- - unless:
50
- condition:
51
- equal: [ true, << parameters.keep-lock-file >> ]
52
- steps:
53
- - run:
54
- name: Remove Gemfile.lock
55
- command: rm Gemfile.lock
56
- - restore_cache:
57
- key: bundle-<< parameters.ruby-version >>-<< parameters.key-name >>-{{ checksum "Gemfile" }}-<< parameters.cache-breaker >>
58
- - ruby/install-deps:
59
- path: vendor/bundle
60
- with-cache: false
61
- - run:
62
- name: "Update dependencies"
63
- command: bundle update
64
- - save_cache:
65
- key: bundle-<< parameters.ruby-version >>-<< parameters.key-name >>-{{ checksum "Gemfile" }}-<< parameters.cache-breaker >>
66
- paths:
67
- - vendor/bundle
68
-
69
- jobs:
70
- publish-rubygems:
71
- executor: gem
72
- steps:
73
- - bundler-preamble:
74
- keep-lock-file: true
75
- - run:
76
- name: Publish to Ruby Gems
77
- command: |
78
- if [ -z "$GEM_HOST_API_KEY" ]; then
79
- echo 'Environment variable GEM_HOST_API_KEY is not present'
80
- exit 1
81
- fi
82
- gem_output=$(gem build json_schematize.gemspec)
83
- VERSION=$(printf "$gem_output" | awk '/Version: / {print $2}')
84
- FILE=$(printf "$gem_output" | awk '/File: / {print $2}')
85
-
86
- gem push ${FILE}
87
-
88
- publish-github:
89
- executor: gem
90
- steps:
91
- - bundler-preamble:
92
- keep-lock-file: true
93
- - run:
94
- name: 'Get Go'
95
- command: |
96
- sudo apt-get update -qq
97
- sudo apt-get -y --no-install-recommends install golang-go
98
- - run:
99
- name: 'Set Git stats'
100
- command: |
101
- git config user.name $GITHUB_USER
102
- git config user.email $GITHUB_EMAIL
103
- - run:
104
- name: Publish Git Release
105
- command: |
106
- curl -sSL https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz | tar xz -f - -C . ghr_v0.13.0_linux_amd64/ghr
107
- mv ghr_v0.13.0_linux_amd64/ghr .
108
- rm -rf ghr_v0.13.0_linux_amd64
109
- chmod 0755 ghr
110
-
111
- if [ -z "$GITHUB_TOKEN" ]; then
112
- echo 'Environment variable GITHUB_TOKEN is not present'
113
- exit 1
114
- fi
115
-
116
- if [ -z "$GITHUB_USER" ]; then
117
- echo 'Environment variable GITHUB_USER is not present'
118
- exit 1
119
- fi
120
-
121
- if [ $(git tag -l "$VERSION") ]; then
122
- echo "Pre existing version $VERSION, not tagging."
123
- exit 0
124
- fi
125
-
126
- gem_output=$(gem build json_schematize.gemspec)
127
- VERSION=$(printf "$gem_output" | awk '/Version: / {print $2}')
128
- FILE=$GEM_PATH$(printf "$gem_output" | awk '/File: / {print $2}')
129
-
130
- git tag -a $VERSION -m "$VERSION"
131
-
132
- SHA=$(git rev-parse HEAD)
133
- ./ghr -soft -t ${GITHUB_TOKEN} -u ${GITHUB_USER} -r json_schematize -c ${SHA} ${VERSION} ${FILE}
134
-
135
- test:
136
- parameters:
137
- ruby-version:
138
- default: "3.0.0"
139
- type: string
140
- description: "Ruby version to test against"
141
- executor:
142
- name: gem
143
- ruby-version: << parameters.ruby-version >>
144
- steps:
145
- - bundler-preamble:
146
- ruby-version: "<< parameters.ruby-version >>"
147
- - run:
148
- name: Setup Climate Control test-reporter
149
- command: |
150
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
151
- chmod +x ./cc-test-reporter
152
- - run:
153
- name: Waiting for Redis to be ready
154
- command: |
155
- for i in `seq 1 10`;
156
- do
157
- nc -z localhost 6379 && echo Success && exit 0
158
- echo -n .
159
- sleep 1
160
- done
161
- echo Failed waiting for Redis to be available && exit 1
162
- - run:
163
- name: Run and Report tests
164
- command: |
165
- ./cc-test-reporter before-build
166
- SIMPLE_COV_RUN=true bundle exec rspec --format RspecJunitFormatter --out test-results/rspec/rspec.xml --format progress --color
167
- - when:
168
- condition:
169
- equal:
170
- [
171
- required-test-ruby2.7.5,
172
- required-test-ruby<< parameters.ruby-version >>,
173
- ]
174
- steps:
175
- - run:
176
- name: Report CodeClimate Coverage
177
- command: ./cc-test-reporter after-build --coverage-input-type simplecov
178
8
  workflows:
179
9
  version: 2
180
10
  yeet-le-jobs:
181
11
  jobs:
182
- - test:
12
+ - cst/enforce-gem-version-bump
13
+ - cst/rspec-ruby:
14
+ rspec-system-args: "SIMPLE_COV_RUN=true"
15
+ cc-report-collect-ruby: "2.7.5"
183
16
  matrix:
184
17
  parameters:
185
18
  ruby-version: ["2.7.5" , "3.0.0", "3.0.3"]
186
19
  alias: required-matrix-tests
187
- name: required-test-ruby<< matrix.ruby-version >>
188
- - publish-github:
189
- requires:
190
- - required-matrix-tests
191
- filters:
192
- branches:
193
- only:
194
- - main
195
- - publish-rubygems:
20
+ name: test-ruby<< matrix.ruby-version >>
21
+ - cst/publish-gem:
22
+ publish-git: true
23
+ publish-default-gem: true
196
24
  requires:
197
25
  - required-matrix-tests
198
26
  filters:
199
27
  branches:
200
28
  only:
201
29
  - main
202
-
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- json_schematize (0.6.1)
4
+ json_schematize (0.6.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  byebug (11.1.3)
10
10
  coderay (1.1.3)
11
- concurrent-ruby (1.1.10)
11
+ concurrent-ruby (1.1.9)
12
12
  diff-lcs (1.5.0)
13
13
  docile (1.4.0)
14
14
  faker (2.20.0)
@@ -33,7 +33,7 @@ GEM
33
33
  rspec-expectations (3.11.0)
34
34
  diff-lcs (>= 1.2.0, < 2.0)
35
35
  rspec-support (~> 3.11.0)
36
- rspec-mocks (3.11.1)
36
+ rspec-mocks (3.11.0)
37
37
  diff-lcs (>= 1.2.0, < 2.0)
38
38
  rspec-support (~> 3.11.0)
39
39
  rspec-support (3.11.0)
@@ -65,7 +65,7 @@ module JsonSchematize
65
65
 
66
66
  serialized_string = redis_client.get(key)
67
67
  Marshal.load(serialized_string)
68
- end
68
+ end.compact
69
69
  end
70
70
 
71
71
  def clear_cache!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonSchematize
4
- VERSION = "0.6.1"
4
+ VERSION = "0.6.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_schematize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Taylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-02 00:00:00.000000000 Z
11
+ date: 2022-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry-byebug
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
- rubygems_version: 3.2.3
125
+ rubygems_version: 3.2.32
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: This gem gives you the ability to turn API results into a standardized schema's