social_stream 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 +4 -4
- data/base/app/assets/javascripts/social_stream/actor.js +7 -1
- data/base/app/assets/javascripts/social_stream/contact.js +8 -0
- data/base/app/assets/javascripts/social_stream/flash.js +11 -1
- data/base/app/controllers/groups_controller.rb +1 -1
- data/base/app/controllers/profiles_controller.rb +7 -2
- data/base/app/controllers/search_controller.rb +9 -11
- data/base/app/models/permission.rb +4 -3
- data/base/app/models/relation/custom.rb +5 -5
- data/base/app/models/user.rb +2 -0
- data/base/app/views/contacts/_new_modal.html.erb +2 -2
- data/base/app/views/contacts/index.html.erb +3 -2
- data/base/app/views/devise/registrations/edit.html.erb +1 -15
- data/base/app/views/groups/_form.html.erb +1 -1
- data/base/app/views/groups/_new_modal.html.erb +1 -1
- data/base/app/views/groups/new.html.erb +1 -1
- data/base/app/views/profiles/_comunication-info_edit.html.erb +1 -1
- data/base/app/views/profiles/_experience_edit.html.erb +2 -2
- data/base/app/views/profiles/_personal_edit.html.erb +3 -3
- data/base/app/views/relation/customs/destroy.js.erb +1 -0
- data/base/app/views/relation/customs/update.js.erb +1 -1
- data/base/app/views/settings/index.html.erb +1 -1
- data/base/config/locales/en.yml +3 -0
- data/base/config/locales/es.yml +1 -1
- data/base/lib/social_stream/base/autoload.rb +15 -8
- data/base/lib/social_stream/base/version.rb +1 -1
- data/base/lib/social_stream/population.rb +14 -0
- data/base/lib/social_stream/search.rb +4 -2
- data/base/lib/tasks/db/populate.rake +108 -160
- data/lib/social_stream/version.rb +1 -1
- data/oauth2_server/app/assets/images/logos/{app-default.png → medium/site.png} +0 -0
- data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/applications/layout/_applications-oauth2server.css.sass +3 -0
- data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/mixins/_mixin.css.sass +46 -1
- data/oauth2_server/app/controllers/site/clients_controller.rb +21 -2
- data/oauth2_server/app/views/site/clients/_list.html.erb +2 -0
- data/oauth2_server/app/views/site/clients/index.html.erb +9 -2
- data/oauth2_server/app/views/site/clients/show.html.erb +11 -12
- data/oauth2_server/config/locales/en.yml +2 -1
- data/oauth2_server/config/locales/es.yml +1 -1
- data/oauth2_server/lib/social_stream/oauth2_server/controllers/helpers.rb +4 -6
- data/oauth2_server/lib/social_stream/oauth2_server/version.rb +1 -1
- data/oauth2_server/social_stream-oauth2_server.gemspec +1 -1
- data/oauth2_server/spec/controllers/dummy_controller_spec.rb +9 -2
- data/social_stream.gemspec +2 -2
- metadata +8 -7
@@ -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
|
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"
|
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(
|
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
|
-
|
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
|
@@ -10,15 +10,13 @@ module SocialStream
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def current_subject
|
13
|
-
|
14
|
-
|
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
|
-
|
20
|
-
|
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)
|
@@ -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.
|
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
|
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(
|
34
|
+
assigns(:current_subject).should eq(client)
|
28
35
|
end
|
29
36
|
end
|
30
37
|
|
data/social_stream.gemspec
CHANGED
@@ -11,13 +11,13 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.license = 'MIT'
|
12
12
|
|
13
13
|
# Gem dependencies
|
14
|
-
s.add_runtime_dependency('social_stream-base', '~> 2.2.
|
14
|
+
s.add_runtime_dependency('social_stream-base', '~> 2.2.1')
|
15
15
|
s.add_runtime_dependency('social_stream-documents', '~> 2.2.0')
|
16
16
|
s.add_runtime_dependency('social_stream-events', '~> 2.2.0')
|
17
17
|
s.add_runtime_dependency('social_stream-linkser', '~> 2.2.0')
|
18
18
|
s.add_runtime_dependency('social_stream-presence', '~> 2.2.0')
|
19
19
|
s.add_runtime_dependency('social_stream-ostatus', '~> 2.2.0')
|
20
|
-
s.add_runtime_dependency('social_stream-oauth2_server', '~> 2.2.
|
20
|
+
s.add_runtime_dependency('social_stream-oauth2_server', '~> 2.2.1')
|
21
21
|
|
22
22
|
# Development Gem dependencies
|
23
23
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GING - DIT - UPM
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: social_stream-base
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.2.
|
19
|
+
version: 2.2.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.2.
|
26
|
+
version: 2.2.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: social_stream-documents
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 2.2.
|
103
|
+
version: 2.2.1
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 2.2.
|
110
|
+
version: 2.2.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: capybara
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -858,6 +858,7 @@ files:
|
|
858
858
|
- base/lib/social_stream/models/subject.rb
|
859
859
|
- base/lib/social_stream/models/subtype.rb
|
860
860
|
- base/lib/social_stream/models/supertype.rb
|
861
|
+
- base/lib/social_stream/population.rb
|
861
862
|
- base/lib/social_stream/population/activity_object.rb
|
862
863
|
- base/lib/social_stream/population/actor.rb
|
863
864
|
- base/lib/social_stream/population/power_law.rb
|
@@ -1302,7 +1303,7 @@ files:
|
|
1302
1303
|
- oauth2_server/Gemfile
|
1303
1304
|
- oauth2_server/README.rdoc
|
1304
1305
|
- oauth2_server/Rakefile
|
1305
|
-
- oauth2_server/app/assets/images/logos/
|
1306
|
+
- oauth2_server/app/assets/images/logos/medium/site.png
|
1306
1307
|
- oauth2_server/app/assets/images/logos/small/site.png
|
1307
1308
|
- oauth2_server/app/assets/images/step_1.png
|
1308
1309
|
- oauth2_server/app/assets/images/step_2.png
|