shoulda-matchers 2.8.0 → 3.0.0.rc1

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.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/.hound_config/ruby.yml +7 -0
  3. data/.travis.yml +11 -54
  4. data/Appraisals +45 -100
  5. data/CONTRIBUTING.md +51 -7
  6. data/Gemfile +7 -19
  7. data/Gemfile.lock +60 -134
  8. data/Guardfile +5 -0
  9. data/NEWS.md +203 -0
  10. data/README.md +95 -50
  11. data/Rakefile +1 -0
  12. data/doc_config/yard/templates/default/layout/html/setup.rb +1 -1
  13. data/gemfiles/4.0.0.gemfile +10 -7
  14. data/gemfiles/4.0.0.gemfile.lock +103 -79
  15. data/gemfiles/4.0.1.gemfile +10 -7
  16. data/gemfiles/4.0.1.gemfile.lock +109 -83
  17. data/gemfiles/4.1.gemfile +10 -7
  18. data/gemfiles/4.1.gemfile.lock +109 -85
  19. data/gemfiles/4.2.gemfile +10 -9
  20. data/gemfiles/4.2.gemfile.lock +86 -78
  21. data/lib/shoulda/matchers.rb +13 -18
  22. data/lib/shoulda/matchers/action_controller.rb +4 -1
  23. data/lib/shoulda/matchers/action_controller/flash_store.rb +95 -0
  24. data/lib/shoulda/matchers/action_controller/{strong_parameters_matcher.rb → permit_matcher.rb} +147 -30
  25. data/lib/shoulda/matchers/action_controller/redirect_to_matcher.rb +1 -1
  26. data/lib/shoulda/matchers/action_controller/render_template_matcher.rb +1 -1
  27. data/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb +1 -1
  28. data/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb +1 -1
  29. data/lib/shoulda/matchers/action_controller/route_matcher.rb +5 -1
  30. data/lib/shoulda/matchers/action_controller/route_params.rb +15 -6
  31. data/lib/shoulda/matchers/action_controller/session_store.rb +34 -0
  32. data/lib/shoulda/matchers/action_controller/set_flash_matcher.rb +30 -136
  33. data/lib/shoulda/matchers/action_controller/set_session_matcher.rb +28 -109
  34. data/lib/shoulda/matchers/action_controller/set_session_or_flash_matcher.rb +103 -0
  35. data/lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb +1 -12
  36. data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +79 -10
  37. data/lib/shoulda/matchers/active_model/numericality_matchers/numeric_type_matcher.rb +10 -0
  38. data/lib/shoulda/matchers/active_model/validate_absence_of_matcher.rb +21 -0
  39. data/lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb +24 -0
  40. data/lib/shoulda/matchers/active_model/validate_confirmation_of_matcher.rb +22 -5
  41. data/lib/shoulda/matchers/active_model/validate_exclusion_of_matcher.rb +29 -10
  42. data/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +27 -10
  43. data/lib/shoulda/matchers/active_model/validate_length_of_matcher.rb +27 -12
  44. data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +56 -20
  45. data/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb +3 -11
  46. data/lib/shoulda/matchers/active_model/validation_message_finder.rb +65 -0
  47. data/lib/shoulda/matchers/active_record/association_matcher.rb +40 -6
  48. data/lib/shoulda/matchers/active_record/association_matchers/join_table_matcher.rb +21 -7
  49. data/lib/shoulda/matchers/active_record/association_matchers/model_reflection.rb +11 -40
  50. data/lib/shoulda/matchers/active_record/association_matchers/model_reflector.rb +1 -1
  51. data/lib/shoulda/matchers/active_record/define_enum_for_matcher.rb +2 -6
  52. data/lib/shoulda/matchers/active_record/validate_uniqueness_of_matcher.rb +137 -22
  53. data/lib/shoulda/matchers/configuration.rb +20 -0
  54. data/lib/shoulda/matchers/doublespeak.rb +11 -1
  55. data/lib/shoulda/matchers/doublespeak/double.rb +29 -11
  56. data/lib/shoulda/matchers/doublespeak/double_collection.rb +4 -3
  57. data/lib/shoulda/matchers/doublespeak/method_call.rb +35 -0
  58. data/lib/shoulda/matchers/doublespeak/object_double.rb +7 -2
  59. data/lib/shoulda/matchers/doublespeak/proxy_implementation.rb +4 -3
  60. data/lib/shoulda/matchers/doublespeak/stub_implementation.rb +3 -3
  61. data/lib/shoulda/matchers/doublespeak/world.rb +21 -1
  62. data/lib/shoulda/matchers/integrations.rb +43 -0
  63. data/lib/shoulda/matchers/integrations/configuration.rb +68 -0
  64. data/lib/shoulda/matchers/integrations/configuration_error.rb +9 -0
  65. data/lib/shoulda/matchers/integrations/inclusion.rb +20 -0
  66. data/lib/shoulda/matchers/integrations/libraries.rb +15 -0
  67. data/lib/shoulda/matchers/integrations/libraries/action_controller.rb +31 -0
  68. data/lib/shoulda/matchers/integrations/libraries/active_model.rb +26 -0
  69. data/lib/shoulda/matchers/integrations/libraries/active_record.rb +26 -0
  70. data/lib/shoulda/matchers/integrations/libraries/missing_library.rb +19 -0
  71. data/lib/shoulda/matchers/integrations/libraries/rails.rb +30 -0
  72. data/lib/shoulda/matchers/integrations/rails.rb +12 -0
  73. data/lib/shoulda/matchers/integrations/registry.rb +28 -0
  74. data/lib/shoulda/matchers/integrations/test_frameworks.rb +16 -0
  75. data/lib/shoulda/matchers/integrations/test_frameworks/active_support_test_case.rb +37 -0
  76. data/lib/shoulda/matchers/integrations/test_frameworks/minitest_4.rb +36 -0
  77. data/lib/shoulda/matchers/integrations/test_frameworks/minitest_5.rb +37 -0
  78. data/lib/shoulda/matchers/integrations/test_frameworks/missing_test_framework.rb +40 -0
  79. data/lib/shoulda/matchers/integrations/test_frameworks/rspec.rb +29 -0
  80. data/lib/shoulda/matchers/integrations/test_frameworks/test_unit.rb +36 -0
  81. data/lib/shoulda/matchers/rails_shim.rb +0 -40
  82. data/lib/shoulda/matchers/version.rb +1 -1
  83. data/script/SUPPORTED_VERSIONS +1 -1
  84. data/script/update_gems_in_all_appraisals +14 -0
  85. data/shoulda-matchers.gemspec +2 -2
  86. data/spec/acceptance/active_model_integration_spec.rb +4 -1
  87. data/spec/acceptance/independent_matchers_spec.rb +6 -6
  88. data/spec/acceptance/multiple_libraries_integration_spec.rb +52 -0
  89. data/spec/acceptance/rails_integration_spec.rb +15 -5
  90. data/spec/acceptance_spec_helper.rb +8 -0
  91. data/spec/doublespeak_spec_helper.rb +14 -0
  92. data/spec/support/acceptance/adds_shoulda_matchers_to_project.rb +110 -0
  93. data/spec/support/acceptance/helpers.rb +2 -0
  94. data/spec/support/acceptance/helpers/base_helpers.rb +6 -1
  95. data/spec/support/acceptance/helpers/command_helpers.rb +6 -2
  96. data/spec/support/acceptance/helpers/minitest_helpers.rb +0 -8
  97. data/spec/support/acceptance/helpers/n_unit_helpers.rb +25 -0
  98. data/spec/support/acceptance/helpers/rspec_helpers.rb +2 -0
  99. data/spec/support/acceptance/helpers/step_helpers.rb +13 -19
  100. data/spec/support/acceptance/matchers/have_output.rb +1 -1
  101. data/spec/support/tests/bundle.rb +1 -1
  102. data/spec/support/tests/command_runner.rb +25 -13
  103. data/spec/support/tests/current_bundle.rb +47 -0
  104. data/spec/support/tests/database.rb +28 -0
  105. data/spec/support/tests/database_adapters/postgresql.rb +25 -0
  106. data/spec/support/tests/database_adapters/sqlite3.rb +26 -0
  107. data/spec/support/tests/database_configuration.rb +33 -0
  108. data/spec/support/tests/database_configuration_registry.rb +28 -0
  109. data/spec/support/tests/filesystem.rb +25 -2
  110. data/spec/support/unit/helpers/active_record_versions.rb +12 -0
  111. data/spec/support/unit/helpers/class_builder.rb +6 -2
  112. data/spec/support/unit/helpers/column_type_helpers.rb +26 -0
  113. data/spec/support/unit/helpers/controller_builder.rb +0 -28
  114. data/spec/support/unit/helpers/database_helpers.rb +18 -0
  115. data/spec/support/unit/helpers/model_builder.rb +38 -6
  116. data/spec/support/unit/helpers/rails_versions.rb +2 -2
  117. data/spec/support/unit/matchers/fail_with_message_including_matcher.rb +9 -8
  118. data/spec/support/unit/matchers/fail_with_message_matcher.rb +1 -1
  119. data/spec/support/unit/rails_application.rb +29 -13
  120. data/spec/support/unit/record_validating_confirmation_builder.rb +1 -2
  121. data/spec/support/unit/shared_examples/set_session_or_flash.rb +355 -0
  122. data/spec/unit/shoulda/matchers/action_controller/permit_matcher_spec.rb +433 -0
  123. data/spec/unit/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb +1 -5
  124. data/spec/unit/shoulda/matchers/action_controller/route_matcher_spec.rb +37 -0
  125. data/spec/unit/shoulda/matchers/action_controller/set_flash_matcher_spec.rb +23 -147
  126. data/spec/unit/shoulda/matchers/action_controller/set_session_matcher_spec.rb +8 -285
  127. data/spec/unit/shoulda/matchers/action_controller/set_session_or_flash_matcher_spec.rb +562 -0
  128. data/spec/unit/shoulda/matchers/active_model/allow_value_matcher_spec.rb +81 -14
  129. data/spec/unit/shoulda/matchers/active_model/disallow_value_matcher_spec.rb +16 -8
  130. data/spec/unit/shoulda/matchers/active_model/numericality_matchers/comparison_matcher_spec.rb +101 -9
  131. data/spec/unit/shoulda/matchers/active_model/numericality_matchers/even_number_matcher_spec.rb +39 -1
  132. data/spec/unit/shoulda/matchers/active_model/numericality_matchers/odd_number_matcher_spec.rb +39 -1
  133. data/spec/unit/shoulda/matchers/active_model/numericality_matchers/only_integer_matcher_spec.rb +39 -0
  134. data/spec/unit/shoulda/matchers/active_model/validate_exclusion_of_matcher_spec.rb +0 -17
  135. data/spec/unit/shoulda/matchers/active_model/validate_inclusion_of_matcher_spec.rb +0 -17
  136. data/spec/unit/shoulda/matchers/active_model/validate_length_of_matcher_spec.rb +0 -17
  137. data/spec/unit/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +838 -271
  138. data/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +0 -19
  139. data/spec/unit/shoulda/matchers/active_record/association_matcher_spec.rb +93 -0
  140. data/spec/unit/shoulda/matchers/active_record/association_matchers/model_reflection_spec.rb +3 -3
  141. data/spec/unit/shoulda/matchers/active_record/define_enum_for_matcher_spec.rb +25 -0
  142. data/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb +905 -0
  143. data/spec/unit/shoulda/matchers/doublespeak/double_collection_spec.rb +17 -11
  144. data/spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb +1 -1
  145. data/spec/unit/shoulda/matchers/doublespeak/double_spec.rb +144 -43
  146. data/spec/unit/shoulda/matchers/doublespeak/object_double_spec.rb +1 -1
  147. data/spec/unit/shoulda/matchers/doublespeak/proxy_implementation_spec.rb +36 -11
  148. data/spec/unit/shoulda/matchers/doublespeak/stub_implementation_spec.rb +29 -16
  149. data/spec/unit/shoulda/matchers/doublespeak/world_spec.rb +8 -5
  150. data/spec/unit/shoulda/matchers/doublespeak_spec.rb +1 -1
  151. data/spec/unit_spec_helper.rb +15 -14
  152. data/spec/warnings_spy.rb +1 -1
  153. metadata +68 -29
  154. data/docs.watchr +0 -5
  155. data/gemfiles/3.0.gemfile +0 -26
  156. data/gemfiles/3.0.gemfile.lock +0 -173
  157. data/gemfiles/3.1.gemfile +0 -32
  158. data/gemfiles/3.1.gemfile.lock +0 -212
  159. data/gemfiles/3.1_1.9.2.gemfile +0 -32
  160. data/gemfiles/3.1_1.9.2.gemfile.lock +0 -212
  161. data/gemfiles/3.2.gemfile +0 -33
  162. data/gemfiles/3.2.gemfile.lock +0 -212
  163. data/gemfiles/3.2_1.9.2.gemfile +0 -31
  164. data/gemfiles/3.2_1.9.2.gemfile.lock +0 -207
  165. data/lib/shoulda/matchers/assertion_error.rb +0 -27
  166. data/lib/shoulda/matchers/doublespeak/structs.rb +0 -10
  167. data/lib/shoulda/matchers/integrations/nunit_test_case_detection.rb +0 -39
  168. data/lib/shoulda/matchers/integrations/rspec.rb +0 -19
  169. data/lib/shoulda/matchers/integrations/test_unit.rb +0 -34
  170. data/spec/unit/shoulda/matchers/action_controller/strong_parameters_matcher_spec.rb +0 -331
  171. data/spec/unit/shoulda/matchers/active_model/validate_uniqueness_of_matcher_spec.rb +0 -564
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8d1979af1b53164efe4a312705f9879f599b123
4
- data.tar.gz: 4f95461b3a1327e5ccf9d233f466cab9ff0e41d0
3
+ metadata.gz: b8fecf73ca944b0663a84b697138602dee5030c7
4
+ data.tar.gz: 6daabcb4fb64b55438d4db5d6058cf2911f6cbda
5
5
  SHA512:
6
- metadata.gz: 9ce8af4fa7d9b70636ee576221f15646621900908f9e351a9cff54de47514e4f01242b4d7ce5340e8dc0c053341e82e9c90afe991d55a1b35af74853a0a2d0f8
7
- data.tar.gz: 1c8fb02675836314efc0c43c3054b16a02b6b56d36070472f1780a3b677de74f47281c01290902f5c81bc8051ed06982e17ddaf159ed44c3098470882130125b
6
+ metadata.gz: c5d7162d77f4c392caf7c797c1cdbe543fd83a358fea4a63a3a376d1801b8cfb7ea7e20b0576a557bac6e1e6d62b4acfc18f273741ac11fbdf71a0a3429aff5b
7
+ data.tar.gz: f7fe158ff1ea7bfb57f2914a149d0db943f21f0f1704adb2e17777a3ce9aba62cbbf9c463d763c27d7891c12c8f1e50a176b35ebee7b98c5f27b4a8a5ff49001
@@ -3,3 +3,10 @@ StringLiterals:
3
3
 
4
4
  AlignParameters:
5
5
  EnforcedStyle: with_fixed_indentation
6
+
7
+ CollectionMethods:
8
+ PreferredMethods:
9
+ find: detect
10
+ reduce: inject
11
+ collect: map
12
+ find_all: select
@@ -1,62 +1,19 @@
1
1
  language: ruby
2
2
  sudo: false
3
+ cache: bundler
3
4
  script: "bundle exec rake"
4
5
 
5
- branches:
6
- except:
7
- - site
8
- - gh-pages
6
+ env:
7
+ - DATABASE_ADAPTER=sqlite3
8
+ - DATABASE_ADAPTER=postgresql
9
9
 
10
10
  rvm:
11
- - 1.9.2
12
- - 1.9.3
11
+ - 2.0.0
12
+ - 2.1.4
13
+ - 2.2.0
13
14
 
14
15
  gemfile:
15
- - gemfiles/3.0.gemfile
16
- - gemfiles/3.1.gemfile
17
- - gemfiles/3.2.gemfile
18
-
19
- matrix:
20
- allow_failures:
21
- - rvm: rbx-19mode
22
- - rvm: jruby-19mode
23
- include:
24
- - rvm: 1.9.2
25
- gemfile: gemfiles/3.1_1.9.2.gemfile
26
- - rvm: 1.9.2
27
- gemfile: gemfiles/3.2_1.9.2.gemfile
28
- - rvm: 1.9.3
29
- gemfile: gemfiles/4.0.0.gemfile
30
- - rvm: 1.9.3
31
- gemfile: gemfiles/4.0.1.gemfile
32
- - rvm: 1.9.3
33
- gemfile: gemfiles/4.1.gemfile
34
- - rvm: 2.0.0
35
- gemfile: gemfiles/3.2.gemfile
36
- - rvm: 2.0.0
37
- gemfile: gemfiles/4.0.0.gemfile
38
- - rvm: 2.0.0
39
- gemfile: gemfiles/4.0.1.gemfile
40
- - rvm: 2.0.0
41
- gemfile: gemfiles/4.1.gemfile
42
- - rvm: 2.0.0
43
- gemfile: gemfiles/4.2.gemfile
44
- - rvm: 2.1.4
45
- gemfile: gemfiles/3.2.gemfile
46
- - rvm: 2.1.4
47
- gemfile: gemfiles/4.0.0.gemfile
48
- - rvm: 2.1.4
49
- gemfile: gemfiles/4.0.1.gemfile
50
- - rvm: 2.1.4
51
- gemfile: gemfiles/4.1.gemfile
52
- - rvm: 2.1.4
53
- gemfile: gemfiles/4.2.gemfile
54
- - rvm: rbx-19mode
55
- gemfile: gemfiles/3.2.gemfile
56
- - rvm: jruby-19mode
57
- gemfile: gemfiles/3.2.gemfile
58
- exclude:
59
- - rvm: 1.9.2
60
- gemfile: gemfiles/3.1.gemfile
61
- - rvm: 1.9.2
62
- gemfile: gemfiles/3.2.gemfile
16
+ - gemfiles/4.0.0.gemfile
17
+ - gemfiles/4.0.1.gemfile
18
+ - gemfiles/4.1.gemfile
19
+ - gemfiles/4.2.gemfile
data/Appraisals CHANGED
@@ -1,43 +1,24 @@
1
1
  ruby_version = Gem::Version.new(RUBY_VERSION + '')
2
2
 
3
+ shared_dependencies = proc do
4
+ gem 'rspec-rails', '>= 3.2.0', '< 4'
5
+ gem 'shoulda-context', '~> 1.2.0'
6
+ gem 'sqlite3', platform: :ruby
7
+ gem 'pg', platform: :ruby
8
+ gem 'activerecord-jdbc-adapter', platform: :jruby
9
+ gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
10
+ gem 'jdbc-sqlite3', platform: :jruby
11
+ gem 'jruby-openssl', platform: :jruby
12
+ gem 'therubyrhino', platform: :jruby
13
+ end
14
+
3
15
  spring = proc do
4
16
  gem 'spring'
5
17
  gem 'spring-commands-rspec'
6
18
  end
7
19
 
8
- rails_3 = proc do
9
- gem 'strong_parameters'
10
- gem 'rspec-rails', '2.99.0'
11
- gem 'minitest', '~> 4.0'
12
- gem 'minitest-reporters'
13
- end
14
-
15
- rails_3_1 = proc do
16
- instance_eval(&rails_3)
17
- gem 'rails', '~> 3.1.8'
18
- gem 'bcrypt-ruby', '~> 3.0.0'
19
- gem 'jquery-rails'
20
- gem 'sass-rails', '~> 3.1.5'
21
- gem 'coffee-rails', '~> 3.1.1'
22
- gem 'uglifier', '>= 1.0.3'
23
- gem 'rspec-rails', '2.99.0'
24
- gem 'minitest', '~> 4.0'
25
- gem 'minitest-reporters'
26
- end
27
-
28
- rails_3_2 = proc do
29
- instance_eval(&rails_3)
30
- gem 'rails', '~> 3.2.13'
31
- gem 'bcrypt-ruby', '~> 3.0.0'
32
- gem 'jquery-rails'
33
- gem 'sass-rails', '~> 3.2.3'
34
- gem 'coffee-rails', '~> 3.2.1'
35
- gem 'uglifier', '>= 1.0.3'
36
- gem 'minitest', '~> 4.0'
37
- gem 'minitest-reporters'
38
- end
39
-
40
20
  rails_4 = proc do
21
+ instance_eval(&shared_dependencies)
41
22
  instance_eval(&spring)
42
23
  gem 'uglifier', '>= 1.3.0'
43
24
  gem 'coffee-rails', '~> 4.0.0'
@@ -45,7 +26,6 @@ rails_4 = proc do
45
26
  gem 'turbolinks'
46
27
  gem 'sdoc'
47
28
  gem 'activeresource', '4.0.0'
48
- gem 'rspec-rails', '~> 3.0.1'
49
29
  # Test suite makes heavy use of attr_accessible
50
30
  gem 'protected_attributes'
51
31
  gem 'minitest-reporters'
@@ -53,76 +33,41 @@ end
53
33
 
54
34
  #---
55
35
 
56
- if Gem::Requirement.new('< 2').satisfied_by?(ruby_version)
57
- appraise '3.0' do
58
- instance_eval(&rails_3)
59
- gem 'rails', '~> 3.0.17'
60
- end
61
-
62
- if Gem::Requirement.new('= 1.9.2').satisfied_by?(ruby_version)
63
- appraise '3.1-1.9.2' do
64
- instance_eval(&rails_3_1)
65
- gem 'turn', '0.8.2'
66
- end
67
- else
68
- appraise '3.1' do
69
- instance_eval(&rails_3_1)
70
- gem 'turn', '~> 0.8.3'
71
- end
72
- end
36
+ appraise '4.0.0' do
37
+ instance_eval(&rails_4)
38
+ gem 'rails', '4.0.0'
39
+ gem 'jbuilder', '~> 1.2'
40
+ gem 'sass-rails', '~> 4.0.0'
41
+ gem 'bcrypt-ruby', '~> 3.0.0'
73
42
  end
74
43
 
75
- if Gem::Requirement.new('= 1.9.2').satisfied_by?(ruby_version)
76
- appraise '3.2-1.9.2' do
77
- instance_eval(&rails_3_2)
78
- end
79
- else
80
- appraise '3.2' do
81
- instance_eval(&rails_3_2)
82
- instance_eval(&spring)
83
- end
44
+ appraise '4.0.1' do
45
+ instance_eval(&rails_4)
46
+ gem 'rails', '4.0.1'
47
+ gem 'jbuilder', '~> 1.2'
48
+ gem 'sass-rails', '~> 4.0.0'
49
+ gem 'bcrypt-ruby', '~> 3.1.2'
84
50
  end
85
51
 
86
- if Gem::Requirement.new('> 1.9.2').satisfied_by?(ruby_version)
87
- appraise '4.0.0' do
88
- instance_eval(&rails_4)
89
- gem 'rails', '4.0.0'
90
- gem 'jbuilder', '~> 1.2'
91
- gem 'sass-rails', '~> 4.0.0'
92
- gem 'bcrypt-ruby', '~> 3.0.0'
93
- end
94
-
95
- appraise '4.0.1' do
96
- instance_eval(&rails_4)
97
- gem 'rails', '4.0.1'
98
- gem 'jbuilder', '~> 1.2'
99
- gem 'sass-rails', '~> 4.0.0'
100
- gem 'bcrypt-ruby', '~> 3.1.2'
101
- gem 'rspec-rails', '2.99.0'
102
- end
103
-
104
- appraise '4.1' do
105
- instance_eval(&rails_4)
106
- gem 'rails', '~> 4.1.0'
107
- gem 'jbuilder', '~> 2.0'
108
- gem 'sass-rails', '~> 4.0.3'
109
- gem 'sdoc', '~> 0.4.0'
110
- gem 'bcrypt', '~> 3.1.7'
111
- gem 'protected_attributes', "~> 1.0.6"
112
- gem 'spring'
113
- end
52
+ appraise '4.1' do
53
+ instance_eval(&rails_4)
54
+ gem 'rails', '~> 4.1.0'
55
+ gem 'jbuilder', '~> 2.0'
56
+ gem 'sass-rails', '~> 4.0.3'
57
+ gem 'sdoc', '~> 0.4.0'
58
+ gem 'bcrypt', '~> 3.1.7'
59
+ gem 'protected_attributes', "~> 1.0.6"
60
+ gem 'spring'
61
+ end
114
62
 
115
- appraise '4.2' do
116
- instance_eval(&rails_4)
117
- gem 'rails', '~> 4.2.0'
118
- gem 'sass-rails', '~> 5.0'
119
- gem 'coffee-rails', '~> 4.1.0'
120
- gem 'jbuilder', '~> 2.0'
121
- gem 'sdoc', '~> 0.4.0'
122
- gem 'bcrypt', '~> 3.1.7'
123
- gem 'byebug'
124
- gem 'web-console', '~> 2.0'
125
- gem 'spring'
126
- gem 'protected_attributes', "~> 1.0.6"
127
- end
63
+ appraise '4.2' do
64
+ instance_eval(&rails_4)
65
+ gem 'rails', '~> 4.2.0'
66
+ gem 'sass-rails', '~> 5.0'
67
+ gem 'coffee-rails', '~> 4.1.0'
68
+ gem 'jbuilder', '~> 2.0'
69
+ gem 'sdoc', '~> 0.4.0'
70
+ gem 'bcrypt', '~> 3.1.7'
71
+ gem 'spring'
72
+ gem 'protected_attributes', "~> 1.0.6"
128
73
  end
@@ -1,18 +1,22 @@
1
1
  We love contributions from the community! Here's a quick guide to making a pull
2
- request:
2
+ request.
3
+
4
+ ## Overview
5
+
6
+ 0. If you haven't contributed before, please read and understand the [Code of
7
+ Conduct].
3
8
 
4
9
  1. Fork the repo.
5
10
 
6
- 2. Run the tests. We only take pull requests with passing tests, and it's great
11
+ 2. Install [dependencies](#installing-dependencies).
12
+
13
+ 3. Run the tests. We only take pull requests with passing tests, and it's great
7
14
  to know that you have a clean slate: `bundle && bundle exec rake`
8
15
 
9
- 3. If you're adding functionality or fixing a bug, add a failing test for the
16
+ 4. If you're adding functionality or fixing a bug, add a failing test for the
10
17
  issue first.
11
18
 
12
- 4. Make the test pass.
13
-
14
- 5. If you're adding a new feature, ensure that the documentation is up to date
15
- (see the README for instructions on previewing documentation live).
19
+ 5. Make the test pass.
16
20
 
17
21
  6. Finally, push to your fork and submit a pull request.
18
22
 
@@ -22,4 +26,44 @@ code to fit with our [code style] or the project style, or discuss alternate
22
26
  ways of addressing the issue in question. When we're happy with everything,
23
27
  we'll bring your changes into master. Now you're a contributor!
24
28
 
29
+ ## Installing Dependencies
30
+
31
+ ### On Debian/Ubuntu-based systems
32
+
33
+ ```
34
+ sudo apt-get install -y ruby-dev libpq-dev libsqlite3-dev nodejs
35
+ ```
36
+
37
+ Ubuntu, as of 14.04, ships with Ruby 1.9.2. shoulda-matchers is only compatible
38
+ with Ruby 2, so use your Ruby version manager of choice to install the latest
39
+ version of Ruby (2.2.1 at the time of this writing).
40
+
41
+ ```
42
+ # RVM
43
+ rvm install 2.2
44
+ rvm use 2.2
45
+
46
+ # rbenv
47
+ rbenv install 2.2.1
48
+ rbenv shell 2.2.1
49
+ ```
50
+
51
+ ### On RedHat-based systems
52
+
53
+ ```
54
+ sudo yum install -y ruby-devel postgresql-devel sqlite-devel zlib-devel
55
+ ```
56
+
57
+ Also, install one of the JavaScript runtimes supported by [execjs]. For
58
+ instance, to install node.js:
59
+
60
+ ```
61
+ sudo su
62
+ curl -sL https://rpm.nodesource.com/setup | bash -
63
+ yum install -y nodejs
64
+ ```
65
+
66
+ [Code of Conduct]: https://thoughtbot.com/open-source-code-of-conduct
25
67
  [code style]: https://github.com/thoughtbot/guides/tree/master/style
68
+ [execjs]: https://github.com/sstephenson/execjs
69
+ [install rvm]: https://rvm.io/rvm/install
data/Gemfile CHANGED
@@ -1,28 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'appraisal', '~> 1.0'
4
- gem 'aruba'
5
- gem 'bourne', '~> 1.3'
6
4
  gem 'bundler', '~> 1.1'
7
- gem 'pry-nav'
8
- gem 'rails', '~> 3.0'
9
- gem 'rake', '>= 0.9.2'
10
- gem 'rspec-rails', '>= 2.99.0'
5
+ gem 'pry', github: 'pry/pry'
6
+ gem 'pry-byebug'
7
+ gem 'rake', '~> 10.0'
8
+ gem 'rspec-core', '>= 3.2.0', '< 4'
9
+ gem 'rspec-expectations', '>= 3.2.0', '< 4'
11
10
 
12
11
  # YARD
13
12
  gem 'yard'
14
13
  gem 'redcarpet'
15
14
  gem 'pygments.rb'
16
- gem 'watchr'
17
-
18
- # For test Rails application
19
- gem 'shoulda-context', '~> 1.2.0'
20
- gem 'sqlite3', :platform => :ruby
21
-
22
- # Can't wrap in platform :jruby do...end block because appraisal doesn't
23
- # support it
24
- gem 'activerecord-jdbc-adapter', :platform => :jruby
25
- gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
26
- gem 'jdbc-sqlite3', :platform => :jruby
27
- gem 'jruby-openssl', :platform => :jruby
28
- gem 'therubyrhino', :platform => :jruby
15
+ gem 'guard'
16
+ gem 'guard-yard'
@@ -1,141 +1,74 @@
1
+ GIT
2
+ remote: git://github.com/pry/pry.git
3
+ revision: f0cbec507111743fdbc273735ea4f0f6164a5b21
4
+ specs:
5
+ pry (0.10.1)
6
+ coderay (~> 1.1.0)
7
+ method_source (~> 0.8.1)
8
+ slop (~> 3.4)
9
+
1
10
  GEM
2
11
  remote: https://rubygems.org/
3
12
  specs:
4
- actionmailer (3.2.16)
5
- actionpack (= 3.2.16)
6
- mail (~> 2.5.4)
7
- actionpack (3.2.16)
8
- activemodel (= 3.2.16)
9
- activesupport (= 3.2.16)
10
- builder (~> 3.0.0)
11
- erubis (~> 2.7.0)
12
- journey (~> 1.0.4)
13
- rack (~> 1.4.5)
14
- rack-cache (~> 1.2)
15
- rack-test (~> 0.6.1)
16
- sprockets (~> 2.2.1)
17
- activemodel (3.2.16)
18
- activesupport (= 3.2.16)
19
- builder (~> 3.0.0)
20
- activerecord (3.2.16)
21
- activemodel (= 3.2.16)
22
- activesupport (= 3.2.16)
23
- arel (~> 3.0.2)
24
- tzinfo (~> 0.3.29)
25
- activeresource (3.2.16)
26
- activemodel (= 3.2.16)
27
- activesupport (= 3.2.16)
28
- activesupport (3.2.16)
29
- i18n (~> 0.6, >= 0.6.4)
30
- multi_json (~> 1.0)
31
13
  appraisal (1.0.2)
32
14
  bundler
33
15
  rake
34
16
  thor (>= 0.14.0)
35
- arel (3.0.3)
36
- aruba (0.6.0)
37
- childprocess (>= 0.3.6)
38
- cucumber (>= 1.1.1)
39
- rspec-expectations (>= 2.7.0)
40
- bourne (1.5.0)
41
- mocha (>= 0.13.2, < 0.15)
42
- builder (3.0.4)
43
- childprocess (0.5.3)
44
- ffi (~> 1.0, >= 1.0.11)
17
+ byebug (4.0.4)
18
+ columnize (= 0.9.0)
19
+ celluloid (0.16.0)
20
+ timers (~> 4.0.0)
45
21
  coderay (1.1.0)
46
- cucumber (1.3.16)
47
- builder (>= 2.1.2)
48
- diff-lcs (>= 1.1.3)
49
- gherkin (~> 2.12)
50
- multi_json (>= 1.7.5, < 2.0)
51
- multi_test (>= 0.1.1)
22
+ columnize (0.9.0)
52
23
  diff-lcs (1.2.5)
53
- erubis (2.7.0)
54
- ffi (1.9.3)
55
- gherkin (2.12.2)
56
- multi_json (~> 1.3)
57
- hike (1.2.3)
58
- i18n (0.6.11)
59
- journey (1.0.4)
60
- json (1.8.1)
61
- mail (2.5.4)
62
- mime-types (~> 1.16)
63
- treetop (~> 1.4.8)
64
- metaclass (0.0.1)
24
+ ffi (1.9.8)
25
+ formatador (0.2.5)
26
+ guard (2.12.5)
27
+ formatador (>= 0.2.4)
28
+ listen (~> 2.7)
29
+ lumberjack (~> 1.0)
30
+ nenv (~> 0.1)
31
+ notiffany (~> 0.0)
32
+ pry (>= 0.9.12)
33
+ shellany (~> 0.0)
34
+ thor (>= 0.18.1)
35
+ guard-yard (2.1.4)
36
+ guard (>= 1.1.0)
37
+ yard (>= 0.7.0)
38
+ hitimes (1.2.2)
39
+ listen (2.10.0)
40
+ celluloid (~> 0.16.0)
41
+ rb-fsevent (>= 0.9.3)
42
+ rb-inotify (>= 0.9)
43
+ lumberjack (1.0.9)
65
44
  method_source (0.8.2)
66
- mime-types (1.25.1)
67
- mocha (0.14.0)
68
- metaclass (~> 0.0.1)
69
- multi_json (1.10.1)
70
- multi_test (0.1.1)
71
- polyglot (0.3.3)
45
+ nenv (0.2.0)
46
+ notiffany (0.0.6)
47
+ nenv (~> 0.1)
48
+ shellany (~> 0.0)
72
49
  posix-spawn (0.3.8)
73
- pry (0.10.1)
74
- coderay (~> 1.1.0)
75
- method_source (~> 0.8.1)
76
- slop (~> 3.4)
77
- pry-nav (0.2.4)
78
- pry (>= 0.9.10, < 0.11.0)
50
+ pry-byebug (3.1.0)
51
+ byebug (~> 4.0)
52
+ pry (~> 0.10)
79
53
  pygments.rb (0.3.7)
80
54
  posix-spawn (~> 0.3.6)
81
55
  yajl-ruby (~> 1.1.0)
82
- rack (1.4.5)
83
- rack-cache (1.2)
84
- rack (>= 0.4)
85
- rack-ssl (1.3.4)
86
- rack
87
- rack-test (0.6.2)
88
- rack (>= 1.0)
89
- rails (3.2.16)
90
- actionmailer (= 3.2.16)
91
- actionpack (= 3.2.16)
92
- activerecord (= 3.2.16)
93
- activeresource (= 3.2.16)
94
- activesupport (= 3.2.16)
95
- bundler (~> 1.0)
96
- railties (= 3.2.16)
97
- railties (3.2.16)
98
- actionpack (= 3.2.16)
99
- activesupport (= 3.2.16)
100
- rack-ssl (~> 1.3.2)
101
- rake (>= 0.8.7)
102
- rdoc (~> 3.4)
103
- thor (>= 0.14.6, < 2.0)
104
- rake (10.3.2)
105
- rdoc (3.12.2)
106
- json (~> 1.4)
56
+ rake (10.4.2)
57
+ rb-fsevent (0.9.4)
58
+ rb-inotify (0.9.5)
59
+ ffi (>= 0.5.0)
107
60
  redcarpet (3.0.0)
108
- rspec-core (3.0.3)
109
- rspec-support (~> 3.0.0)
110
- rspec-expectations (3.0.3)
61
+ rspec-core (3.2.0)
62
+ rspec-support (~> 3.2.0)
63
+ rspec-expectations (3.2.0)
111
64
  diff-lcs (>= 1.2.0, < 2.0)
112
- rspec-support (~> 3.0.0)
113
- rspec-mocks (3.0.3)
114
- rspec-support (~> 3.0.0)
115
- rspec-rails (3.0.2)
116
- actionpack (>= 3.0)
117
- activesupport (>= 3.0)
118
- railties (>= 3.0)
119
- rspec-core (~> 3.0.0)
120
- rspec-expectations (~> 3.0.0)
121
- rspec-mocks (~> 3.0.0)
122
- rspec-support (~> 3.0.0)
123
- rspec-support (3.0.3)
124
- shoulda-context (1.2.0)
65
+ rspec-support (~> 3.2.0)
66
+ rspec-support (3.2.1)
67
+ shellany (0.0.1)
125
68
  slop (3.6.0)
126
- sprockets (2.2.2)
127
- hike (~> 1.2)
128
- multi_json (~> 1.0)
129
- rack (~> 1.0)
130
- tilt (~> 1.1, != 1.3.0)
131
- sqlite3 (1.3.8)
132
69
  thor (0.19.1)
133
- tilt (1.4.1)
134
- treetop (1.4.15)
135
- polyglot
136
- polyglot (>= 0.3.1)
137
- tzinfo (0.3.38)
138
- watchr (0.7)
70
+ timers (4.0.1)
71
+ hitimes
139
72
  yajl-ruby (1.1.0)
140
73
  yard (0.8.7.3)
141
74
 
@@ -143,22 +76,15 @@ PLATFORMS
143
76
  ruby
144
77
 
145
78
  DEPENDENCIES
146
- activerecord-jdbc-adapter
147
- activerecord-jdbcsqlite3-adapter
148
79
  appraisal (~> 1.0)
149
- aruba
150
- bourne (~> 1.3)
151
80
  bundler (~> 1.1)
152
- jdbc-sqlite3
153
- jruby-openssl
154
- pry-nav
81
+ guard
82
+ guard-yard
83
+ pry!
84
+ pry-byebug
155
85
  pygments.rb
156
- rails (~> 3.0)
157
- rake (>= 0.9.2)
86
+ rake (~> 10.0)
158
87
  redcarpet
159
- rspec-rails (>= 2.99.0)
160
- shoulda-context (~> 1.2.0)
161
- sqlite3
162
- therubyrhino
163
- watchr
88
+ rspec-core (>= 3.2.0, < 4)
89
+ rspec-expectations (>= 3.2.0, < 4)
164
90
  yard