Skip to content
This repository has been archived by the owner on Jan 23, 2020. It is now read-only.

Commit

Permalink
Merge pull request #93 from asebastian/master
Browse files Browse the repository at this point in the history
Add specs + Various Fixes
  • Loading branch information
asebastian committed Jul 15, 2013
2 parents 6e57cab + 08b8831 commit 765b80f
Show file tree
Hide file tree
Showing 114 changed files with 1,732 additions and 493 deletions.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--color
12 changes: 9 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ gem 'rails', '3.2.12'
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

# bundle --without mysql if using sqlite
gem 'mysql2', "~> 0.3.11", :group => :mysql
gem 'mysql2', "~> 0.3.11", :group => :mysql

#Authentication Gems
gem 'devise'
Expand Down Expand Up @@ -50,7 +49,14 @@ gem 'thin', :group => :development

#testing
group :test, :development do
gem 'minitest-rails'
gem "rspec-rails"
gem "factory_girl_rails"
gem "capybara"
gem "poltergeist"
end

group :test do
gem "sinatra"
end

#debug
Expand Down
132 changes: 88 additions & 44 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,68 +29,89 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bcrypt-ruby (3.1.1)
bootstrap-sass (2.1.1.0)
bootstrap-will_paginate (0.0.9)
will_paginate
builder (3.0.4)
cancan (1.6.8)
chronic (0.6.7)
cancan (1.6.10)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
chronic (0.9.1)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.4.0)
coffee-script-source (1.6.3)
daemons (1.1.9)
devise (2.1.2)
devise (3.0.0)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
railties (>= 3.2.6, < 5)
warden (~> 1.2.3)
diff-lcs (1.2.4)
erubis (2.7.0)
eventmachine (1.0.0)
eventmachine (1.0.3)
execjs (1.4.0)
multi_json (~> 1.0)
font-awesome-sass-rails (2.0.0.0)
factory_girl (4.2.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.2.1)
factory_girl (~> 4.2.0)
railties (>= 3.0.0)
faye-websocket (0.4.7)
eventmachine (>= 0.12.0)
font-awesome-sass-rails (3.0.2.2)
railties (>= 3.1.1)
sass-rails (>= 3.1.1)
formtastic (2.2.1)
actionpack (>= 3.0)
haml (3.1.7)
haml-rails (0.3.5)
haml (4.0.3)
tilt
haml-rails (0.4)
actionpack (>= 3.1, < 4.1)
activesupport (>= 3.1, < 4.1)
haml (~> 3.1)
haml (>= 3.1, < 4.1)
railties (>= 3.1, < 4.1)
hike (1.2.1)
hike (1.2.3)
http_parser.rb (0.5.3)
i18n (0.6.4)
journey (1.0.4)
jquery-datatables-rails (1.11.1)
jquery-datatables-rails (1.11.2)
jquery-rails
jquery-rails (2.1.3)
railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
json (1.7.7)
kgio (2.7.4)
libv8 (3.3.10.4)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.0)
kgio (2.8.0)
libv8 (3.11.8.17)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.21)
minitest (4.3.3)
minitest-rails (0.3)
minitest (~> 4.0)
rails (~> 3.0)
multi_json (1.6.1)
mime-types (1.23)
mini_portile (0.5.1)
multi_json (1.7.7)
mysql2 (0.3.11)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
orm_adapter (0.4.0)
poltergeist (1.3.0)
capybara (~> 2.1.0)
faye-websocket (>= 0.4.4, < 0.5.0)
http_parser.rb (~> 0.5.3)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-protection (1.5.0)
rack
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
Expand All @@ -110,49 +131,68 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
raindrops (0.10.0)
rake (10.0.3)
raindrops (0.11.0)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
ref (1.0.5)
rest-client (1.6.7)
mime-types (>= 1.16)
rolify (3.1.0)
sass (3.2.1)
sass-rails (3.2.5)
rspec-core (2.14.3)
rspec-expectations (2.14.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.1)
rspec-rails (2.14.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
sass (3.2.9)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sinatra (1.4.3)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
therubyracer (0.10.2)
libv8 (~> 3.3.10)
thin (1.5.0)
sqlite3 (1.3.7)
therubyracer (0.11.4)
libv8 (~> 3.11.8.12)
ref
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.17.0)
tilt (1.3.5)
treetop (1.4.12)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.14)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (1.3.0)
uglifier (2.1.2)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
unicorn (4.4.0)
unicorn (4.6.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
warden (1.2.1)
warden (1.2.3)
rack (>= 1.0)
whenever (0.7.3)
whenever (0.8.3)
activesupport (>= 2.3.4)
chronic (~> 0.6.3)
will_paginate (3.0.3)
chronic (>= 0.6.3)
will_paginate (3.0.4)
xpath (2.0.0)
nokogiri (~> 1.3)

PLATFORMS
ruby
Expand All @@ -161,20 +201,24 @@ DEPENDENCIES
bootstrap-sass (= 2.1.1.0)
bootstrap-will_paginate
cancan
capybara
coffee-rails (~> 3.2.1)
devise
factory_girl_rails
font-awesome-sass-rails
formtastic
haml-rails
jquery-datatables-rails
jquery-rails
json
minitest-rails
mysql2 (~> 0.3.11)
poltergeist
rails (= 3.2.12)
rest-client
rolify (= 3.1)
rspec-rails
sass-rails (~> 3.2.3)
sinatra
sqlite3
therubyracer
thin
Expand Down
30 changes: 22 additions & 8 deletions app/assets/javascripts/clients.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,35 @@
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
$ ->
$('.subpopover').popover({'placement': 'bottom'})

$('td.moreinfo').click ->
$($(this).closest('tr').attr("rel")).modal("show")
$(this).closest('tr').attr("rel")
$.get "/clients/modal_data", { 'client_query': $(this).closest('tr').attr("rel") },
(data) ->
if data.code == 0
$('#client-data-modal').html(data['data'])
$('#client-data-modal').modal("show")
else
alert(data.msg)

$('a.delete-client').click ->
self = $(this)
if (confirm('Are you sure?'))
$.ajax $(this).attr("rel"),
type: 'DELETE'
success: (data) ->
$.post "/clients/delete_client", { 'key': $(this).attr('key') },
(data) ->
if data
$("#client_row_" + $(self).attr('key')).hide()
else
alert("Could not delete client")

use_environments = $("#use_environments").attr("rel")
if use_environments == "true"
aocolumns = [null, null, null, null, null, null, {bSortable: false}, {bSortable: false}]
else
aocolumns = [null, null, null, null, null, {bSortable: false}, {bSortable: false}]

dtable = $('#clients_table').dataTable
bAutoWidth: false
bSort: true
aoColumns: [null, null, null, null, null, null, {bSortable: false}, {bSortable: false}]
bPaginate: false
bAutoWidth: false
bSort: true
aoColumns: aocolumns
bPaginate: false
Loading

0 comments on commit 765b80f

Please sign in to comment.