Skip to content

Commit

Permalink
Remove specs and software (#140)
Browse files Browse the repository at this point in the history
* Remove software asset type

* Remove specification
  • Loading branch information
jalyna authored Apr 3, 2023
1 parent 4e15df5 commit 88982bd
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 38 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

* **BREAKING** Remove `Software` asset type
* **BREAKING** Remove `Asset#specification`

## [0.13.0] - 2023-03-24

* Add `Zaikio::Hub::SubscriptionInvitation`
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Zaikio::Hub.with_token(token) do
# Note that .all understands pagination headers and will fetch all pages
organization.members.all
organization.machines.all
organization.software.all
organization.sites.all
organization.sites.find('123')
organization.business_relationships.all
Expand Down
1 change: 0 additions & 1 deletion lib/zaikio/hub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
require "zaikio/hub/organization"
require "zaikio/hub/person"
require "zaikio/hub/machine"
require "zaikio/hub/software"
require "zaikio/hub/specialist"
require "zaikio/hub/address"
require "zaikio/hub/site"
Expand Down
11 changes: 0 additions & 11 deletions lib/zaikio/hub/asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@ def destroy
end
end

def specification
prefix = if Zaikio::Hub.current_token_data.subject_type == "Person"
"person/organizations/#{owner_id || organization_id}/"
else
""
end
self.class.request(:get,
"#{prefix}#{collection_name}/#{id}/#{singular_name}_specification")
&.body&.dig("data")
end

private

def collection_name
Expand Down
2 changes: 0 additions & 2 deletions lib/zaikio/hub/current_organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ def self.find_with_fallback(fallback)
uri: "organization/memberships(/:id)"
has_many :business_relationships, class_name: "Zaikio::Hub::BusinessRelationship",
uri: "organization/business_relationships(/:id)"
has_many :software, class_name: "Zaikio::Hub::Software",
uri: "software(/:id)"
has_many :machines, class_name: "Zaikio::Hub::Machine",
uri: "machines(/:id)"
has_many :specialists, class_name: "Zaikio::Hub::Specialist",
Expand Down
2 changes: 0 additions & 2 deletions lib/zaikio/hub/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class Organization < Base
# Associations
has_many :memberships, class_name: "Zaikio::Hub::Membership",
uri: "person/organizations/:organization_id/memberships"
has_many :software, class_name: "Zaikio::Hub::Software",
uri: "person/organizations/:organization_id/software"
has_many :machines, class_name: "Zaikio::Hub::Machine",
uri: "person/organizations/:organization_id/machines"
has_many :specialists, class_name: "Zaikio::Hub::Specialist",
Expand Down
20 changes: 0 additions & 20 deletions lib/zaikio/hub/software.rb

This file was deleted.

1 change: 0 additions & 1 deletion test/zaikio/hub_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ def default_headers(token)
organization = Zaikio::Hub::CurrentOrganization.new
machine2 = organization.machines.find("55a37c0f-c2c5-531c-be8c-8e012a938fc5")
assert_equal "55a37c0f-c2c5-531c-be8c-8e012a938fc5", machine2.id
assert_equal({ "capabilities" => [] }, machine2.specification)
end
end
end
Expand Down

0 comments on commit 88982bd

Please sign in to comment.