leadlight 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +5 -7
- data/README.md +82 -0
- data/default.gems +1 -0
- data/leadlight.gemspec +16 -7
- data/lib/leadlight.rb +18 -62
- data/lib/leadlight/basic_converter.rb +18 -0
- data/lib/leadlight/codec.rb +2 -0
- data/lib/leadlight/entity.rb +1 -0
- data/lib/leadlight/errors.rb +10 -2
- data/lib/leadlight/header_helpers.rb +11 -0
- data/lib/leadlight/hyperlinkable.rb +1 -1
- data/lib/leadlight/representation.rb +19 -1
- data/lib/leadlight/request.rb +44 -11
- data/lib/leadlight/service.rb +4 -9
- data/lib/leadlight/service_class_methods.rb +69 -0
- data/lib/leadlight/service_middleware.rb +2 -14
- data/lib/leadlight/tint.rb +6 -2
- data/lib/leadlight/tint_helper.rb +27 -4
- data/lib/leadlight/type_map.rb +101 -0
- data/spec/cassettes/Leadlight/authorized_GitHub_example/_user/has_the_expected_content.yml +8 -8
- data/spec/cassettes/Leadlight/authorized_GitHub_example/_user/indicates_the_expected_oath_scopes.yml +8 -8
- data/spec/cassettes/Leadlight/authorized_GitHub_example/adding_and_removing_team_members.yml +273 -284
- data/spec/cassettes/Leadlight/authorized_GitHub_example/{adding_and_removing_team_members/.yml → adding_and_removing_teams.yml} +57 -84
- data/spec/cassettes/Leadlight/authorized_GitHub_example/test_team/.yml +111 -117
- data/spec/cassettes/Leadlight/basic_GitHub_example/_root/.yml +58 -25
- data/spec/cassettes/Leadlight/basic_GitHub_example/_root/__location__/.yml +58 -25
- data/spec/cassettes/Leadlight/basic_GitHub_example/_root/should_be_a_204_no_content.yml +58 -25
- data/spec/cassettes/Leadlight/tinted_GitHub_example/_root/.yml +58 -25
- data/spec/cassettes/Leadlight/tinted_GitHub_example/_root/__location__/.yml +58 -25
- data/spec/cassettes/Leadlight/tinted_GitHub_example/_root/should_be_a_204_no_content.yml +58 -25
- data/spec/cassettes/Leadlight/tinted_GitHub_example/_user/has_the_expected_content.yml +122 -50
- data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/.yml +190 -77
- data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/should_be_able_to_follow_next_link.yml +260 -104
- data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/should_be_enumerable.yml +616 -212
- data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/should_be_enumerable_over_page_boundaries.yml +331 -131
- data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/should_have_next_and_last_links.yml +190 -77
- data/spec/cassettes/Leadlight/tinted_GitHub_example/user_link/exists.yml +58 -25
- data/spec/cassettes/Leadlight/tinted_GitHub_example/user_link/links_to_the_expected_URL.yml +58 -25
- data/spec/leadlight/hyperlinkable_spec.rb +3 -1
- data/spec/leadlight/link_template_spec.rb +2 -1
- data/spec/leadlight/request_spec.rb +44 -21
- data/spec/leadlight/service_middleware_spec.rb +9 -46
- data/spec/leadlight/service_spec.rb +30 -24
- data/spec/leadlight/tint_helper_spec.rb +67 -1
- data/spec/leadlight/tint_spec.rb +69 -0
- data/spec/leadlight/type_map_spec.rb +127 -0
- data/spec/leadlight_spec.rb +102 -51
- data/spec/support/credentials.rb +10 -2
- data/spec/support/vcr.rb +1 -1
- metadata +61 -32
- data/lib/leadlight/type.rb +0 -71
- data/spec/leadlight/type_spec.rb +0 -137
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'spec_helper_lite'
|
2
|
+
require 'leadlight/tint'
|
3
|
+
|
4
|
+
module Leadlight
|
5
|
+
describe Tint do
|
6
|
+
subject { target.extend(Tint.new(:test_tint, options, &definition)) }
|
7
|
+
let(:definition) {
|
8
|
+
->(*args) do
|
9
|
+
self.tint_applied!
|
10
|
+
end
|
11
|
+
}
|
12
|
+
let(:target) { Target.new }
|
13
|
+
let(:status) { 200 }
|
14
|
+
let(:response) { stub(:status => status) }
|
15
|
+
let(:options) { {} }
|
16
|
+
|
17
|
+
class Target
|
18
|
+
def __apply_tint__
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def apply
|
23
|
+
subject.__apply_tint__
|
24
|
+
end
|
25
|
+
|
26
|
+
before do
|
27
|
+
target.stub(:__response__ => response)
|
28
|
+
end
|
29
|
+
|
30
|
+
context "with a successful status" do
|
31
|
+
it "is applied" do
|
32
|
+
target.should_receive(:tint_applied!)
|
33
|
+
apply
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context "with an unsuccessful status" do
|
38
|
+
let(:status) { 401 }
|
39
|
+
|
40
|
+
it "is not applied" do
|
41
|
+
target.should_not_receive(:tint_applied!)
|
42
|
+
apply
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "with a custom status guard" do
|
47
|
+
before do
|
48
|
+
options[:status] = 401
|
49
|
+
end
|
50
|
+
|
51
|
+
context "with a non-matching status" do
|
52
|
+
it "is not applied" do
|
53
|
+
target.should_not_receive(:tint_applied!)
|
54
|
+
apply
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
context "with an matching status" do
|
59
|
+
let(:status) { 401 }
|
60
|
+
|
61
|
+
it "is applied" do
|
62
|
+
target.should_receive(:tint_applied!)
|
63
|
+
apply
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,127 @@
|
|
1
|
+
require 'spec_helper_lite'
|
2
|
+
require 'leadlight/type_map'
|
3
|
+
|
4
|
+
module Leadlight
|
5
|
+
describe TypeMap do
|
6
|
+
subject { TypeMap.new(codec: codec) }
|
7
|
+
let(:codec) { stub(:codec) }
|
8
|
+
let(:options) { {foo: 23} }
|
9
|
+
let(:native_object) { stub(:native_object) }
|
10
|
+
let(:body) { stub(:body, size: 2) }
|
11
|
+
|
12
|
+
matcher :encode do |object|
|
13
|
+
define_method :expected_options do
|
14
|
+
@expected_options ||= anything
|
15
|
+
end
|
16
|
+
|
17
|
+
match{ |typemap|
|
18
|
+
result = stub(:encode_result)
|
19
|
+
@expected_type.should_receive(:encode).with(object, expected_options).
|
20
|
+
and_return(result)
|
21
|
+
typemap.to_entity_body(object).should equal(result)
|
22
|
+
}
|
23
|
+
|
24
|
+
chain :using do |expected_type|
|
25
|
+
@expected_type = expected_type
|
26
|
+
end
|
27
|
+
|
28
|
+
chain :with_options do |expected_options|
|
29
|
+
@expected_options = expected_options
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
matcher :decode do |enctype|
|
34
|
+
define_method :expected_options do
|
35
|
+
@expected_options ||= anything
|
36
|
+
end
|
37
|
+
|
38
|
+
match{ |typemap|
|
39
|
+
result = stub(:decode_result)
|
40
|
+
@expected_type.should_receive(:decode).with(enctype, body, expected_options).
|
41
|
+
and_return(result)
|
42
|
+
typemap.to_native(enctype, body, options).should equal(result)
|
43
|
+
}
|
44
|
+
|
45
|
+
chain :using do |expected_type|
|
46
|
+
@expected_type = expected_type
|
47
|
+
end
|
48
|
+
|
49
|
+
chain :with_options do |expected_options|
|
50
|
+
@expected_options = expected_options
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "defaults" do
|
55
|
+
it "encodes arbitrary objects to JSON" do
|
56
|
+
codec.should_receive(:encode).
|
57
|
+
with("application/json", native_object, options).
|
58
|
+
and_return(body)
|
59
|
+
result = subject.to_entity_body(native_object, options)
|
60
|
+
result.content_type.should eq("application/json")
|
61
|
+
result.body.should equal(body)
|
62
|
+
end
|
63
|
+
|
64
|
+
it "encodes nils as nil body, nil content type" do
|
65
|
+
result = subject.to_entity_body(nil, options)
|
66
|
+
result.content_type.should be_nil
|
67
|
+
result.body.should be_nil
|
68
|
+
end
|
69
|
+
|
70
|
+
it "permits encode type to be overridden" do
|
71
|
+
codec.should_receive(:encode).
|
72
|
+
with("application/xml", native_object, {}).
|
73
|
+
and_return(body)
|
74
|
+
result = subject.to_entity_body(native_object, {content_type: 'application/xml'})
|
75
|
+
result.content_type.should eq("application/xml")
|
76
|
+
result.body.should equal(body)
|
77
|
+
end
|
78
|
+
|
79
|
+
it "decodes entity bodies using the codec" do
|
80
|
+
codec.should_receive(:decode).
|
81
|
+
with("application/foobaz", body, options).
|
82
|
+
and_return(native_object)
|
83
|
+
subject.to_native("application/foobaz", body, options)
|
84
|
+
end
|
85
|
+
|
86
|
+
it "decodes empty entity bodies as a Blank object" do
|
87
|
+
subject.to_native("application/json", "", options).should be_a(Blank)
|
88
|
+
end
|
89
|
+
|
90
|
+
it "handles missing content type" do
|
91
|
+
subject.to_native(nil, "", options).should be_a(Blank)
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
95
|
+
|
96
|
+
describe "with some types defined" do
|
97
|
+
let(:numeric_type) { stub(:numeric_type) }
|
98
|
+
let(:custom_json_type) { stub(:custom_json_type) }
|
99
|
+
|
100
|
+
before do
|
101
|
+
subject.add "application/vnd.numeric", [Integer, Float], numeric_type
|
102
|
+
subject.add ["application/json", /\+json/], Hash, custom_json_type
|
103
|
+
end
|
104
|
+
|
105
|
+
it "encodes unmatched objects to JSON" do
|
106
|
+
codec.should_receive(:encode).
|
107
|
+
with("application/json", native_object, options).
|
108
|
+
and_return(body)
|
109
|
+
subject.to_entity_body(native_object, options)
|
110
|
+
end
|
111
|
+
|
112
|
+
it "decodes unmatched content types entity bodies using the codec" do
|
113
|
+
codec.should_receive(:decode).
|
114
|
+
with("application/foobaz", body, options).
|
115
|
+
and_return(native_object)
|
116
|
+
subject.to_native("application/foobaz", body,options)
|
117
|
+
end
|
118
|
+
|
119
|
+
it { should encode(123).using(numeric_type) }
|
120
|
+
it { should encode(12.5).using(numeric_type) }
|
121
|
+
it { should decode("application/vnd.numeric").using(numeric_type) }
|
122
|
+
it { should encode({}).using(custom_json_type) }
|
123
|
+
it { should decode("application/json").using(custom_json_type) }
|
124
|
+
it { should decode("application/xyzzy+json").using(custom_json_type) }
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
data/spec/leadlight_spec.rb
CHANGED
@@ -116,7 +116,7 @@ describe Leadlight, vcr: true do
|
|
116
116
|
subject.each do |f|
|
117
117
|
followers << f
|
118
118
|
end
|
119
|
-
followers.should
|
119
|
+
followers.size.should be > 150
|
120
120
|
end
|
121
121
|
|
122
122
|
it 'should be enumerable over page boundaries' do
|
@@ -127,74 +127,114 @@ describe Leadlight, vcr: true do
|
|
127
127
|
end
|
128
128
|
|
129
129
|
describe 'authorized GitHub example', vcr: { match_requests_on: [:method, :uri]}do
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
130
|
+
AuthorizedGithubService ||= Leadlight.build_service do
|
131
|
+
url 'https://api.github.com'
|
132
|
+
|
133
|
+
# Tints will skip error responses by default
|
134
|
+
tint 'errors', :status => :error do
|
135
|
+
extend do
|
136
|
+
def exception_message
|
137
|
+
self['message'] || super
|
138
|
+
end
|
138
139
|
end
|
140
|
+
end
|
139
141
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
142
|
+
tint 'root' do
|
143
|
+
match_path('/')
|
144
|
+
add_link_template '/users/{login}', 'user', 'Find user by login'
|
145
|
+
add_link_template '/orgs/{name}', 'organization'
|
146
|
+
end
|
147
|
+
|
148
|
+
tint 'auth_scopes' do
|
149
|
+
extend do
|
150
|
+
def oauth_scopes
|
151
|
+
__response__.headers['X-OAuth-Scopes'].to_s.strip.split(/\W+/)
|
145
152
|
end
|
146
153
|
end
|
154
|
+
end
|
147
155
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
add_link "#{__location__}/teams", 'teams'
|
156
|
+
tint 'organization' do
|
157
|
+
match_path(%r{^/orgs/\w+$})
|
158
|
+
add_link "#{__location__}/teams", 'teams'
|
152
159
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
end
|
160
|
+
extend do
|
161
|
+
def team_for_name(name)
|
162
|
+
teams.get(name)
|
157
163
|
end
|
164
|
+
|
165
|
+
def add_team(name, permission)
|
166
|
+
link('teams').post({},
|
167
|
+
{ 'name' => name,
|
168
|
+
'permission' => permission}).
|
169
|
+
raise_on_error.
|
170
|
+
submit_and_wait do |new_team|
|
171
|
+
return new_team
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
158
175
|
end
|
176
|
+
end
|
159
177
|
|
160
|
-
|
161
|
-
|
178
|
+
tint 'teamlist' do
|
179
|
+
match_path(%r{^/orgs/\w+/teams$})
|
162
180
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
end
|
181
|
+
add_link_set('child', :get) do
|
182
|
+
map{|team|
|
183
|
+
{href: team['url'], title: team['name']}
|
184
|
+
}
|
168
185
|
end
|
186
|
+
end
|
187
|
+
|
188
|
+
tint 'team' do
|
189
|
+
match_template('/teams/{id}')
|
190
|
+
|
191
|
+
add_link "#{__location__}/members", 'members'
|
192
|
+
add_link_template "#{__location__}/members/{id}", 'member'
|
193
|
+
|
194
|
+
extend do
|
195
|
+
def add_member(member_name)
|
196
|
+
link('member').put(member_name).submit_and_wait.raise_on_error
|
197
|
+
end
|
198
|
+
|
199
|
+
def remove_member(member_name)
|
200
|
+
link('member').delete(member_name).submit_and_wait.raise_on_error
|
201
|
+
end
|
169
202
|
|
170
|
-
|
171
|
-
|
172
|
-
type :team
|
173
|
-
|
174
|
-
add_link "#{__location__}/members", 'members'
|
175
|
-
add_link_template "#{__location__}/members/{id}", 'member'
|
176
|
-
|
177
|
-
extend do
|
178
|
-
def add_member(member_name)
|
179
|
-
link('member').put(member_name).submit_and_wait.raise_on_error
|
180
|
-
end
|
181
|
-
|
182
|
-
def remove_member(member_name)
|
183
|
-
link('member').delete(member_name).submit_and_wait.raise_on_error
|
184
|
-
end
|
203
|
+
def destroy
|
204
|
+
link('self').delete.raise_on_error.submit_and_wait
|
185
205
|
end
|
186
206
|
end
|
207
|
+
end
|
208
|
+
|
209
|
+
class GithubRepresentation < SimpleDelegator
|
210
|
+
def github_type
|
211
|
+
self['type']
|
212
|
+
end
|
213
|
+
end
|
187
214
|
|
188
|
-
|
215
|
+
# Define a type-mapping which will override the default handling
|
216
|
+
# of application/json and instantiate GithubRepresentation
|
217
|
+
# objects
|
218
|
+
type_mapping "application/json", GithubRepresentation do
|
219
|
+
def encode(object, options={})
|
220
|
+
encode_with_type("application/json", object.__getobj__, options)
|
189
221
|
end
|
190
222
|
|
191
|
-
|
223
|
+
def decode(content_type, entity_body, options={})
|
224
|
+
object = decode_with_type(content_type, entity_body, options)
|
225
|
+
GithubRepresentation.new(object)
|
192
226
|
end
|
193
227
|
end
|
194
228
|
|
195
|
-
|
196
|
-
request
|
229
|
+
on_prepare_request do |event, request|
|
230
|
+
# 'request' is the Faraday request being prepared
|
231
|
+
#
|
232
|
+
# 'event.source' is the Leadlight request, which delegates
|
233
|
+
# #service_options to the service
|
234
|
+
request.headers['Authorization'] =
|
235
|
+
"Bearer #{event.source.service_options[:oauth2_token]}"
|
197
236
|
end
|
237
|
+
|
198
238
|
end
|
199
239
|
|
200
240
|
subject { session }
|
@@ -222,14 +262,25 @@ describe Leadlight, vcr: true do
|
|
222
262
|
it { should be }
|
223
263
|
end
|
224
264
|
|
265
|
+
specify "adding and removing teams" do
|
266
|
+
org = session.root.organization('shiprise')
|
267
|
+
team = org.add_team("Leadlight Ephemeral Team", "pull")
|
268
|
+
team["permission"].should eq("pull")
|
269
|
+
team.destroy
|
270
|
+
end
|
271
|
+
|
225
272
|
specify "adding and removing team members" do
|
226
273
|
user = session.root.user("leadlight-test")
|
227
274
|
user.should_not be_empty
|
228
|
-
|
229
|
-
|
275
|
+
org = session.root.organization('shiprise')
|
276
|
+
org.should be_a(GithubRepresentation)
|
277
|
+
org.github_type.should eq("Organization")
|
278
|
+
teams = org.teams
|
279
|
+
team = teams.get('Leadlight Test Team')
|
280
|
+
team.should be_a(GithubRepresentation)
|
230
281
|
team.should_not be_empty
|
231
282
|
team.add_member('leadlight-test')
|
232
|
-
|
283
|
+
team.members.map{|m| m['login']}.should include('leadlight-test')
|
233
284
|
team.remove_member('leadlight-test')
|
234
285
|
team.members.map{|m| m['login']}.should_not include('leadlight-test')
|
235
286
|
end
|
data/spec/support/credentials.rb
CHANGED
@@ -3,9 +3,17 @@ require 'yaml'
|
|
3
3
|
module CredentialsTestHelpers
|
4
4
|
def credentials
|
5
5
|
credentials_path = Pathname('../../credentials.yml').expand_path(__FILE__)
|
6
|
+
@loaded_credentials ||= if credentials_path.readable?
|
7
|
+
YAML.load_file(credentials_path) || {}
|
8
|
+
else
|
9
|
+
{}
|
10
|
+
end
|
6
11
|
@credentials ||= Hash.new do |h,k|
|
7
|
-
|
8
|
-
|
12
|
+
h[k] = "MISSING_CREDENTIAL_KEY_#{k}"
|
13
|
+
unless ENV['TRAVIS']
|
14
|
+
warn "Missing key #{k.inspect} from #{credentials_path}"
|
15
|
+
end
|
16
|
+
end.merge!(@loaded_credentials)
|
9
17
|
rescue LoadError, SystemCallError, KeyError => e
|
10
18
|
pending e.message
|
11
19
|
end
|
data/spec/support/vcr.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leadlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: addressable
|
16
|
+
requirement: &70280979493900 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70280979493900
|
14
25
|
- !ruby/object:Gem::Dependency
|
15
26
|
name: faraday
|
16
|
-
requirement: &
|
27
|
+
requirement: &70280979493420 !ruby/object:Gem::Requirement
|
17
28
|
none: false
|
18
29
|
requirements:
|
19
30
|
- - ! '>='
|
@@ -21,10 +32,10 @@ dependencies:
|
|
21
32
|
version: '0'
|
22
33
|
type: :runtime
|
23
34
|
prerelease: false
|
24
|
-
version_requirements: *
|
35
|
+
version_requirements: *70280979493420
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: fattr
|
27
|
-
requirement: &
|
38
|
+
requirement: &70280979493000 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ! '>='
|
@@ -32,10 +43,10 @@ dependencies:
|
|
32
43
|
version: '0'
|
33
44
|
type: :runtime
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *70280979493000
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: link_header
|
38
|
-
requirement: &
|
49
|
+
requirement: &70280979492560 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ! '>='
|
@@ -43,10 +54,10 @@ dependencies:
|
|
43
54
|
version: '0'
|
44
55
|
type: :runtime
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *70280979492560
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
59
|
name: multi_json
|
49
|
-
requirement: &
|
60
|
+
requirement: &70280979492100 !ruby/object:Gem::Requirement
|
50
61
|
none: false
|
51
62
|
requirements:
|
52
63
|
- - ! '>='
|
@@ -54,10 +65,10 @@ dependencies:
|
|
54
65
|
version: '0'
|
55
66
|
type: :runtime
|
56
67
|
prerelease: false
|
57
|
-
version_requirements: *
|
68
|
+
version_requirements: *70280979492100
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: mime-types
|
60
|
-
requirement: &
|
71
|
+
requirement: &70280979491460 !ruby/object:Gem::Requirement
|
61
72
|
none: false
|
62
73
|
requirements:
|
63
74
|
- - ! '>='
|
@@ -65,10 +76,10 @@ dependencies:
|
|
65
76
|
version: '0'
|
66
77
|
type: :runtime
|
67
78
|
prerelease: false
|
68
|
-
version_requirements: *
|
79
|
+
version_requirements: *70280979491460
|
69
80
|
- !ruby/object:Gem::Dependency
|
70
81
|
name: hookr
|
71
|
-
requirement: &
|
82
|
+
requirement: &70280979490720 !ruby/object:Gem::Requirement
|
72
83
|
none: false
|
73
84
|
requirements:
|
74
85
|
- - ! '>='
|
@@ -76,10 +87,21 @@ dependencies:
|
|
76
87
|
version: '0'
|
77
88
|
type: :runtime
|
78
89
|
prerelease: false
|
79
|
-
version_requirements: *
|
90
|
+
version_requirements: *70280979490720
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: rake
|
93
|
+
requirement: &70280979489560 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *70280979489560
|
80
102
|
- !ruby/object:Gem::Dependency
|
81
103
|
name: rspec
|
82
|
-
requirement: &
|
104
|
+
requirement: &70280979488680 !ruby/object:Gem::Requirement
|
83
105
|
none: false
|
84
106
|
requirements:
|
85
107
|
- - ! '>='
|
@@ -87,10 +109,10 @@ dependencies:
|
|
87
109
|
version: '0'
|
88
110
|
type: :development
|
89
111
|
prerelease: false
|
90
|
-
version_requirements: *
|
112
|
+
version_requirements: *70280979488680
|
91
113
|
- !ruby/object:Gem::Dependency
|
92
114
|
name: vcr
|
93
|
-
requirement: &
|
115
|
+
requirement: &70280979487900 !ruby/object:Gem::Requirement
|
94
116
|
none: false
|
95
117
|
requirements:
|
96
118
|
- - ~>
|
@@ -98,10 +120,10 @@ dependencies:
|
|
98
120
|
version: 2.0.0.rc1
|
99
121
|
type: :development
|
100
122
|
prerelease: false
|
101
|
-
version_requirements: *
|
123
|
+
version_requirements: *70280979487900
|
102
124
|
- !ruby/object:Gem::Dependency
|
103
125
|
name: guard
|
104
|
-
requirement: &
|
126
|
+
requirement: &70280979487220 !ruby/object:Gem::Requirement
|
105
127
|
none: false
|
106
128
|
requirements:
|
107
129
|
- - ! '>='
|
@@ -109,10 +131,10 @@ dependencies:
|
|
109
131
|
version: '0'
|
110
132
|
type: :development
|
111
133
|
prerelease: false
|
112
|
-
version_requirements: *
|
134
|
+
version_requirements: *70280979487220
|
113
135
|
- !ruby/object:Gem::Dependency
|
114
136
|
name: guard-rspec
|
115
|
-
requirement: &
|
137
|
+
requirement: &70280979486440 !ruby/object:Gem::Requirement
|
116
138
|
none: false
|
117
139
|
requirements:
|
118
140
|
- - ! '>='
|
@@ -120,10 +142,10 @@ dependencies:
|
|
120
142
|
version: '0'
|
121
143
|
type: :development
|
122
144
|
prerelease: false
|
123
|
-
version_requirements: *
|
145
|
+
version_requirements: *70280979486440
|
124
146
|
- !ruby/object:Gem::Dependency
|
125
147
|
name: guard-bundler
|
126
|
-
requirement: &
|
148
|
+
requirement: &70280979485820 !ruby/object:Gem::Requirement
|
127
149
|
none: false
|
128
150
|
requirements:
|
129
151
|
- - ! '>='
|
@@ -131,10 +153,10 @@ dependencies:
|
|
131
153
|
version: '0'
|
132
154
|
type: :development
|
133
155
|
prerelease: false
|
134
|
-
version_requirements: *
|
156
|
+
version_requirements: *70280979485820
|
135
157
|
- !ruby/object:Gem::Dependency
|
136
158
|
name: ruby-debug19
|
137
|
-
requirement: &
|
159
|
+
requirement: &70280979485080 !ruby/object:Gem::Requirement
|
138
160
|
none: false
|
139
161
|
requirements:
|
140
162
|
- - ! '>='
|
@@ -142,8 +164,8 @@ dependencies:
|
|
142
164
|
version: '0'
|
143
165
|
type: :development
|
144
166
|
prerelease: false
|
145
|
-
version_requirements: *
|
146
|
-
description:
|
167
|
+
version_requirements: *70280979485080
|
168
|
+
description: Rose colored stained glass windows for HTTP.
|
147
169
|
email: avdi@avdi.org
|
148
170
|
executables: []
|
149
171
|
extensions: []
|
@@ -152,27 +174,33 @@ files:
|
|
152
174
|
- Gemfile
|
153
175
|
- Gemfile.lock
|
154
176
|
- Guardfile
|
177
|
+
- README.md
|
155
178
|
- Rakefile
|
179
|
+
- default.gems
|
156
180
|
- leadlight.gemspec
|
157
181
|
- lib/leadlight.rb
|
182
|
+
- lib/leadlight/basic_converter.rb
|
158
183
|
- lib/leadlight/blank.rb
|
159
184
|
- lib/leadlight/codec.rb
|
185
|
+
- lib/leadlight/entity.rb
|
160
186
|
- lib/leadlight/enumerable_representation.rb
|
161
187
|
- lib/leadlight/errors.rb
|
188
|
+
- lib/leadlight/header_helpers.rb
|
162
189
|
- lib/leadlight/hyperlinkable.rb
|
163
190
|
- lib/leadlight/link.rb
|
164
191
|
- lib/leadlight/link_template.rb
|
165
192
|
- lib/leadlight/representation.rb
|
166
193
|
- lib/leadlight/request.rb
|
167
194
|
- lib/leadlight/service.rb
|
195
|
+
- lib/leadlight/service_class_methods.rb
|
168
196
|
- lib/leadlight/service_middleware.rb
|
169
197
|
- lib/leadlight/tint.rb
|
170
198
|
- lib/leadlight/tint_helper.rb
|
171
|
-
- lib/leadlight/
|
199
|
+
- lib/leadlight/type_map.rb
|
172
200
|
- spec/cassettes/Leadlight/authorized_GitHub_example/_user/has_the_expected_content.yml
|
173
201
|
- spec/cassettes/Leadlight/authorized_GitHub_example/_user/indicates_the_expected_oath_scopes.yml
|
174
202
|
- spec/cassettes/Leadlight/authorized_GitHub_example/adding_and_removing_team_members.yml
|
175
|
-
- spec/cassettes/Leadlight/authorized_GitHub_example/
|
203
|
+
- spec/cassettes/Leadlight/authorized_GitHub_example/adding_and_removing_teams.yml
|
176
204
|
- spec/cassettes/Leadlight/authorized_GitHub_example/test_team/.yml
|
177
205
|
- spec/cassettes/Leadlight/basic_GitHub_example/_root/.yml
|
178
206
|
- spec/cassettes/Leadlight/basic_GitHub_example/_root/__location__/.yml
|
@@ -197,7 +225,8 @@ files:
|
|
197
225
|
- spec/leadlight/service_middleware_spec.rb
|
198
226
|
- spec/leadlight/service_spec.rb
|
199
227
|
- spec/leadlight/tint_helper_spec.rb
|
200
|
-
- spec/leadlight/
|
228
|
+
- spec/leadlight/tint_spec.rb
|
229
|
+
- spec/leadlight/type_map_spec.rb
|
201
230
|
- spec/leadlight_spec.rb
|
202
231
|
- spec/spec_helper_lite.rb
|
203
232
|
- spec/support/credentials.rb
|
@@ -222,8 +251,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
251
|
version: '0'
|
223
252
|
requirements: []
|
224
253
|
rubyforge_project: leadlight
|
225
|
-
rubygems_version: 1.8.
|
254
|
+
rubygems_version: 1.8.15
|
226
255
|
signing_key:
|
227
256
|
specification_version: 2
|
228
|
-
summary:
|
257
|
+
summary: Rose colored stained glass windows for HTTP.
|
229
258
|
test_files: []
|