Skip to content

Commit ccaaae7

Browse files
committed
init specs
1 parent 50aea4b commit ccaaae7

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

lib/cloudflare/r2/cors.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
module Cloudflare
1010
module R2
1111
class Cors < Representation
12-
include Async::REST::Representation::Mutable
13-
1412
def rules
1513
result[:rules]
1614
end

lib/cloudflare/r2/domains.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
module Cloudflare
1010
module R2
1111
class Domain < Representation
12-
include Async::REST::Representation::Mutable
13-
1412
def name
1513
result[:domain]
1614
end

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ end
6060

6161
### Using a Bearer Token
6262

63-
You can read more about [bearer tokens here](https://blog.cloudflare.com/api-tokens-general-availability/). This allows you to limit priviledges.
63+
You can read more about [bearer tokens here](https://blog.cloudflare.com/api-tokens-general-availability/). This allows you to limit privileges.
6464

6565
``` ruby
6666
require 'cloudflare'

test/cloudflare/accounts.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,12 @@
3636

3737
expect(namespace.resource.reference.path).to be(:end_with?, "/#{account.id}/storage/kv/namespaces")
3838
end
39+
40+
it "can generate a representation for the R2 bucket endpoint" do
41+
buckets = connection.accounts.find_by_id(account.id).r2_buckets
42+
43+
expect(buckets).to be_a(Cloudflare::R2::Buckets)
44+
45+
expect(buckets.resource.reference.path).to be(:end_with?, "/#{account.id}/r2/buckets")
46+
end
3947
end

0 commit comments

Comments
 (0)