Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Origin model #91

Merged
merged 1 commit into from
Jul 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions lib/fastly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
require 'fastly/gzip'
require 'fastly/invoice'
require 'fastly/match'
require 'fastly/origin'
require 'fastly/request_setting'
require 'fastly/response_object'
require 'fastly/service'
Expand Down Expand Up @@ -143,7 +142,7 @@ def regions
client.get_stats('/stats/regions')
end

[User, Customer, Backend, CacheSetting, Condition, Dictionary, DictionaryItem, Director, Domain, Header, Healthcheck, Gzip, Match, Origin, RequestSetting, ResponseObject, Service, S3Logging, Syslog, VCL, Version].each do |klass|
[User, Customer, Backend, CacheSetting, Condition, Dictionary, DictionaryItem, Director, Domain, Header, Healthcheck, Gzip, Match, RequestSetting, ResponseObject, Service, S3Logging, Syslog, VCL, Version].each do |klass|
type = Util.class_to_path(klass)

if klass.respond_to?(:pluralize)
Expand Down Expand Up @@ -203,10 +202,6 @@ def regions
# :method: create_match(opts)
# opts must contain service_id, version and name params

##
# :method: create_origin(opts)
# opts must contain service_id, version and name params

##
# :method: create_healthcheck(opts)
# opts must contain service_id, version and name params
Expand Down Expand Up @@ -291,10 +286,6 @@ def regions
# :method: get_match(service_id, number, name)
# Get a Match

##
# :method: get_origin(service_id, number, name)
# Get an Origin

##
# :method: get_s3_logging(service_id, number, name)
# Get a S3 logging
Expand Down Expand Up @@ -394,11 +385,6 @@ def regions
# You can also call
# match.save!

##
# :method: update_origin(origin)
# You can also call
# origin.save!

##
# :method: update_settings(settings)
# You can also call
Expand Down Expand Up @@ -509,11 +495,6 @@ def regions
# You can also call
# match.delete!(match)

##
# :method: delete_origin(origin)
# You can also call
# origin.delete!

##
# :method: delete_s3_logging(s3_logging)
# You can also call
Expand Down Expand Up @@ -608,10 +589,6 @@ def regions
#
# Get a list of all matches

# :method: list_origins(:service_id => service.id, :version => version.number)
#
# Get a list of all origins

# :method: list_syslogs(:service_id => service.id, :version => version.number)
#
# Get a list of all syslogs
Expand Down
39 changes: 0 additions & 39 deletions lib/fastly/origin.rb

This file was deleted.

8 changes: 0 additions & 8 deletions test/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,6 @@ def test_creating_service_and_backend
assert director.add_backend(backend)
# generated2 = version3.generated_vcl

origin_name = "fastly-test-origin-#{random_string}"
origin = @fastly.create_origin(:service_id => service.id, :version => number, :name => origin_name)
assert origin
assert_equal origin_name, origin.name
assert_equal service.id, origin.service.id
assert_equal number.to_s, origin.version_number.to_s
# assert_equal origin.version.number.to_s, number.to_s

condition_name = "fastly-test-condition-#{random_string}"
condition_statement = 'req.url ~ "^/foo"'
condition = @fastly.create_condition(:service_id => service.id, :version => number, :name => condition_name, :statement => condition_statement, :type => 'REQUEST')
Expand Down