Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Switch to jasminerice + guard-jasmine #67

Merged
merged 2 commits into from

1 participant

@bkeepers
Owner

This removes evergreen in favor of guard-jasmine and jasminerice.

Closes #64

@bkeepers bkeepers merged commit 7db49bd into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
11 .evergreen
@@ -1,11 +0,0 @@
-require 'capybara/poltergeist'
-
-Evergreen.configure do |config|
- config.driver = :poltergeist
- config.spec_dir = 'spec/javascripts'
- config.template_dir = 'spec/javascripts/templates'
- config.public_dir = 'public'
-end
-
-require 'webmock'
-WebMock.disable_net_connect!(:allow_localhost => true)
View
3  Gemfile
@@ -16,8 +16,9 @@ group :assets do
end
group :development, :test do
- gem 'evergreen', :require => 'evergreen/rails'
gem 'rspec-rails'
+ gem 'jasminerice'
+ gem 'guard-jasmine'
end
group :test do
View
27 Gemfile.lock
@@ -76,12 +76,6 @@ GEM
dotenv (0.1.0)
erubis (2.7.0)
eventmachine (0.12.10)
- evergreen (1.0.0)
- capybara (~> 1.0)
- coffee-script
- json_pure
- launchy
- sinatra (~> 1.1)
execjs (1.4.0)
multi_json (~> 1.0)
faye-websocket (0.4.6)
@@ -99,8 +93,14 @@ GEM
guard-cucumber (1.2.0)
cucumber (>= 1.2.0)
guard (>= 1.1.0)
+ guard-jasmine (1.11.1)
+ childprocess
+ guard (>= 1.1.0)
+ multi_json
+ thor
guard-rspec (1.2.0)
guard (>= 1.1)
+ haml (3.1.7)
hike (1.2.1)
hogan_assets (1.3.1)
execjs (>= 1.2.9)
@@ -108,10 +108,10 @@ GEM
tilt (>= 1.3.3)
http_parser.rb (0.5.3)
i18n (0.6.1)
+ jasminerice (0.0.10)
+ coffee-rails
+ haml
json (1.7.6)
- json_pure (1.7.3)
- launchy (2.1.0)
- addressable (~> 2.2.6)
libwebsocket (0.1.4)
addressable
listen (0.4.7)
@@ -142,8 +142,6 @@ GEM
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
- rack-protection (1.2.0)
- rack
rack-ssl (1.3.2)
rack
rack-test (0.6.2)
@@ -197,10 +195,6 @@ GEM
multi_json (~> 1.0)
rubyzip
simple_uuid (0.1.2)
- sinatra (1.3.2)
- rack (~> 1.3, >= 1.3.6)
- rack-protection (~> 1.2)
- tilt (~> 1.3, >= 1.3.3)
sprockets (2.0.4)
hike (~> 1.2)
rack (~> 1.0)
@@ -238,11 +232,12 @@ DEPENDENCIES
compass-rails
cucumber-rails
dotenv
- evergreen
guard-bundler
guard-cucumber
+ guard-jasmine
guard-rspec
hogan_assets
+ jasminerice
mongo
net-ssh
poltergeist
View
6 Guardfile
@@ -20,3 +20,9 @@ guard 'cucumber' do
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
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{app/assets/javascripts/(.+?)\.(js\.coffee|js|coffee)(?:\.\w+)*$}) { |m| "spec/javascripts/#{ m[1] }_spec.#{ m[2] }" }
+end
View
2  app/assets/javascripts/routers/item_router.coffee
@@ -30,7 +30,7 @@ class @ItemRouter extends Backbone.Router
@items.fetch()
newItem: (id) =>
- @content new Item.Views.New(collection: @items)
+ @content new Item.Views.Create(collection: @items)
item: (id) =>
@items.load(id).then (item) =>
View
2  app/assets/javascripts/routers/key_router.coffee
@@ -19,7 +19,7 @@ class @KeyRouter extends Backbone.Router
window.location.hash = "#key/new"
newKey: ->
- @layout.setView('#content', new Keypair.Views.New(app: @app)).render()
+ @layout.setView('#content', new Keypair.Views.Create(app: @app)).render()
download: ->
@layout.setView('#content', new Keypair.Views.Download(app: @app)).render()
View
0  app/assets/javascripts/templates/item/new.mustache → ...assets/javascripts/templates/item/create.mustache
File renamed without changes
View
0  ...assets/javascripts/templates/keypair/new.mustache → ...ets/javascripts/templates/keypair/create.mustache
File renamed without changes
View
4 app/assets/javascripts/views/item/new.coffee → app/assets/javascripts/views/item/create.coffee
@@ -1,7 +1,7 @@
Item.Views ?= {}
-class Item.Views.New extends Item.Views.Form
- template: 'templates/item/new'
+class Item.Views.Create extends Item.Views.Form
+ template: 'templates/item/create'
save: (params) ->
@collection.create params, success: (item) =>
View
4 app/assets/javascripts/views/keypair/new.coffee → app/assets/javascripts/views/keypair/create.coffee
@@ -1,7 +1,7 @@
Keypair.Views ?= {}
-class Keypair.Views.New extends Backbone.View
- template: 'templates/keypair/new'
+class Keypair.Views.Create extends Backbone.View
+ template: 'templates/keypair/create'
events:
'submit form': 'generate'
View
0  spec/javascripts/templates/priv.pem → spec/javascripts/fixtures/priv.pem
File renamed without changes
View
0  spec/javascripts/templates/pub.pem → spec/javascripts/fixtures/pub.pem
File renamed without changes
View
4 spec/javascripts/models/item_key_spec.coffee
@@ -1,5 +1,5 @@
-require '/assets/forge.js'
-require '/assets/models/item_key.js'
+#= require forge
+#= require models/item_key
describe 'ItemKey', ->
beforeEach ->
View
2  spec/javascripts/models/item_spec.coffee
@@ -1,4 +1,4 @@
-require '/assets/application.js'
+#= require models
describe 'Item', ->
beforeEach ->
View
10 spec/javascripts/models/keypair_authenticator_spec.coffee
@@ -1,8 +1,8 @@
-require '/assets/jquery.js'
-require '/assets/underscore.js'
-require '/assets/forge.js'
-require '/assets/models/keypair.js'
-require '/assets/models/keypair_authenticator.js'
+#= require jquery
+#= require underscore
+#= require forge
+#= require models/keypair
+#= require models/keypair_authenticator
describe 'KeypairAuthenticator', ->
beforeEach ->
View
8 spec/javascripts/models/keypair_spec.coffee
@@ -1,13 +1,13 @@
-require '/assets/jquery.js'
-require '/assets/forge.js'
-require '/assets/models/keypair.js'
+#= require jquery
+#= require forge
+#= require models/keypair
describe 'Keypair', ->
beforeEach ->
Keypair.ajax = @ajax = jasmine.createSpy('ajax')
Keypair.localStorage = @local = {}
- @privateKey = fixture('priv.pem')
+ @privateKey = readFixtures('priv.pem.txt')
@keypair = new Keypair(@privateKey)
describe 'savePrivateKey', ->
View
0  spec/javascripts/spec.css
No changes.
View
2  spec/javascripts/spec.js.coffee
@@ -0,0 +1,2 @@
+#= require application
+#= require_tree ./
View
5 spec/javascripts/spec_helper.coffee
@@ -1,5 +0,0 @@
-@fixture = (name) ->
- Evergreen.templates[name]
-
-beforeEach ->
- localStorage.clear()
View
8 spec/javascripts/views/item/new_spec.coffee → spec/javascripts/views/item/create_spec.coffee
@@ -1,10 +1,10 @@
-require '/assets/application.js'
-require '/assets/ui.js'
+#= require application
+#= require ui
-describe 'Item.Views.New', ->
+describe 'Item.Views.Create', ->
beforeEach ->
@collection = {create: jasmine.createSpy('create')}
- @view = new Item.Views.New(collection: @collection)
+ @view = new Item.Views.Create(collection: @collection)
@event = {preventDefault: jasmine.createSpy('preventDefault')}
describe 'submit', ->
Something went wrong with that request. Please try again.