octoparts 0.0.9 → 0.1.1
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 +24 -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 +6 -8
- data/test/helper.rb +0 -3
- metadata +13 -45
- 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: f27557474b94440fbec313c6f9c4dde2d2ce4656635dcf978f9fae15bab57c2e
|
4
|
+
data.tar.gz: 6eae036d7d6640a44c4a1d7088f6a5e0c364883490c6529f66f73c7d526adb10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 159bbadd2a097ab85640295b1f20947b0803b94c57cff93ba6747b2dc0e9a4f2eea6438171e6e74a603f7fdf6eb7d855f90df512c985bdf80cbe938b96727b45
|
7
|
+
data.tar.gz: beed3811f895f592750675eddddcbec5ce2d38020502cfe10d8b1700ff22c77db0346b4e0476fcd7a2f939f2fec6359408691901c4c7674e95233d48c7f6d290
|
@@ -0,0 +1,24 @@
|
|
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', '3.2' ]
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby-version }}
|
22
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
23
|
+
- name: Run tests
|
24
|
+
run: 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 "
|
29
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rake", "~> 13.0.6"
|
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.
|
4
|
+
version: 0.1.1
|
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-12-27 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,34 +66,20 @@ 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
|
87
72
|
requirements:
|
88
73
|
- - "~>"
|
89
74
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
75
|
+
version: 13.0.6
|
91
76
|
type: :development
|
92
77
|
prerelease: false
|
93
78
|
version_requirements: !ruby/object:Gem::Requirement
|
94
79
|
requirements:
|
95
80
|
- - "~>"
|
96
81
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
82
|
+
version: 13.0.6
|
98
83
|
- !ruby/object:Gem::Dependency
|
99
84
|
name: pry
|
100
85
|
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.0.3.1
|
238
206
|
signing_key:
|
239
207
|
specification_version: 4
|
240
208
|
summary: Ruby client for the Octoparts API
|
data/.travis.yml
DELETED