fullstack-admin 0.1.56 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -16,7 +16,7 @@ gem "plupload-rails"
16
16
  gem "has-attached", '~> 0.2.4'
17
17
 
18
18
  gem 'bootstrap-datepicker-rails'
19
-
19
+ gem 'sorcery'
20
20
 
21
21
  group :development do
22
22
  gem "jeweler"
data/Gemfile.lock CHANGED
@@ -85,6 +85,8 @@ GEM
85
85
  facebox-rails (0.1.2)
86
86
  railties (~> 3.0)
87
87
  thor (~> 0.14)
88
+ faraday (0.8.4)
89
+ multipart-post (~> 1.1)
88
90
  flash_cookie_session (1.1.3)
89
91
  rails (~> 3.0)
90
92
  formtastic (2.2.1)
@@ -129,6 +131,7 @@ GEM
129
131
  httparty (0.9.0)
130
132
  multi_json (~> 1.0)
131
133
  multi_xml
134
+ httpauth (0.2.0)
132
135
  i18n (0.6.0)
133
136
  jeweler (1.8.4)
134
137
  bundler (~> 1.0)
@@ -163,8 +166,14 @@ GEM
163
166
  rails
164
167
  multi_json (1.3.6)
165
168
  multi_xml (0.5.1)
169
+ multipart-post (1.1.5)
166
170
  net-ssh (2.5.2)
167
171
  nokogiri (1.5.5)
172
+ oauth (0.4.7)
173
+ oauth2 (0.6.1)
174
+ faraday (~> 0.7)
175
+ httpauth (~> 0.1)
176
+ multi_json (~> 1.3)
168
177
  orm_adapter (0.4.0)
169
178
  paperclip (3.2.0)
170
179
  activemodel (>= 3.0.0)
@@ -220,6 +229,10 @@ GEM
220
229
  remotipart (1.0.2)
221
230
  resource-presentation-helpers (0.1.1)
222
231
  rails
232
+ sorcery (0.7.13)
233
+ bcrypt-ruby (~> 3.0.0)
234
+ oauth (~> 0.4.4)
235
+ oauth2 (~> 0.6.0)
223
236
  sprockets (2.1.3)
224
237
  hike (~> 1.2)
225
238
  rack (~> 1.0)
@@ -254,3 +267,4 @@ DEPENDENCIES
254
267
  meta_search
255
268
  plupload-rails
256
269
  rails (~> 3.2)
270
+ sorcery
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.56
1
+ 0.2.1
@@ -8,7 +8,7 @@ class Admin::BaseController < ApplicationController
8
8
 
9
9
  def rescue_access_denied
10
10
  if subject.guest?
11
- redirect_to new_user_session_path
11
+ redirect_to new_admin_session_path
12
12
  else
13
13
  render :text => "Not Authorized", :status => 403
14
14
  end
@@ -0,0 +1,19 @@
1
+ class Admin::SessionsController < ApplicationController
2
+ layout 'admin'
3
+
4
+ def create
5
+ user = login(params[:email], params[:password], params[:remember_me])
6
+ if user
7
+ redirect_back_or_to root_url, :notice => "Logged in!"
8
+ else
9
+ flash.now.alert = "Email or password was invalid"
10
+ render :new
11
+ end
12
+ end
13
+
14
+ def destroy
15
+ logout
16
+ redirect_to root_url, :notice => "Logged out!"
17
+ end
18
+
19
+ end
@@ -0,0 +1,12 @@
1
+ class Superuser < ActiveRecord::Base
2
+ authenticates_with_sorcery!
3
+
4
+ attr_accessible :email, :password, :password_confirmation
5
+
6
+ validates_confirmation_of :password
7
+ validates_presence_of :password, :on => :create
8
+ validates_presence_of :email
9
+ validates_uniqueness_of :email
10
+ field :email
11
+ field :password
12
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fullstack-admin"
8
- s.version = "0.1.56"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcasimir"]
12
- s.date = "2012-10-27"
12
+ s.date = "2012-11-04"
13
13
  s.description = "Administration interface framework for fullstack"
14
14
  s.email = "maurizio.cas@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -951,6 +951,7 @@ Gem::Specification.new do |s|
951
951
  "app/controllers/admin/positionables_controller.rb",
952
952
  "app/controllers/admin/responder.rb",
953
953
  "app/controllers/admin/scaffold_controller.rb",
954
+ "app/controllers/admin/sessions_controller.rb",
954
955
  "app/helpers/admin_form_helper.rb",
955
956
  "app/helpers/scaffold_helper.rb",
956
957
  "app/inputs/country_input.rb",
@@ -976,6 +977,7 @@ Gem::Specification.new do |s|
976
977
  "app/models/registerable.rb",
977
978
  "app/models/rememberable.rb",
978
979
  "app/models/roleable.rb",
980
+ "app/models/superuser.rb",
979
981
  "app/models/suspendable.rb",
980
982
  "app/models/trackable.rb",
981
983
  "app/views/admin/_nav.html.erb",
@@ -1086,6 +1088,7 @@ Gem::Specification.new do |s|
1086
1088
  s.add_runtime_dependency(%q<plupload-rails>, [">= 0"])
1087
1089
  s.add_runtime_dependency(%q<has-attached>, ["~> 0.2.4"])
1088
1090
  s.add_runtime_dependency(%q<bootstrap-datepicker-rails>, [">= 0"])
1091
+ s.add_runtime_dependency(%q<sorcery>, [">= 0"])
1089
1092
  s.add_development_dependency(%q<jeweler>, [">= 0"])
1090
1093
  else
1091
1094
  s.add_dependency(%q<rails>, ["~> 3.2"])
@@ -1099,6 +1102,7 @@ Gem::Specification.new do |s|
1099
1102
  s.add_dependency(%q<plupload-rails>, [">= 0"])
1100
1103
  s.add_dependency(%q<has-attached>, ["~> 0.2.4"])
1101
1104
  s.add_dependency(%q<bootstrap-datepicker-rails>, [">= 0"])
1105
+ s.add_dependency(%q<sorcery>, [">= 0"])
1102
1106
  s.add_dependency(%q<jeweler>, [">= 0"])
1103
1107
  end
1104
1108
  else
@@ -1113,6 +1117,7 @@ Gem::Specification.new do |s|
1113
1117
  s.add_dependency(%q<plupload-rails>, [">= 0"])
1114
1118
  s.add_dependency(%q<has-attached>, ["~> 0.2.4"])
1115
1119
  s.add_dependency(%q<bootstrap-datepicker-rails>, [">= 0"])
1120
+ s.add_dependency(%q<sorcery>, [">= 0"])
1116
1121
  s.add_dependency(%q<jeweler>, [">= 0"])
1117
1122
  end
1118
1123
  end
@@ -33,6 +33,7 @@ require "plupload-rails"
33
33
  require "fullstack"
34
34
  require "bootstrap-datepicker-rails"
35
35
  require "fullstack"
36
+ require 'sorcery'
36
37
 
37
38
  require 'fullstack/admin/engine'
38
39
  require 'fullstack/admin/resources'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fullstack-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.56
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-27 00:00:00.000000000 Z
12
+ date: 2012-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -187,6 +187,22 @@ dependencies:
187
187
  - - ! '>='
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: sorcery
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :runtime
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
190
206
  - !ruby/object:Gem::Dependency
191
207
  name: jeweler
192
208
  requirement: !ruby/object:Gem::Requirement
@@ -1145,6 +1161,7 @@ files:
1145
1161
  - app/controllers/admin/positionables_controller.rb
1146
1162
  - app/controllers/admin/responder.rb
1147
1163
  - app/controllers/admin/scaffold_controller.rb
1164
+ - app/controllers/admin/sessions_controller.rb
1148
1165
  - app/helpers/admin_form_helper.rb
1149
1166
  - app/helpers/scaffold_helper.rb
1150
1167
  - app/inputs/country_input.rb
@@ -1170,6 +1187,7 @@ files:
1170
1187
  - app/models/registerable.rb
1171
1188
  - app/models/rememberable.rb
1172
1189
  - app/models/roleable.rb
1190
+ - app/models/superuser.rb
1173
1191
  - app/models/suspendable.rb
1174
1192
  - app/models/trackable.rb
1175
1193
  - app/views/admin/_nav.html.erb
@@ -1273,7 +1291,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1273
1291
  version: '0'
1274
1292
  segments:
1275
1293
  - 0
1276
- hash: -1233107733094197871
1294
+ hash: -697068176308442679
1277
1295
  required_rubygems_version: !ruby/object:Gem::Requirement
1278
1296
  none: false
1279
1297
  requirements: