shoulda-let 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Appraisals ADDED
@@ -0,0 +1,7 @@
1
+ appraise "shoulda2" do
2
+ gem 'shoulda', '~>2.11'
3
+ end
4
+
5
+ appraise "shoulda3" do
6
+ gem 'shoulda', '~>3.1'
7
+ end
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ gemspec
3
3
 
4
4
  gem "rake"
5
5
  gem "test-unit", ">=2.5.1"
6
- gem "shoulda", "~>2.11"
6
+ gem "appraisal"
data/Gemfile.lock CHANGED
@@ -1,21 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shoulda-let (0.0.1)
4
+ shoulda-let (0.0.2)
5
5
  shoulda
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- rake (0.9.2)
11
- shoulda (2.11.3)
10
+ activesupport (3.2.8)
11
+ i18n (~> 0.6)
12
+ multi_json (~> 1.0)
13
+ appraisal (0.4.1)
14
+ bundler
15
+ rake
16
+ i18n (0.6.0)
17
+ multi_json (1.3.6)
18
+ rake (0.9.2.2)
19
+ shoulda (3.1.1)
20
+ shoulda-context (~> 1.0)
21
+ shoulda-matchers (~> 1.2)
22
+ shoulda-context (1.0.0)
23
+ shoulda-matchers (1.2.0)
24
+ activesupport (>= 3.0.0)
12
25
  test-unit (2.5.1)
13
26
 
14
27
  PLATFORMS
15
28
  ruby
16
29
 
17
30
  DEPENDENCIES
31
+ appraisal
18
32
  rake
19
- shoulda (~> 2.11)
20
33
  shoulda-let!
21
34
  test-unit (>= 2.5.1)
data/Rakefile CHANGED
@@ -1,6 +1,10 @@
1
- require "bundler/gem_tasks"
1
+ require 'appraisal'
2
+ require 'bundler/gem_tasks'
2
3
 
3
- task :default do
4
+ task :test do
4
5
  sh "ruby test/shoulda_let_test.rb"
5
6
  end
6
7
 
8
+ task :default do
9
+ sh "bundle exec rake appraisal:install && bundle exec rake appraisal test"
10
+ end
data/Readme.md CHANGED
@@ -53,4 +53,4 @@ Author
53
53
  [Michael Grosser](http://grosser.it)<br/>
54
54
  michael@grosser.it<br/>
55
55
  License: MIT<br/>
56
- [![Build Status](https://secure.travis-ci.org/grosser/shoulda_let.png)](http://travis-ci.org/grosser/shoulda_let)
56
+ [![Build Status](https://secure.travis-ci.org/grosser/shoulda-let.png)](http://travis-ci.org/grosser/shoulda-let)
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source :rubygems
4
+
5
+ gem "rake"
6
+ gem "test-unit", ">=2.5.1"
7
+ gem "appraisal"
8
+ gem "shoulda", "~>2.11"
9
+
10
+ gemspec :path=>"../"
@@ -0,0 +1,25 @@
1
+ PATH
2
+ remote: /Users/mgrosser/code/tools/shoulda-let
3
+ specs:
4
+ shoulda-let (0.0.2)
5
+ shoulda
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ appraisal (0.4.1)
11
+ bundler
12
+ rake
13
+ rake (0.9.2.2)
14
+ shoulda (2.11.3)
15
+ test-unit (2.5.1)
16
+
17
+ PLATFORMS
18
+ ruby
19
+
20
+ DEPENDENCIES
21
+ appraisal
22
+ rake
23
+ shoulda (~> 2.11)
24
+ shoulda-let!
25
+ test-unit (>= 2.5.1)
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source :rubygems
4
+
5
+ gem "rake"
6
+ gem "test-unit", ">=2.5.1"
7
+ gem "appraisal"
8
+ gem "shoulda", "~>3.1"
9
+
10
+ gemspec :path=>"../"
@@ -0,0 +1,35 @@
1
+ PATH
2
+ remote: /Users/mgrosser/code/tools/shoulda-let
3
+ specs:
4
+ shoulda-let (0.0.2)
5
+ shoulda
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ activesupport (3.2.8)
11
+ i18n (~> 0.6)
12
+ multi_json (~> 1.0)
13
+ appraisal (0.4.1)
14
+ bundler
15
+ rake
16
+ i18n (0.6.0)
17
+ multi_json (1.3.6)
18
+ rake (0.9.2.2)
19
+ shoulda (3.1.1)
20
+ shoulda-context (~> 1.0)
21
+ shoulda-matchers (~> 1.2)
22
+ shoulda-context (1.0.0)
23
+ shoulda-matchers (1.2.0)
24
+ activesupport (>= 3.0.0)
25
+ test-unit (2.5.1)
26
+
27
+ PLATFORMS
28
+ ruby
29
+
30
+ DEPENDENCIES
31
+ appraisal
32
+ rake
33
+ shoulda (~> 3.1)
34
+ shoulda-let!
35
+ test-unit (>= 2.5.1)
data/lib/shoulda/let.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require "shoulda"
2
+ require "shoulda/context"
2
3
 
3
- Shoulda::Context.class_eval do
4
+ context_class = (Shoulda::VERSION >= "3.0.0" ? Shoulda::Context::Context : Shoulda::Context)
5
+ context_class.class_eval do
4
6
  def let(name, &block)
5
7
  @let ||= {}
6
8
  if block
@@ -11,7 +13,8 @@ Shoulda::Context.class_eval do
11
13
  end
12
14
  end
13
15
 
14
- Shoulda::InstanceMethods.class_eval do
16
+ instance_class = (Shoulda::VERSION >= "3.0.0" ? Test::Unit::TestCase : Shoulda::InstanceMethods)
17
+ instance_class.class_eval do
15
18
  def let(name)
16
19
  @let ||= {}
17
20
  @let.fetch(name) do
data/shoulda-let.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  name = "shoulda-let"
2
2
 
3
- Gem::Specification.new name, "0.0.1" do |s|
3
+ Gem::Specification.new name, "0.0.2" do |s|
4
4
  s.summary = "A simple let for shoulda"
5
5
  s.authors = ["Michael Grosser"]
6
6
  s.email = "michael@grosser.it"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-let
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-23 00:00:00.000000000 Z
12
+ date: 2012-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
@@ -34,10 +34,15 @@ extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
36
  - .travis.yml
37
+ - Appraisals
37
38
  - Gemfile
38
39
  - Gemfile.lock
39
40
  - Rakefile
40
41
  - Readme.md
42
+ - gemfiles/shoulda2.gemfile
43
+ - gemfiles/shoulda2.gemfile.lock
44
+ - gemfiles/shoulda3.gemfile
45
+ - gemfiles/shoulda3.gemfile.lock
41
46
  - lib/shoulda/let.rb
42
47
  - shoulda-let.gemspec
43
48
  - test/shoulda_let_test.rb
@@ -56,7 +61,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
61
  version: '0'
57
62
  segments:
58
63
  - 0
59
- hash: -2456576844475002993
64
+ hash: -375726372463278070
60
65
  required_rubygems_version: !ruby/object:Gem::Requirement
61
66
  none: false
62
67
  requirements:
@@ -65,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
70
  version: '0'
66
71
  segments:
67
72
  - 0
68
- hash: -2456576844475002993
73
+ hash: -375726372463278070
69
74
  requirements: []
70
75
  rubyforge_project:
71
76
  rubygems_version: 1.8.24