remarkable_activerecord 4.0.0.alpha1 → 4.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -28,6 +28,22 @@ Remarkable?
28
28
 
29
29
  * I18n.
30
30
 
31
+ == Installation
32
+
33
+ sudo gem install remarkable_activerecord --pre
34
+
35
+ Add this to your Gemfile:
36
+
37
+ group :test do
38
+ gem 'remarkable_activerecord', '>=4.0.0.alpha2'
39
+ end
40
+
41
+ Drop this into your spec/spec_helper.rb or spec/support/remarkable.rb file:
42
+
43
+ require 'remarkable/active_record'
44
+
45
+ This will also automatically load remarkable/active_model and add those matchers as well.
46
+
31
47
  == Examples
32
48
 
33
49
  All Remarkable macros can be accessed in two different ways. For those who prefer the Shoulda style, let’s look at some model tests:
@@ -59,7 +75,7 @@ For those who likes more the Rspec way can simply do:
59
75
  All matchers come with I18n support. If you want to translate your matchers,
60
76
  grab make a copy of locale/en.yml and start to translate it.
61
77
 
62
- Then add your new locale file to Remarkable:
78
+ Then add your new locale file to Remarkable in spec/support/remarkable.rb:
63
79
 
64
80
  Remarkable.add_locale 'path/to/my_locale.yml'
65
81
 
@@ -0,0 +1,14 @@
1
+ # Load Remarkable
2
+ require 'remarkable/active_model'
3
+ require 'remarkable/active_record/base'
4
+
5
+ # Add default locale
6
+ dir = File.dirname(__FILE__)
7
+ Dir["#{dir}/../../locale/*yml"].each {|f| Remarkable.add_locale(f) }
8
+
9
+ # Add matchers
10
+ Dir[File.join(dir, 'active_record', 'matchers', '*.rb')].each do |file|
11
+ require file
12
+ end
13
+
14
+ Remarkable.include_matchers!(Remarkable::ActiveRecord, Rspec::Core::ExampleGroup)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{remarkable_activerecord}
8
- s.version = "4.0.0.alpha1"
8
+ s.version = "4.0.0.alpha2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ho-Sheng Hsiao", "Carlos Brando", "Jos\303\251 Valim", "Diego Carrion"]
12
- s.date = %q{2010-04-22}
12
+ s.date = %q{2010-05-26}
13
13
  s.description = %q{Remarkable ActiveRecord: collection of matchers and macros with I18n for ActiveRecord}
14
14
  s.email = ["hosh@sparkfly.com", "eduardobrando@gmail.com", "jose.valim@gmail.com", "dc.rec1@gmail.com"]
15
15
  s.extra_rdoc_files = [
@@ -21,18 +21,18 @@ Gem::Specification.new do |s|
21
21
  "CHANGELOG",
22
22
  "LICENSE",
23
23
  "README",
24
- "lib/remarkable_activerecord.rb",
25
- "lib/remarkable_activerecord/base.rb",
26
- "lib/remarkable_activerecord/matchers/accept_nested_attributes_for_matcher.rb",
27
- "lib/remarkable_activerecord/matchers/allow_mass_assignment_of_matcher.rb",
28
- "lib/remarkable_activerecord/matchers/association_matcher.rb",
29
- "lib/remarkable_activerecord/matchers/have_column_matcher.rb",
30
- "lib/remarkable_activerecord/matchers/have_default_scope_matcher.rb",
31
- "lib/remarkable_activerecord/matchers/have_index_matcher.rb",
32
- "lib/remarkable_activerecord/matchers/have_readonly_attributes_matcher.rb",
33
- "lib/remarkable_activerecord/matchers/have_scope_matcher.rb",
34
- "lib/remarkable_activerecord/matchers/validate_associated_matcher.rb",
35
- "lib/remarkable_activerecord/matchers/validate_uniqueness_of_matcher.rb",
24
+ "lib/remarkable/active_record.rb",
25
+ "lib/remarkable/active_record/base.rb",
26
+ "lib/remarkable/active_record/matchers/accept_nested_attributes_for_matcher.rb",
27
+ "lib/remarkable/active_record/matchers/allow_mass_assignment_of_matcher.rb",
28
+ "lib/remarkable/active_record/matchers/association_matcher.rb",
29
+ "lib/remarkable/active_record/matchers/have_column_matcher.rb",
30
+ "lib/remarkable/active_record/matchers/have_default_scope_matcher.rb",
31
+ "lib/remarkable/active_record/matchers/have_index_matcher.rb",
32
+ "lib/remarkable/active_record/matchers/have_readonly_attributes_matcher.rb",
33
+ "lib/remarkable/active_record/matchers/have_scope_matcher.rb",
34
+ "lib/remarkable/active_record/matchers/validate_associated_matcher.rb",
35
+ "lib/remarkable/active_record/matchers/validate_uniqueness_of_matcher.rb",
36
36
  "locale/en.yml",
37
37
  "remarkable_activerecord.gemspec"
38
38
  ]
@@ -40,26 +40,26 @@ Gem::Specification.new do |s|
40
40
  s.rdoc_options = ["--charset=UTF-8"]
41
41
  s.require_paths = ["lib"]
42
42
  s.rubyforge_project = %q{remarkable}
43
- s.rubygems_version = %q{1.3.6}
43
+ s.rubygems_version = %q{1.3.7}
44
44
  s.summary = %q{Remarkable ActiveRecord: collection of matchers and macros with I18n for ActiveRecord}
45
45
 
46
46
  if s.respond_to? :specification_version then
47
47
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
48
48
  s.specification_version = 3
49
49
 
50
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
51
- s.add_runtime_dependency(%q<rspec>, [">= 2.0.0.alpha7"])
52
- s.add_runtime_dependency(%q<remarkable>, ["~> 4.0.0.alpha1"])
53
- s.add_runtime_dependency(%q<remarkable_activemodel>, ["~> 4.0.0.alpha1"])
50
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
+ s.add_runtime_dependency(%q<rspec>, [">= 2.0.0.alpha8"])
52
+ s.add_runtime_dependency(%q<remarkable>, ["~> 4.0.0.alpha2"])
53
+ s.add_runtime_dependency(%q<remarkable_activemodel>, ["~> 4.0.0.alpha2"])
54
54
  else
55
- s.add_dependency(%q<rspec>, [">= 2.0.0.alpha7"])
56
- s.add_dependency(%q<remarkable>, ["~> 4.0.0.alpha1"])
57
- s.add_dependency(%q<remarkable_activemodel>, ["~> 4.0.0.alpha1"])
55
+ s.add_dependency(%q<rspec>, [">= 2.0.0.alpha8"])
56
+ s.add_dependency(%q<remarkable>, ["~> 4.0.0.alpha2"])
57
+ s.add_dependency(%q<remarkable_activemodel>, ["~> 4.0.0.alpha2"])
58
58
  end
59
59
  else
60
- s.add_dependency(%q<rspec>, [">= 2.0.0.alpha7"])
61
- s.add_dependency(%q<remarkable>, ["~> 4.0.0.alpha1"])
62
- s.add_dependency(%q<remarkable_activemodel>, ["~> 4.0.0.alpha1"])
60
+ s.add_dependency(%q<rspec>, [">= 2.0.0.alpha8"])
61
+ s.add_dependency(%q<remarkable>, ["~> 4.0.0.alpha2"])
62
+ s.add_dependency(%q<remarkable_activemodel>, ["~> 4.0.0.alpha2"])
63
63
  end
64
64
  end
65
65
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remarkable_activerecord
3
3
  version: !ruby/object:Gem::Version
4
+ hash: -1710980496
4
5
  prerelease: true
5
6
  segments:
6
7
  - 4
7
8
  - 0
8
9
  - 0
9
- - alpha1
10
- version: 4.0.0.alpha1
10
+ - alpha2
11
+ version: 4.0.0.alpha2
11
12
  platform: ruby
12
13
  authors:
13
14
  - Ho-Sheng Hsiao
@@ -18,52 +19,58 @@ autorequire:
18
19
  bindir: bin
19
20
  cert_chain: []
20
21
 
21
- date: 2010-04-22 00:00:00 -04:00
22
+ date: 2010-05-26 00:00:00 -04:00
22
23
  default_executable:
23
24
  dependencies:
24
25
  - !ruby/object:Gem::Dependency
25
26
  name: rspec
26
27
  prerelease: false
27
28
  requirement: &id001 !ruby/object:Gem::Requirement
29
+ none: false
28
30
  requirements:
29
31
  - - ">="
30
32
  - !ruby/object:Gem::Version
33
+ hash: -1710980374
31
34
  segments:
32
35
  - 2
33
36
  - 0
34
37
  - 0
35
- - alpha7
36
- version: 2.0.0.alpha7
38
+ - alpha8
39
+ version: 2.0.0.alpha8
37
40
  type: :runtime
38
41
  version_requirements: *id001
39
42
  - !ruby/object:Gem::Dependency
40
43
  name: remarkable
41
44
  prerelease: false
42
45
  requirement: &id002 !ruby/object:Gem::Requirement
46
+ none: false
43
47
  requirements:
44
48
  - - ~>
45
49
  - !ruby/object:Gem::Version
50
+ hash: -1710980496
46
51
  segments:
47
52
  - 4
48
53
  - 0
49
54
  - 0
50
- - alpha1
51
- version: 4.0.0.alpha1
55
+ - alpha2
56
+ version: 4.0.0.alpha2
52
57
  type: :runtime
53
58
  version_requirements: *id002
54
59
  - !ruby/object:Gem::Dependency
55
60
  name: remarkable_activemodel
56
61
  prerelease: false
57
62
  requirement: &id003 !ruby/object:Gem::Requirement
63
+ none: false
58
64
  requirements:
59
65
  - - ~>
60
66
  - !ruby/object:Gem::Version
67
+ hash: -1710980496
61
68
  segments:
62
69
  - 4
63
70
  - 0
64
71
  - 0
65
- - alpha1
66
- version: 4.0.0.alpha1
72
+ - alpha2
73
+ version: 4.0.0.alpha2
67
74
  type: :runtime
68
75
  version_requirements: *id003
69
76
  description: "Remarkable ActiveRecord: collection of matchers and macros with I18n for ActiveRecord"
@@ -84,18 +91,18 @@ files:
84
91
  - CHANGELOG
85
92
  - LICENSE
86
93
  - README
87
- - lib/remarkable_activerecord.rb
88
- - lib/remarkable_activerecord/base.rb
89
- - lib/remarkable_activerecord/matchers/accept_nested_attributes_for_matcher.rb
90
- - lib/remarkable_activerecord/matchers/allow_mass_assignment_of_matcher.rb
91
- - lib/remarkable_activerecord/matchers/association_matcher.rb
92
- - lib/remarkable_activerecord/matchers/have_column_matcher.rb
93
- - lib/remarkable_activerecord/matchers/have_default_scope_matcher.rb
94
- - lib/remarkable_activerecord/matchers/have_index_matcher.rb
95
- - lib/remarkable_activerecord/matchers/have_readonly_attributes_matcher.rb
96
- - lib/remarkable_activerecord/matchers/have_scope_matcher.rb
97
- - lib/remarkable_activerecord/matchers/validate_associated_matcher.rb
98
- - lib/remarkable_activerecord/matchers/validate_uniqueness_of_matcher.rb
94
+ - lib/remarkable/active_record.rb
95
+ - lib/remarkable/active_record/base.rb
96
+ - lib/remarkable/active_record/matchers/accept_nested_attributes_for_matcher.rb
97
+ - lib/remarkable/active_record/matchers/allow_mass_assignment_of_matcher.rb
98
+ - lib/remarkable/active_record/matchers/association_matcher.rb
99
+ - lib/remarkable/active_record/matchers/have_column_matcher.rb
100
+ - lib/remarkable/active_record/matchers/have_default_scope_matcher.rb
101
+ - lib/remarkable/active_record/matchers/have_index_matcher.rb
102
+ - lib/remarkable/active_record/matchers/have_readonly_attributes_matcher.rb
103
+ - lib/remarkable/active_record/matchers/have_scope_matcher.rb
104
+ - lib/remarkable/active_record/matchers/validate_associated_matcher.rb
105
+ - lib/remarkable/active_record/matchers/validate_uniqueness_of_matcher.rb
99
106
  - locale/en.yml
100
107
  - remarkable_activerecord.gemspec
101
108
  has_rdoc: true
@@ -108,16 +115,20 @@ rdoc_options:
108
115
  require_paths:
109
116
  - lib
110
117
  required_ruby_version: !ruby/object:Gem::Requirement
118
+ none: false
111
119
  requirements:
112
120
  - - ">="
113
121
  - !ruby/object:Gem::Version
122
+ hash: 3
114
123
  segments:
115
124
  - 0
116
125
  version: "0"
117
126
  required_rubygems_version: !ruby/object:Gem::Requirement
127
+ none: false
118
128
  requirements:
119
129
  - - ">"
120
130
  - !ruby/object:Gem::Version
131
+ hash: 25
121
132
  segments:
122
133
  - 1
123
134
  - 3
@@ -126,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
137
  requirements: []
127
138
 
128
139
  rubyforge_project: remarkable
129
- rubygems_version: 1.3.6
140
+ rubygems_version: 1.3.7
130
141
  signing_key:
131
142
  specification_version: 3
132
143
  summary: "Remarkable ActiveRecord: collection of matchers and macros with I18n for ActiveRecord"
@@ -1,28 +0,0 @@
1
- # Load Remarkable
2
- unless Object.const_defined?('Remarkable')
3
- begin
4
- require 'remarkable'
5
- rescue LoadError
6
- require 'rubygems'
7
- gem 'remarkable'
8
- require 'remarkable'
9
- end
10
- end
11
-
12
- # Load Remarkable ActiveRecord files
13
- dir = File.dirname(__FILE__)
14
- require File.join(dir, 'remarkable_activerecord', 'base')
15
-
16
- # Add locale
17
- Remarkable.add_locale File.join(dir, '..', 'locale', 'en.yml')
18
-
19
- # Add matchers
20
- Dir[File.join(dir, 'remarkable_activerecord', 'matchers', '*.rb')].each do |file|
21
- require file
22
- end
23
-
24
- # By default, ActiveRecord matchers are not included in any example group.
25
- # The responsable for this is RemarkableRails. If you are using ActiveRecord
26
- # without Rails, put the line below in your spec_helper to include ActiveRecord
27
- # matchers into rspec globally.
28
- # Remarkable.include_matchers!(Remarkable::ActiveRecord, Rspec::Example::ExampleGroup)