bootswatch_rails 3.2.0.22 → 3.2.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2006ea43501ef37e862e5075bef13a15cc9829a
4
- data.tar.gz: f4e9466be1f2dd4964bafe6e3da8cd0250014dce
3
+ metadata.gz: c9b6d64a94c444c61214c3a4f0fca343ab569dbe
4
+ data.tar.gz: 0db44cda7ac19f2ee5405c6ca2427cbc11959506
5
5
  SHA512:
6
- metadata.gz: 38ca818073bd18a3d0b7a0c65565054e4cb604096b4507b3d0ac55e975d2a4bb4be7a205ee5c88fc9740e16c91dd8fc234c8b2dbe11c973138a6b638415983c7
7
- data.tar.gz: 18740e3490f9870db0b5f68af5e9a81205ec45647c5422bddba6bf8447541c8e1822f4313f4c7bd3e69e5f909d8d76a922d1c321ea4fb73051340d01fd93089e
6
+ metadata.gz: e1e8fdf32d93d9fb54b21c4d0ebcbd09c2b57a27f5adf821c72a987d95a81691e9993ef8874385d2073513d35ae1d296be3eb645320c4695765931762d7a6b9a
7
+ data.tar.gz: 4c39a739911cb688ec8dc7df82f8a172c2cd77d3fcb3d9aeb1e64dc486fbe1bfe55c99d4e33b03dd2ec3aa7c03254040171173edd08f5596b5b70af57cae7997
@@ -1,6 +1,6 @@
1
1
  module BootswatchRails
2
2
  BOOTSTRAP = "3.2.0"
3
- VERSION = "3.2.0.22"
3
+ VERSION = "3.2.0.24"
4
4
  THEMES = [:amelia, :cerulean, :cosmo, :custom, :cyborg, :darkly, :flatly, :journal, :lumen, :paper, :readable, :sandstone, :simplex, :slate, :spacelab, :superhero, :united, :yeti]
5
5
  DEFAULT = 1
6
6
  end
@@ -1,15 +1,15 @@
1
1
  require 'rails/generators/active_record'
2
2
 
3
3
  module BootswatchRails
4
- USER_STATUS = %w(guest member admin sysadm)
5
-
6
4
  module Generators
7
5
  class SorceryGenerator < ActiveRecord::Generators::Base
8
- desc "Install model, views and controller for user with Sorcery."
6
+ desc "Install authentication (with Sorcery) and (optional) authorization."
9
7
  argument :name, type: :string, default: "user",
10
8
  banner: "user model (default 'user')"
11
9
  class_option :picture, type: :boolean, default: false,
12
10
  desc: 'Add picture to user (needs carrierwave)'
11
+ class_option :authorization, type: :boolean, default: true,
12
+ desc: 'Add dynamic athorization on top of authentication'
13
13
  class_option :user_activation, type: :boolean, default: false,
14
14
  desc: 'User activation by email with optional success email'
15
15
  class_option :reset_password, type: :boolean, default: false,
@@ -29,23 +29,41 @@ module BootswatchRails
29
29
  class_option :layout, type: :string, default: 'centered',
30
30
  desc: 'Layout to be used for rendering login.html.erb'
31
31
  source_root File.expand_path("../templates", __FILE__)
32
-
33
- def add_migration
32
+
33
+ def add_migrations
34
34
  migration_template "user_migration.rb", "db/migrate/create_#{table_name}.rb"
35
+ return unless options.authorization?
36
+ migration_template "role_migration.rb", "db/migrate/create_roles.rb"
37
+ migration_template "assignment_migration.rb", "db/migrate/create_assignments.rb"
38
+ migration_template "ability_migration.rb", "db/migrate/create_abilities.rb"
35
39
  end
36
40
 
37
- def add_model
41
+ def add_models
38
42
  template "user_model.rb", "app/models/#{name}.rb"
43
+ return unless options.authorization?
44
+ template "role_model.rb", "app/models/role.rb"
45
+ template "assignment_model.rb", "app/models/assignment.rb"
46
+ template "ability_model.rb", "app/models/ability.rb"
47
+ end
48
+
49
+ def add_uploader
50
+ return unless options.picture?
51
+ template "picture_uploader.rb", "app/uploaders/picture_uploader.rb"
39
52
  end
40
53
 
41
54
  def add_mailer
42
55
  return unless reset_password?
43
- template "user_mailer.rb", "app/mailers/#{name}_mailer.rb"
44
- template "reset_password_email.html.erb", "app/views/#{name}_mailer/reset_password_email.html.erb"
56
+ template "user_mailer.rb", "app/mailers/#{mailer_name}.rb"
57
+ template "reset_password_email.html.erb", "app/views/#{mailer_name}/reset_password_email.html.erb"
45
58
  end
46
59
 
47
- def add_controller
60
+ def add_controllers
48
61
  template "users_controller.rb", "app/controllers/#{table_name}_controller.rb"
62
+ return unless authorization?
63
+ # TODO
64
+ # template "roles_controller.rb", "app/controllers/roles_controller.rb"
65
+ # template "assignments_controller.rb", "app/controllers/assignments_controller.rb"
66
+ # template "abilities_controller.rb", "app/controllers/abilities_controller.rb"
49
67
  end
50
68
 
51
69
  def add_views
@@ -54,6 +72,8 @@ module BootswatchRails
54
72
  views.each do |view|
55
73
  template "#{view}.html.erb", "app/views/#{table_name}/#{view}.html.erb"
56
74
  end
75
+ return unless options.authorization?
76
+ # TODO
57
77
  end
58
78
 
59
79
  def add_routes
@@ -84,6 +104,12 @@ module BootswatchRails
84
104
  " get '/logout' => '#{table_name}#log_out', as: :logout, format: false",
85
105
  ""
86
106
  ]
107
+ lines << [
108
+ " resources :roles",
109
+ " resources :assignments",
110
+ " resources :abilities",
111
+ ""
112
+ ] if options.authorization?
87
113
  route lines.join("\n")
88
114
  end
89
115
 
@@ -117,6 +143,10 @@ module BootswatchRails
117
143
  options.picture?
118
144
  end
119
145
 
146
+ def authorization?
147
+ options.authorization?
148
+ end
149
+
120
150
  def user_activation?
121
151
  options.user_activation?
122
152
  end
@@ -180,8 +210,8 @@ module BootswatchRails
180
210
 
181
211
  def whitelist
182
212
  text = ":email, :name, :phone, :comment, :theme, " +
183
- ":active, :status, :password, :password_confirmation"
184
- text += ", :picture, :picture_cache" if has_picture?
213
+ ":active, :sysadm, :password, :password_confirmation"
214
+ text += ", :picture, :picture_cache" if options.picture?
185
215
  end
186
216
  end
187
217
  end
@@ -25,7 +25,9 @@
25
25
  <%%= f.input :active %>
26
26
  <%%= f.input :password %>
27
27
  <%%= f.input :password_confirmation %>
28
- <%%= f.input :status %>
28
+ <%%- if current_<%= name %>.sysadmin and @<%= name %> != current_<%= name %> -%>
29
+ <%%= f.input :sysadm %>
30
+ <%%- end -%>
29
31
 
30
32
  <%%= f.button :submit, class: 'btn btn-primary' %>
31
33
  <%%- if @<%= name %>.new_record? -%>
@@ -0,0 +1,28 @@
1
+ class CreateAbilities < ActiveRecord::Migration
2
+ def change
3
+ create_table :abilities do |t|
4
+ t.belongs_to :role, index: true
5
+ t.string :resource, null: false
6
+ t.boolean :create_new, default: false
7
+ t.boolean :read_own, default: false
8
+ t.boolean :read_any, default: false
9
+ t.boolean :update_own, default: false
10
+ t.boolean :update_any, default: false
11
+ t.boolean :delete_own, default: false
12
+ t.boolean :delete_any, default: false
13
+ t.boolean :user1_own, default: false
14
+ t.boolean :user1_any, default: false
15
+ t.string :user1_name
16
+ t.boolean :user2_own, default: false
17
+ t.boolean :user2_any, default: false
18
+ t.string :user2_name
19
+ t.boolean :user3_own, default: false
20
+ t.boolean :user3_any, default: false
21
+ t.string :user3_name
22
+
23
+ t.timestamps
24
+ end
25
+
26
+ add_index :abilities, :resource, unique: true
27
+ end
28
+ end
@@ -0,0 +1,3 @@
1
+ class Ability < ActiveRecord::Base
2
+ belongs_to :role
3
+ end
@@ -0,0 +1,10 @@
1
+ class CreateAssignments < ActiveRecord::Migration
2
+ def change
3
+ create_table :assignments do |t|
4
+ t.belongs_to :<%= name %>, index: true
5
+ t.belongs_to :role, index: true
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ class Assignment < ActiveRecord::Base
2
+ belongs_to :user
3
+ belongs_to :role
4
+ end
@@ -3,13 +3,16 @@
3
3
  <table class="table table-striped table-hover">
4
4
  <thead>
5
5
  <tr>
6
- <th><%%= t('activerecord.models.<%= name %>.one') %></th>
6
+ <th><%%= t('activerecord.attributes.<%= name %>.name') %>
7
+ <br>
8
+ <%%= t('activerecord.attributes.<%= name %>.phone') %></th>
7
9
  <th><%%= t('activerecord.attributes.<%= name %>.comment') %></th>
8
10
  <%- if has_picture? -%>
9
11
  <th><%%= t('activerecord.attributes.<%= name %>.picture') %></th>
10
12
  <%- end -%>
11
- <th><%%= t('activerecord.attributes.<%= name %>.active') %></th>
12
- <th><%%= t('activerecord.attributes.<%= name %>.status') %></th>
13
+ <th><%%= t('activerecord.attributes.<%= name %>.active') %>
14
+ <br>
15
+ <%%= t('activerecord.attributes.<%= name %>.sysadm') %></th>
13
16
  <th class="index-actions"><%%= t('actions.title') %></th>
14
17
  </tr>
15
18
  </thead>
@@ -17,13 +20,24 @@
17
20
  <tbody>
18
21
  <%% @<%= table_name %>.each do |<%= name %>| %>
19
22
  <tr>
20
- <td><%%= mail_to(<%= name %>.email, <%= name %>.name) %><br><%%= <%= name %>.phone %></td>
21
- <td><%%= <%= name %>.comment %></td>
23
+ <td>
24
+ <%%= mail_to(<%= name %>.email, <%= name %>.name) %>
25
+ <br>
26
+ <%%= <%= name %>.phone %>
27
+ </td>
28
+ <td>
29
+ <%%= <%= name %>.comment %>
30
+ </td>
22
31
  <%- if has_picture? -%>
23
- <td><%%= image_tag(<%= name %>.picture_url(:thumb).to_s) %></td>
32
+ <td>
33
+ <%%= image_tag(<%= name %>.picture_url(:thumb).to_s) %>
34
+ </td>
24
35
  <%- end -%>
25
- <td><%%= <%= name %>.active ? t('simple_form.yes') : t('simple_form.no') %></td>
26
- <td><%%= t('enums.<%= name %>.status.' + <%= name %>.status) %></td>
36
+ <td>
37
+ <%%= <%= name %>.active ? t('simple_form.yes') : t('simple_form.no') %>
38
+ <br>
39
+ <%%= <%= name %>.sysadm ? t('simple_form.yes') : t('simple_form.no') %>
40
+ </td>
27
41
  <td class="index-actions">
28
42
  <%%= link_to t('actions.show'), <%= name %>, class: 'btn btn-default btn-xs' %>
29
43
  <%%- if current_<%= name %>.status.to_sym == :sysadm or <%= name %> == current_<%= name %> -%>
@@ -0,0 +1,65 @@
1
+ # encoding: utf-8
2
+
3
+ class PictureUploader < CarrierWave::Uploader::Base
4
+
5
+ # Include RMagick or MiniMagick support:
6
+ # include CarrierWave::RMagick
7
+ include CarrierWave::MiniMagick
8
+
9
+ # Include the Sprockets helpers for Rails 3.1+ asset pipeline compatibility:
10
+ ## Seems to be gone in Rails 4.0 ???
11
+ ## include Sprockets::Helpers::RailsHelper
12
+ ## include Sprockets::Helpers::IsolatedHelper
13
+
14
+ # Choose what kind of storage to use for this uploader:
15
+ storage :file
16
+ # storage :fog
17
+
18
+ # Override the directory where uploaded files will be stored.
19
+ # This is a sensible default for uploaders that are meant to be mounted:
20
+ def store_dir
21
+ "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
22
+ end
23
+
24
+ # Provide a default URL as a default if there hasn't been a file uploaded:
25
+ # def default_url
26
+ # # For Rails 3.1+ asset pipeline compatibility:
27
+ # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
28
+ #
29
+ # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
30
+ # end
31
+
32
+ # Process files as they are uploaded:
33
+ # process :scale => [200, 300]
34
+ #
35
+ # def scale(width, height)
36
+ # # do something
37
+ # end
38
+
39
+ # Create different versions of your uploaded files:
40
+ version :thumb do
41
+ process :resize_to_limit => [100, 100]
42
+ end
43
+ version :carousel do
44
+ process :resize_to_fill => [600, 400]
45
+ end
46
+ version :display do
47
+ process :resize_to_limit => [600, 600]
48
+ end
49
+ version :avatar do
50
+ process :resize_to_limit => [300, 300]
51
+ end
52
+
53
+ # Add a white list of extensions which are allowed to be uploaded.
54
+ # For images you might use something like this:
55
+ def extension_white_list
56
+ %w(jpg jpeg gif png)
57
+ end
58
+
59
+ # Override the filename of the uploaded files:
60
+ # Avoid using model.id or version_name here, see uploader/store.rb for details.
61
+ # def filename
62
+ # "something.jpg" if original_filename
63
+ # end
64
+
65
+ end
@@ -0,0 +1,11 @@
1
+ class CreateRoles < ActiveRecord::Migration
2
+ def change
3
+ create_table :roles do |t|
4
+ t.string :name, null: false
5
+
6
+ t.timestamps
7
+ end
8
+
9
+ add_index :roles, :name, unique: true
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class Role < ActiveRecord::Base
2
+ has_many :assignments
3
+ has_many :users, through: :assignments
4
+ has_many :abilities
5
+ end
@@ -0,0 +1,80 @@
1
+ class RolesController < ApplicationController
2
+ force_ssl if: :ssl_configured?
3
+ before_action :set_role, only: [:show, :edit, :update, :destroy]
4
+
5
+ # GET /roles
6
+ # GET /roles.json
7
+ def index
8
+ @roles = Role.all
9
+ end
10
+
11
+ # GET /roles/1
12
+ # GET /roles/1.json
13
+ def show
14
+ end
15
+
16
+ # GET /roles/new
17
+ def new
18
+ @role = Role.new
19
+ end
20
+
21
+ # GET /roles/1/edit
22
+ def edit
23
+ end
24
+
25
+ # POST /roles
26
+ # POST /roles.json
27
+ def create
28
+ @role = Role.new(role_params)
29
+
30
+ respond_to do |format|
31
+ if @role.save
32
+ format.html { redirect_to @role, notice: 'Role was successfully created.' }
33
+ format.json { render :show, status: :created, location: @role }
34
+ else
35
+ format.html { render :new }
36
+ format.json { render json: @role.errors, status: :unprocessable_entity }
37
+ end
38
+ end
39
+ end
40
+
41
+ # PATCH/PUT /roles/1
42
+ # PATCH/PUT /roles/1.json
43
+ def update
44
+ respond_to do |format|
45
+ if @role.update(role_params)
46
+ format.html { redirect_to @role, notice: 'Role was successfully updated.' }
47
+ format.json { render :show, status: :ok, location: @role }
48
+ else
49
+ format.html { render :edit }
50
+ format.json { render json: @role.errors, status: :unprocessable_entity }
51
+ end
52
+ end
53
+ end
54
+
55
+ # DELETE /roles/1
56
+ # DELETE /roles/1.json
57
+ def destroy
58
+ @role.destroy
59
+ respond_to do |format|
60
+ format.html { redirect_to roles_url, notice: 'Role was successfully destroyed.' }
61
+ format.json { head :no_content }
62
+ end
63
+ end
64
+
65
+ private
66
+ # Always enforce SSL for this controller
67
+ def ssl_configured?
68
+ Rails.env.production?
69
+ end
70
+
71
+ # Use callbacks to share common setup or constraints between actions.
72
+ def set_role
73
+ @role = Role.find(params[:id])
74
+ end
75
+
76
+ # Never trust parameters from the scary internet, only allow the white list through.
77
+ def role_params
78
+ params.require(:role).permit(:name)
79
+ end
80
+ end
@@ -35,8 +35,8 @@
35
35
  <td><%%= @<%= name %>.active ? t('simple_form.yes') : t('simple_form.no') %></td>
36
36
  </tr>
37
37
  <tr>
38
- <td><%%= t('activerecord.attributes.<%= name %>.status') %></td>
39
- <td><%%= t('enums.<%= name %>.status.' + @<%= name %>.status) %></td>
38
+ <td><%%= t('activerecord.attributes.<%= name %>.sysadm') %></td>
39
+ <td><%%= @<%= name %>.sysadm ? t('simple_form.yes') : t('simple_form.no') %></td>
40
40
  </tr>
41
41
  <%- if activity_logging? -%>
42
42
  <%%- if @<%= name %>.last_login_at.present? -%>
@@ -29,19 +29,22 @@ de:
29
29
  reset_password_email:
30
30
  subject: "Kennwort für #{name} zurücksetzen"
31
31
 
32
- enums:
33
- <%= name %>:
34
- status:
35
- guest: "Gast"
36
- member: "Mitglied"
37
- admin: "Admin"
38
- sysadm: "System-Admin"
39
-
40
32
  activerecord:
41
33
  models:
42
34
  <%= name %>:
43
35
  one: "Benutzer"
44
36
  other: "Benutzer"
37
+ <%- if authorization? -%>
38
+ role:
39
+ one: "Rolle"
40
+ other: "Rollen"
41
+ assignment:
42
+ one: "Rollenzuordnung"
43
+ other: "Rollenzuordnungen"
44
+ ability:
45
+ one: "Fähigkeit"
46
+ other: Fähigkeiten"
47
+ <%- end -%>
45
48
  attributes:
46
49
  <%= name %>:
47
50
  email: "E-Mail"
@@ -53,7 +56,7 @@ de:
53
56
  <%- end -%>
54
57
  theme: "Oberfläche"
55
58
  active: "Aktiv"
56
- status: "Status"
59
+ sysadm: "Admin"
57
60
  password: "Kennwort"
58
61
  password_confirmation: "Kennwort wiederholen"
59
62
  <%- if remember_me? -%>
@@ -69,3 +72,29 @@ de:
69
72
  failed_logins_count: "Fehlversuche Anmeldung"
70
73
  lock_expires_at: "Gesperrt bis"
71
74
  <%- end -%>
75
+ <%- if options.authorization? -%>
76
+ role:
77
+ name: "Bezeichnung"
78
+ assignment:
79
+ <%= name %>: "Benutzer"
80
+ role: "Rolle"
81
+ ability:
82
+ resource: "Tabelle"
83
+ create_new: "Neu Anlegen"
84
+ read_own: "Lesen Eigene"
85
+ read_any: "Lesen Alle"
86
+ update_own: "Edit Eigene"
87
+ update_any: "Edit Alle"
88
+ delete_own: "Löschen Eigene"
89
+ delete_any: "Löschen Alle"
90
+ user1_own: "Zusatz1 Eigene"
91
+ user1_any: "Zusatz1 Alle"
92
+ user1_name: "Zusatz1 Name"
93
+ user2_own: "Zusatz2 Eigene"
94
+ user2_any: "Zusatz2 Alle"
95
+ user2_name: "Zusatz2 Name"
96
+ user3_own: "Zusatz3 Eigene"
97
+ user3_any: "Zusatz3 Alle"
98
+ user3_name: "Zusatz3 Name"
99
+ <%- end -%>
100
+
@@ -1,51 +1,51 @@
1
1
  class <%= migration_name.camelize %> < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :<%= table_name %> do |t|
4
- t.string :email, null: false
5
- t.string :name
6
- t.string :phone
7
- t.text :comment
4
+ t.string :email, null: false
5
+ t.string :name
6
+ t.string :phone
7
+ t.text :comment
8
8
  <%- if has_picture? -%>
9
- t.string :picture
9
+ t.string :picture
10
10
  <%- end -%>
11
- t.integer :theme, default: BootswatchRails::DEFAULT
12
- t.boolean :active, default: true
13
- t.integer :status, default: 0
11
+ t.integer :theme, default: BootswatchRails::DEFAULT
12
+ t.boolean :active, default: true
13
+ t.boolean :sysadm, default: false
14
14
 
15
- t.string :crypted_password, null: false
16
- t.string :salt, null: false
15
+ t.string :crypted_password, null: false
16
+ t.string :salt, null: false
17
17
  <%- if user_activation? -%>
18
- t.string :activation_state, default: nil
19
- t.string :activation_token, default: nil
18
+ t.string :activation_state, default: nil
19
+ t.string :activation_token, default: nil
20
20
  t.datetime :activation_token_expires_at, default: nil
21
21
  <%- end -%>
22
22
  <%- if reset_password? -%>
23
- t.string :reset_password_token, default: nil
23
+ t.string :reset_password_token, default: nil
24
24
  t.datetime :reset_password_token_expires_at, default: nil
25
25
  t.datetime :reset_password_email_sent_at, default: nil
26
26
  <%- end -%>
27
27
  <%- if remember_me? -%>
28
- t.boolean :remember_me
29
- t.string :remember_me_token, default: nil
28
+ t.boolean :remember_me
29
+ t.string :remember_me_token, default: nil
30
30
  t.datetime :remember_me_token_expires_at, default: nil
31
31
  <%- end -%>
32
32
  <%- if brute_force_protection? -%>
33
- t.integer :failed_logins_count, default: 0
33
+ t.integer :failed_logins_count, default: 0
34
34
  t.datetime :lock_expires_at, default: nil
35
- t.string :unlock_token, default: nil
35
+ t.string :unlock_token, default: nil
36
36
  <%- end -%>
37
37
  <%- if activity_logging? -%>
38
38
  t.datetime :last_login_at, default: nil
39
39
  t.datetime :last_logout_at, default: nil
40
40
  t.datetime :last_activity_at, default: nil
41
- t.string :last_login_from_ip_address, default: nil
41
+ t.string :last_login_from_ip_address, default: nil
42
42
  <%- end -%>
43
43
 
44
44
  t.timestamps
45
45
  end
46
46
 
47
47
  add_index :<%= table_name %>, :email, unique: true
48
- add_index :<%= table_name %>, :status
48
+ add_index :<%= table_name %>, :sysadm
49
49
  <%- if user_activation? -%>
50
50
  add_index :<%= table_name %>, :activation_token
51
51
  <%- end -%>
@@ -6,12 +6,13 @@ class <%= class_name %> < ActiveRecord::Base
6
6
  validates :password, confirmation: true
7
7
  validates :password_confirmation, presence: true, on: :create
8
8
 
9
+ has_many :assignments
10
+ has_many :roles, through: :assignments
11
+ has_many :abilities, through: :roles
12
+
9
13
  <%- if has_picture? -%>
10
14
  mount_uploader :picture, PictureUploader
11
15
 
12
16
  <%- end -%>
13
- enum status: <%= BootswatchRails::USER_STATUS %>
14
- validates :status, presence: true
15
-
16
17
  enum theme: BootswatchRails::THEMES
17
18
  end
@@ -3665,11 +3665,11 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
3665
3665
  .nav-tabs.nav-justified > .active > a,
3666
3666
  .nav-tabs.nav-justified > .active > a:hover,
3667
3667
  .nav-tabs.nav-justified > .active > a:focus {
3668
- border: 1px solid #dddddd;
3668
+ border: 1px solid transparent;
3669
3669
  }
3670
3670
  @media (min-width: 768px) {
3671
3671
  .nav-tabs.nav-justified > li > a {
3672
- border-bottom: 1px solid #dddddd;
3672
+ border-bottom: 1px solid transparent;
3673
3673
  border-radius: 3px 3px 0 0;
3674
3674
  }
3675
3675
  .nav-tabs.nav-justified > .active > a,
@@ -3733,11 +3733,11 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
3733
3733
  .nav-tabs-justified > .active > a,
3734
3734
  .nav-tabs-justified > .active > a:hover,
3735
3735
  .nav-tabs-justified > .active > a:focus {
3736
- border: 1px solid #dddddd;
3736
+ border: 1px solid transparent;
3737
3737
  }
3738
3738
  @media (min-width: 768px) {
3739
3739
  .nav-tabs-justified > li > a {
3740
- border-bottom: 1px solid #dddddd;
3740
+ border-bottom: 1px solid transparent;
3741
3741
  border-radius: 3px 3px 0 0;
3742
3742
  }
3743
3743
  .nav-tabs-justified > .active > a,
@@ -5630,7 +5630,7 @@ button.close {
5630
5630
  margin-left: -11px;
5631
5631
  border-bottom-width: 0;
5632
5632
  border-top-color: rgba(0, 0, 0, 0);
5633
- border-top-color: rgba(0, 0, 0, 0.05);
5633
+ border-top-color: rgba(0, 0, 0, 0.075);
5634
5634
  bottom: -11px;
5635
5635
  }
5636
5636
  .popover.top > .arrow:after {
@@ -5646,7 +5646,7 @@ button.close {
5646
5646
  margin-top: -11px;
5647
5647
  border-left-width: 0;
5648
5648
  border-right-color: rgba(0, 0, 0, 0);
5649
- border-right-color: rgba(0, 0, 0, 0.05);
5649
+ border-right-color: rgba(0, 0, 0, 0.075);
5650
5650
  }
5651
5651
  .popover.right > .arrow:after {
5652
5652
  content: " ";
@@ -5660,7 +5660,7 @@ button.close {
5660
5660
  margin-left: -11px;
5661
5661
  border-top-width: 0;
5662
5662
  border-bottom-color: rgba(0, 0, 0, 0);
5663
- border-bottom-color: rgba(0, 0, 0, 0.05);
5663
+ border-bottom-color: rgba(0, 0, 0, 0.075);
5664
5664
  top: -11px;
5665
5665
  }
5666
5666
  .popover.bottom > .arrow:after {
@@ -5676,7 +5676,7 @@ button.close {
5676
5676
  margin-top: -11px;
5677
5677
  border-right-width: 0;
5678
5678
  border-left-color: rgba(0, 0, 0, 0);
5679
- border-left-color: rgba(0, 0, 0, 0.05);
5679
+ border-left-color: rgba(0, 0, 0, 0.075);
5680
5680
  }
5681
5681
  .popover.left > .arrow:after {
5682
5682
  content: " ";
@@ -6280,7 +6280,8 @@ body {
6280
6280
  p {
6281
6281
  margin: 0 0 1em;
6282
6282
  }
6283
- input {
6283
+ input,
6284
+ button {
6284
6285
  -webkit-font-smoothing: antialiased;
6285
6286
  letter-spacing: .1px;
6286
6287
  text-rendering: optimizeLegibility;
@@ -6290,13 +6291,14 @@ a {
6290
6291
  -o-transition: all 0.2s;
6291
6292
  transition: all 0.2s;
6292
6293
  }
6294
+ textarea,
6295
+ textarea.form-control,
6293
6296
  input[type=text],
6294
6297
  input[type=password],
6295
6298
  input[type=email],
6296
- textarea,
6299
+ input[type=number],
6297
6300
  [type=text].form-control,
6298
- [type=password].form-control,
6299
- textarea.form-control {
6301
+ [type=password].form-control {
6300
6302
  padding: 0;
6301
6303
  border: none;
6302
6304
  border-radius: 0;
@@ -6304,30 +6306,33 @@ textarea.form-control {
6304
6306
  box-shadow: inset 0 -1px 0 #dddddd;
6305
6307
  font-size: 16px;
6306
6308
  }
6309
+ textarea:focus,
6310
+ textarea.form-control:focus,
6307
6311
  input[type=text]:focus,
6308
6312
  input[type=password]:focus,
6309
6313
  input[type=email]:focus,
6310
- textarea:focus,
6314
+ input[type=number]:focus,
6311
6315
  [type=text].form-control:focus,
6312
- [type=password].form-control:focus,
6313
- textarea.form-control:focus {
6316
+ [type=password].form-control:focus {
6314
6317
  -webkit-box-shadow: inset 0 -2px 0 #2196f3;
6315
6318
  box-shadow: inset 0 -2px 0 #2196f3;
6316
6319
  }
6320
+ textarea[disabled],
6321
+ textarea.form-control[disabled],
6317
6322
  input[type=text][disabled],
6318
6323
  input[type=password][disabled],
6319
6324
  input[type=email][disabled],
6320
- textarea[disabled],
6325
+ input[type=number][disabled],
6321
6326
  [type=text].form-control[disabled],
6322
6327
  [type=password].form-control[disabled],
6323
- textarea.form-control[disabled],
6328
+ textarea[readonly],
6329
+ textarea.form-control[readonly],
6324
6330
  input[type=text][readonly],
6325
6331
  input[type=password][readonly],
6326
6332
  input[type=email][readonly],
6327
- textarea[readonly],
6333
+ input[type=number][readonly],
6328
6334
  [type=text].form-control[readonly],
6329
- [type=password].form-control[readonly],
6330
- textarea.form-control[readonly] {
6335
+ [type=password].form-control[readonly] {
6331
6336
  -webkit-box-shadow: none;
6332
6337
  box-shadow: none;
6333
6338
  border-bottom: 1px dotted #ddd;
@@ -6384,11 +6389,18 @@ select.form-control {
6384
6389
  }
6385
6390
  .nav-tabs > li.active > a:hover {
6386
6391
  border: none;
6392
+ color: #2196f3;
6387
6393
  }
6388
6394
  .nav-tabs > li.disabled > a {
6389
6395
  -webkit-box-shadow: inset 0 -1px 0 #dddddd;
6390
6396
  box-shadow: inset 0 -1px 0 #dddddd;
6391
6397
  }
6398
+ .nav-tabs.nav-justified > li > a,
6399
+ .nav-tabs.nav-justified > li > a:hover,
6400
+ .nav-tabs.nav-justified > .active > a,
6401
+ .nav-tabs.nav-justified > .active > a:hover {
6402
+ border: none;
6403
+ }
6392
6404
  .nav-tabs .dropdown-menu {
6393
6405
  margin-top: 0;
6394
6406
  }
@@ -6413,7 +6425,7 @@ select.form-control {
6413
6425
  .alert-danger {
6414
6426
  background-color: #e51c23;
6415
6427
  }
6416
- .alert a,
6428
+ .alert a:not(.close),
6417
6429
  .alert .alert-link {
6418
6430
  color: #fff;
6419
6431
  font-weight: bold;
@@ -6465,6 +6477,7 @@ select.form-control {
6465
6477
  .close {
6466
6478
  font-size: 34px;
6467
6479
  font-weight: 300;
6480
+ line-height: 24px;
6468
6481
  opacity: 0.6;
6469
6482
  }
6470
6483
  .close:hover {
@@ -891,7 +891,7 @@ html {
891
891
  body {
892
892
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
893
893
  font-size: 15px;
894
- line-height: 1.42857143;
894
+ line-height: 1.4;
895
895
  color: #222222;
896
896
  background-color: #ffffff;
897
897
  }
@@ -938,7 +938,7 @@ img {
938
938
  }
939
939
  .img-thumbnail {
940
940
  padding: 4px;
941
- line-height: 1.42857143;
941
+ line-height: 1.4;
942
942
  background-color: #ffffff;
943
943
  border: 1px solid #dddddd;
944
944
  border-radius: 0;
@@ -1243,7 +1243,7 @@ dl {
1243
1243
  }
1244
1244
  dt,
1245
1245
  dd {
1246
- line-height: 1.42857143;
1246
+ line-height: 1.4;
1247
1247
  }
1248
1248
  dt {
1249
1249
  font-weight: bold;
@@ -1290,7 +1290,7 @@ blockquote small,
1290
1290
  blockquote .small {
1291
1291
  display: block;
1292
1292
  font-size: 80%;
1293
- line-height: 1.42857143;
1293
+ line-height: 1.4;
1294
1294
  color: #6f6f6f;
1295
1295
  }
1296
1296
  blockquote footer:before,
@@ -1329,7 +1329,7 @@ blockquote:after {
1329
1329
  address {
1330
1330
  margin-bottom: 21px;
1331
1331
  font-style: normal;
1332
- line-height: 1.42857143;
1332
+ line-height: 1.4;
1333
1333
  }
1334
1334
  code,
1335
1335
  kbd,
@@ -1362,7 +1362,7 @@ pre {
1362
1362
  padding: 10px;
1363
1363
  margin: 0 0 10.5px;
1364
1364
  font-size: 14px;
1365
- line-height: 1.42857143;
1365
+ line-height: 1.4;
1366
1366
  word-break: break-all;
1367
1367
  word-wrap: break-word;
1368
1368
  color: #333333;
@@ -2067,7 +2067,7 @@ th {
2067
2067
  .table > tbody > tr > td,
2068
2068
  .table > tfoot > tr > td {
2069
2069
  padding: 8px;
2070
- line-height: 1.42857143;
2070
+ line-height: 1.4;
2071
2071
  vertical-align: top;
2072
2072
  border-top: 1px solid #dddddd;
2073
2073
  }
@@ -2337,18 +2337,18 @@ input[type="checkbox"]:focus {
2337
2337
  }
2338
2338
  output {
2339
2339
  display: block;
2340
- padding-top: 15px;
2340
+ padding-top: 9px;
2341
2341
  font-size: 15px;
2342
- line-height: 1.42857143;
2342
+ line-height: 1.4;
2343
2343
  color: #6f6f6f;
2344
2344
  }
2345
2345
  .form-control {
2346
2346
  display: block;
2347
2347
  width: 100%;
2348
- height: 51px;
2349
- padding: 14px 18px;
2348
+ height: 39px;
2349
+ padding: 8px 12px;
2350
2350
  font-size: 15px;
2351
- line-height: 1.42857143;
2351
+ line-height: 1.4;
2352
2352
  color: #6f6f6f;
2353
2353
  background-color: #ffffff;
2354
2354
  background-image: none;
@@ -2393,8 +2393,8 @@ input[type="date"],
2393
2393
  input[type="time"],
2394
2394
  input[type="datetime-local"],
2395
2395
  input[type="month"] {
2396
- line-height: 51px;
2397
- line-height: 1.42857143 \0;
2396
+ line-height: 39px;
2397
+ line-height: 1.4 \0;
2398
2398
  }
2399
2399
  input[type="date"].input-sm,
2400
2400
  input[type="time"].input-sm,
@@ -2473,8 +2473,8 @@ fieldset[disabled] .checkbox label {
2473
2473
  cursor: not-allowed;
2474
2474
  }
2475
2475
  .form-control-static {
2476
- padding-top: 15px;
2477
- padding-bottom: 15px;
2476
+ padding-top: 9px;
2477
+ padding-bottom: 9px;
2478
2478
  margin-bottom: 0;
2479
2479
  }
2480
2480
  .form-control-static.input-lg,
@@ -2518,7 +2518,7 @@ select[multiple].input-lg {
2518
2518
  position: relative;
2519
2519
  }
2520
2520
  .has-feedback .form-control {
2521
- padding-right: 63.75px;
2521
+ padding-right: 48.75px;
2522
2522
  }
2523
2523
  .form-control-feedback {
2524
2524
  position: absolute;
@@ -2526,9 +2526,9 @@ select[multiple].input-lg {
2526
2526
  right: 0;
2527
2527
  z-index: 2;
2528
2528
  display: block;
2529
- width: 51px;
2530
- height: 51px;
2531
- line-height: 51px;
2529
+ width: 39px;
2530
+ height: 39px;
2531
+ line-height: 39px;
2532
2532
  text-align: center;
2533
2533
  }
2534
2534
  .input-lg + .form-control-feedback {
@@ -2681,11 +2681,11 @@ select[multiple].input-lg {
2681
2681
  .form-horizontal .checkbox-inline {
2682
2682
  margin-top: 0;
2683
2683
  margin-bottom: 0;
2684
- padding-top: 15px;
2684
+ padding-top: 9px;
2685
2685
  }
2686
2686
  .form-horizontal .radio,
2687
2687
  .form-horizontal .checkbox {
2688
- min-height: 36px;
2688
+ min-height: 30px;
2689
2689
  }
2690
2690
  .form-horizontal .form-group {
2691
2691
  margin-left: -15px;
@@ -2695,7 +2695,7 @@ select[multiple].input-lg {
2695
2695
  .form-horizontal .control-label {
2696
2696
  text-align: right;
2697
2697
  margin-bottom: 0;
2698
- padding-top: 15px;
2698
+ padding-top: 9px;
2699
2699
  }
2700
2700
  }
2701
2701
  .form-horizontal .has-feedback .form-control-feedback {
@@ -2722,9 +2722,9 @@ select[multiple].input-lg {
2722
2722
  background-image: none;
2723
2723
  border: 1px solid transparent;
2724
2724
  white-space: nowrap;
2725
- padding: 14px 18px;
2725
+ padding: 8px 12px;
2726
2726
  font-size: 15px;
2727
- line-height: 1.42857143;
2727
+ line-height: 1.4;
2728
2728
  border-radius: 0;
2729
2729
  -webkit-user-select: none;
2730
2730
  -moz-user-select: none;
@@ -3153,7 +3153,7 @@ tbody.collapse.in {
3153
3153
  padding: 3px 20px;
3154
3154
  clear: both;
3155
3155
  font-weight: normal;
3156
- line-height: 1.42857143;
3156
+ line-height: 1.4;
3157
3157
  color: #555555;
3158
3158
  white-space: nowrap;
3159
3159
  }
@@ -3202,7 +3202,7 @@ tbody.collapse.in {
3202
3202
  display: block;
3203
3203
  padding: 3px 20px;
3204
3204
  font-size: 12px;
3205
- line-height: 1.42857143;
3205
+ line-height: 1.4;
3206
3206
  color: #999999;
3207
3207
  white-space: nowrap;
3208
3208
  }
@@ -3491,7 +3491,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
3491
3491
  vertical-align: middle;
3492
3492
  }
3493
3493
  .input-group-addon {
3494
- padding: 14px 18px;
3494
+ padding: 8px 12px;
3495
3495
  font-size: 15px;
3496
3496
  font-weight: normal;
3497
3497
  line-height: 1;
@@ -3618,7 +3618,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
3618
3618
  }
3619
3619
  .nav-tabs > li > a {
3620
3620
  margin-right: 2px;
3621
- line-height: 1.42857143;
3621
+ line-height: 1.4;
3622
3622
  border: 1px solid transparent;
3623
3623
  border-radius: 0 0 0 0;
3624
3624
  }
@@ -3973,8 +3973,8 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
3973
3973
  border-bottom: 1px solid transparent;
3974
3974
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
3975
3975
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
3976
- margin-top: -3px;
3977
- margin-bottom: -3px;
3976
+ margin-top: 3px;
3977
+ margin-bottom: 3px;
3978
3978
  }
3979
3979
  @media (min-width: 768px) {
3980
3980
  .navbar-form .form-group {
@@ -4053,8 +4053,8 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
4053
4053
  border-bottom-left-radius: 0;
4054
4054
  }
4055
4055
  .navbar-btn {
4056
- margin-top: -3px;
4057
- margin-bottom: -3px;
4056
+ margin-top: 3px;
4057
+ margin-bottom: 3px;
4058
4058
  }
4059
4059
  .navbar-btn.btn-sm {
4060
4060
  margin-top: 4.5px;
@@ -4307,8 +4307,8 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
4307
4307
  .pagination > li > span {
4308
4308
  position: relative;
4309
4309
  float: left;
4310
- padding: 14px 18px;
4311
- line-height: 1.42857143;
4310
+ padding: 8px 12px;
4311
+ line-height: 1.4;
4312
4312
  text-decoration: none;
4313
4313
  color: #008cba;
4314
4314
  background-color: transparent;
@@ -4573,7 +4573,7 @@ a.list-group-item.active > .badge,
4573
4573
  display: block;
4574
4574
  padding: 4px;
4575
4575
  margin-bottom: 21px;
4576
- line-height: 1.42857143;
4576
+ line-height: 1.4;
4577
4577
  background-color: #ffffff;
4578
4578
  border: 1px solid #dddddd;
4579
4579
  border-radius: 0;
@@ -5416,14 +5416,14 @@ button.close {
5416
5416
  .modal-header {
5417
5417
  padding: 15px;
5418
5418
  border-bottom: 1px solid #e5e5e5;
5419
- min-height: 16.42857143px;
5419
+ min-height: 16.4px;
5420
5420
  }
5421
5421
  .modal-header .close {
5422
5422
  margin-top: -2px;
5423
5423
  }
5424
5424
  .modal-title {
5425
5425
  margin: 0;
5426
- line-height: 1.42857143;
5426
+ line-height: 1.4;
5427
5427
  }
5428
5428
  .modal-body {
5429
5429
  position: relative;
@@ -6233,7 +6233,7 @@ button.close {
6233
6233
  background-color: #006687;
6234
6234
  }
6235
6235
  .btn {
6236
- padding: 14px 18px;
6236
+ padding: 8px 12px;
6237
6237
  }
6238
6238
  .btn-lg {
6239
6239
  padding: 16px 20px;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootswatch_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0.22
4
+ version: 3.2.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-26 00:00:00.000000000 Z
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -123,6 +123,10 @@ files:
123
123
  - lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
124
124
  - lib/generators/bootswatch_rails/sorcery/sorcery_generator.rb
125
125
  - lib/generators/bootswatch_rails/sorcery/templates/_form.html.erb
126
+ - lib/generators/bootswatch_rails/sorcery/templates/ability_migration.rb
127
+ - lib/generators/bootswatch_rails/sorcery/templates/ability_model.rb
128
+ - lib/generators/bootswatch_rails/sorcery/templates/assignment_migration.rb
129
+ - lib/generators/bootswatch_rails/sorcery/templates/assignment_model.rb
126
130
  - lib/generators/bootswatch_rails/sorcery/templates/change.html.erb
127
131
  - lib/generators/bootswatch_rails/sorcery/templates/edit.html.erb
128
132
  - lib/generators/bootswatch_rails/sorcery/templates/index.html.erb
@@ -130,7 +134,11 @@ files:
130
134
  - lib/generators/bootswatch_rails/sorcery/templates/log_in.html.erb
131
135
  - lib/generators/bootswatch_rails/sorcery/templates/new.html.erb
132
136
  - lib/generators/bootswatch_rails/sorcery/templates/password.html.erb
137
+ - lib/generators/bootswatch_rails/sorcery/templates/picture_uploader.rb
133
138
  - lib/generators/bootswatch_rails/sorcery/templates/reset_password_email.html.erb
139
+ - lib/generators/bootswatch_rails/sorcery/templates/role_migration.rb
140
+ - lib/generators/bootswatch_rails/sorcery/templates/role_model.rb
141
+ - lib/generators/bootswatch_rails/sorcery/templates/roles_controller.rb
134
142
  - lib/generators/bootswatch_rails/sorcery/templates/show.html.erb
135
143
  - lib/generators/bootswatch_rails/sorcery/templates/sorcery.de.yml
136
144
  - lib/generators/bootswatch_rails/sorcery/templates/user_mailer.rb
@@ -185,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
193
  version: '0'
186
194
  requirements: []
187
195
  rubyforge_project:
188
- rubygems_version: 2.4.1
196
+ rubygems_version: 2.4.2
189
197
  signing_key:
190
198
  specification_version: 4
191
199
  summary: Add bootswatch.com themes to the Rails asset pipeline