roo_on_rails 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c14df25a7b6424101a9e98b40db865b5481b507
4
- data.tar.gz: dfff2f9bea33530d06533183c2d31be578d0aa96
3
+ metadata.gz: a12748afeabfe5feb779e2051e59c58428709628
4
+ data.tar.gz: 39f18f2e6d56c739e3b95c23e73b5de7a1bce388
5
5
  SHA512:
6
- metadata.gz: 8c8811e21f02b5eaf1ce83a6653e5e0329c8c0a80f9ef9cf80e407576409c57818ed90662d4ced4b1f44bc6ac51a46dff57376af82a6d8f905d66069acfa6205
7
- data.tar.gz: 5e5b53d7ca2df0137cc3326c13231242f30d2ae9743024e34131ad6b9ad167aa429f746d205484e9995b472a2317e235ea528d47de73af14864ca7989dda72ae
6
+ metadata.gz: 30dddc77f957057480418a62fe13d82ed0d5516e3aca68bb32e1d61f188e6dacf84276fb8d0d94d4bb58e5bb9655d65e7707c33abc7b0c93c24c556294a5177c
7
+ data.tar.gz: e1e48287115b12b7d48792dc4e68540c20485b9ff9d801695daad2f15305f1ce9af06b7df9629c5e54f3eaf24d0bd85eebd3ed5123e52626a0bb4f98e7f2f856
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.3
1
+ 2.4.1
data/.travis.yml CHANGED
@@ -1,9 +1,9 @@
1
- sudo: false
1
+ sudo: required
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.6
4
+ - 2.2.7
5
5
  - 2.3.3
6
- - 2.4.0
6
+ - 2.4.1
7
7
  - ruby-head
8
8
  gemfile:
9
9
  - gemfiles/rails_3.gemfile
@@ -13,16 +13,22 @@ gemfile:
13
13
  install:
14
14
  - bundle install --jobs=3 --retry=3 --path=vendor/bundle
15
15
  cache:
16
- bundler: false
16
+ bundler: true
17
17
  directories:
18
18
  - vendor/bundle
19
+ - vendor/bundle-scaffold
19
20
  before_script:
20
21
  - unset RACK_ENV
21
22
  - unset RAILS_ENV
23
+ - mkdir -p $PWD/tmp && sudo mount -t tmpfs -o size=1024m tmpfs $PWD/tmp
24
+ - gem install bundler
22
25
  matrix:
23
26
  allow_failures:
24
27
  - rvm: ruby-head
25
- - rvm: 2.4.0
28
+ exclude:
29
+ - rvm: 2.4.1
30
+ gemfile: gemfiles/rails_3.gemfile
31
+ - rvm: ruby-head
26
32
  gemfile: gemfiles/rails_3.gemfile
27
33
  services:
28
34
  - redis-server
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # v1.8.1 (2017-07-27)
2
+
3
+ Features:
4
+
5
+ - Google OAuth supported in Rails 3 and 4 (#54)
6
+
7
+ Bug fixes:
8
+
9
+ - Allow client apps to load middleware (#54)
10
+
1
11
  # v1.8.0 (2017-07-26)
2
12
 
3
13
  Bug fixes:
@@ -1,7 +1,5 @@
1
1
  ## Using the Google OAuth feature
2
2
 
3
- This feature is only supported when using Rails 5+.
4
-
5
3
  `roo_on_rails` provides a pre-baked Omniauth setup to help protect your app with
6
4
  Google authentication. Read the main `README` first to set things up; you'll
7
5
  need at least `GOOGLE_AUTH_ENABLED=YES`, and `GOOGLE_AUTH_CLIENT_ID` and
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- roo_on_rails (1.8.0)
4
+ roo_on_rails (1.8.1)
5
5
  dogstatsd-ruby
6
6
  dotenv-rails (~> 2.1)
7
7
  faraday
@@ -122,7 +122,7 @@ GEM
122
122
  multi_xml (0.6.0)
123
123
  multipart-post (2.0.0)
124
124
  nenv (0.3.0)
125
- newrelic_rpm (4.2.0.334)
125
+ newrelic_rpm (4.3.0.335)
126
126
  notiffany (0.1.1)
127
127
  nenv (~> 0.1)
128
128
  shellany (~> 0.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- roo_on_rails (1.8.0)
4
+ roo_on_rails (1.8.1)
5
5
  dogstatsd-ruby
6
6
  dotenv-rails (~> 2.1)
7
7
  faraday
@@ -134,7 +134,7 @@ GEM
134
134
  multi_xml (0.6.0)
135
135
  multipart-post (2.0.0)
136
136
  nenv (0.3.0)
137
- newrelic_rpm (4.2.0.334)
137
+ newrelic_rpm (4.3.0.335)
138
138
  nokogiri (1.8.0)
139
139
  mini_portile2 (~> 2.2.0)
140
140
  notiffany (0.1.1)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- roo_on_rails (1.8.0)
4
+ roo_on_rails (1.8.1)
5
5
  dogstatsd-ruby
6
6
  dotenv-rails (~> 2.1)
7
7
  faraday
@@ -137,7 +137,7 @@ GEM
137
137
  multi_xml (0.6.0)
138
138
  multipart-post (2.0.0)
139
139
  nenv (0.3.0)
140
- newrelic_rpm (4.2.0.334)
140
+ newrelic_rpm (4.3.0.335)
141
141
  nio4r (2.1.0)
142
142
  nokogiri (1.8.0)
143
143
  mini_portile2 (~> 2.2.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- roo_on_rails (1.8.0)
4
+ roo_on_rails (1.8.1)
5
5
  dogstatsd-ruby
6
6
  dotenv-rails (~> 2.1)
7
7
  faraday
@@ -138,7 +138,7 @@ GEM
138
138
  multi_xml (0.6.0)
139
139
  multipart-post (2.0.0)
140
140
  nenv (0.3.0)
141
- newrelic_rpm (4.2.0.334)
141
+ newrelic_rpm (4.3.0.335)
142
142
  nio4r (2.1.0)
143
143
  nokogiri (1.8.0)
144
144
  mini_portile2 (~> 2.2.0)
@@ -1,17 +1,13 @@
1
+ require 'roo_on_rails/config'
2
+
1
3
  module RooOnRails
2
4
  module Railties
3
5
  class GoogleOAuth < Rails::Railtie
4
6
  initializer 'roo_on_rails.google_auth.middleware' do |app|
7
+ $stderr.puts 'initializer roo_on_rails.google_auth'
5
8
  _if_enabled do
6
9
  _add_middleware(app)
7
- end
8
- end
9
-
10
- initializer 'roo_on_rails.google_auth.routes', after: :set_routes_reloader_hook do |app|
11
- _if_enabled do
12
10
  _add_routes(app)
13
- # support development mode on route changes (only works in Rails 5)
14
- app.reloader.to_prepare { _add_routes(app) }
15
11
  end
16
12
  end
17
13
 
@@ -19,18 +15,10 @@ module RooOnRails
19
15
 
20
16
  def _if_enabled
21
17
  return unless Config.google_auth_enabled?
22
- if Rails::VERSION::MAJOR < 5
23
- Rails.logger.warn 'The Google OAuth feature is not supported with Rails < 5'
24
- return
25
- end
26
-
27
18
  yield
28
19
  end
29
20
 
30
21
  def _add_middleware(app)
31
- $stderr.puts 'initializer roo_on_rails.google_auth.middleware'
32
-
33
- require 'roo_on_rails/config'
34
22
  require 'omniauth'
35
23
  require 'omniauth-google-oauth2'
36
24
  require 'active_support/core_ext/object/blank'
@@ -55,20 +43,16 @@ module RooOnRails
55
43
  end
56
44
 
57
45
  def _add_routes(app)
58
- $stderr.puts 'initializer roo_on_rails.google_auth.routes'
59
-
60
46
  prefix = Config.google_auth_path_prefix
61
47
  ctrl = Config.google_auth_controller
62
48
 
63
- app.routes.disable_clear_and_finalize = true
64
- app.routes.draw do
49
+ app.routes.prepend do
65
50
  get "#{prefix}/google_oauth2", controller: ctrl, action: 'failure'
66
51
  get "#{prefix}/google_oauth2/callback", controller: ctrl, action: 'create'
67
52
  post "#{prefix}/google_oauth2/callback", controller: ctrl, action: 'create'
68
53
  get "#{prefix}/failure", controller: ctrl, action: 'failure'
69
54
  get "#{prefix}/logout", controller: ctrl, action: 'destroy'
70
55
  end
71
- app.routes.disable_clear_and_finalize = false
72
56
  end
73
57
  end
74
58
  end
@@ -1,3 +1,3 @@
1
1
  module RooOnRails
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.8.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roo_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Letessier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-26 00:00:00.000000000 Z
11
+ date: 2017-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv-rails
@@ -448,7 +448,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
448
448
  version: '0'
449
449
  requirements: []
450
450
  rubyforge_project:
451
- rubygems_version: 2.5.2
451
+ rubygems_version: 2.6.11
452
452
  signing_key:
453
453
  specification_version: 4
454
454
  summary: Scaffolding for building services