all3dp 1.0.0 → 2.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2125550bedac1df4dfd975cbe52ace243a1a3f2a57bdd3246e47c3141c3982bc
4
- data.tar.gz: 316d777dbdeed8f8c51303094bb9b08bc57301083d8af3a8dcd90da4ff803aa7
3
+ metadata.gz: b1ad87904ac3a1ebc9fc9b94a2257929de5f7839f6b153af027ac9fb93b52753
4
+ data.tar.gz: 3da475508a32d567664f99609b74e14ce7a6266593cb498e5a41fca90a6b04e5
5
5
  SHA512:
6
- metadata.gz: 6e85a12cdc7734e871cdb0752732ec33795277f18567437632425f080a410aa3fc6dc863caf7414c44b28d8cb953a8487d9ab6b9b7429a58dd7454d4339fee7a
7
- data.tar.gz: 26b24337a9b00d290c20ee27e2c091a9dcca57121f22af9111853663a6ed17be4804624fbef259140695e68e9a13433b47c245418aa6f34514628be518fd8d9b
6
+ metadata.gz: f2dda46490582d44f3d43a60dbc5dfe3fcbf3a0024fe789815218d169e9d0ce6eb806e457a373b1cdc483d457192257e51dab3778dc49304d823d72c129b1535
7
+ data.tar.gz: 6751e372621808d3bab19e38c38603ed2445a172fe39ab5ec5015d918939f967b3303f42340188a8e275853b708ac3346e653a994bc5fef0fc653ccd48a06790
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "04:00"
8
+ open-pull-requests-limit: 3
9
+ ignore:
10
+ - dependency-name: rubocop
11
+ versions:
12
+ - "> 1.0.0"
13
+ rebase-strategy: disabled
data/.rubocop.yml CHANGED
@@ -1,12 +1,32 @@
1
+ plugins:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
1
5
  AllCops:
2
- TargetRubyVersion: 2.4
6
+ TargetRubyVersion: 3.3
7
+ NewCops: enable
3
8
 
4
- Style/StringLiterals:
5
- EnforcedStyle: double_quotes
9
+ Bundler/OrderedGems:
10
+ Enabled: false
6
11
 
7
12
  Gemspec/OrderedDependencies:
8
13
  Enabled: false
9
14
 
15
+ RSpec/ExampleLength:
16
+ Max: 20
17
+
18
+ RSpec/MultipleExpectations:
19
+ Enabled: false
20
+
21
+ RSpec/SpecFilePathFormat:
22
+ CustomTransform:
23
+ RuboCop: rubocop
24
+ RSpec: rspec
25
+ All3DP: all3dp
26
+
27
+ Style/StringLiterals:
28
+ EnforcedStyle: double_quotes
29
+
10
30
  Style/TrailingCommaInArrayLiteral:
11
31
  EnforcedStyleForMultiline: consistent_comma
12
32
 
@@ -45,3 +65,92 @@ Style/HashTransformKeys:
45
65
 
46
66
  Style/HashTransformValues:
47
67
  Enabled: true
68
+
69
+ Layout/EmptyLinesAroundAttributeAccessor:
70
+ Enabled: true
71
+ Layout/SpaceAroundMethodCallOperator:
72
+ Enabled: true
73
+ Lint/DeprecatedOpenSSLConstant:
74
+ Enabled: true
75
+ Lint/MixedRegexpCaptureTypes:
76
+ Enabled: true
77
+ Style/ExponentialNotation:
78
+ Enabled: true
79
+ Style/RedundantRegexpCharacterClass:
80
+ Enabled: true
81
+ Style/RedundantRegexpEscape:
82
+ Enabled: true
83
+ Style/SlicingWithRange:
84
+ Enabled: true
85
+ Layout/BeginEndAlignment: # (new in 0.91)
86
+ Enabled: true
87
+ Lint/BinaryOperatorWithIdenticalOperands: # (new in 0.89)
88
+ Enabled: true
89
+ Lint/ConstantDefinitionInBlock: # (new in 0.91)
90
+ Enabled: true
91
+ Lint/DuplicateElsifCondition: # (new in 0.88)
92
+ Enabled: true
93
+ Lint/DuplicateRequire: # (new in 0.90)
94
+ Enabled: true
95
+ Lint/DuplicateRescueException: # (new in 0.89)
96
+ Enabled: true
97
+ Lint/EmptyConditionalBody: # (new in 0.89)
98
+ Enabled: true
99
+ Lint/EmptyFile: # (new in 0.90)
100
+ Enabled: true
101
+ Lint/FloatComparison: # (new in 0.89)
102
+ Enabled: true
103
+ Lint/IdentityComparison: # (new in 0.91)
104
+ Enabled: true
105
+ Lint/MissingSuper: # (new in 0.89)
106
+ Enabled: true
107
+ Lint/OutOfRangeRegexpRef: # (new in 0.89)
108
+ Enabled: true
109
+ Lint/SelfAssignment: # (new in 0.89)
110
+ Enabled: true
111
+ Lint/TopLevelReturnWithArgument: # (new in 0.89)
112
+ Enabled: true
113
+ Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
114
+ Enabled: true
115
+ Lint/UnreachableLoop: # (new in 0.89)
116
+ Enabled: true
117
+ Lint/UselessMethodDefinition: # (new in 0.90)
118
+ Enabled: true
119
+ Lint/UselessTimes: # (new in 0.91)
120
+ Enabled: true
121
+ Style/AccessorGrouping: # (new in 0.87)
122
+ Enabled: true
123
+ Style/ArrayCoercion: # (new in 0.88)
124
+ Enabled: true
125
+ Style/BisectedAttrAccessor: # (new in 0.87)
126
+ Enabled: true
127
+ Style/CaseLikeIf: # (new in 0.88)
128
+ Enabled: true
129
+ Style/CombinableLoops: # (new in 0.90)
130
+ Enabled: true
131
+ Style/ExplicitBlockArgument: # (new in 0.89)
132
+ Enabled: true
133
+ Style/GlobalStdStream: # (new in 0.89)
134
+ Enabled: true
135
+ Style/HashAsLastArrayItem: # (new in 0.88)
136
+ Enabled: true
137
+ Style/HashLikeCase: # (new in 0.88)
138
+ Enabled: true
139
+ Style/KeywordParametersOrder: # (new in 0.90)
140
+ Enabled: true
141
+ Style/OptionalBooleanParameter: # (new in 0.89)
142
+ Enabled: true
143
+ Style/RedundantAssignment: # (new in 0.87)
144
+ Enabled: true
145
+ Style/RedundantFetchBlock: # (new in 0.86)
146
+ Enabled: true
147
+ Style/RedundantFileExtensionInRequire: # (new in 0.88)
148
+ Enabled: true
149
+ Style/RedundantSelfAssignment: # (new in 0.90)
150
+ Enabled: true
151
+ Style/SingleArgumentDig: # (new in 0.89)
152
+ Enabled: true
153
+ Style/SoleNestedConditional: # (new in 0.89)
154
+ Enabled: true
155
+ Style/StringConcatenation: # (new in 0.89)
156
+ Enabled: true
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # unreleased
2
2
 
3
+ # v2.0.0
4
+
5
+ Feature:
6
+ - Use the new `customer-api.craftcloud3d.com` endpoint.
7
+
8
+ Breaking changes:
9
+ - Drop Ruby 2 support
10
+
11
+ # v1.0.1
12
+
13
+ Fix:
14
+ - Update configuration links to `app.craftcloud3d.com`.
15
+
3
16
  # v1.0.0
4
17
 
5
18
  Feature:
data/Gemfile CHANGED
@@ -2,7 +2,14 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
-
7
5
  # Specify your gem's dependencies in all3dp.gemspec
8
6
  gemspec
7
+
8
+ # Development dependencies
9
+ gem "rake", ">= 13.0"
10
+ gem "rspec", ">= 3.0"
11
+ gem "webmock", ">= 3.6"
12
+ gem "rubocop", ">= 1.0"
13
+ gem "rubocop-rake"
14
+ gem "rubocop-rspec"
15
+ gem "httplog", ">= 1.0"
data/README.md CHANGED
@@ -32,7 +32,7 @@ configuration = All3DP::Configuration.create(
32
32
  You can then redirect your users to the given URL:
33
33
 
34
34
  ```rb
35
- configuration.url # => "https://print.all3dp.com/configuration/f00b4r…"
35
+ configuration.url # => "https://app.craftcloud3d.com/configuration/f00b4r…"
36
36
  ```
37
37
 
38
38
  ## Development
@@ -45,7 +45,7 @@ interactive prompt that will allow you to experiment with the API.
45
45
 
46
46
  To release a new version, update the version number in `version.rb`, update
47
47
  the `CHANGELOG.md`, commit with a message like "v42.0.0", and then run
48
- `bundle exec rake release`, which will create a git tag for the version,
48
+ `bin/rake release`, which will create a git tag for the version,
49
49
  push git commits and tags, and push the gem to
50
50
  [rubygems.org](https://rubygems.org).
51
51
 
data/Rakefile CHANGED
@@ -2,14 +2,12 @@
2
2
 
3
3
  # Bundler
4
4
  require "bundler/gem_tasks"
5
- require "rspec/core/rake_task"
6
5
 
7
- # Rspec
6
+ # RSpec
8
7
  require "rspec/core/rake_task"
9
8
  RSpec::Core::RakeTask.new(:spec)
10
9
 
11
- task default: :spec
12
- # Rubocop
10
+ # RuboCop
13
11
  require "rubocop/rake_task"
14
12
  RuboCop::RakeTask.new(:rubocop)
15
13
 
data/all3dp.gemspec CHANGED
@@ -10,9 +10,9 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ["Sunny Ripert"]
11
11
  spec.email = ["sunny@sunfox.org"]
12
12
 
13
- spec.summary = "Access All3DP's API"
14
- spec.description = "Send 3D files to the All3DP API"
15
- spec.homepage = "http://github.com/sunny/all3dp"
13
+ spec.summary = "Access Craftcloud's API"
14
+ spec.description = "Send 3D files to All3DP's Craftcloud API"
15
+ spec.homepage = "http://github.com/cults/all3dp"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f|
18
18
  f.match(%r{^(test|spec|features)/})
@@ -21,10 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_development_dependency "bundler", "~> 2.0"
25
- spec.add_development_dependency "rake", "~> 13.0"
26
- spec.add_development_dependency "rspec", "~> 3.0"
27
- spec.add_development_dependency "webmock", "~> 3.6"
28
- spec.add_development_dependency "rubocop", "~> 0.55"
29
- spec.add_development_dependency "httplog", "~> 1.0"
24
+ spec.required_ruby_version = ">= 3.3"
25
+
26
+ spec.metadata["rubygems_mfa_required"] = "true"
30
27
  end
data/bin/rubocop ADDED
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rubocop' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath,)
14
+
15
+ bundle_binstub = File.expand_path("bundle", __dir__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort(
22
+ "Your `bin/bundle` was not generated by Bundler, so this binstub " \
23
+ "cannot run.\n" \
24
+ "Replace `bin/bundle` by running `bundle binstubs bundler --force`, " \
25
+ "then run this command again.",
26
+ )
27
+ end
28
+ end
29
+
30
+ require "rubygems"
31
+ require "bundler/setup"
32
+
33
+ load Gem.bin_path("rubocop", "rubocop")
data/lib/all3dp/api.rb CHANGED
@@ -4,8 +4,11 @@ module All3DP
4
4
  # Handle all calls to the API.
5
5
  class API
6
6
  class Error < StandardError; end
7
+
7
8
  class BadGatewayError < Error; end
9
+
8
10
  class GatewayTimeoutError < Error; end
11
+
9
12
  class ServiceUnavailableError < Error; end
10
13
 
11
14
  def create_configuration(items:)
@@ -17,7 +20,7 @@ module All3DP
17
20
 
18
21
  private
19
22
 
20
- BASE_URL = "https://api.craftcloud3d.com"
23
+ BASE_URL = "https://customer-api.craftcloud3d.com"
21
24
  private_constant :BASE_URL
22
25
 
23
26
  def response_body(response)
@@ -36,7 +39,6 @@ module All3DP
36
39
  uri = URI.parse(url)
37
40
  request = Net::HTTP::Post.new(uri)
38
41
  request.content_type = "application/json; charset=UTF-8"
39
- request["use-model-urls"] = "true"
40
42
  request.body = JSON.dump(json)
41
43
  req_options = { use_ssl: uri.scheme == "https" }
42
44
 
@@ -10,7 +10,7 @@ module All3DP
10
10
  end
11
11
 
12
12
  def url
13
- "https://print.all3dp.com/configuration/#{id}"
13
+ "https://craftcloud3d.com/configuration/#{id}"
14
14
  end
15
15
 
16
16
  def self.create(model_urls:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module All3DP
4
- VERSION = "1.0.0"
4
+ VERSION = "2.0.0"
5
5
  end
metadata CHANGED
@@ -1,109 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: all3dp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunny Ripert
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2020-04-24 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '13.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '13.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.0'
55
- - !ruby/object:Gem::Dependency
56
- name: webmock
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.6'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.6'
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.55'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.55'
83
- - !ruby/object:Gem::Dependency
84
- name: httplog
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.0'
97
- description: Send 3D files to the All3DP API
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: Send 3D files to All3DP's Craftcloud API
98
13
  email:
99
14
  - sunny@sunfox.org
100
15
  executables: []
101
16
  extensions: []
102
17
  extra_rdoc_files: []
103
18
  files:
19
+ - ".github/dependabot.yml"
104
20
  - ".gitignore"
105
21
  - ".rspec"
106
22
  - ".rubocop.yml"
23
+ - ".ruby-version"
107
24
  - ".travis.yml"
108
25
  - CHANGELOG.md
109
26
  - CODE_OF_CONDUCT.md
@@ -113,15 +30,16 @@ files:
113
30
  - Rakefile
114
31
  - all3dp.gemspec
115
32
  - bin/console
33
+ - bin/rubocop
116
34
  - bin/setup
117
35
  - lib/all3dp.rb
118
36
  - lib/all3dp/api.rb
119
37
  - lib/all3dp/configuration.rb
120
38
  - lib/all3dp/version.rb
121
- homepage: http://github.com/sunny/all3dp
39
+ homepage: http://github.com/cults/all3dp
122
40
  licenses: []
123
- metadata: {}
124
- post_install_message:
41
+ metadata:
42
+ rubygems_mfa_required: 'true'
125
43
  rdoc_options: []
126
44
  require_paths:
127
45
  - lib
@@ -129,16 +47,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
47
  requirements:
130
48
  - - ">="
131
49
  - !ruby/object:Gem::Version
132
- version: '0'
50
+ version: '3.3'
133
51
  required_rubygems_version: !ruby/object:Gem::Requirement
134
52
  requirements:
135
53
  - - ">="
136
54
  - !ruby/object:Gem::Version
137
55
  version: '0'
138
56
  requirements: []
139
- rubyforge_project:
140
- rubygems_version: 2.7.6.2
141
- signing_key:
57
+ rubygems_version: 4.0.16
142
58
  specification_version: 4
143
- summary: Access All3DP's API
59
+ summary: Access Craftcloud's API
144
60
  test_files: []