ander 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/ander.rb +47 -0
- metadata +46 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YmZjNDc1ZjY4MjhhMjI0MjIwNWE4YTQyOTYxYTdkZDM4MWIzNzQ2ZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YWMzMzg1YmVkOTA3ODdiNTE5NjE5M2MxMzQwMGFmOWZhOTBmM2E1ZQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NzJjNGI3MTU5Y2I2Mzg4OWFjYWQzMTU3N2NiOGUwZjA5ZTVhY2FlN2RhMDlj
|
10
|
+
MzA3MjQ1MDEwYWJiOTRjYmFhNGIxNjQ2YzhlNWI2Y2Y0Nzg4NzYxZGNiMDg3
|
11
|
+
NjU3NTQyYWZjMTdkZmRmZTZlMGFhNGE1YmFhNTQwZjMwNDc0MjA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NWM5ZDdhMmIyMjFjMmU0YWVlY2U5Y2Y4MWFlNjhmNzUyYTA3MjZjMDJjZGEy
|
14
|
+
ZjM0OGM1YjA1MzlkYmZkMjY2NTdlMDBkNTU1MWY1OWY5YzNiYTkwNjljZTUz
|
15
|
+
ZDMzOWQ3NTJhYWNmMzU2OTNiNzMzNDNhYTk5NGFmZjNhZjM5YTY=
|
data/lib/ander.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
class Ander
|
2
|
+
def self.setup_all
|
3
|
+
self.add_to_gemfile
|
4
|
+
self.bundle_install
|
5
|
+
self.run_setup_commands
|
6
|
+
self.configure_dotrspec
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.add_to_gemfile
|
10
|
+
# Include rspec, rails_spec and simplecov in Gemfile
|
11
|
+
puts "\nAdding rspec, rspec-rails and simplecov to the Gemfile"
|
12
|
+
open('Gemfile', 'a') { |f|
|
13
|
+
f.puts 'group :development, :test do'
|
14
|
+
f.puts " gem 'rspec'"
|
15
|
+
f.puts " gem 'rspec-rails'"
|
16
|
+
f.puts " gem 'simplecov'"
|
17
|
+
f.puts 'end'
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.bundle_install
|
22
|
+
# Bundle install
|
23
|
+
puts "\nExecuting Bundle Install"
|
24
|
+
system('bundle install')
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.run_setup_commands
|
28
|
+
# run all required setup commands for rspec
|
29
|
+
puts "\nRunning setup commands for rspec"
|
30
|
+
system('spring stop')
|
31
|
+
system('rails generate rspec:install')
|
32
|
+
system('spring stop')
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.configure_dotrspec
|
36
|
+
# configure .rspec
|
37
|
+
puts "\nconfiguring rspec output format in .rspec"
|
38
|
+
open('.rspec', 'w') { |f|
|
39
|
+
f.puts '--color'
|
40
|
+
f.puts '--require spec_helper'
|
41
|
+
f.puts '--format progress'
|
42
|
+
f.puts '--format html'
|
43
|
+
f.puts '--out spec/rspec_results.html'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ander
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Derwin Devera, Andy Juram Lee
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Setup Rspec for Rails environment including all configurations and command
|
14
|
+
line inputs required. Once the setup is ran, user can start run spec files without
|
15
|
+
any further configurations.
|
16
|
+
email: andy.lee@flipp.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/ander.rb
|
22
|
+
homepage: http://rubygems.org/gems/anderwin
|
23
|
+
licenses:
|
24
|
+
- ''
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 2.4.6
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: Performs all required steps to setup rspec on rails.
|
46
|
+
test_files: []
|