credere 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.markdown +361 -0
  4. data/Rakefile +11 -0
  5. data/app/assets/javascripts/credere/application.js +16 -0
  6. data/app/assets/javascripts/credere/reports.js +5 -0
  7. data/app/assets/stylesheets/bootstrap-theme.min.css +5 -0
  8. data/app/assets/stylesheets/bootstrap.min.css +5 -0
  9. data/app/assets/stylesheets/credere/application.css +19 -0
  10. data/app/controllers/credere/accounts_controller.rb +30 -0
  11. data/app/controllers/credere/application_controller.rb +4 -0
  12. data/app/controllers/credere/entries_controller.rb +34 -0
  13. data/app/controllers/credere/reports_controller.rb +40 -0
  14. data/app/models/credere/account.rb +170 -0
  15. data/app/models/credere/amount.rb +22 -0
  16. data/app/models/credere/amounts_extension.rb +42 -0
  17. data/app/models/credere/asset.rb +56 -0
  18. data/app/models/credere/credit_amount.rb +10 -0
  19. data/app/models/credere/debit_amount.rb +10 -0
  20. data/app/models/credere/entry.rb +77 -0
  21. data/app/models/credere/equity.rb +56 -0
  22. data/app/models/credere/expense.rb +56 -0
  23. data/app/models/credere/liability.rb +56 -0
  24. data/app/models/credere/no_tenancy.rb +9 -0
  25. data/app/models/credere/revenue.rb +56 -0
  26. data/app/models/credere/tenancy.rb +15 -0
  27. data/app/views/credere/accounts/index.html.erb +26 -0
  28. data/app/views/credere/entries/index.html.erb +59 -0
  29. data/app/views/credere/reports/_account.html.erb +28 -0
  30. data/app/views/credere/reports/balance_sheet.html.erb +21 -0
  31. data/app/views/credere/reports/income_statement.html.erb +24 -0
  32. data/app/views/layouts/credere/_messages.html.erb +9 -0
  33. data/app/views/layouts/credere/_navigation.html.erb +19 -0
  34. data/app/views/layouts/credere/_navigation_links.html.erb +5 -0
  35. data/app/views/layouts/credere/application.html.erb +19 -0
  36. data/config/backtrace_silencers.rb +7 -0
  37. data/config/database.yml +5 -0
  38. data/config/inflections.rb +10 -0
  39. data/config/mime_types.rb +5 -0
  40. data/config/routes.rb +9 -0
  41. data/config/secret_token.rb +7 -0
  42. data/config/session_store.rb +8 -0
  43. data/lib/credere/version.rb +3 -0
  44. data/lib/credere.rb +23 -0
  45. data/lib/generators/credere/USAGE +22 -0
  46. data/lib/generators/credere/add_date_upgrade_generator.rb +11 -0
  47. data/lib/generators/credere/base_generator.rb +19 -0
  48. data/lib/generators/credere/credere_generator.rb +12 -0
  49. data/lib/generators/credere/templates/add_date_migration.rb +6 -0
  50. data/lib/generators/credere/templates/migration.rb +39 -0
  51. data/lib/generators/credere/templates/tenant_migration.rb +6 -0
  52. data/lib/generators/credere/templates/update_migration.rb +17 -0
  53. data/lib/generators/credere/tenancy_generator.rb +12 -0
  54. data/lib/generators/credere/upgrade_credere_generator.rb +12 -0
  55. data/spec/controllers/accounts_controller_spec.rb +19 -0
  56. data/spec/controllers/entries_controller_spec.rb +19 -0
  57. data/spec/controllers/reports_controller_spec.rb +24 -0
  58. data/spec/factories/account_factory.rb +35 -0
  59. data/spec/factories/amount_factory.rb +19 -0
  60. data/spec/factories/entry_factory.rb +11 -0
  61. data/spec/lib/credere_spec.rb +0 -0
  62. data/spec/models/account_spec.rb +133 -0
  63. data/spec/models/amount_spec.rb +8 -0
  64. data/spec/models/asset_spec.rb +7 -0
  65. data/spec/models/credit_amount_spec.rb +7 -0
  66. data/spec/models/debit_amount_spec.rb +7 -0
  67. data/spec/models/entry_spec.rb +170 -0
  68. data/spec/models/equity_spec.rb +7 -0
  69. data/spec/models/expense_spec.rb +7 -0
  70. data/spec/models/liability_spec.rb +7 -0
  71. data/spec/models/revenue_spec.rb +7 -0
  72. data/spec/models/tenancy_spec.rb +45 -0
  73. data/spec/rcov.opts +2 -0
  74. data/spec/routing/accounts_routing_spec.rb +13 -0
  75. data/spec/routing/entries_routing_spec.rb +13 -0
  76. data/spec/spec.opts +4 -0
  77. data/spec/spec_helper.rb +23 -0
  78. data/spec/support/account_shared_examples.rb +60 -0
  79. data/spec/support/active_support_helpers.rb +13 -0
  80. data/spec/support/amount_shared_examples.rb +21 -0
  81. data/spec/support/factory_girl_helpers.rb +8 -0
  82. metadata +197 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8dc97b9ba3d1567dd4b218cab8bc15c08b7795c387e0ef79c8b7fa67eddd539f
4
+ data.tar.gz: e3dc71788fceebfb57cbd01d2e299b01066ba7bdd11814df12676dff9bfaf00e
5
+ SHA512:
6
+ metadata.gz: c7e1b0abe0122097310728eab355d0575e7afbb82fb411ee682312d43f95253d20d551a4952be61bdfd7b3ba0b3bd77700f50dfb7443e67c0a8a531a1dd32564
7
+ data.tar.gz: cc9203e87cad1fb48cec91ab8ee21adbb5e2beeef5f2aa2ba02aed2f0cea36165709619b92650c62de64ba7c43c4b717541b0062934150e53b2b4d9688e32f0d
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Eric Roberts
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.markdown ADDED
@@ -0,0 +1,361 @@
1
+ credere
2
+ =================
3
+ <!-- [![Build Status](https://travis-ci.org/legalshield/credere.svg?branch=master)](https://travis-ci.org/legalshield/credere) [![Coverage Status](https://coveralls.io/repos/github/legalshield/credere/badge.svg?branch=master)](https://coveralls.io/github/legalshield/credere?branch=master) -->
4
+
5
+ The credere plugin is a Ruby on Rails Engine which provides a double entry accounting system for your application.
6
+
7
+ Compatibility
8
+ =============
9
+
10
+ * Ruby versions: MRI 2.2.2+ (should work with earlier versions if using Rails 4)
11
+ * Rails versions: ~> 5.0, ~> 4.0
12
+
13
+ For earlier versions, and upgrading, please see the section titled [Previous Versions](https://github.com/legalshield/credere#previous-versions)
14
+
15
+ Installation
16
+ ============
17
+
18
+ - Add the gem to your Gemfile `gem "credere"`
19
+
20
+ - generate migration files `rails g credere`
21
+
22
+ - run migrations `rake db:migrate`
23
+
24
+ Overview
25
+ ========
26
+
27
+ The Credere plugin provides a complete double entry accounting system for use in any Ruby on Rails application. The plugin follows general [Double Entry Bookkeeping](http://en.wikipedia.org/wiki/Double-entry_bookkeeping_system) practices. All calculations are done using [BigDecimal](http://www.ruby-doc.org/stdlib-2.1.0/libdoc/bigdecimal/rdoc/BigDecimal.html) in order to prevent floating point rounding errors. The plugin requires a decimal type on your database as well.
28
+
29
+ Credere consists of tables that maintain your accounts, entries and debits and credits. Each entry can have many debits and credits. The entry table, which records your business transactions is, essentially, your accounting [Journal](http://en.wikipedia.org/wiki/Journal_entry).
30
+
31
+ Posting to a [Ledger](http://en.wikipedia.org/wiki/General_ledger) can be considered to happen automatically, since Accounts have the reverse `has_many` relationship to either its credit or debit entries.
32
+
33
+ Accounts
34
+ --------
35
+
36
+ The Credere::Account class represents accounts in the system. The Account table uses single table inheritance to store information on each type of account (Asset, Liability, Equity, Revenue, Expense). Each account must be sub-classed as one of the following types:
37
+
38
+ TYPE | NORMAL BALANCE | DESCRIPTION
39
+ --------------------------------------------------------------------------
40
+ Asset | Debit | Resources owned by the Business Entity
41
+ Liability | Credit | Debts owed to outsiders
42
+ Equity | Credit | Owners rights to the Assets
43
+ Revenue | Credit | Increases in owners equity
44
+ Expense | Debit | Assets or services consumed in the generation of revenue
45
+
46
+ Your Book of Accounts needs to be created prior to recording any entries. The simplest method is to have a number of `create` methods in your db/seeds.rb file like so:
47
+
48
+ ```ruby
49
+ Credere::Asset.create(:name => "Accounts Receivable")
50
+ Credere::Asset.create(:name => "Cash")
51
+ Credere::Revenue.create(:name => "Sales Revenue")
52
+ Credere::Liability.create(:name => "Unearned Revenue")
53
+ Credere::Liability.create(:name => "Sales Tax Payable")
54
+ ```
55
+
56
+ Then simply run `rake db:seed`
57
+
58
+ Each account can also be marked as a "Contra Account". A contra account will have its normal balance swapped. For example, to remove equity, a "Drawing" account may be created as a contra equity account as follows:
59
+
60
+ ```ruby
61
+ Credere::Equity.create(:name => "Drawing", :contra => true)
62
+ ```
63
+
64
+ At all times the balance of all accounts should conform to the [Accounting
65
+ Equation](http://en.wikipedia.org/wiki/Accounting_equation)
66
+
67
+ Assets = Liabilities + Owner's Equity
68
+
69
+ Every account object has a `has_many` association of credit and debit entries, which means that each account object also acts as its own [Ledger](http://en.wikipedia.org/wiki/General_ledger), and exposes a method to calculate the balance of the account.
70
+
71
+ See the `Credere::Account`, `Credere::Entry`, and `Credere::Amount` classes for more information.
72
+
73
+ Examples
74
+ ========
75
+
76
+ Recording an Entry
77
+ ------------------
78
+
79
+ Let's assume we're accounting on an [Accrual basis](http://en.wikipedia.org/wiki/Accounting_methods#Accrual_basis). We've just taken a customer's order for some widgets, which we've also billed him for. At this point we've actually added a liability to the company until we deliver the goods. To record this entry we'd need two accounts:
80
+
81
+ ```ruby
82
+ >> Credere::Asset.create(:name => "Cash")
83
+ >> Credere::Liability.create(:name => "Unearned Revenue")
84
+ ```
85
+
86
+ Next we'll build the entry we want to record. credere uses ActiveRecord conventions to build the transaction and its associated amounts.
87
+
88
+ ```ruby
89
+ entry = Credere::Entry.new(
90
+ :description => "Order placed for widgets",
91
+ :date => Date.yesterday,
92
+ :debits => [
93
+ {:account_name => "Cash", :amount => 100.00}],
94
+ :credits => [
95
+ {:account_name => "Unearned Revenue", :amount => 100.00}])
96
+ ```
97
+
98
+ Entries must specify a description, as well as at least one credit and debit amount. Specifying the date is optional; by default, the current date will be assigned to the entry before the record is saved. `debits` and `credits` must specify an array of hashes, with an amount value as well as an account, either by providing a `Credere::Account` to `account` or by passing in an `account_name` string.
99
+
100
+ Finally, save the entry.
101
+
102
+ ```ruby
103
+ >> entry.save
104
+ ```
105
+
106
+ If there are any issues with your credit and debit amounts, the save will fail and return false. You can inspect the errors via `entry.errors`. Because we are doing double-entry accounting, the sum total of your credit and debit amounts must always cancel out to keep the accounts in balance.
107
+
108
+ Recording an Entry with multiple accounts
109
+ -----------------------------------------
110
+
111
+ Often times a single entry requires more than one type of account. A classic example would be a entry in which a tax is charged. We'll assume that we have not yet received payment for the order, so we'll need an "Accounts Receivable" Asset:
112
+
113
+ ```ruby
114
+ >> Credere::Asset.create(:name => "Accounts Receivable")
115
+ >> Credere::Revenue.create(:name => "Sales Revenue")
116
+ >> Credere::Liability.create(:name => "Sales Tax Payable")
117
+ ```
118
+
119
+ And here's the entry:
120
+
121
+ ```ruby
122
+ entry = Credere::Entry.build(
123
+ :description => "Sold some widgets",
124
+ :debits => [
125
+ {:account_name => "Accounts Receivable", :amount => 50}],
126
+ :credits => [
127
+ {:account_name => "Sales Revenue", :amount => 45},
128
+ {:account_name => "Sales Tax Payable", :amount => 5}])
129
+ entry.save
130
+ ```
131
+
132
+ Associating Documents
133
+ ---------------------
134
+
135
+ Although Credere does not provide a mechanism for generating invoices or orders, it is possible to associate any such commercial document with a given entry.
136
+
137
+ Suppose we pull up our latest invoice in order to generate a entry for Credere (we'll assume you already have an Invoice model):
138
+
139
+ ```ruby
140
+ >> invoice = Invoice.last
141
+ ```
142
+
143
+ Let's assume we're using the same entry from the last example
144
+
145
+ ```ruby
146
+ entry = Credere::Entry.new(
147
+ :description => "Sold some widgets",
148
+ :commercial_document => invoice,
149
+ :debits => [
150
+ {:account_name => "Accounts Receivable", :amount => invoice.total_amount}],
151
+ :credits => [
152
+ {:account_name => "Sales Revenue", :amount => invoice.sales_amount},
153
+ {:account_name => "Sales Tax Payable", :amount => invoice.tax_amount}])
154
+ entry.save
155
+ ```
156
+
157
+ The commercial document attribute on the entry is a polymorphic association allowing you to associate any record from your models with a entry (i.e. Bills, Invoices, Receipts, Returns, etc.)
158
+
159
+ Checking the Balance of an Individual Account
160
+ ----------------------------------------------
161
+
162
+ Each account can report on its own balance. This number should normally be positive. If the number is negative, you may have a problem.
163
+
164
+ ```ruby
165
+ >> cash = Credere::Asset.find_by_name("Cash")
166
+ >> cash.balance
167
+ => #<BigDecimal:103259bb8,'0.2E4',4(12)>
168
+ ```
169
+
170
+ The balance can also be calculated within a specified date range. Dates can be strings in the format of "yyyy-mm-dd" or Ruby Date objects.
171
+
172
+ ```ruby
173
+ >> cash = Credere::Asset.find_by_name("Cash")
174
+ >> cash.balance(:from_date => "2014-01-01", :to_date => Date.today)
175
+ => #<BigDecimal:103259bb8,'0.2E4',4(12)>
176
+ ```
177
+
178
+ Checking the Balance of an Account Type
179
+ ---------------------------------------
180
+
181
+ Each subclass of accounts can report on the total balance of all the accounts of that type. This number should normally be positive. If the number is negative, you may have a problem.
182
+
183
+ ```ruby
184
+ >> Credere::Asset.balance
185
+ => #<BigDecimal:103259bb8,'0.2E4',4(12)>
186
+ ```
187
+
188
+ Again, a date range can be given
189
+
190
+ ```ruby
191
+ >> Credere::Asset.balance(:from_date => "2014-01-01", :to_date => Date.today)
192
+ => #<BigDecimal:103259bb8,'0.2E4',4(12)>
193
+ ```
194
+
195
+ Calculating the Trial Balance
196
+ -----------------------------
197
+
198
+ The [Trial Balance](http://en.wikipedia.org/wiki/Trial_balance) for all accounts on the system can be found through the abstract Account class. This value should be 0 unless there is an error in the system.
199
+
200
+ ```ruby
201
+ >> Credere::Account.trial_balance
202
+ => #<BigDecimal:1031c0d28,'0.0',4(12)>
203
+ ```
204
+
205
+ Contra Accounts and Complex Entries
206
+ -----------------------------------
207
+
208
+ For complex entries, you should always ensure that you are balancing your accounts via the [Accounting Equation](http://en.wikipedia.org/wiki/Accounting_equation).
209
+
210
+ Assets = Liabilities + Owner's Equity
211
+
212
+ For example, let's assume the owner of a business wants to withdraw cash. First we'll assume that we have an asset account for "Cash" which the funds will be drawn from. We'll then need an Equity account to record where the funds are going, however, in this case, we can't simply create a regular Equity account. The "Cash" account must be credited for the decrease in its balance since it's an Asset. Likewise, Equity accounts are typically credited when there is an increase in their balance. Equity is considered an owner's rights to Assets in the business. In this case however, we are not simply increasing the owner's rights to assets within the business; we are actually removing capital from the business altogether. Hence both sides of our accounting equation will see a decrease. In order to accomplish this, we need to create a Contra-Equity account we'll call "Drawings". Since Equity accounts normally have credit balances, a Contra-Equity account will have a debit balance, which is what we need for our entry.
213
+
214
+ ```ruby
215
+ >> Credere::Equity.create(:name => "Drawing", :contra => true)
216
+ >> Credere::Asset.create(:name => "Cash")
217
+ ```
218
+
219
+ We would then create the following entry:
220
+
221
+ ```ruby
222
+ entry = Credere::Entry.new(
223
+ :description => "Owner withdrawing cash",
224
+ :debits => [
225
+ {:account_name => "Drawing", :amount => 1000}],
226
+ :credits => [
227
+ {:account_name => "Cash", :amount => 1000}])
228
+ entry.save
229
+ ```
230
+
231
+ To make the example clearer, imagine instead that the owner decides to invest his money into the business in exchange for some type of equity security. In this case we might have the following accounts:
232
+
233
+ ```ruby
234
+ >> Credere::Equity.create(:name => "Common Stock")
235
+ >> Credere::Asset.create(:name => "Cash")
236
+ ```
237
+
238
+ And out entry would be:
239
+
240
+ ```ruby
241
+ entry = Credere::Entry.new(
242
+ :description => "Owner investing cash",
243
+ :debits => [
244
+ {:account_name => "Cash", :amount => 1000}],
245
+ :credits => [
246
+ {:account_name => "Common Stock", :amount => 1000}])
247
+ entry.save
248
+ ```
249
+
250
+ In this case, we've increase our cash Asset, and simultaneously increased the other side of our accounting equation in
251
+ Equity, keeping everything balanced.
252
+
253
+ Money & Currency Support
254
+ ========================
255
+
256
+ Credere aims to be agnostic about the values used for amounts. All fields are maintained as BigDecimal values, with `:precision => 20, :scale => 10`, which means that any currency can be safely stored in the tables.
257
+
258
+ Credere is also compatible with the [Money](https://github.com/RubyMoney/money) gem. With Money versions greater than 6.0, the `money.amount` will returns a BigDecimal which you can use with credere as follows:
259
+
260
+ ```ruby
261
+ entry = Credere::Entry.build(
262
+ :description => "Order placed for widgets",
263
+ :debits => [
264
+ {:account_name => "Cash", :amount => money.amount}],
265
+ :credits => [
266
+ {:account_name => "Unearned Revenue", :amount => money.amount}])
267
+ ```
268
+
269
+ Multitenancy Support
270
+ =====================
271
+
272
+ Credere supports multitenant applications. Multitenancy is acheived by associating all Accounts under `Credere::Account` with a "Tenant" object (typically some model in your Rails application). To add multi-tenancy support to credere, you must do the following:
273
+
274
+ - Generate the migration which will add `tenant_id` to the credere accounts table
275
+
276
+ ```sh
277
+ bundle exec rails g credere:tenancy
278
+ ```
279
+
280
+ - Run the migration
281
+
282
+ ```sh
283
+ rake db:migrate
284
+ ```
285
+
286
+ - Add an initializer to your Rails application, i.e. `config/initializers/credere.rb`
287
+
288
+ ```ruby
289
+ credere.config do |config|
290
+ config.enable_tenancy = true
291
+ config.tenant_class = 'Tenant'
292
+ end
293
+ ```
294
+ *NOTE: When building entries, be sure to specify the account directly, rather than use the `account_name` feature. Otherwise you'll probably end up with the wrong account.*
295
+
296
+ ```ruby
297
+ debit_account = Credere::Account.where(:name => "Cash", :tenant => my_tenant).last
298
+ credit_account = Credere::Account.where(:name => "Unearned Revenue", :tenant => my_tenant).last
299
+ entry = Credere::Entry.new(
300
+ :description => "Order placed for widgets",
301
+ :date => Date.yesterday,
302
+ :debits => [
303
+ {:account => debit_account, :amount => 100.00}],
304
+ :credits => [
305
+ {:account => credit_account, :amount => 100.00}])
306
+ ```
307
+
308
+ Reporting Views
309
+ ===============
310
+
311
+ The Engine provides controllers and views for rendering basic reports, including a Balance Sheet and Income Statement.
312
+
313
+ These views and controllers are read-only for reporting purposes. It is assumed entry creation will occur within your applications code.
314
+
315
+ Routing is supplied via an engine mount point. credere can be mounted on a subpath in your existing Rails 3 app by adding the following to your routes.rb:
316
+
317
+ ```ruby
318
+ mount Credere::Engine => "/credere", :as => "credere"
319
+ ```
320
+
321
+ *NOTE: The `Credere::ApplicationController` does not currently support authentication. If you enable routing, the views will be publicly available on your mount point. Authentication can be added by overriding the controller.*
322
+
323
+ <!-- *Future versions of Credere will allow for customization of authentication.* -->
324
+
325
+
326
+ Previous Versions
327
+ =================
328
+
329
+ <!-- For the rails 3 version, you can go here:
330
+
331
+ [https://github.com/legalshield/credere/tree/rails3](https://github.com/legalshield/credere/tree/rails3)
332
+
333
+ For the rails 2 version, you can go here:
334
+
335
+ [https://github.com/legalshield/credere/tree/rails2](https://github.com/legalshield/credere/tree/rails2)
336
+
337
+ * Gems in RubyGems.org >= 0.5.0 support Rails 3
338
+ * Gems in RubyGems.org >= 0.8.0 support Rails 4
339
+ * Gems in RubyGems.org >= 0.9.0 support Rails ~> 4.1 -->
340
+ * Gems in RubyGems.org >= 0.10.0 support Rails ~> 5.0
341
+
342
+ <!-- Upgrading from older versions
343
+ -----------------------------
344
+
345
+ As credere is still in alpha, there have been some breaking changes with previous versions.
346
+
347
+ If you are upgrading, please check the Wiki for guides on how to properly upgrade credere to deal with the changes:
348
+
349
+ [Upgrade Notes](https://github.com/legalshield/credere/wiki/Updrade-Notes) -->
350
+
351
+ Testing
352
+ =======
353
+
354
+ [Rspec](http://rspec.info/) tests are provided. Run `bundle install` then `rake`.
355
+
356
+
357
+ Attribution
358
+ ===========
359
+
360
+ This work is based mostly off the the Plutus gem and has been modified to remove the namespace issues around the Account model.
361
+ [https://github.com/mbulat/plutus](https://github.com/mbulat/plutus)
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'bundler/setup'
2
+
3
+ require 'rspec/core/rake_task'
4
+
5
+ desc "run specs"
6
+ RSpec::Core::RakeTask.new do |t|
7
+ t.rspec_opts = ["-c", "-f d", "-r ./spec/spec_helper.rb"]
8
+ t.pattern = 'spec/**/*_spec.rb'
9
+ end
10
+
11
+ task :default => :spec
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require jquery-ui/datepicker
16
+ //= require_tree .
@@ -0,0 +1,5 @@
1
+ jQuery(function() {
2
+ return $('.datepicker').datepicker({
3
+ dateFormat: "yy-mm-dd"
4
+ });
5
+ });
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Bootstrap v3.3.5 (http://getbootstrap.com)
3
+ * Copyright 2011-2015 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}