my_api_client 0.1.3 → 0.1.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 +4 -4
- data/.circleci/config.yml +196 -110
- data/.rubocop_todo.yml +1 -1
- data/Gemfile.lock +3 -3
- data/gemfiles/rails_4.2.gemfile +11 -0
- data/gemfiles/rails_5.0.gemfile +11 -0
- data/gemfiles/rails_5.1.gemfile +11 -0
- data/gemfiles/rails_5.2.gemfile +11 -0
- data/lib/my_api_client/base.rb +9 -2
- data/lib/my_api_client/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a1616750cd4557d71f53dcc9fedbedf674836c636d34c981c46103f8d34b7e1
|
4
|
+
data.tar.gz: 26853ecf8accdda262b74be4f194a0a1cb525fb7968d8e14093f67c274e91001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01836b11189eeaef1b7fa7d641d8d7fdc2c34ccf3d454723dc4668327353a94e653921b14c1ec71dd9983973bfb81ccc61b1c8b2540851fb01dc77a67ca56792'
|
7
|
+
data.tar.gz: 72181a7e168dc37747dbfe03c6ac974b023490c726735be059357bb9f9a6ccc18ac4734fa5945e0d8fe5e3c0235b303053633f567cc8860395b9bedf14e44f95
|
data/.circleci/config.yml
CHANGED
@@ -2,129 +2,95 @@
|
|
2
2
|
#
|
3
3
|
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
4
|
#
|
5
|
-
version: 2
|
5
|
+
version: 2.1
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
executors:
|
8
|
+
default:
|
9
|
+
parameters:
|
10
|
+
ruby_version:
|
11
|
+
type: enum
|
12
|
+
enum: ['2.4', '2.5', '2.6']
|
13
|
+
docker:
|
14
|
+
- image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
|
15
|
+
working_directory: ~/repo
|
16
|
+
|
17
|
+
commands:
|
18
|
+
download_cc_test_reporter:
|
19
|
+
description: 'Download cc-test-reporter'
|
20
|
+
steps:
|
21
|
+
- run: |
|
12
22
|
mkdir -p tmp/
|
13
23
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
|
14
24
|
chmod +x ./tmp/cc-test-reporter
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- &bundle_install
|
21
|
-
run:
|
22
|
-
name: Bundle Install
|
23
|
-
command: |
|
24
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
25
|
-
- &save_bundle_install_cache
|
26
|
-
save_cache:
|
27
|
-
paths:
|
28
|
-
- ./vendor/bundle
|
29
|
-
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
30
|
-
- &run_rspec
|
31
|
-
run:
|
32
|
-
name: Run Rspec
|
33
|
-
command: |
|
34
|
-
mkdir /tmp/test-results
|
35
|
-
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
36
|
-
./tmp/cc-test-reporter before-build
|
37
|
-
bundle exec rspec --format documentation \
|
38
|
-
--color \
|
39
|
-
--format RspecJunitFormatter \
|
40
|
-
--out /tmp/test-results/rspec.xml \
|
41
|
-
$TEST_FILES
|
42
|
-
./tmp/cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
43
|
-
- &build
|
44
|
-
working_directory: ~/repo
|
25
|
+
setup_bundle:
|
26
|
+
description: Setup Bundle
|
27
|
+
parameters:
|
28
|
+
rails_version:
|
29
|
+
type: string
|
45
30
|
steps:
|
46
|
-
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
-
|
51
|
-
|
31
|
+
- restore_cache:
|
32
|
+
keys:
|
33
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
34
|
+
- v1-dependencies-
|
35
|
+
- run:
|
36
|
+
name: Bundle Install
|
37
|
+
command: |
|
38
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
39
|
+
- run:
|
40
|
+
name: Modify ActiveSupport Version
|
41
|
+
command: |
|
42
|
+
cp gemfiles/rails_<< parameters.rails_version >>.gemfile Gemfile
|
43
|
+
bundle update activesupport
|
44
|
+
- save_cache:
|
45
|
+
paths:
|
46
|
+
- ./vendor/bundle
|
47
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
48
|
+
run_rspec:
|
49
|
+
description: 'Run RSpec'
|
50
|
+
steps:
|
51
|
+
- run:
|
52
|
+
name: 'Execute RSpec'
|
53
|
+
command: |
|
54
|
+
mkdir /tmp/test-results
|
55
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
56
|
+
./tmp/cc-test-reporter before-build
|
57
|
+
bundle exec rspec --format documentation \
|
58
|
+
--color \
|
59
|
+
--format RspecJunitFormatter \
|
60
|
+
--out /tmp/test-results/rspec.xml \
|
61
|
+
$TEST_FILES
|
62
|
+
./tmp/cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
52
63
|
- store_test_results:
|
53
64
|
path: /tmp/test-results
|
54
65
|
- store_artifacts:
|
55
66
|
path: /tmp/test-results
|
56
67
|
destination: test-results
|
57
|
-
|
58
|
-
|
59
|
-
command: |
|
60
|
-
bundle exec rake build
|
61
|
-
- &rubocop
|
62
|
-
working_directory: ~/repo
|
68
|
+
rubocop:
|
69
|
+
description: Run RuboCop
|
63
70
|
steps:
|
64
|
-
- checkout
|
65
|
-
- *restore_bundle_install_cache
|
66
|
-
- *bundle_install
|
67
|
-
- *save_bundle_install_cache
|
68
71
|
- run: bundle exec rubocop
|
69
|
-
|
70
|
-
|
71
|
-
working_directory: ~/repo
|
72
|
+
yardoc:
|
73
|
+
description: 'Generate YARDoc'
|
72
74
|
steps:
|
73
|
-
-
|
74
|
-
- *restore_bundle_install_cache
|
75
|
-
- *bundle_install
|
76
|
-
- *save_bundle_install_cache
|
77
|
-
- run: bundle exec yardoc -o ./yardoc
|
75
|
+
- run: bundle exec yardoc -o ./yardoc
|
78
76
|
- store_artifacts:
|
79
77
|
path: ./yardoc
|
80
78
|
destination: yardoc
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
<<: *build
|
87
|
-
build_on_ruby_2.5:
|
88
|
-
docker:
|
89
|
-
- image: circleci/ruby:2.5-node-browsers
|
90
|
-
<<: *build
|
91
|
-
build_on_ruby_2.6:
|
92
|
-
docker:
|
93
|
-
- image: circleci/ruby:2.6-node-browsers
|
94
|
-
<<: *build
|
95
|
-
build_on_ruby_latest:
|
96
|
-
docker:
|
97
|
-
- image: circleci/ruby:latest-node-browsers-legacy
|
98
|
-
<<: *build
|
99
|
-
rubocop:
|
100
|
-
docker:
|
101
|
-
- image: circleci/ruby:2.4-node-browsers
|
102
|
-
<<: *rubocop
|
103
|
-
yardoc:
|
104
|
-
docker:
|
105
|
-
- image: circleci/ruby:2.4-node-browsers
|
106
|
-
<<: *yardoc
|
107
|
-
|
79
|
+
rake_build:
|
80
|
+
description: Rake Build
|
81
|
+
steps:
|
82
|
+
- run: |
|
83
|
+
bundle exec rake build
|
108
84
|
rubocop_challenge:
|
109
|
-
|
110
|
-
- image: circleci/ruby:2.4-node-browsers
|
111
|
-
working_directory: ~/repo
|
85
|
+
description: Rubocop Challenge
|
112
86
|
steps:
|
113
87
|
- checkout
|
114
|
-
- run:
|
115
|
-
|
116
|
-
|
117
|
-
gem install rubocop_challenger --pre
|
118
|
-
rubocop_challenger go --email=ryz310@gmail.com --name=ryz310
|
88
|
+
- run: |
|
89
|
+
gem install rubocop_challenger --pre
|
90
|
+
rubocop_challenger go --email=ryz310@gmail.com --name=ryz310
|
119
91
|
release:
|
120
|
-
|
121
|
-
- image: circleci/ruby:2.4-node-browsers
|
122
|
-
working_directory: ~/repo
|
92
|
+
description: Release to RubyGems.org
|
123
93
|
steps:
|
124
|
-
- checkout
|
125
|
-
- *restore_bundle_install_cache
|
126
|
-
- *bundle_install
|
127
|
-
- *save_bundle_install_cache
|
128
94
|
- run:
|
129
95
|
name: Create Rubygems Credentials
|
130
96
|
command: |
|
@@ -136,24 +102,144 @@ jobs:
|
|
136
102
|
command: |
|
137
103
|
git push --set-upstream origin ${CIRCLE_BRANCH}
|
138
104
|
bundle exec rake release --trace
|
105
|
+
setup:
|
106
|
+
description: Setup for Job Working
|
107
|
+
parameters:
|
108
|
+
rails_version:
|
109
|
+
type: string
|
110
|
+
steps:
|
111
|
+
- checkout
|
112
|
+
- setup_bundle:
|
113
|
+
rails_version: << parameters.rails_version >>
|
114
|
+
build:
|
115
|
+
description: Build the RubyGem
|
116
|
+
parameters:
|
117
|
+
rails_version:
|
118
|
+
type: string
|
119
|
+
steps:
|
120
|
+
- checkout
|
121
|
+
- download_cc_test_reporter
|
122
|
+
- setup_bundle:
|
123
|
+
rails_version: << parameters.rails_version >>
|
124
|
+
- run_rspec
|
125
|
+
- rake_build
|
126
|
+
|
127
|
+
jobs:
|
128
|
+
build:
|
129
|
+
parameters:
|
130
|
+
ruby_version:
|
131
|
+
type: enum
|
132
|
+
enum: ['2.4', '2.5', '2.6']
|
133
|
+
rails_version:
|
134
|
+
type: enum
|
135
|
+
enum: ['4.2', '5.0', '5.1', '5.2']
|
136
|
+
executor:
|
137
|
+
name: default
|
138
|
+
ruby_version: << parameters.ruby_version >>
|
139
|
+
steps:
|
140
|
+
- build:
|
141
|
+
rails_version: << parameters.rails_version >>
|
142
|
+
rubocop:
|
143
|
+
executor:
|
144
|
+
name: default
|
145
|
+
ruby_version: '2.4'
|
146
|
+
steps:
|
147
|
+
- setup:
|
148
|
+
rails_version: '4.2'
|
149
|
+
- rubocop
|
150
|
+
yardoc:
|
151
|
+
executor:
|
152
|
+
name: default
|
153
|
+
ruby_version: '2.4'
|
154
|
+
steps:
|
155
|
+
- setup:
|
156
|
+
rails_version: '4.2'
|
157
|
+
- yardoc
|
158
|
+
rubocop_challenge:
|
159
|
+
executor:
|
160
|
+
name: default
|
161
|
+
ruby_version: '2.4'
|
162
|
+
steps:
|
163
|
+
- rubocop_challenge
|
164
|
+
release:
|
165
|
+
executor:
|
166
|
+
name: default
|
167
|
+
ruby_version: '2.4'
|
168
|
+
steps:
|
169
|
+
- setup:
|
170
|
+
rails_version: '5.2'
|
171
|
+
- release
|
172
|
+
|
139
173
|
workflows:
|
140
174
|
version: 2
|
141
175
|
|
142
176
|
commit:
|
143
177
|
jobs:
|
144
|
-
-
|
145
|
-
|
146
|
-
|
147
|
-
|
178
|
+
- build:
|
179
|
+
name: build_on_ruby_2_4_and_rails_4_2
|
180
|
+
ruby_version: '2.4'
|
181
|
+
rails_version: '4.2'
|
182
|
+
- build:
|
183
|
+
name: build_on_ruby_2_4_and_rails_5_0
|
184
|
+
ruby_version: '2.4'
|
185
|
+
rails_version: '5.0'
|
186
|
+
- build:
|
187
|
+
name: build_on_ruby_2_4_and_rails_5_1
|
188
|
+
ruby_version: '2.4'
|
189
|
+
rails_version: '5.1'
|
190
|
+
- build:
|
191
|
+
name: build_on_ruby_2_4_and_rails_5_2
|
192
|
+
ruby_version: '2.4'
|
193
|
+
rails_version: '5.2'
|
194
|
+
- build:
|
195
|
+
name: build_on_ruby_2_5_and_rails_4_2
|
196
|
+
ruby_version: '2.5'
|
197
|
+
rails_version: '4.2'
|
198
|
+
- build:
|
199
|
+
name: build_on_ruby_2_5_and_rails_5_0
|
200
|
+
ruby_version: '2.5'
|
201
|
+
rails_version: '5.0'
|
202
|
+
- build:
|
203
|
+
name: build_on_ruby_2_5_and_rails_5_1
|
204
|
+
ruby_version: '2.5'
|
205
|
+
rails_version: '5.1'
|
206
|
+
- build:
|
207
|
+
name: build_on_ruby_2_5_and_rails_5_2
|
208
|
+
ruby_version: '2.5'
|
209
|
+
rails_version: '5.2'
|
210
|
+
- build:
|
211
|
+
name: build_on_ruby_2_6_and_rails_4_2
|
212
|
+
ruby_version: '2.6'
|
213
|
+
rails_version: '4.2'
|
214
|
+
- build:
|
215
|
+
name: build_on_ruby_2_6_and_rails_5_0
|
216
|
+
ruby_version: '2.6'
|
217
|
+
rails_version: '5.0'
|
218
|
+
- build:
|
219
|
+
name: build_on_ruby_2_6_and_rails_5_1
|
220
|
+
ruby_version: '2.6'
|
221
|
+
rails_version: '5.1'
|
222
|
+
- build:
|
223
|
+
name: build_on_ruby_2_6_and_rails_5_2
|
224
|
+
ruby_version: '2.6'
|
225
|
+
rails_version: '5.2'
|
148
226
|
- rubocop
|
149
227
|
- yardoc
|
150
228
|
- release:
|
151
229
|
context: RubyGems API Key
|
152
230
|
requires:
|
153
|
-
-
|
154
|
-
-
|
155
|
-
-
|
156
|
-
-
|
231
|
+
- build_on_ruby_2_4_and_rails_4_2
|
232
|
+
- build_on_ruby_2_4_and_rails_5_0
|
233
|
+
- build_on_ruby_2_4_and_rails_5_1
|
234
|
+
- build_on_ruby_2_4_and_rails_5_2
|
235
|
+
- build_on_ruby_2_5_and_rails_4_2
|
236
|
+
- build_on_ruby_2_5_and_rails_5_0
|
237
|
+
- build_on_ruby_2_5_and_rails_5_1
|
238
|
+
- build_on_ruby_2_5_and_rails_5_2
|
239
|
+
- build_on_ruby_2_6_and_rails_4_2
|
240
|
+
- build_on_ruby_2_6_and_rails_5_0
|
241
|
+
- build_on_ruby_2_6_and_rails_5_1
|
242
|
+
- build_on_ruby_2_6_and_rails_5_2
|
157
243
|
- rubocop
|
158
244
|
filters:
|
159
245
|
branches:
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2019-
|
3
|
+
# on 2019-05-27 23:30:42 +0000 using RuboCop version 0.70.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
my_api_client (0.1.
|
4
|
+
my_api_client (0.1.4)
|
5
5
|
activesupport (>= 4.2.0)
|
6
6
|
jsonpath
|
7
7
|
sawyer
|
@@ -80,7 +80,7 @@ GEM
|
|
80
80
|
rubocop (>= 0.68.0)
|
81
81
|
rubocop-rspec (1.33.0)
|
82
82
|
rubocop (>= 0.60.0)
|
83
|
-
ruby-progressbar (1.10.
|
83
|
+
ruby-progressbar (1.10.1)
|
84
84
|
safe_yaml (1.0.5)
|
85
85
|
sawyer (0.8.2)
|
86
86
|
addressable (>= 2.3.5)
|
@@ -120,4 +120,4 @@ DEPENDENCIES
|
|
120
120
|
yard
|
121
121
|
|
122
122
|
BUNDLED WITH
|
123
|
-
1.17.
|
123
|
+
1.17.3
|
data/lib/my_api_client/base.rb
CHANGED
@@ -8,8 +8,15 @@ module MyApiClient
|
|
8
8
|
include MyApiClient::Exceptions
|
9
9
|
include MyApiClient::Request
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
if ActiveSupport::VERSION::STRING >= '5.2.0'
|
12
|
+
class_attribute :logger, instance_writer: false, default: ::Logger.new(STDOUT)
|
13
|
+
class_attribute :error_handlers, instance_writer: false, default: []
|
14
|
+
else
|
15
|
+
class_attribute :logger
|
16
|
+
class_attribute :error_handlers
|
17
|
+
self.logger = ::Logger.new(STDOUT)
|
18
|
+
self.error_handlers = []
|
19
|
+
end
|
13
20
|
|
14
21
|
# NOTE: This class **MUST NOT** implement #initialize method. Because it
|
15
22
|
# will become constraint that need call #super in the #initialize at
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ryz310
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -243,6 +243,10 @@ files:
|
|
243
243
|
- bin/console
|
244
244
|
- bin/release
|
245
245
|
- bin/setup
|
246
|
+
- gemfiles/rails_4.2.gemfile
|
247
|
+
- gemfiles/rails_5.0.gemfile
|
248
|
+
- gemfiles/rails_5.1.gemfile
|
249
|
+
- gemfiles/rails_5.2.gemfile
|
246
250
|
- lib/generators/rails/USAGE
|
247
251
|
- lib/generators/rails/api_client_generator.rb
|
248
252
|
- lib/generators/rails/templates/api_client.rb.erb
|