raygun 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/raygun +1 -3
- data/lib/raygun/app_builder.rb +7 -0
- data/lib/raygun/generators/app_generator.rb +1 -0
- data/lib/raygun/version.rb +1 -1
- data/{generators/simplecov → templates/_spec/support}/simplecov.rb +0 -0
- metadata +3 -7
- data/generators/application_template.rb +0 -5
- data/generators/simplecov/simplecov_template.rb +0 -11
- data/generators/simplecov/spec/support/simplecov.rb +0 -25
- data/generators/simplecov/tasks/coverage.rake +0 -12
data/bin/raygun
CHANGED
@@ -4,7 +4,5 @@ Raygun::AppGenerator.launch_path(Dir.pwd)
|
|
4
4
|
templates_root = File.expand_path(File.join('..', 'templates'), File.dirname(__FILE__))
|
5
5
|
Raygun::AppGenerator.source_root templates_root
|
6
6
|
Raygun::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root
|
7
|
-
Raygun::AppGenerator.source_paths << templates_root
|
8
|
-
Raygun::AppGenerator.source_paths << File.expand_path(File.join('..', 'generators'), File.dirname(__FILE__))
|
9
7
|
|
10
|
-
Raygun::AppGenerator.start ARGV
|
8
|
+
Raygun::AppGenerator.start ARGV
|
data/lib/raygun/app_builder.rb
CHANGED
@@ -268,6 +268,13 @@ RUBY
|
|
268
268
|
append_to_file 'config/environments/test.rb', 'Sorcery::CryptoProviders::BCrypt.cost = 1'
|
269
269
|
end
|
270
270
|
|
271
|
+
def setup_simplecov
|
272
|
+
uncomment_lines 'Gemfile', /simplecov/
|
273
|
+
|
274
|
+
copy_file '_lib/tasks/coverage.rake', 'lib/tasks/coverage.rake'
|
275
|
+
copy_file '_spec/support/simplecov.rb', 'spec/support/simplecov.rb'
|
276
|
+
end
|
277
|
+
|
271
278
|
def setup_default_rake_task
|
272
279
|
append_file 'Rakefile' do
|
273
280
|
"\ntask(:default).clear\ntask default: ['spec', 'spec:javascripts']"
|
data/lib/raygun/version.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
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-
|
12
|
+
date: 2012-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -92,11 +92,6 @@ files:
|
|
92
92
|
- Rakefile
|
93
93
|
- TODO.md
|
94
94
|
- bin/raygun
|
95
|
-
- generators/application_template.rb
|
96
|
-
- generators/simplecov/simplecov.rb
|
97
|
-
- generators/simplecov/simplecov_template.rb
|
98
|
-
- generators/simplecov/spec/support/simplecov.rb
|
99
|
-
- generators/simplecov/tasks/coverage.rake
|
100
95
|
- lib/raygun/actions.rb
|
101
96
|
- lib/raygun/app_builder.rb
|
102
97
|
- lib/raygun/generators/app_generator.rb
|
@@ -154,6 +149,7 @@ files:
|
|
154
149
|
- templates/_spec/requests/user_sessions_spec.rb
|
155
150
|
- templates/_spec/support/accept_values.rb
|
156
151
|
- templates/_spec/support/factory_girl.rb
|
152
|
+
- templates/_spec/support/simplecov.rb
|
157
153
|
- templates/_spec/support/sorcery.rb
|
158
154
|
- templates/_spec/support/user_sessions_request_helper.rb
|
159
155
|
- templates/rbenv-version.erb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
insert_into_file 'spec/spec_helper.rb',
|
2
|
-
"require File.expand_path('../support/simplecov', __FILE__)\n",
|
3
|
-
after: "ENV[\"RAILS_ENV\"] ||= \'test\'\n"
|
4
|
-
|
5
|
-
#gem_group :test, :development do
|
6
|
-
# gem 'simplecov'
|
7
|
-
#end
|
8
|
-
uncomment_lines 'Gemfile', /simplecov/
|
9
|
-
|
10
|
-
copy_file 'simplecov/tasks/coverage.rake', 'lib/tasks/coverage.rake'
|
11
|
-
copy_file 'simplecov/spec/support/simplecov.rb', 'spec/support/simplecov.rb'
|
@@ -1,25 +0,0 @@
|
|
1
|
-
if ENV['COVERAGE']
|
2
|
-
require 'simplecov'
|
3
|
-
|
4
|
-
# Writes the coverage stat to a file to be used by Cane.
|
5
|
-
class SimpleCov::Formatter::QualityFormatter
|
6
|
-
def format(result)
|
7
|
-
SimpleCov::Formatter::HTMLFormatter.new.format(result)
|
8
|
-
File.open("coverage/covered_percent", "w") do |f|
|
9
|
-
f.puts result.source_files.covered_percent.to_f
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
SimpleCov.formatter = SimpleCov::Formatter::QualityFormatter
|
14
|
-
|
15
|
-
SimpleCov.start do
|
16
|
-
add_filter '/spec/'
|
17
|
-
add_filter '/config/'
|
18
|
-
add_filter '/vendor/'
|
19
|
-
add_group 'Models', 'app/models'
|
20
|
-
add_group 'Controllers', 'app/controllers'
|
21
|
-
add_group 'Helpers', 'app/helpers'
|
22
|
-
add_group 'Views', 'app/views'
|
23
|
-
add_group 'Mailers', 'app/mailers'
|
24
|
-
end
|
25
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
namespace :spec do
|
2
|
-
task :enable_coverage do
|
3
|
-
ENV['COVERAGE'] = '1'
|
4
|
-
end
|
5
|
-
|
6
|
-
desc 'Executes specs with code coverage reports'
|
7
|
-
task coverage: :enable_coverage do
|
8
|
-
Rake::Task[:spec].invoke
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
Rake::Task['spec'].enhance ['spec:enable_coverage']
|