octoparts 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +33 -0
- data/.gitignore +3 -0
- data/README.md +1 -1
- data/lib/octoparts/client.rb +2 -1
- data/lib/octoparts/representer/aggregate_request_representer.rb +4 -2
- data/lib/octoparts/version.rb +1 -1
- data/octoparts.gemspec +5 -7
- data/test/helper.rb +0 -3
- metadata +11 -43
- data/.travis.yml +0 -7
- data/gemfiles/faraday-0_8_8.gemfile +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c5eb7130020cc1bb8342f6013e649c55afa417295bb6272366246a1035ca0fc8
|
4
|
+
data.tar.gz: 59bc63e029187a631144277e8ffac3a8e678e8d63a5b448e0cf4f50fc8f0f8a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f0e644e33f9e1c1587441c55098a40a50978a599f92befd617a2c39d1c7646f31b2c79c72c475b5d5075c08e70eb17dbc5e68df6e39a44cb42a05984614733e
|
7
|
+
data.tar.gz: f199b064557b1601b44c228e78b690307d737091eb973ed257c3b57502ef76b52f5028dcda31f039ef16b92499b9b6978f0362bb3f8524bde4b54f6189af8c1a
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: [ '2.6', '2.7', '3.0', '3.1' ]
|
15
|
+
include:
|
16
|
+
- ruby-version: '2.6'
|
17
|
+
ruby-opt: ''
|
18
|
+
- ruby-version: '2.7'
|
19
|
+
ruby-opt: '-W:deprecated'
|
20
|
+
- ruby-version: '3.0'
|
21
|
+
ruby-opt: '-W:deprecated'
|
22
|
+
- ruby-version: '3.1'
|
23
|
+
ruby-opt: '-W:deprecated'
|
24
|
+
|
25
|
+
steps:
|
26
|
+
- uses: actions/checkout@v2
|
27
|
+
- name: Set up Ruby
|
28
|
+
uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby-version }}
|
31
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
32
|
+
- name: Run tests
|
33
|
+
run: RUBY_OPT=${{ matrix.ruby-opt }} bundle exec rake
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Octoparts
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/octoparts.svg)](http://badge.fury.io/rb/octoparts)
|
4
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://github.com/m3dev/octoparts-rb/workflows/Ruby/badge.svg?branch=master)](https://github.com/m3dev/octoparts-rb/actions?query=workflow%3ARuby)
|
5
5
|
|
6
6
|
Octoparts Client for Ruby
|
7
7
|
|
data/lib/octoparts/client.rb
CHANGED
@@ -58,7 +58,8 @@ module Octoparts
|
|
58
58
|
private
|
59
59
|
|
60
60
|
def post_cache_api(path)
|
61
|
-
|
61
|
+
encoded_path_segments = path.split('/').map { |seg| URI.encode_www_form_component(seg) }.join('/')
|
62
|
+
escaped_path = "#{CACHE_API_ENDPOINT_PATH}#{encoded_path_segments}"
|
62
63
|
resp = post(escaped_path)
|
63
64
|
Response.new(
|
64
65
|
resp.body,
|
@@ -8,8 +8,10 @@ module Octoparts
|
|
8
8
|
@camelcase = camelcase
|
9
9
|
end
|
10
10
|
|
11
|
-
def call(
|
12
|
-
|
11
|
+
def call(represented)
|
12
|
+
options = represented.fetch(:options, {})
|
13
|
+
user_options = options.fetch(:user_options, {})
|
14
|
+
user_options[:camelize] ? @camelcase : @camelcase.underscore
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
data/lib/octoparts/version.rb
CHANGED
data/octoparts.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'octoparts/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "octoparts"
|
8
8
|
spec.version = Octoparts::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["
|
9
|
+
spec.authors = ["M3, inc."]
|
10
|
+
spec.email = ["platform-dev@m3.com"]
|
11
11
|
spec.summary = %q{ Ruby client for the Octoparts API }
|
12
12
|
spec.description = %q{ Ruby client library for the Octoparts API }
|
13
13
|
spec.homepage = "https://github.com/m3dev/octoparts-rb"
|
@@ -19,17 +19,15 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.required_ruby_version = '
|
23
|
-
spec.add_dependency "representable", "~> 3.0"
|
22
|
+
spec.required_ruby_version = '> 2.2'
|
23
|
+
spec.add_dependency "representable", "~> 3.1.0"
|
24
24
|
spec.add_dependency "activesupport", "> 4.0.0"
|
25
|
-
spec.add_dependency "faraday"
|
25
|
+
spec.add_dependency "faraday", "< 2.0"
|
26
26
|
spec.add_dependency "multi_json"
|
27
27
|
|
28
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
29
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
29
|
spec.add_development_dependency "pry"
|
31
30
|
spec.add_development_dependency "test-unit", "~> 3.0"
|
32
31
|
spec.add_development_dependency "webmock"
|
33
32
|
spec.add_development_dependency "vcr"
|
34
|
-
spec.add_development_dependency "coveralls"
|
35
33
|
end
|
data/test/helper.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octoparts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Takayuki Matsubara
|
8
7
|
- M3, inc.
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2022-05-20 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: representable
|
@@ -17,14 +16,14 @@ dependencies:
|
|
17
16
|
requirements:
|
18
17
|
- - "~>"
|
19
18
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
19
|
+
version: 3.1.0
|
21
20
|
type: :runtime
|
22
21
|
prerelease: false
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
24
|
- - "~>"
|
26
25
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
26
|
+
version: 3.1.0
|
28
27
|
- !ruby/object:Gem::Dependency
|
29
28
|
name: activesupport
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,16 +42,16 @@ dependencies:
|
|
43
42
|
name: faraday
|
44
43
|
requirement: !ruby/object:Gem::Requirement
|
45
44
|
requirements:
|
46
|
-
- - "
|
45
|
+
- - "<"
|
47
46
|
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
47
|
+
version: '2.0'
|
49
48
|
type: :runtime
|
50
49
|
prerelease: false
|
51
50
|
version_requirements: !ruby/object:Gem::Requirement
|
52
51
|
requirements:
|
53
|
-
- - "
|
52
|
+
- - "<"
|
54
53
|
- !ruby/object:Gem::Version
|
55
|
-
version: '0'
|
54
|
+
version: '2.0'
|
56
55
|
- !ruby/object:Gem::Dependency
|
57
56
|
name: multi_json
|
58
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,20 +66,6 @@ dependencies:
|
|
67
66
|
- - ">="
|
68
67
|
- !ruby/object:Gem::Version
|
69
68
|
version: '0'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: bundler
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - "~>"
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '1.7'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - "~>"
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '1.7'
|
84
69
|
- !ruby/object:Gem::Dependency
|
85
70
|
name: rake
|
86
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,35 +136,19 @@ dependencies:
|
|
151
136
|
- - ">="
|
152
137
|
- !ruby/object:Gem::Version
|
153
138
|
version: '0'
|
154
|
-
- !ruby/object:Gem::Dependency
|
155
|
-
name: coveralls
|
156
|
-
requirement: !ruby/object:Gem::Requirement
|
157
|
-
requirements:
|
158
|
-
- - ">="
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: '0'
|
161
|
-
type: :development
|
162
|
-
prerelease: false
|
163
|
-
version_requirements: !ruby/object:Gem::Requirement
|
164
|
-
requirements:
|
165
|
-
- - ">="
|
166
|
-
- !ruby/object:Gem::Version
|
167
|
-
version: '0'
|
168
139
|
description: " Ruby client library for the Octoparts API "
|
169
140
|
email:
|
170
|
-
- takayuki.1229@gmail.com
|
171
141
|
- platform-dev@m3.com
|
172
142
|
executables: []
|
173
143
|
extensions: []
|
174
144
|
extra_rdoc_files: []
|
175
145
|
files:
|
146
|
+
- ".github/workflows/ruby.yml"
|
176
147
|
- ".gitignore"
|
177
|
-
- ".travis.yml"
|
178
148
|
- Gemfile
|
179
149
|
- LICENSE.txt
|
180
150
|
- README.md
|
181
151
|
- Rakefile
|
182
|
-
- gemfiles/faraday-0_8_8.gemfile
|
183
152
|
- lib/octoparts.rb
|
184
153
|
- lib/octoparts/builder.rb
|
185
154
|
- lib/octoparts/client.rb
|
@@ -224,7 +193,7 @@ require_paths:
|
|
224
193
|
- lib
|
225
194
|
required_ruby_version: !ruby/object:Gem::Requirement
|
226
195
|
requirements:
|
227
|
-
- - "
|
196
|
+
- - ">"
|
228
197
|
- !ruby/object:Gem::Version
|
229
198
|
version: '2.2'
|
230
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -233,8 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
202
|
- !ruby/object:Gem::Version
|
234
203
|
version: '0'
|
235
204
|
requirements: []
|
236
|
-
|
237
|
-
rubygems_version: 2.6.8
|
205
|
+
rubygems_version: 3.1.2
|
238
206
|
signing_key:
|
239
207
|
specification_version: 4
|
240
208
|
summary: Ruby client for the Octoparts API
|
data/.travis.yml
DELETED