rails_apps_composer 2.5.0 → 2.5.1
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.
- checksums.yaml +4 -4
- data/recipes/extras.rb +10 -1
- data/recipes/gems.rb +1 -0
- data/recipes/tests4.rb +5 -69
- data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb7b070a8c93fc3dc7b3853ad4daabc4a1918f5e
|
|
4
|
+
data.tar.gz: 8c0f8a43b0ec9825f90a70745e930173647619c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a60b89b7f043166097aa871f01e2882f46c18060f85586222e9e363caa230ab4b54e2b7e3808fae11a15d4cd7e88607e4b11b8eebb468189123bacd2a312c05
|
|
7
|
+
data.tar.gz: 9f87d3a8c3dbe0952402d97d337a9d056bec4ecfad6ded0c470fe272fdd34b50d0cd80b757c596a99f289074c2dc9284ef9fab9f01fc60868995bc43848ec12a
|
data/recipes/extras.rb
CHANGED
|
@@ -103,7 +103,16 @@ end
|
|
|
103
103
|
if prefs[:better_errors]
|
|
104
104
|
say_wizard "recipe adding better_errors gem"
|
|
105
105
|
add_gem 'better_errors', :group => :development
|
|
106
|
-
|
|
106
|
+
if RUBY_ENGINE == 'ruby'
|
|
107
|
+
case RUBY_VERSION.split('.')[0] + "." + RUBY_VERSION.split('.')[1]
|
|
108
|
+
when '2.1'
|
|
109
|
+
add_gem 'binding_of_caller', :group => :development, :platforms => [:mri_21]
|
|
110
|
+
when '2.0'
|
|
111
|
+
add_gem 'binding_of_caller', :group => :development, :platforms => [:mri_20]
|
|
112
|
+
when '1.9'
|
|
113
|
+
add_gem 'binding_of_caller', :group => :development, :platforms => [:mri_19]
|
|
114
|
+
end
|
|
115
|
+
end
|
|
107
116
|
end
|
|
108
117
|
|
|
109
118
|
# Pry
|
data/recipes/gems.rb
CHANGED
|
@@ -65,6 +65,7 @@ end
|
|
|
65
65
|
## Testing Framework
|
|
66
66
|
if rails_4_1?
|
|
67
67
|
if prefer :tests, 'rspec'
|
|
68
|
+
add_gem 'rails_apps_testing', :group => :development
|
|
68
69
|
add_gem 'rspec-rails', '>= 3.0.0.beta2', :group => [:development, :test]
|
|
69
70
|
add_gem 'factory_girl_rails', :group => [:development, :test]
|
|
70
71
|
add_gem 'faker', :group => :test
|
data/recipes/tests4.rb
CHANGED
|
@@ -6,75 +6,9 @@ after_bundler do
|
|
|
6
6
|
### RSPEC ###
|
|
7
7
|
if prefer :tests, 'rspec'
|
|
8
8
|
say_wizard "recipe installing RSpec"
|
|
9
|
-
|
|
10
|
-
generate 'rspec:install'
|
|
11
|
-
inject_into_file '.rspec', "--format documentation\n", :after => "--color\n"
|
|
12
|
-
gsub_file 'spec/spec_helper.rb', /ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)/, "ActiveRecord::Migration.maintain_test_schema!"
|
|
13
|
-
inject_into_file 'config/application.rb', :after => "Rails::Application\n" do <<-RUBY
|
|
14
|
-
|
|
15
|
-
config.generators do |g|
|
|
16
|
-
g.test_framework :rspec,
|
|
17
|
-
fixtures: true,
|
|
18
|
-
view_specs: false,
|
|
19
|
-
helper_specs: false,
|
|
20
|
-
routing_specs: false,
|
|
21
|
-
controller_specs: false,
|
|
22
|
-
request_specs: false
|
|
23
|
-
g.fixture_replacement :factory_girl, dir: "spec/factories"
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
RUBY
|
|
27
|
-
end
|
|
28
|
-
### Configure Launchy to display CSS and JavaScript
|
|
29
|
-
create_file 'spec/support/capybara.rb', "Capybara.asset_host = 'http://localhost:3000'\n"
|
|
30
|
-
### Configure Database Cleaner to test JavaScript
|
|
31
|
-
gsub_file 'spec/spec_helper.rb', /config.use_transactional_fixtures = true/, "config.use_transactional_fixtures = false"
|
|
32
|
-
create_file 'spec/support/database_cleaner.rb' do
|
|
33
|
-
<<-RUBY
|
|
34
|
-
RSpec.configure do |config|
|
|
35
|
-
config.before(:suite) do
|
|
36
|
-
DatabaseCleaner.clean_with(:truncation)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
config.before(:each) do
|
|
40
|
-
DatabaseCleaner.strategy = :transaction
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
config.before(:each, :js => true) do
|
|
44
|
-
DatabaseCleaner.strategy = :truncation
|
|
9
|
+
generate 'testing:configure rspec -f'
|
|
45
10
|
end
|
|
46
|
-
|
|
47
|
-
config.before(:each) do
|
|
48
|
-
DatabaseCleaner.start
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
config.append_after(:each) do
|
|
52
|
-
DatabaseCleaner.clean
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
RUBY
|
|
56
|
-
end
|
|
57
|
-
### Configure FactoryGirl for shortcuts
|
|
58
|
-
create_file 'spec/support/factory_girl.rb' do
|
|
59
|
-
<<-RUBY
|
|
60
|
-
RSpec.configure do |config|
|
|
61
|
-
config.include FactoryGirl::Syntax::Methods
|
|
62
|
-
end
|
|
63
|
-
RUBY
|
|
64
|
-
end
|
|
65
|
-
## RSPEC AND DEVISE
|
|
66
|
-
if prefer :authentication, 'devise'
|
|
67
|
-
# add Devise test helpers
|
|
68
|
-
create_file 'spec/support/devise.rb' do
|
|
69
|
-
<<-RUBY
|
|
70
|
-
RSpec.configure do |config|
|
|
71
|
-
config.include Devise::TestHelpers, :type => :controller
|
|
72
|
-
end
|
|
73
|
-
RUBY
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
### GUARD
|
|
11
|
+
### GUARD ###
|
|
78
12
|
if prefer :continuous_testing, 'guard'
|
|
79
13
|
say_wizard "recipe initializing Guard"
|
|
80
14
|
run 'bundle exec guard init'
|
|
@@ -86,7 +20,9 @@ end # after_bundler
|
|
|
86
20
|
|
|
87
21
|
after_everything do
|
|
88
22
|
say_wizard "recipe running after everything"
|
|
89
|
-
|
|
23
|
+
if prefer :authentication, 'devise'
|
|
24
|
+
generate 'testing:configure devise -f'
|
|
25
|
+
end
|
|
90
26
|
end # after_everything
|
|
91
27
|
|
|
92
28
|
__END__
|
data/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_apps_composer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.5.
|
|
4
|
+
version: 2.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Kehoe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-04-
|
|
11
|
+
date: 2014-04-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: i18n
|