oauth-plugin 0.5.0 → 0.5.1
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/CHANGELOG +3 -0
- data/generators/oauth_consumer/oauth_consumer_generator.rb +3 -1
- data/generators/oauth_consumer/templates/index.html.slim +15 -0
- data/generators/oauth_consumer/templates/show.html.slim +8 -0
- data/lib/generators/oauth_consumer/oauth_consumer_generator.rb +1 -1
- data/lib/generators/slim/oauth_consumer_generator.rb +21 -0
- data/lib/generators/slim/oauth_consumer_templates/index.html.slim +15 -0
- data/lib/generators/slim/oauth_consumer_templates/show.html.slim +8 -0
- data/lib/oauth-plugin/version.rb +1 -1
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 401132149e044ecdceaf75dd6c9429909822c7ec
|
4
|
+
data.tar.gz: 83fbb145b545e4513149c028974ddb18535b3976
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0588fbbd4e3af917bd41402124f13c0a0e00bef47724639a5b718dc6c8a54f9f6e1083c9e1e6e8f93acc64e21b75c40565251d3a99ac261a2f5b349c1edd2c36
|
7
|
+
data.tar.gz: 9bba1d5256f96c667ca3e6021b9b791999660cf571b0f2b0a72472ca37a8da99f50f458f2aed6102f66d0905b6b123f5575423ec0bdbca8d4cd316ed582d9c22
|
data/CHANGELOG
CHANGED
@@ -19,7 +19,7 @@ class OauthConsumerGenerator < Rails::Generator::Base
|
|
19
19
|
m.template 'controller.rb',File.join('app/controllers',"oauth_consumers_controller.rb")
|
20
20
|
m.route_entry "map.resources :oauth_consumers,:member=>{:callback=>:get}"
|
21
21
|
|
22
|
-
@template_extension= options[:haml] ? "haml" : "erb"
|
22
|
+
@template_extension= options[:haml] ? "haml" : ( options[:slim] ? "slim": "erb")
|
23
23
|
|
24
24
|
m.template "show.html.#{@template_extension}", File.join('app/views', 'oauth_consumers', "show.html.#{@template_extension}")
|
25
25
|
m.template "index.html.#{@template_extension}", File.join('app/views', 'oauth_consumers', "index.html.#{@template_extension}")
|
@@ -46,5 +46,7 @@ class OauthConsumerGenerator < Rails::Generator::Base
|
|
46
46
|
# "Generate the Test::Unit compatible tests instead of RSpec") { |v| options[:test_unit] = v }
|
47
47
|
opt.on("--haml",
|
48
48
|
"Templates use haml") { |v| options[:haml] = v }
|
49
|
+
opt.on("--slim",
|
50
|
+
"Templates use slim") { |v| options[:slim] = v }
|
49
51
|
end
|
50
52
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
h1 Services
|
2
|
+
|
3
|
+
-if @consumer_tokens.empty?
|
4
|
+
p You are currently not connected to any external services.
|
5
|
+
-else
|
6
|
+
p You are connected to the following services:
|
7
|
+
ul
|
8
|
+
-@consumer_tokens.each do |token|
|
9
|
+
li = link_to token.class.service_name.to_s.humanize, oauth_consumer_path(token.class.service_name)
|
10
|
+
|
11
|
+
-unless @services.empty?
|
12
|
+
h3 You can connect to the following services:
|
13
|
+
ul
|
14
|
+
-@services.each do |service|
|
15
|
+
li = link_to service.to_s.humanize,oauth_consumer_path(service)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rails/generators/erb/controller/controller_generator'
|
2
|
+
|
3
|
+
module Slim
|
4
|
+
module Generators
|
5
|
+
class OauthConsumerGenerator < Erb::Generators::Base
|
6
|
+
source_root File.expand_path('../oauth_consumer_templates', __FILE__)
|
7
|
+
|
8
|
+
argument :name, :type => :string, :default => 'Oauth'
|
9
|
+
|
10
|
+
def copy_view_files
|
11
|
+
template 'index.html.slim', File.join('app/views', class_path, 'oauth_consumers', 'index.html.slim')
|
12
|
+
template 'show.html.slim', File.join('app/views', class_path, 'oauth_consumers', 'show.html.slim')
|
13
|
+
end
|
14
|
+
|
15
|
+
protected
|
16
|
+
def handler
|
17
|
+
:slim
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
h1 Services
|
2
|
+
|
3
|
+
-if @consumer_tokens.empty?
|
4
|
+
p You are currently not connected to any external services.
|
5
|
+
-else
|
6
|
+
p You are connected to the following services:
|
7
|
+
ul
|
8
|
+
-@consumer_tokens.each do |token|
|
9
|
+
li = link_to token.class.service_name.to_s.humanize, oauth_consumer_path(token.class.service_name)
|
10
|
+
|
11
|
+
-unless @services.empty?
|
12
|
+
h3 You can connect to the following services:
|
13
|
+
ul
|
14
|
+
-@services.each do |service|
|
15
|
+
li = link_to service.to_s.humanize,oauth_consumer_path(service)
|
data/lib/oauth-plugin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pelle Braendgaard
|
@@ -185,10 +185,12 @@ files:
|
|
185
185
|
- generators/oauth_consumer/templates/controller.rb
|
186
186
|
- generators/oauth_consumer/templates/index.html.erb
|
187
187
|
- generators/oauth_consumer/templates/index.html.haml
|
188
|
+
- generators/oauth_consumer/templates/index.html.slim
|
188
189
|
- generators/oauth_consumer/templates/migration.rb
|
189
190
|
- generators/oauth_consumer/templates/oauth_config.rb
|
190
191
|
- generators/oauth_consumer/templates/show.html.erb
|
191
192
|
- generators/oauth_consumer/templates/show.html.haml
|
193
|
+
- generators/oauth_consumer/templates/show.html.slim
|
192
194
|
- generators/oauth_provider/USAGE
|
193
195
|
- generators/oauth_provider/lib/insert_routes.rb
|
194
196
|
- generators/oauth_provider/oauth_provider_generator.rb
|
@@ -303,6 +305,9 @@ files:
|
|
303
305
|
- lib/generators/rspec/templates/oauth_nonces.yml
|
304
306
|
- lib/generators/rspec/templates/oauth_token_spec.rb
|
305
307
|
- lib/generators/rspec/templates/oauth_tokens.yml
|
308
|
+
- lib/generators/slim/oauth_consumer_generator.rb
|
309
|
+
- lib/generators/slim/oauth_consumer_templates/index.html.slim
|
310
|
+
- lib/generators/slim/oauth_consumer_templates/show.html.slim
|
306
311
|
- lib/generators/test_unit/oauth_provider_generator.rb
|
307
312
|
- lib/generators/test_unit/templates/client_application_test.rb
|
308
313
|
- lib/generators/test_unit/templates/client_applications.yml
|