gds-sso 11.0.0 → 11.1.0
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.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/README.md +10 -0
- data/Rakefile +1 -2
- data/lib/gds-sso/version.rb +1 -1
- data/spec/fixtures/integration/signonotron2.sql +2 -2
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/log/test.log +3504 -1428
- data/spec/support/signonotron2_integration_helpers.rb +12 -6
- data/spec/tasks/signonotron_tasks.rake +10 -1
- metadata +3 -19
- data/spec/fixtures/integration/signonotron2_database.yml +0 -5
@@ -34,13 +34,19 @@ module Signonotron2IntegrationHelpers
|
|
34
34
|
load_signonotron_fixture("authorize_api_users.sql")
|
35
35
|
end
|
36
36
|
|
37
|
-
def load_signonotron_fixture(
|
38
|
-
|
39
|
-
app = "signonotron2"
|
40
|
-
path_to_app = Rails.root.join('..','..','tmp',app)
|
37
|
+
def load_signonotron_fixture(filename)
|
38
|
+
db = YAML.load_file(signon_path + "/config/database.yml")['test']
|
41
39
|
|
42
|
-
|
43
|
-
cmd = "sqlite3 #{path_to_app + db['database']} < #{fixtures_path + "#{fixture_sql_file}"}"
|
40
|
+
cmd = "mysql #{db['database']} -u#{db['username']} -p#{db['password']} < #{fixture_file(filename)}"
|
44
41
|
system cmd or raise "Error loading signonotron fixture"
|
45
42
|
end
|
43
|
+
|
44
|
+
private
|
45
|
+
def fixture_file(filename)
|
46
|
+
File.join(File.dirname(__FILE__), '../fixtures/integration', filename)
|
47
|
+
end
|
48
|
+
|
49
|
+
def signon_path
|
50
|
+
Rails.root.join('..','..','tmp','signonotron2').to_s
|
51
|
+
end
|
46
52
|
end
|
@@ -18,6 +18,13 @@ namespace :signonotron do
|
|
18
18
|
else
|
19
19
|
puts `git clone git@github.com:alphagov/#{@app_to_launch}`
|
20
20
|
end
|
21
|
+
|
22
|
+
if signon_commitish = ENV['SIGNON_COMMITISH']
|
23
|
+
puts "Checking out non-master of signon: #{signon_commitish}"
|
24
|
+
Dir.chdir(@app_to_launch) do
|
25
|
+
system `git checkout #{signon_commitish}` || raise("Unable to checkout #{signon_commitish}")
|
26
|
+
end
|
27
|
+
end
|
21
28
|
end
|
22
29
|
|
23
30
|
Dir.chdir gem_root + 'tmp' + @app_to_launch do
|
@@ -30,10 +37,12 @@ namespace :signonotron do
|
|
30
37
|
"/usr/bin/env " + env_to_clear.map { |e| "-u #{e}" }.join(" ")
|
31
38
|
end
|
32
39
|
env_stuff += " RAILS_ENV=test"
|
40
|
+
if ENV.has_key?('ORIGINAL_PATH')
|
41
|
+
env_stuff += " PATH=#{ENV.fetch('ORIGINAL_PATH')}"
|
42
|
+
end
|
33
43
|
|
34
44
|
puts "Running bundler"
|
35
45
|
puts `#{env_stuff} bundle install --path=#{gem_root + 'tmp' + "#{@app_to_launch}_bundle"}`
|
36
|
-
FileUtils.cp gem_root.join('spec', 'fixtures', 'integration', "#{@app_to_launch}_database.yml"), File.join('config', 'database.yml')
|
37
46
|
puts `#{env_stuff} bundle exec rake db:drop db:create db:schema:load`
|
38
47
|
|
39
48
|
puts "Starting signonotron instance in the background"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.
|
4
|
+
version: 11.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Patterson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -235,20 +235,6 @@ dependencies:
|
|
235
235
|
- - '='
|
236
236
|
- !ruby/object:Gem::Version
|
237
237
|
version: 0.3.5
|
238
|
-
- !ruby/object:Gem::Dependency
|
239
|
-
name: wwtd
|
240
|
-
requirement: !ruby/object:Gem::Requirement
|
241
|
-
requirements:
|
242
|
-
- - ">="
|
243
|
-
- !ruby/object:Gem::Version
|
244
|
-
version: '0'
|
245
|
-
type: :development
|
246
|
-
prerelease: false
|
247
|
-
version_requirements: !ruby/object:Gem::Requirement
|
248
|
-
requirements:
|
249
|
-
- - ">="
|
250
|
-
- !ruby/object:Gem::Version
|
251
|
-
version: '0'
|
252
238
|
description: Client for GDS' OAuth 2-based SSO
|
253
239
|
email:
|
254
240
|
- matt@constituentparts.com
|
@@ -280,7 +266,6 @@ files:
|
|
280
266
|
- spec/controller/api_user_controller_spec.rb
|
281
267
|
- spec/fixtures/integration/authorize_api_users.sql
|
282
268
|
- spec/fixtures/integration/signonotron2.sql
|
283
|
-
- spec/fixtures/integration/signonotron2_database.yml
|
284
269
|
- spec/internal/app/controllers/application_controller.rb
|
285
270
|
- spec/internal/app/controllers/example_controller.rb
|
286
271
|
- spec/internal/app/models/user.rb
|
@@ -319,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
319
304
|
version: '0'
|
320
305
|
requirements: []
|
321
306
|
rubyforge_project: gds-sso
|
322
|
-
rubygems_version: 2.2.
|
307
|
+
rubygems_version: 2.2.5
|
323
308
|
signing_key:
|
324
309
|
specification_version: 4
|
325
310
|
summary: Client for GDS' OAuth 2-based SSO
|
@@ -335,7 +320,6 @@ test_files:
|
|
335
320
|
- spec/tasks/signonotron_tasks.rake
|
336
321
|
- spec/fixtures/integration/signonotron2.sql
|
337
322
|
- spec/fixtures/integration/authorize_api_users.sql
|
338
|
-
- spec/fixtures/integration/signonotron2_database.yml
|
339
323
|
- spec/internal/log/test.log
|
340
324
|
- spec/internal/db/schema.rb
|
341
325
|
- spec/internal/db/combustion_test.sqlite
|