Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Jasmine 2.0 #124

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ public/system
*.*.gz
Session.vim
err.txt

# RubyMine project files
.idea

# Mac finder artifacts
.DS_Store

15 changes: 8 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
source "http://rubygems.org"
source 'http://rubygems.org'

gemspec

# used by the dummy application
gem 'rails', '3.1.0'
gem 'rails', '3.2.18'
gem 'json'
gem 'coffee-rails', "~> 3.1.0"
gem 'coffee-rails'
gem 'haml-rails'

# used by test rails apps
gem 'sqlite3'
gem 'sass-rails', "~> 3.1.0"
gem 'sass-rails'
gem 'uglifier'
gem 'jquery-rails'
gem 'turn', :require => false, :group => :test

group :development, :test do
gem "rspec-rails"
gem "capybara"
gem "aruba"
gem 'rspec-rails', '2.99.0'
gem 'capybara'
gem 'selenium-webdriver'
gem 'aruba'
end
238 changes: 121 additions & 117 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,171 +1,174 @@
PATH
remote: .
specs:
jasminerice (0.1.0)
jasminerice (2.0.3)
coffee-rails

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.0)
actionpack (= 3.1.0)
mail (~> 2.3.0)
actionpack (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
actionmailer (3.2.18)
actionpack (= 3.2.18)
mail (~> 2.5.4)
actionpack (3.2.18)
activemodel (= 3.2.18)
activesupport (= 3.2.18)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.0.3)
rack-mount (~> 0.8.2)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.0)
activemodel (3.1.0)
activesupport (= 3.1.0)
bcrypt-ruby (~> 3.0.0)
sprockets (~> 2.2.1)
activemodel (3.2.18)
activesupport (= 3.2.18)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
arel (~> 2.2.1)
activerecord (3.2.18)
activemodel (= 3.2.18)
activesupport (= 3.2.18)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
activesupport (3.1.0)
activeresource (3.2.18)
activemodel (= 3.2.18)
activesupport (= 3.2.18)
activesupport (3.2.18)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
ansi (1.4.3)
arel (2.2.1)
aruba (0.5.1)
childprocess (~> 0.3.6)
arel (3.0.3)
aruba (0.6.0)
childprocess (>= 0.3.6)
cucumber (>= 1.1.1)
rspec-expectations (>= 2.7.0)
bcrypt-ruby (3.0.1)
bcrypt-ruby (3.0.1-java)
builder (3.0.0)
capybara (2.0.2)
builder (3.0.4)
capybara (2.4.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 1.0.0)
childprocess (0.3.8)
xpath (~> 2.0)
childprocess (0.5.5)
ffi (~> 1.0, >= 1.0.11)
coffee-rails (3.1.1)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
railties (~> 3.2.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.3.3)
cucumber (1.2.1)
coffee-script-source (1.7.1)
cucumber (1.3.16)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0)
json (>= 1.4.6)
diff-lcs (1.1.3)
gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.1)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
ffi (1.4.0)
ffi (1.4.0-java)
gherkin (2.11.5)
json (>= 1.4.6)
gherkin (2.11.5-java)
json (>= 1.4.6)
haml (3.1.7)
haml-rails (0.3.5)
execjs (2.2.1)
ffi (1.9.6)
ffi (1.9.6-java)
gherkin (2.12.2)
multi_json (~> 1.3)
gherkin (2.12.2-java)
multi_json (~> 1.3)
haml (4.0.5)
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)
i18n (0.6.0)
jquery-rails (2.2.0)
hike (1.2.3)
i18n (0.6.11)
journey (1.0.4)
jquery-rails (3.1.1)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.6.1)
json (1.6.1-java)
mail (2.3.0)
i18n (>= 0.4.0)
json (1.8.1)
json (1.8.1-java)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.6.1)
nokogiri (1.5.6)
nokogiri (1.5.6-java)
polyglot (0.3.2)
rack (1.3.5)
rack-cache (1.0.3)
mime-types (1.25.1)
mini_portile (0.6.0)
minitest (4.7.5)
multi_json (1.11.0)
multi_test (0.1.1)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
nokogiri (1.6.3.1-java)
polyglot (0.3.5)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack-ssl (1.3.4)
rack
rack-test (0.6.1)
rack-test (0.6.2)
rack (>= 1.0)
rails (3.1.0)
actionmailer (= 3.1.0)
actionpack (= 3.1.0)
activerecord (= 3.1.0)
activeresource (= 3.1.0)
activesupport (= 3.1.0)
rails (3.2.18)
actionmailer (= 3.2.18)
actionpack (= 3.2.18)
activerecord (= 3.2.18)
activeresource (= 3.2.18)
activesupport (= 3.2.18)
bundler (~> 1.0)
railties (= 3.1.0)
railties (3.1.0)
actionpack (= 3.1.0)
activesupport (= 3.1.0)
railties (= 3.2.18)
railties (3.2.18)
actionpack (= 3.2.18)
activesupport (= 3.2.18)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.11)
thor (>= 0.14.6, < 2.0)
rake (10.3.2)
rdoc (3.12.2)
json (~> 1.4)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.12.1)
rspec-rails (2.12.2)
rspec-collection_matchers (1.0.0)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (2.99.1)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.2)
rspec-rails (2.99.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
rubyzip (0.9.9)
sass (3.2.5)
sass-rails (3.1.7)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
rspec-collection_matchers
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
rubyzip (1.1.7)
sass (3.3.14)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3.2)
selenium-webdriver (2.30.0)
childprocess (>= 0.2.5)
tilt (~> 1.3)
selenium-webdriver (2.45.0)
childprocess (~> 0.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
sprockets (2.0.3)
rubyzip (~> 1.0)
websocket (~> 1.0)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
sqlite3 (1.3.9)
thor (0.19.1)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turn (0.9.6)
turn (0.9.7)
ansi
tzinfo (0.3.30)
uglifier (1.3.0)
minitest (~> 4)
tzinfo (0.3.41)
uglifier (2.5.3)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
websocket (1.0.7)
xpath (1.0.0)
json (>= 1.8.0)
websocket (1.2.1)
xpath (2.0.0)
nokogiri (~> 1.3)

PLATFORMS
Expand All @@ -175,14 +178,15 @@ PLATFORMS
DEPENDENCIES
aruba
capybara
coffee-rails (~> 3.1.0)
coffee-rails
haml-rails
jasminerice!
jquery-rails
json
rails (= 3.1.0)
rspec-rails
sass-rails (~> 3.1.0)
rails (= 3.2.18)
rspec-rails (= 2.99.0)
sass-rails
selenium-webdriver
sqlite3
turn
uglifier
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Just include it in your `Gemfile`:

```ruby
group :development, :test do
gem "jasminerice", :git => 'https://github.com/bradphelan/jasminerice.git'
gem "jasminerice", :git => 'https://github.com/michael-harrison/jasminerice.git'
end
```

Expand All @@ -51,6 +51,17 @@ This will add the required `spec.js.coffee`, an example spec, and fixture to hel

## Usage

### Jasmine version selection

By default Jasminerice will use Jasmine 1.3. To select Jasmine 2.0 simply add the follow line in `config/initializers/jasminerice.rb`:

```ruby
Jasminerice.setup do |config|
config.jasmine_version = '2_0'
end
```


### CoffeeScripts

Create a file `spec/javascripts/spec.js.coffee` (or run the install generator), and add the following content.
Expand Down
2 changes: 2 additions & 0 deletions app/assets/javascripts/jasminerice.js.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<% require_asset "jasmine_#{Jasminerice.jasmine_version}/jasminerice" %>
console.log('<%= Jasminerice.jasmine_version %>');
1 change: 1 addition & 0 deletions app/assets/stylesheets/jasmine.css.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<% require_asset "jasmine_#{Jasminerice.jasmine_version}/jasmine" %>
6 changes: 3 additions & 3 deletions jasminerice.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# project in your rails apps through git.
Gem::Specification.new do |s|
s.name = "jasminerice"
s.version = "0.1.0"
s.version = "2.0.3"
s.authors = ["Brad Phelan"]
s.summary = "Pain free coffeescript unit testing for Rails 3.1 using jasmine"
s.description = "Full support for the Rails 3.1 asset pipeline when bdd'ing your coffeescript or javascript using jasmine"
s.summary = "Pain free coffeescript unit testing for Rails using jasmine"
s.description = "Full support for the Rails asset pipeline when bdd'ing your coffeescript or javascript using jasmine"

s.platform = Gem::Platform::RUBY
s.files = Dir["{app,config,lib,vendor}/**/*"] + ["MIT.LICENSE", "README.md"]
Expand Down
Loading