Skip to content

Commit

Permalink
Switching to Konacha from Jasmine.
Browse files Browse the repository at this point in the history
Should help with #114.
Also better than jasmine.
  • Loading branch information
Hugo Corbucci committed Dec 19, 2014
1 parent 5f8a549 commit f34562d
Show file tree
Hide file tree
Showing 39 changed files with 201 additions and 135 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--color
--format progress
--drb
--require spec_helper
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

22 changes: 18 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#encoding: utf-8
source 'http://rubygems.org'
ruby '1.9.3'

def linux_only(require_as)
RbConfig::CONFIG['host_os'] =~ /linux/ ? require_as : false
end
# Mac OS X
def darwin_only(require_as)
RbConfig::CONFIG['host_os'] =~ /darwin/ ? require_as : false
end

gem 'rails', '3.2.21' # Issue #114 - 4.0.2 is target
gem 'activemodel', '3.2.21', require: 'active_model' # Remove once issue #114 is done as this is part of rails 4
Expand Down Expand Up @@ -69,8 +78,13 @@ group :development, :test do
gem 'rspec-collection_matchers'
gem 'guard-rspec'
gem 'pry-rails'
gem 'jasmine-jquery-rails', '1.5.6' # Requires jasmine 2 to upgrade but jasminerice doesnt support it
gem 'terminal-notifier-guard'
gem 'guard-jasmine', '1.19.2'
gem 'jasminerice', '0.0.10'
gem 'rb-fsevent', require: darwin_only('rb-fsevent')
gem 'terminal-notifier-guard', require: darwin_only('terminal-notifier-guard')
gem 'rb-inotify', require: linux_only('rb-inotify')
gem 'spring'
gem 'spring-commands-rspec'
gem 'konacha'
gem 'guard-konacha', git: 'https://github.com/lbeder/guard-konacha.git'
gem 'poltergeist', require: 'capybara/poltergeist'
gem 'selenium-webdriver'
end
65 changes: 52 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
GIT
remote: https://github.com/lbeder/guard-konacha.git
revision: 1485be6d093f675b6e633651c576f3a6879f912e
specs:
guard-konacha (1.0.5)
guard (>= 2)
konacha (>= 3.0)

GEM
remote: http://rubygems.org/
specs:
Expand Down Expand Up @@ -61,10 +69,17 @@ GEM
capistrano-rails (1.1.2)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capybara (2.4.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
celluloid (0.16.0)
timers (~> 4.0.0)
childprocess (0.5.5)
ffi (~> 1.0, >= 1.0.11)
cliver (0.3.2)
codeclimate-test-reporter (0.4.3)
simplecov (>= 0.7.1, < 1.0.0)
coderay (1.1.0)
Expand Down Expand Up @@ -126,12 +141,6 @@ GEM
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-compat (1.1.0)
guard-jasmine (1.19.2)
childprocess
guard (>= 2.0.0)
multi_json
thor
tilt
guard-rspec (4.5.0)
guard (~> 2.1)
guard-compat (~> 1.1)
Expand All @@ -150,17 +159,19 @@ GEM
has_scope (~> 0.6.0.rc)
railties (>= 3.2, < 4.2)
responders (~> 1.0)
jasmine-jquery-rails (1.5.6)
jasminerice (0.0.10)
coffee-rails
haml
journey (1.0.4)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.2.1)
railties (>= 3.2.16)
json (1.8.1)
konacha (3.3.0)
actionpack (>= 3.1, < 5)
capybara
colorize
railties (>= 3.1, < 5)
sprockets
launchy (2.4.3)
addressable (~> 2.3)
libv8 (3.16.14.7)
Expand All @@ -183,6 +194,7 @@ GEM
metaclass (0.0.4)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.1)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.10.1)
Expand All @@ -192,7 +204,14 @@ GEM
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
newrelic_rpm (3.9.8.273)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
orm_adapter (0.5.0)
poltergeist (1.5.1)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyglot (0.3.5)
pry (0.10.1)
coderay (~> 1.1.0)
Expand Down Expand Up @@ -256,6 +275,7 @@ GEM
rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
rubyzip (1.1.6)
sass (3.4.9)
sass-rails (3.2.6)
railties (~> 3.2.0)
Expand All @@ -264,6 +284,11 @@ GEM
seed-fu (2.3.3)
activerecord (>= 3.1, < 4.2)
activesupport (>= 3.1, < 4.2)
selenium-webdriver (2.44.0)
childprocess (~> 0.5)
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0)
shoulda-matchers (2.7.0)
activesupport (>= 3.0.0)
simplecov (0.9.1)
Expand All @@ -272,6 +297,9 @@ GEM
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.6.0)
spring (1.2.0)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (2.2.3)
hike (~> 1.2)
multi_json (~> 1.0)
Expand Down Expand Up @@ -308,8 +336,14 @@ GEM
activerecord
warden (1.2.3)
rack (>= 1.0)
websocket (1.2.1)
websocket-driver (0.5.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.1)
will_paginate (3.0.7)
xml-simple (1.1.4)
xpath (2.0.0)
nokogiri (~> 1.3)
yui-compressor (0.12.0)

PLATFORMS
Expand Down Expand Up @@ -340,29 +374,34 @@ DEPENDENCIES
foreman
formtastic (= 2.2.1)
goalie (= 0.0.4)
guard-jasmine (= 1.19.2)
guard-konacha!
guard-rspec
haml (= 4.0.6)
has_scope (= 0.6.0.rc)
inherited_resources (= 1.5.1)
jasmine-jquery-rails (= 1.5.6)
jasminerice (= 0.0.10)
jquery-rails (= 3.1.2)
jquery-ui-rails (= 4.2.1)
konacha
lol_dba
magic-localized_country_select (= 0.2.0)
mocha
mysql2 (= 0.3.17)
newrelic_rpm (= 3.9.8.273)
poltergeist
pry-rails
rails (= 3.2.21)
rb-fsevent
rb-inotify
rspec-collection_matchers
rspec-its
rspec-rails
sass-rails (= 3.2.6)
seed-fu (= 2.3.3)
selenium-webdriver
shoulda-matchers
simplecov
spring
spring-commands-rspec
sqlite3
state_machine (= 1.2.0)
strong_parameters (= 0.2.3)
Expand Down
14 changes: 9 additions & 5 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ guard :rspec, cmd: 'bundle exec rspec' do
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
end

guard :jasmine do
watch(%r{spec/javascripts/spec\.(js\.coffee|js|coffee)$}) { 'spec/javascripts' }
watch(%r{spec/javascripts/.+_spec\.(js\.coffee|js|coffee)$})
watch(%r{spec/javascripts/fixtures/.+$})
watch(%r{app/assets/javascripts/(.+?)\.(js\.coffee|js|coffee)(?:\.\w+)*$}) { |m| "spec/javascripts/#{ m[1] }_spec.#{ m[2] }" }
### Guard::Konacha
# available options:
# - :run_all_on_start, defaults to true
# - :notification, defaults to true
# - :rails_environment_file, location of rails environment file,
# should be able to find it automatically
guard :konacha do
watch(%r{^app/assets/javascripts/(.*)(\.js|\.js\.coffee|.coffee)$}) { |m| "#{m[1]}_spec.js" }
watch(%r{^spec/javascripts/.+_spec(\.js|\.js\.coffee|.coffee)$})
end
3 changes: 2 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
web: bundle exec rails server
guard: bundle exec guard
guard: bundle exec guard
konacha: bundle exec rake konacha:serve
1 change: 0 additions & 1 deletion app/assets/javascripts/accepted_sessions.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#= require jquery
#= require jquery_ujs
#= require fancybox
#= require_self

class AcceptedSessions
constructor: (containerId) ->
Expand Down
5 changes: 2 additions & 3 deletions app/assets/javascripts/actions.coffee
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#= require jquery
#= require_self

(($) ->
$.submissions = $.submissions || {}

$.submissions.initializeCharts = (charts) ->

drawCharts = ->
$.each charts, (key, value) ->
data = google.visualization.arrayToDataTable(value.data)
Expand All @@ -29,4 +28,4 @@
google.load "visualization", "1",
packages: ["corechart"]
callback: drawCharts
)(jQuery)
)(jQuery)
Loading

0 comments on commit f34562d

Please sign in to comment.