openskip-skip_embedded 0.9.12 → 0.9.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@
17
17
  <%= link_to image_tag('footer_logo.png'), "/" %>
18
18
  </div>
19
19
  <div class="banner"></div>
20
- <% if SkipEmbedded::InitialSettings["skip_collaboration"]["fulltext_search"] -%>
20
+ <% if SkipEmbedded::InitialSettings["skip_collaboration"]['skip_url'] -%>
21
21
  <%= render(:partial => "shared/skip_full_text_search_form") %>
22
22
  <% end -%>
23
23
  </div>
@@ -1,12 +1,8 @@
1
1
  <%
2
- config = SkipEmbedded::InitialSettings["skip_collaboration"]["fulltext_search"]
3
- endpoint = config["endpoint"]
4
- query_name = config["full_text_query"]
2
+ skip_url = SkipEmbedded::InitialSettings["skip_collaboration"]["skip_url"]
3
+ endpoint = URI.join(skip_url, "/search/full_text_search").to_s
4
+ query_name = 'full_text_query'
5
5
  search_label = _("Input keyword to search")
6
-
7
- unless endpoint =~ /\Ahttp(s)?:\/\//
8
- endpoint = SkipEmbedded::InitialSettings["skip_collaboration"]["skip_url"] + endpoint
9
- end
10
6
  %>
11
7
 
12
8
  <div id="search">
@@ -14,11 +10,8 @@
14
10
  <%= text_field_tag(query_name, search_label, :class => "labeled-field", :size => 40) %>
15
11
  <%= submit_tag _('Search') %>
16
12
  <% end -%>
17
-
18
- <% content_for :javascript_initializer do %>
19
- jQuery(function(){
20
- jQuery("#search input.labeled-field").labeledTextField(<%= {:message => search_label}.to_json %>);
21
- });
22
- <% end %>
23
13
  </div>
24
14
 
15
+ <% content_for :javascript_initializer do -%>
16
+ jQuery("#search input.labeled-field").labeledTextField(<%= {:message => search_label}.to_json %>);
17
+ <% end -%>
@@ -2,25 +2,8 @@ development:
2
2
  skip_collaboration:
3
3
  skip_url: "http://localhost:3000/"
4
4
  secret_key: change-me
5
- fulltext_search:
6
- endpoint: "/search/full_text_search"
7
- query_name: "full_text_query"
8
- fixed_op:
9
- disabled: false
10
- fixed_openid_server_url: "http://localhost:3000/"
11
- acceptable_op_urls:
12
- - "http://localhost:3000/"
13
5
 
14
6
  test:
15
7
  skip_collaboration:
16
8
  skip_url: "http://test.openskip.org"
17
9
  secret_key: "hogehogehogehoge"
18
- fulltext_search:
19
- endpoint: "/search/full_text_search"
20
- query_name: "full_text_query"
21
- fixed_op:
22
- disabled: true
23
- fixed_openid_server_url: "http://www.myopenid.com"
24
- acceptable_op_urls:
25
- - "http://localhost:3200/server"
26
-
@@ -1,12 +1,12 @@
1
1
  div#header
2
2
  :position relative
3
3
  :height 70px
4
- :margin-bottom 2px
4
+ :border-bottom 1px solid #ccc
5
5
  // IEでpositionがstatic以外の場合にz-indexが正しく適用されないバグ対応
6
6
  :z-index 1
7
7
  div#global_top
8
8
  :border-bottom 1px solid #ccc
9
- :height 20px
9
+ :height 18px
10
10
  :margin 4px 5px
11
11
  a
12
12
  :color #00c
@@ -31,9 +31,6 @@ div#header
31
31
  :color #fff
32
32
  :background-color #36c
33
33
  div#menu
34
- :position absolute
35
- :top 0
36
- :right 0
37
34
  :border none
38
35
  :font-size 12px
39
36
  :text-align right
data/lib/skip_embedded.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # SkipEmbedded
2
2
  module SkipEmbedded
3
- Version = "0.9.12"
3
+ Version = "0.9.13"
4
4
 
5
5
  Dependencies = {:jquery => "jquery-1.3.2.min.js"}
6
6
  end
@@ -3,26 +3,19 @@ require 'skip_embedded/initial_settings'
3
3
 
4
4
  module SkipEmbedded
5
5
  class OpFixation
6
- cattr_accessor :servers, :sso_openid_provider_url
7
-
8
- def self.accept?(claimed_url)
9
- servers.empty? || new(*servers).accept?(claimed_url)
10
- end
6
+ cattr_accessor :skip_url
7
+ @@skip_url = InitialSettings['skip_collaboration']['skip_url']
11
8
 
12
9
  def self.sso_enabled?
13
- @@config && !@@config["disabled"]
10
+ !!@@skip_url
14
11
  end
15
12
 
16
- def self.sso_openid_logout_url
17
- URI.join(sso_openid_provider_url, "logout").to_s if sso_openid_provider_url
13
+ def self.accept?(claimed_url)
14
+ new(@@skip_url).accept?(claimed_url)
18
15
  end
19
16
 
20
- @@config = InitialSettings['skip_collaboration']['fixed_op']
21
- if sso_enabled?
22
- @@servers = @@config["acceptable_op_urls"]
23
- @@sso_openid_provider_url = @@config["fixed_openid_server_url"]
24
- else
25
- @@servers, @@sso_openid_provider_url = [], nil
17
+ def self.skip_logout_url
18
+ URI.join(skip_url, "logout").to_s if skip_url
26
19
  end
27
20
 
28
21
  def initialize(*allowed)
@@ -7,7 +7,7 @@ module SkipEmbedded
7
7
 
8
8
  private
9
9
  def access_denied_with_open_id_sso(message = nil)
10
- if op = SkipEmbedded::OpFixation.sso_openid_provider_url
10
+ if op = SkipEmbedded::OpFixation.skip_url
11
11
  store_location
12
12
  options = {:method => "post", :return_to => session_url}
13
13
  if attr_adapter = SessionsController.attribute_adapter
@@ -8,7 +8,7 @@ module SkipEmbedded
8
8
 
9
9
  private
10
10
  def after_logout_path
11
- OpFixation.sso_openid_logout_url || login_path
11
+ OpFixation.skip_logout_url || login_path
12
12
  end
13
13
 
14
14
  def login_successfully(user, personal_data)
@@ -31,7 +31,7 @@ module SkipEmbedded
31
31
 
32
32
  def available_op_limitation
33
33
  if params[:openid_url] && !OpFixation.accept?(params[:openid_url])
34
- logger.debug("login refused since #{params[:openid_url]} is not member #{OpFixation.servers.inspect}")
34
+ logger.debug("login refused since #{params[:openid_url]} is not skip_url")
35
35
  authenticate_failure
36
36
  elsif OpFixation.sso_enabled? && !params["open_id_complete"].blank? && (params["openid.identity"] != params["openid.claimed_id"])
37
37
  logger.debug("login refused since claimed_id differs from identity.")
@@ -3,22 +3,22 @@ require 'skip_embedded/op_fixation'
3
3
 
4
4
  describe SkipEmbedded::OpFixation, "http://openid.example.comで擬似SSOをする場合", :type => :model do
5
5
  before() do
6
- SkipEmbedded::OpFixation.sso_openid_provider_url = "http://openid.example.com/"
6
+ SkipEmbedded::OpFixation.skip_url = "http://openid.example.com/"
7
7
  end
8
8
 
9
- it "sso_openid_provider_urlは@server_endpoint_urlであること" do
10
- SkipEmbedded::OpFixation.sso_openid_provider_url.should == "http://openid.example.com/"
9
+ it "skip_urlは@server_endpoint_urlであること" do
10
+ SkipEmbedded::OpFixation.skip_url.should == "http://openid.example.com/"
11
11
  end
12
12
 
13
- it "sso_openid_logout_urlは@server_endpoint_url + '/logout'であること" do
14
- SkipEmbedded::OpFixation.sso_openid_logout_url.should == "http://openid.example.com/logout"
13
+ it "skip_logout_urlは@server_endpoint_url + '/logout'であること" do
14
+ SkipEmbedded::OpFixation.skip_logout_url.should == "http://openid.example.com/logout"
15
15
  end
16
16
  end
17
17
 
18
18
  describe SkipEmbedded::OpFixation, "[http://openid.example.com]を受け付ける場合", :type => :model do
19
19
  before(:all) do
20
20
  @server_endpoint_url = "http://openid.example.com/server"
21
- SkipEmbedded::OpFixation.servers = @server_endpoint_url
21
+ SkipEmbedded::OpFixation.skip_url = @server_endpoint_url
22
22
  end
23
23
 
24
24
  describe "OpenID.discoverのOP endpoint URLがhttp://openid.example.comの場合" do
@@ -45,13 +45,3 @@ describe SkipEmbedded::OpFixation, "[http://openid.example.com]を受け付け
45
45
  end
46
46
  end
47
47
  end
48
-
49
- describe SkipEmbedded::OpFixation, "serversを指定しない場合", :type => :model do
50
- before(:all) do
51
- SkipEmbedded::OpFixation.servers = []
52
- end
53
-
54
- it "http://not-registered.example.com/alice/での問い合わせを許可すること" do
55
- SkipEmbedded::OpFixation.accept?("http://not-registered.example.com/alice/").should be_true
56
- end
57
- end
@@ -38,7 +38,7 @@ module SkipEmbedded
38
38
  describe "open_service_with_url" do
39
39
  it "paramsがエンコードされてget_jsonに渡されること" do
40
40
  params = { :id => "user", :key => "ほげ%$# ふが" }
41
- query_str = "key=%E3%81%BB%E3%81%92%25%24%23%20%E3%81%B5%E3%81%8C&id=user"
41
+ query_str = params.map{|k,v| "#{k}=#{ERB::Util.u(v)}"}.join('&')
42
42
 
43
43
  WebServiceUtil.should_receive(:get_json).with("url?#{query_str}", nil)
44
44
  WebServiceUtil.open_service_with_url "url", params
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openskip-skip_embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.12
4
+ version: 0.9.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - MAEDA Naoki
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-06-16 00:00:00 -07:00
14
+ date: 2009-06-22 00:00:00 -07:00
15
15
  default_executable: skip-gen
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -68,95 +68,95 @@ files:
68
68
  - ChangeLog
69
69
  - Rakefile
70
70
  - bin/skip-gen
71
- - lib/skip_embedded.rb
72
71
  - lib/skip_embedded
72
+ - lib/skip_embedded/fulltext_search_cache
73
+ - lib/skip_embedded/fulltext_search_cache/builder_base.rb
74
+ - lib/skip_embedded/fulltext_search_cache/mediator.rb
75
+ - lib/skip_embedded/fulltext_search_cache/partial_loader.rb
76
+ - lib/skip_embedded/fulltext_search_cache.rb
77
+ - lib/skip_embedded/helpers
78
+ - lib/skip_embedded/helpers/sprite.rb
79
+ - lib/skip_embedded/helpers/ui.rb
80
+ - lib/skip_embedded/helpers.rb
73
81
  - lib/skip_embedded/initial_settings.rb
82
+ - lib/skip_embedded/op_fixation.rb
74
83
  - lib/skip_embedded/open_id_sso
75
- - lib/skip_embedded/open_id_sso/session_management.rb
76
84
  - lib/skip_embedded/open_id_sso/authentication.rb
77
- - lib/skip_embedded/op_fixation.rb
85
+ - lib/skip_embedded/open_id_sso/session_management.rb
86
+ - lib/skip_embedded/rp_service
87
+ - lib/skip_embedded/rp_service/client.rb
88
+ - lib/skip_embedded/rp_service/http_connection.rb
89
+ - lib/skip_embedded/rp_service/oauth_proxy.rb
90
+ - lib/skip_embedded/rp_service/util.rb
78
91
  - lib/skip_embedded/types
79
92
  - lib/skip_embedded/types/content_type.rb
80
- - lib/skip_embedded/helpers
81
- - lib/skip_embedded/helpers/sprite.rb
82
- - lib/skip_embedded/helpers/ui.rb
83
93
  - lib/skip_embedded/validations_file.rb
84
- - lib/skip_embedded/web_service_util.rb
85
- - lib/skip_embedded/fulltext_search_cache.rb
86
94
  - lib/skip_embedded/web_service_util
87
- - lib/skip_embedded/web_service_util/server.rb
88
95
  - lib/skip_embedded/web_service_util/client.rb
89
- - lib/skip_embedded/helpers.rb
90
- - lib/skip_embedded/fulltext_search_cache
91
- - lib/skip_embedded/fulltext_search_cache/partial_loader.rb
92
- - lib/skip_embedded/fulltext_search_cache/builder_base.rb
93
- - lib/skip_embedded/fulltext_search_cache/mediator.rb
94
- - lib/skip_embedded/rp_service
95
- - lib/skip_embedded/rp_service/oauth_proxy.rb
96
- - lib/skip_embedded/rp_service/http_connection.rb
97
- - lib/skip_embedded/rp_service/util.rb
98
- - lib/skip_embedded/rp_service/client.rb
99
- - generators/skip_embedded_stylesheets
100
- - generators/skip_embedded_stylesheets/templates
101
- - generators/skip_embedded_stylesheets/templates/public
102
- - generators/skip_embedded_stylesheets/templates/public/stylesheets
103
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass
104
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded
105
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/skip_base.sass
106
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/skip_header.sass
107
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/editor_area.sass
108
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/skip_footer.sass
109
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/skip_embedded.sass
110
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/skip_embedded
111
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/skip_embedded/sprites.png
112
- - generators/skip_embedded_stylesheets/templates/public/stylesheets/skip_embedded/sprites.css
113
- - generators/skip_embedded_stylesheets/skip_embedded_stylesheets_generator.rb
96
+ - lib/skip_embedded/web_service_util/server.rb
97
+ - lib/skip_embedded/web_service_util.rb
98
+ - lib/skip_embedded.rb
99
+ - generators/skip_embedded
100
+ - generators/skip_embedded/skip_embedded_generator.rb
101
+ - generators/skip_embedded_assets
102
+ - generators/skip_embedded_assets/skip_embedded_assets_generator.rb
114
103
  - generators/skip_embedded_init
104
+ - generators/skip_embedded_init/skip_embedded_init_generator.rb
115
105
  - generators/skip_embedded_init/templates
116
- - generators/skip_embedded_init/templates/public
117
- - generators/skip_embedded_init/templates/public/images
118
- - generators/skip_embedded_init/templates/public/images/footer_logo.png
119
106
  - generators/skip_embedded_init/templates/app
120
107
  - generators/skip_embedded_init/templates/app/views
108
+ - generators/skip_embedded_init/templates/app/views/layouts
109
+ - generators/skip_embedded_init/templates/app/views/layouts/skip_embedded.html.erb
121
110
  - generators/skip_embedded_init/templates/app/views/shared
122
- - generators/skip_embedded_init/templates/app/views/shared/_skip_full_text_search_form.html.erb
111
+ - generators/skip_embedded_init/templates/app/views/shared/_common_header.html.erb
123
112
  - generators/skip_embedded_init/templates/app/views/shared/_flash_message.html.erb
124
- - generators/skip_embedded_init/templates/app/views/shared/_header.html.erb
125
113
  - generators/skip_embedded_init/templates/app/views/shared/_footer.html.erb
126
- - generators/skip_embedded_init/templates/app/views/shared/_common_header.html.erb
127
- - generators/skip_embedded_init/templates/app/views/layouts
128
- - generators/skip_embedded_init/templates/app/views/layouts/skip_embedded.html.erb
114
+ - generators/skip_embedded_init/templates/app/views/shared/_header.html.erb
115
+ - generators/skip_embedded_init/templates/app/views/shared/_skip_full_text_search_form.html.erb
116
+ - generators/skip_embedded_init/templates/config
117
+ - generators/skip_embedded_init/templates/config/initial_settings.yml
129
118
  - generators/skip_embedded_init/templates/lib
130
119
  - generators/skip_embedded_init/templates/lib/tasks
131
120
  - generators/skip_embedded_init/templates/lib/tasks/skip_embedded.rake
132
- - generators/skip_embedded_init/templates/config
133
- - generators/skip_embedded_init/templates/config/initial_settings.yml
134
- - generators/skip_embedded_init/skip_embedded_init_generator.rb
135
- - generators/skip_embedded_assets
136
- - generators/skip_embedded_assets/skip_embedded_assets_generator.rb
137
- - generators/skip_embedded
138
- - generators/skip_embedded/skip_embedded_generator.rb
121
+ - generators/skip_embedded_init/templates/public
122
+ - generators/skip_embedded_init/templates/public/images
123
+ - generators/skip_embedded_init/templates/public/images/footer_logo.png
139
124
  - generators/skip_embedded_javascripts
125
+ - generators/skip_embedded_javascripts/skip_embedded_javascripts_generator.rb
140
126
  - generators/skip_embedded_javascripts/templates
141
127
  - generators/skip_embedded_javascripts/templates/public
142
128
  - generators/skip_embedded_javascripts/templates/public/blank.html
143
129
  - generators/skip_embedded_javascripts/templates/public/javascripts
144
130
  - generators/skip_embedded_javascripts/templates/public/javascripts/skip_embedded
145
- - generators/skip_embedded_javascripts/templates/public/javascripts/skip_embedded/iframe_upload.js
146
- - generators/skip_embedded_javascripts/templates/public/javascripts/skip_embedded/skip_fckeditor_config.js
147
131
  - generators/skip_embedded_javascripts/templates/public/javascripts/skip_embedded/dropdown_navigation.js
148
132
  - generators/skip_embedded_javascripts/templates/public/javascripts/skip_embedded/flash_message.js
133
+ - generators/skip_embedded_javascripts/templates/public/javascripts/skip_embedded/iframe_upload.js
149
134
  - generators/skip_embedded_javascripts/templates/public/javascripts/skip_embedded/labeled_text_field.js
150
- - generators/skip_embedded_javascripts/skip_embedded_javascripts_generator.rb
135
+ - generators/skip_embedded_javascripts/templates/public/javascripts/skip_embedded/skip_fckeditor_config.js
136
+ - generators/skip_embedded_stylesheets
137
+ - generators/skip_embedded_stylesheets/skip_embedded_stylesheets_generator.rb
138
+ - generators/skip_embedded_stylesheets/templates
139
+ - generators/skip_embedded_stylesheets/templates/public
140
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets
141
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass
142
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded
143
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/editor_area.sass
144
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/skip_base.sass
145
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/skip_embedded.sass
146
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/skip_footer.sass
147
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/sass/skip_embedded/skip_header.sass
148
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/skip_embedded
149
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/skip_embedded/sprites.css
150
+ - generators/skip_embedded_stylesheets/templates/public/stylesheets/skip_embedded/sprites.png
151
151
  - script/skip-gen.sh
152
- - spec/spec_helper.rb
152
+ - spec/skip_embedded/fulltext_search_cache/builder_base_spec.rb
153
+ - spec/skip_embedded/fulltext_search_cache/mediator_spec.rb
154
+ - spec/skip_embedded/fulltext_search_cache/partial_loader_spec.rb
153
155
  - spec/skip_embedded/initial_setting_spec.rb
156
+ - spec/skip_embedded/op_fixation_spec.rb
154
157
  - spec/skip_embedded/validations_file_spec.rb
155
158
  - spec/skip_embedded/web_service_util_spec.rb
156
- - spec/skip_embedded/op_fixation_spec.rb
157
- - spec/skip_embedded/fulltext_search_cache/mediator_spec.rb
158
- - spec/skip_embedded/fulltext_search_cache/partial_loader_spec.rb
159
- - spec/skip_embedded/fulltext_search_cache/builder_base_spec.rb
159
+ - spec/spec_helper.rb
160
160
  - rails/init.rb
161
161
  has_rdoc: false
162
162
  homepage: http://github.com/openskip/skip_embedded/tree/master
@@ -196,10 +196,10 @@ signing_key:
196
196
  specification_version: 3
197
197
  summary: Utilities to collabolate SKIP, opensource buisiness SNS.
198
198
  test_files:
199
+ - spec/skip_embedded/fulltext_search_cache/builder_base_spec.rb
200
+ - spec/skip_embedded/fulltext_search_cache/mediator_spec.rb
201
+ - spec/skip_embedded/fulltext_search_cache/partial_loader_spec.rb
199
202
  - spec/skip_embedded/initial_setting_spec.rb
203
+ - spec/skip_embedded/op_fixation_spec.rb
200
204
  - spec/skip_embedded/validations_file_spec.rb
201
205
  - spec/skip_embedded/web_service_util_spec.rb
202
- - spec/skip_embedded/op_fixation_spec.rb
203
- - spec/skip_embedded/fulltext_search_cache/mediator_spec.rb
204
- - spec/skip_embedded/fulltext_search_cache/partial_loader_spec.rb
205
- - spec/skip_embedded/fulltext_search_cache/builder_base_spec.rb