prismic.io 1.0.0.rc4 → 1.0.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/prismic.rb +1 -1
- data/lib/prismic/version.rb +1 -1
- data/spec/oauth_spec.rb +20 -0
- metadata +15 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca80b38d048125991d9ddb08ae46e30ff195a315
|
4
|
+
data.tar.gz: 175dbc5a5df2492651e3eb3794f9bcd0ea5d3117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f1d0d419feeb6cfe59e08c8e1e8b3ce40371407ecfa7d0ded8971f2e943d0588edce93f469d5e1a6d5a66ccec1b7f4ed6aeacc715ac7fdc92797ea54dd2fb1f
|
7
|
+
data.tar.gz: 24189dbe64510b5023e9ad339bd408910724eff3c034f60c36a6ec0d227994e9c46a973c965cfca1956f33538ba17b22600c579fa94791a28640771b89c70728
|
data/Gemfile.lock
CHANGED
data/lib/prismic.rb
CHANGED
@@ -57,7 +57,7 @@ module Prismic
|
|
57
57
|
|
58
58
|
def self.oauth_initiate_url(url, oauth_opts, api_opts=nil)
|
59
59
|
api_opts ||= {}
|
60
|
-
api_opts = {access_token:
|
60
|
+
api_opts = {access_token: api_opts} if api_opts.is_a?(String)
|
61
61
|
API.oauth_initiate_url(url, oauth_opts, api_opts)
|
62
62
|
end
|
63
63
|
|
data/lib/prismic/version.rb
CHANGED
data/spec/oauth_spec.rb
CHANGED
@@ -39,6 +39,16 @@ describe 'OAuth' do
|
|
39
39
|
url.should == expected_url
|
40
40
|
end
|
41
41
|
|
42
|
+
it "should returns the URL (with access_token)" do
|
43
|
+
url = Prismic.oauth_initiate_url(PUBLIC_URL, OAUTH_INITIATE_OPTS, "token")
|
44
|
+
expected_url = [
|
45
|
+
"https://lesbonneschoses.prismic.io/auth?client_id=client_id",
|
46
|
+
"redirect_uri=http%3A%2F%2Fmyapp.com%2Fcallback",
|
47
|
+
"scope=master%2Breleases",
|
48
|
+
].join("&")
|
49
|
+
url.should == expected_url
|
50
|
+
end
|
51
|
+
|
42
52
|
end
|
43
53
|
|
44
54
|
describe "oauth_check_token" do
|
@@ -100,6 +110,16 @@ describe 'OAuth' do
|
|
100
110
|
url.should == expected_url
|
101
111
|
end
|
102
112
|
|
113
|
+
it "should returns the URL (with access_token)" do
|
114
|
+
url = Prismic.oauth_initiate_url(PRIVATE_URL, OAUTH_INITIATE_OPTS, "token")
|
115
|
+
expected_url = [
|
116
|
+
"https://privaterepository.prismic.io/auth?client_id=client_id",
|
117
|
+
"redirect_uri=http%3A%2F%2Fmyapp.com%2Fcallback",
|
118
|
+
"scope=master%2Breleases",
|
119
|
+
].join("&")
|
120
|
+
url.should == expected_url
|
121
|
+
end
|
122
|
+
|
103
123
|
end
|
104
124
|
|
105
125
|
describe "oauth_check_token" do
|
metadata
CHANGED
@@ -1,70 +1,70 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prismic.io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Étienne Vallette d'Osia
|
7
|
+
- "Étienne Vallette d'Osia"
|
8
8
|
- Samy Dindane
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.3'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.3'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rspec
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '2.14'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '2.14'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: nokogiri
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '1.6'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '1.6'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: simplecov
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0.7'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0.7'
|
70
70
|
description: The standard Prismic.io's API library.
|
@@ -74,8 +74,8 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .gitignore
|
78
|
-
- .travis.yml
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
79
|
- Gemfile
|
80
80
|
- Gemfile.lock
|
81
81
|
- README.md
|
@@ -123,12 +123,12 @@ require_paths:
|
|
123
123
|
- lib
|
124
124
|
required_ruby_version: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- -
|
126
|
+
- - ">="
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '0'
|
129
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ">"
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: 1.3.1
|
134
134
|
requirements: []
|
@@ -152,4 +152,3 @@ test_files:
|
|
152
152
|
- spec/responses_mocks/structured_text_paragraph.json
|
153
153
|
- spec/responses_mocks/structured_text_with_tricky_spans.json
|
154
154
|
- spec/spec_helper.rb
|
155
|
-
has_rdoc:
|