cms-fortress 1.1.4 → 1.1.5

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: 3ea34716f7477f06e0b9978ea9300ba7c42d9461
4
- data.tar.gz: 356bfa34ee22113eed9c2603b4a496aa4f1c7d06
3
+ metadata.gz: 23d3523efa51201588fedd394a1909352466a71f
4
+ data.tar.gz: 2b586ee061ddad839ca8dfe28829980e6f961490
5
5
  SHA512:
6
- metadata.gz: 2a54bd45e9cef91ee7c6064d86d08b2ddd63941865c6fe11d1e226297c2fb398cada5c0b18ca2e335b1ad196a85239596377181f9bfc73b3d497ef518bfc8cf5
7
- data.tar.gz: 2d6f7a655fa18f5571b68da8450d157ed021775be6d04ed3ffaa83c1652b10cacbd67e897100576e71bb9a3a70f6da5d200067741dceaa5a601dc64363251c4c
6
+ metadata.gz: 349ea67b8f8587de0efdd556b20e85337e7dae7304f1183c9e3cba8bcee5d70e1eaa33b9aaa944ce9d45b1b8916a85c56f6383b9fdf4748ceef728636287a8f5
7
+ data.tar.gz: 95a0ed41d08bd4711510fb98c291bdc94afe5832afd61841c135c960fb285f0771e36b4a9d5402d2d0a436030f580e423b3178c815f0bfbe81383eef62462c0a
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source "http://rubygems.org"
5
5
  gem 'devise', '~>3.2'
6
6
  gem 'cancan', '>=1.6.9'
7
7
  gem 'delayed_job', '~>4'
8
- gem 'tinymce-rails', '4.0.12'
8
+ gem 'tinymce-rails', '~>4.0.0'
9
9
 
10
10
  # Add dependencies to develop your gem here.
11
11
  # Include everything needed to run rake, tests, features, etc.
data/Gemfile.lock CHANGED
@@ -62,6 +62,7 @@ GEM
62
62
  sass-rails (>= 3.1.0)
63
63
  delayed_job (4.0.0)
64
64
  activesupport (>= 3.0, < 4.1)
65
+ descendants_tracker (0.0.3)
65
66
  devise (3.2.2)
66
67
  bcrypt-ruby (~> 3.0)
67
68
  orm_adapter (~> 0.1)
@@ -71,17 +72,18 @@ GEM
71
72
  docile (1.1.1)
72
73
  erubis (2.7.0)
73
74
  execjs (2.0.2)
74
- faraday (0.8.8)
75
- multipart-post (~> 1.2.0)
75
+ faraday (0.9.0)
76
+ multipart-post (>= 1.2, < 3)
76
77
  formatted_form (2.1.2)
77
78
  rails (>= 3.1)
78
79
  git (1.2.6)
79
- github_api (0.10.1)
80
- addressable
81
- faraday (~> 0.8.1)
80
+ github_api (0.11.2)
81
+ addressable (~> 2.3)
82
+ descendants_tracker (~> 0.0.1)
83
+ faraday (~> 0.8, < 0.10)
82
84
  hashie (>= 1.2)
83
- multi_json (~> 1.4)
84
- nokogiri (~> 1.5.2)
85
+ multi_json (>= 1.7.5, < 2.0)
86
+ nokogiri (~> 1.6.0)
85
87
  oauth2
86
88
  haml (4.0.5)
87
89
  tilt
@@ -93,15 +95,14 @@ GEM
93
95
  hashie (2.0.5)
94
96
  highline (1.6.20)
95
97
  hike (1.2.3)
96
- httpauth (0.2.0)
97
98
  i18n (0.6.9)
98
- jeweler (1.8.8)
99
+ jeweler (2.0.1)
99
100
  builder
100
- bundler (~> 1.0)
101
+ bundler (>= 1.0)
101
102
  git (>= 1.2.5)
102
- github_api (= 0.10.1)
103
+ github_api
103
104
  highline (>= 1.6.15)
104
- nokogiri (= 1.5.10)
105
+ nokogiri (>= 1.5.10)
105
106
  rake
106
107
  rdoc
107
108
  jquery-rails (3.1.0)
@@ -110,7 +111,7 @@ GEM
110
111
  jquery-ui-rails (4.2.0)
111
112
  railties (>= 3.2.16)
112
113
  json (1.8.1)
113
- jwt (0.1.8)
114
+ jwt (0.1.11)
114
115
  multi_json (>= 1.5)
115
116
  kaminari (0.15.1)
116
117
  actionpack (>= 3.0.0)
@@ -120,16 +121,17 @@ GEM
120
121
  mime-types (~> 1.16)
121
122
  treetop (~> 1.4.8)
122
123
  mime-types (1.25.1)
124
+ mini_portile (0.5.2)
123
125
  minitest (4.7.5)
124
126
  multi_json (1.8.4)
125
127
  multi_xml (0.5.5)
126
- multipart-post (1.2.0)
127
- nokogiri (1.5.10)
128
- oauth2 (0.9.2)
129
- faraday (~> 0.8)
130
- httpauth (~> 0.2)
131
- jwt (~> 0.1.4)
132
- multi_json (~> 1.0)
128
+ multipart-post (2.0.0)
129
+ nokogiri (1.6.1)
130
+ mini_portile (~> 0.5.0)
131
+ oauth2 (0.9.3)
132
+ faraday (>= 0.8, < 0.10)
133
+ jwt (~> 0.1.8)
134
+ multi_json (~> 1.3)
133
135
  multi_xml (~> 0.5)
134
136
  rack (~> 1.2)
135
137
  orm_adapter (0.5.0)
@@ -159,7 +161,7 @@ GEM
159
161
  rake (>= 0.8.7)
160
162
  thor (>= 0.18.1, < 2.0)
161
163
  rake (10.1.1)
162
- rdoc (4.0.1)
164
+ rdoc (4.1.1)
163
165
  json (~> 1.4)
164
166
  sass (3.2.14)
165
167
  sass-rails (4.0.1)
@@ -184,7 +186,7 @@ GEM
184
186
  thread_safe (0.1.3)
185
187
  atomic
186
188
  tilt (1.4.1)
187
- tinymce-rails (4.0.12)
189
+ tinymce-rails (4.0.16)
188
190
  railties (>= 3.1.1)
189
191
  treetop (1.4.15)
190
192
  polyglot
@@ -206,4 +208,4 @@ DEPENDENCIES
206
208
  rails (>= 4.0.0)
207
209
  rdoc
208
210
  simplecov
209
- tinymce-rails (= 4.0.12)
211
+ tinymce-rails (~> 4.0.0)
data/README.rdoc CHANGED
@@ -1,4 +1,7 @@
1
1
  {<img src="https://badge.fury.io/rb/cms-fortress.png" alt="Gem Version" />}[http://badge.fury.io/rb/cms-fortress]
2
+ {<img src="https://gemnasium.com/melvinsembrano/cms-fortress.png" alt="Dependencies" />}[https://gemnasium.com/melvinsembrano/cms-fortress]
3
+ {<img src="https://codeclimate.com/github/melvinsembrano/cms-fortress.png" alt="Code Climate" />}[https://codeclimate.com/github/melvinsembrano/cms-fortress]
4
+
2
5
  = cms-fortress
3
6
 
4
7
  An extension for the awesome Comfortable Mexican Sofa (https://github.com/comfy/comfortable-mexican-sofa) CMS Engine
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.4
1
+ 1.1.5
@@ -62,7 +62,9 @@ window.media =
62
62
  this.ed.selection.setContent(img)
63
63
  this.ed.nodeChanged()
64
64
 
65
+ window.CmsFortress = window.CmsFortress || {}
65
66
 
67
+ window.CmsFortress.media = media
66
68
 
67
69
  $(document).ready ->
68
- media.init()
70
+ CmsFortress.media.init()
@@ -6,19 +6,19 @@ window.CMS.wysiwyg = ->
6
6
  menubar: 'tools format view'
7
7
  toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | fullscreen code | image fmedia link"
8
8
  plugins: ['code', 'fullscreen', 'media', 'link']
9
- link_list: media.othersUrl()
9
+ link_list: CmsFortress.media.othersUrl()
10
10
  setup: (ed) ->
11
11
  ed.addButton 'image',
12
12
  title: 'Insert Image'
13
13
  onclick: ->
14
- media.showImageDialog(ed)
14
+ CmsFortress.media.showImageDialog(ed)
15
15
 
16
16
  ed.addButton 'fmedia',
17
17
  tooltip: 'Insert Video'
18
18
  icon: 'media'
19
19
  stateSelector: ['img[data-mce-object=video]', 'img[data-mce-object=iframe]']
20
20
  onclick: ->
21
- media.showVideoDialog(ed)
21
+ CmsFortress.media.showVideoDialog(ed)
22
22
 
23
23
 
24
24
 
@@ -10,8 +10,8 @@
10
10
  Click the thumbnail to insert item to the selected editor.
11
11
 
12
12
  :coffeescript
13
- media.imagesPath = "#{ media_files_path(:image) }"
14
- media.videosPath = "#{ media_files_path(:video) }"
15
- media.othersPath = "#{ media_files_path(:others) }"
13
+ CmsFortress.media.imagesPath = "#{ media_files_path(:image) }"
14
+ CmsFortress.media.videosPath = "#{ media_files_path(:video) }"
15
+ CmsFortress.media.othersPath = "#{ media_files_path(:others) }"
16
16
 
17
17
 
data/cms-fortress.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cms-fortress"
8
- s.version = "1.1.4"
8
+ s.version = "1.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Melvin Sembrano"]
12
- s.date = "2014-02-21"
12
+ s.date = "2014-02-26"
13
13
  s.description = "Comfortable Mexican Sofa (CMS) - User and role management extension"
14
14
  s.email = "melvinsembrano@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -144,7 +144,7 @@ Gem::Specification.new do |s|
144
144
  s.add_runtime_dependency(%q<devise>, ["~> 3.2"])
145
145
  s.add_runtime_dependency(%q<cancan>, [">= 1.6.9"])
146
146
  s.add_runtime_dependency(%q<delayed_job>, ["~> 4"])
147
- s.add_runtime_dependency(%q<tinymce-rails>, ["= 4.0.12"])
147
+ s.add_runtime_dependency(%q<tinymce-rails>, ["~> 4.0.0"])
148
148
  s.add_development_dependency(%q<rdoc>, [">= 0"])
149
149
  s.add_development_dependency(%q<bundler>, [">= 0"])
150
150
  s.add_development_dependency(%q<jeweler>, [">= 0"])
@@ -155,7 +155,7 @@ Gem::Specification.new do |s|
155
155
  s.add_dependency(%q<devise>, ["~> 3.2"])
156
156
  s.add_dependency(%q<cancan>, [">= 1.6.9"])
157
157
  s.add_dependency(%q<delayed_job>, ["~> 4"])
158
- s.add_dependency(%q<tinymce-rails>, ["= 4.0.12"])
158
+ s.add_dependency(%q<tinymce-rails>, ["~> 4.0.0"])
159
159
  s.add_dependency(%q<rdoc>, [">= 0"])
160
160
  s.add_dependency(%q<bundler>, [">= 0"])
161
161
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -167,7 +167,7 @@ Gem::Specification.new do |s|
167
167
  s.add_dependency(%q<devise>, ["~> 3.2"])
168
168
  s.add_dependency(%q<cancan>, [">= 1.6.9"])
169
169
  s.add_dependency(%q<delayed_job>, ["~> 4"])
170
- s.add_dependency(%q<tinymce-rails>, ["= 4.0.12"])
170
+ s.add_dependency(%q<tinymce-rails>, ["~> 4.0.0"])
171
171
  s.add_dependency(%q<rdoc>, [">= 0"])
172
172
  s.add_dependency(%q<bundler>, [">= 0"])
173
173
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -2,13 +2,30 @@
2
2
  module Cms
3
3
  module Fortress
4
4
  module ApplicationControllerMethods
5
+
5
6
  def after_sign_in_path_for(resource)
6
- admin_cms_path
7
+ if resource.class.eql?(Cms::Fortress::User)
8
+ admin_cms_path
9
+ else
10
+ begin
11
+ stored_location_for(resource) || send("after_sign_in_path_for_#{ resource.class.name.underscore }", resource)
12
+ rescue
13
+ raise "Cannot find `after_sign_in_path_for_#{ resource.class.name.underscore }` in your ApplicationController class."
14
+ end
15
+ end
7
16
  end
8
17
 
9
18
  def after_sign_out_path_for(resource_or_scope)
10
19
  # request.referrer
11
- admin_cms_path
20
+ if resource_or_scope.eql?(:cms_fortress_user)
21
+ admin_cms_path
22
+ else
23
+ begin
24
+ stored_location_for(resource_or_scope) || send("after_sign_out_path_for_#{ resource_or_scope.to_s }", resource_or_scope)
25
+ rescue
26
+ raise "Cannot find `after_sign_out_path_for_#{ resource.class.name.underscore }` in your ApplicationController class."
27
+ end
28
+ end
12
29
  end
13
30
 
14
31
  def ability_class
@@ -47,7 +47,7 @@ module Cms
47
47
  end
48
48
 
49
49
  initializer :assets do |config|
50
- Rails.application.config.assets.precompile += %w( cms/fortress/bootstrap.js cms/fortress/admin_overrides.css cms/fortress/session.css cms/fortress/themes/wide.css cms/fortress/themes/wide.js cms/fortress/media.js)
50
+ Rails.application.config.assets.precompile += %w( cms/fortress/bootstrap.css cms/fortress/bootstrap-responsive.css cms/fortress/bootstrap.js cms/fortress/admin_overrides.css cms/fortress/session.css cms/fortress/themes/wide.css cms/fortress/themes/wide.js cms/fortress/media.js)
51
51
  end
52
52
  end
53
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cms-fortress
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melvin Sembrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-21 00:00:00.000000000 Z
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: tinymce-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '='
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: 4.0.12
89
+ version: 4.0.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '='
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: 4.0.12
96
+ version: 4.0.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rdoc
99
99
  requirement: !ruby/object:Gem::Requirement