dato 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Rakefile +3 -5
- data/lib/dato/account/repo/site.rb +10 -1
- data/lib/dato/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82c1636f441fbd46c8331b4a3a17d005560de0e8
|
4
|
+
data.tar.gz: c37302cbe0003a7188dcc6c4344876eab27f1b23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daa7cca64ddccfedde2a6fa675111c2b11f92f944c61aa0ebdc69114f2d84c4701e1357d92b164a25b10a7db373b2735c0a7377bef2aec98eba168b2a0b2481b
|
7
|
+
data.tar.gz: b9c65378b99fda7b554f62c9191a5dddea274847bf09cd05f7968bec8074be49e4fcb5017fa3af572f13e7d30f937067d3d00250dcc527d9cfac0e50906093f7
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
|
+
require "open-uri"
|
3
4
|
|
4
|
-
require_relative "./build/download_schema"
|
5
5
|
require_relative "./build/build_client"
|
6
6
|
|
7
7
|
RSpec::Core::RakeTask.new(:spec)
|
@@ -9,16 +9,14 @@ RSpec::Core::RakeTask.new(:spec)
|
|
9
9
|
task :default => :spec
|
10
10
|
|
11
11
|
task :build_repos do
|
12
|
-
downloader = DownloadSchema.new("y32upcTKLupUjXiC9nFW", "182")
|
13
|
-
|
14
12
|
BuildClient.new(
|
15
|
-
|
13
|
+
open("https://site-api.datocms.com/docs/site-api-hyperschema.json").read,
|
16
14
|
"site",
|
17
15
|
%w(session item)
|
18
16
|
).build
|
19
17
|
|
20
18
|
BuildClient.new(
|
21
|
-
|
19
|
+
open("https://site-api.datocms.com/docs/account-api-hyperschema.json").read,
|
22
20
|
"account",
|
23
21
|
%w(session item)
|
24
22
|
).build
|
@@ -16,7 +16,7 @@ module Dato
|
|
16
16
|
def create(resource_attributes)
|
17
17
|
body = JsonApiSerializer.new(
|
18
18
|
type: :site,
|
19
|
-
attributes: %i(domain name notes),
|
19
|
+
attributes: %i(domain name notes template),
|
20
20
|
).serialize(resource_attributes)
|
21
21
|
|
22
22
|
post_request "/sites", body
|
@@ -35,6 +35,15 @@ module Dato
|
|
35
35
|
delete_request "/sites/#{site_id}"
|
36
36
|
end
|
37
37
|
|
38
|
+
def duplicate(site_id, resource_attributes)
|
39
|
+
body = JsonApiSerializer.new(
|
40
|
+
type: :site,
|
41
|
+
attributes: %i(name),
|
42
|
+
).serialize(resource_attributes)
|
43
|
+
|
44
|
+
post_request "/sites/#{site_id}/duplicate", body
|
45
|
+
end
|
46
|
+
|
38
47
|
end
|
39
48
|
end
|
40
49
|
end
|
data/lib/dato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|