social_stream-oauth2_server 2.2.0 → 2.2.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: 0f974cd2ca225c2e81f96ebfe5705847aa8f79db
4
- data.tar.gz: 767419bbe1194902609edfdea7d5502968c4882c
3
+ metadata.gz: dc036d8372a01dfcdd89be772415cfee0ec9c09d
4
+ data.tar.gz: 797262eb30dea1097c1fc7d42292ff974316b836
5
5
  SHA512:
6
- metadata.gz: 047a94b500d2e5b14fde61acc72d5978babf0d9fa5c67c6c7cb2a856449cb9686dead638ee8a86ec0911bfd14567bc2e790ef7a623ee7c87e3c464c15ed11ec9
7
- data.tar.gz: 57c1b9cf96589fcf8fe39790460e8ac712b65e194af414d69a6b0e2ed24455ee48201e12743b8a26a86b6f2da222180b91ee27a2006726431e880cf0e3100b4b
6
+ metadata.gz: 2632f575f38a9414b58f23266ddd2a1b95fe02a8bb6069c499969ec98ab924768b8629ce8e11dfe4be1c04057ff6c6f1383fde3abd2f00776e52b545faa52f0c
7
+ data.tar.gz: 6d25f86424c5ae4c23cd1a041762b5f4e4d2dea0cb140d2faf8ec1dbf5b01f419fe7024c71a293aceb8d080ba1d08983120abff97612848921e2f78c3e2bab03
@@ -48,3 +48,6 @@
48
48
  input
49
49
  &[type="file"]
50
50
  line-height: 0px
51
+
52
+ .next-step
53
+ @include next-btn
@@ -1,5 +1,45 @@
1
1
  // menu horizontal
2
2
  // ----------------------------------
3
+ @mixin btn-secundary
4
+ @include ie7-inline-block()
5
+ padding: 4px 12px
6
+ margin-bottom: 0
7
+ font-size: $baseFontSize
8
+ line-height: $baseLineHeight
9
+ vertical-align: middle
10
+ cursor: pointer
11
+ background-color: $secundary-btnColorbackground
12
+ border: 1px solid $secundary-btnColorborder
13
+ *border: 0
14
+ color: $auxiliarColor
15
+ background-image: none
16
+ @include ie7-restore-left-whitespace()
17
+ @include box-shadow(inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05))
18
+ @include transition(background 1s, color, 1s)
19
+ @include border-radius(7px)
20
+ a
21
+ color: $gray
22
+
23
+ &:hover
24
+ border: 1px solid $secundary-btnColorbackground
25
+ background-color: $secundary-btnColorborder !important
26
+ color: $principalColor
27
+
28
+ &:focus
29
+ @include tab-focus()
30
+
31
+ &.active
32
+ border: 1px solid $secundary-btnColorborder
33
+ background-color: $secundary-btnColorbackground !important
34
+ color: $principalColor
35
+
36
+ &.disabled,
37
+ &[disabled]
38
+ cursor: default
39
+ @include opacity(85)
40
+ background-color: $secundary-btnColorbackground
41
+ color: $gray
42
+
3
43
 
4
44
  @mixin principal-box
5
45
  @include border-radius(5px)
@@ -7,4 +47,9 @@
7
47
  border: 1px solid
8
48
  border-color: rgba(0,0,0, 0.1)
9
49
  background-color: $auxiliarColor
10
- border-color: rgba(0,0,0, 0.1)
50
+ border-color: rgba(0,0,0, 0.1)
51
+
52
+
53
+ @mixin next-btn
54
+ @include btn-secundary
55
+
@@ -4,7 +4,7 @@ class Site::ClientsController < ApplicationController
4
4
 
5
5
  before_filter :authenticate_user!
6
6
 
7
- load_and_authorize_resource
7
+ load_and_authorize_resource except: :index
8
8
 
9
9
  def create
10
10
  create! do |success, error|
@@ -28,9 +28,28 @@ class Site::ClientsController < ApplicationController
28
28
  destroy! { :home }
29
29
  end
30
30
 
31
+ def collection
32
+ get_collection_ivar ||
33
+ set_collection_ivar(build_collection)
34
+ end
35
+
31
36
  protected
32
37
 
33
- def collection
38
+ def build_collection
34
39
  current_subject.managed_site_clients
35
40
  end
41
+
42
+ def permitted_params
43
+ params.permit resource_request_name => resource_permitted_params,
44
+ resource_instance_name => resource_permitted_params
45
+ end
46
+
47
+ def resource_permitted_params
48
+ [
49
+ :name,
50
+ :description,
51
+ :url,
52
+ :callback_url
53
+ ]
54
+ end
36
55
  end
@@ -14,6 +14,7 @@
14
14
  <%= link_to client.url, client.url, target: '_blank' %>
15
15
  </div>
16
16
  </div>
17
+ <!--
17
18
  <div class="team">
18
19
  <div class="users">
19
20
  <span>
@@ -28,6 +29,7 @@
28
29
  authorized
29
30
  </div>
30
31
  </div>
32
+ -->
31
33
  <hr class="soften">
32
34
  </li>
33
35
  <% end %>
@@ -12,17 +12,24 @@
12
12
  </header>
13
13
  <div class="tabbable"> <!-- Only required for left/right tabs -->
14
14
  <ul class="nav nav-tabs">
15
- <li class="active"><a href="#tab1" data-toggle="tab">Managing</a></li>
15
+ <li class="active"><a href="#tab1" data-toggle="tab"><%= t 'site.client.managing' %></a></li>
16
16
  </ul>
17
17
  </div>
18
18
 
19
-
20
19
  <div class="tab-content">
21
20
  <div class="tab-pane active" id="tab1">
22
21
  <%= render partial: 'list',
23
22
  object: collection %>
24
23
  </div>
25
24
  </div>
25
+
26
+ <div class="tab-content">
27
+ <div class="tab-pane" id="tab2">
28
+ <%= render partial: 'list',
29
+ object: collection %>
30
+ </div>
31
+ </div>
32
+
26
33
  <%= render partial: 'new.modal' %>
27
34
  </section>
28
35
  </section>
@@ -11,7 +11,7 @@
11
11
  <% end %>
12
12
  </h4>
13
13
 
14
- <%= image_tag('logos/app-default.png', class: "logo-app pull-right") %>
14
+ <%= image_tag(resource.logo.url(:medium), class: "logo-app pull-right") %>
15
15
 
16
16
  </header>
17
17
 
@@ -85,31 +85,30 @@
85
85
  <div class="tabbable"> <!-- Only required for left/right tabs -->
86
86
  <ul class="nav nav-tabs">
87
87
  <li class="active"><a href="#authorized" data-toggle="tab">Authorized</a></li>
88
- <li><a href="#registered" data-toggle="tab">Users</a></li>
89
88
  </ul>
90
89
 
91
- <%= render partial: 'contacts/add_button',
92
- locals: {
93
- sender: resource,
94
- type: [ :user, :group ]
95
- }
96
- %>
97
-
90
+ <!--
98
91
  <div class="btn-group" data-toggle="buttons">
99
92
  <button type="radio" name="options" id="option1">user</button>
100
93
  <button type="radio" name="options" id="option2"">organization</button>
101
94
  </div>
102
95
 
103
96
  <%= text_field_tag "contact-filter", "", placeholder: "filter", autocomplete: "off" %>
97
+ -->
104
98
 
105
99
  <div class="tab-content">
106
100
  <div class="tab-pane active" id="authorized">
101
+
102
+ <%= render partial: 'contacts/add_button',
103
+ locals: {
104
+ sender: resource,
105
+ type: [ :user, :group ]
106
+ }
107
+ %>
108
+
107
109
  <%= render partial: 'contacts/contact',
108
110
  collection: resource.sent_contacts.first(12) %>
109
111
  </div>
110
-
111
- <div class="tab-pane" id="registered">
112
- </div>
113
112
  </div>
114
113
  </div>
115
114
 
@@ -64,11 +64,12 @@ en:
64
64
  go_to_other: See your other site clients
65
65
  index:
66
66
  title: Client sites
67
+ managing: Managing
67
68
  new:
68
69
  link: Add site
69
70
  title: Register new client site
70
71
  oauth:
71
- credentials: Credentials
72
+ credentials: OAuth2 Credentials
72
73
  secret:
73
74
  refresh: refresh
74
75
  refreshed: OAuth2 client secret regenerated
@@ -65,7 +65,7 @@ es:
65
65
  link: Añadir sitio
66
66
  title: Registrar nuevo sitio
67
67
  oauth:
68
- credentials: Credenciales
68
+ credentials: Credenciales OAuth2
69
69
  secret:
70
70
  refresh: regenerar
71
71
  refreshed: Token secreto de OAuth2 regenerado
@@ -10,15 +10,13 @@ module SocialStream
10
10
  end
11
11
 
12
12
  def current_subject
13
- super ||
14
- @current_subject ||=
15
- current_from_oauth_token(:client)
13
+ @current_subject ||=
14
+ current_from_oauth_token(:client) || super
16
15
  end
17
16
 
18
17
  def current_user
19
- super ||
20
- @current_user ||=
21
- current_from_oauth_token(:user)
18
+ @current_user ||=
19
+ current_from_oauth_token(:user) || super
22
20
  end
23
21
 
24
22
  def current_from_oauth_token(type)
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Oauth2Server
3
- VERSION = "2.2.0".freeze
3
+ VERSION = "2.2.1".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 2.2.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 2.2.1')
16
16
  s.add_runtime_dependency('rack-oauth2', '~> 1.0.0')
17
17
 
18
18
  s.add_development_dependency('rspec-rails', '~> 2.8.0')
@@ -20,11 +20,18 @@ describe DummyController do
20
20
  token.stub(:user).and_return(user)
21
21
  end
22
22
 
23
- it "should have user as current_subject" do
23
+ it "should have user as current_user" do
24
+ get :index
25
+
26
+ assigns(:current_user).should be_present
27
+ assigns(:current_user).should eq(user)
28
+ end
29
+
30
+ it "should have client as current_subject" do
24
31
  get :index
25
32
 
26
33
  assigns(:current_subject).should be_present
27
- assigns(:current_subject).should eq(user)
34
+ assigns(:current_subject).should eq(client)
28
35
  end
29
36
  end
30
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-oauth2_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Tapiador
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-01 00:00:00.000000000 Z
12
+ date: 2013-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: social_stream-base
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 2.2.0
20
+ version: 2.2.1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 2.2.0
27
+ version: 2.2.1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rack-oauth2
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +66,7 @@ files:
66
66
  - Gemfile
67
67
  - README.rdoc
68
68
  - Rakefile
69
- - app/assets/images/logos/app-default.png
69
+ - app/assets/images/logos/medium/site.png
70
70
  - app/assets/images/logos/small/site.png
71
71
  - app/assets/images/step_1.png
72
72
  - app/assets/images/step_2.png