ander 1.0.1 → 1.0.2
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 +8 -8
- data/lib/ander.rb +33 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDM2OTlmZjE0N2Q3MmI1YjZiNjU1YzhkNTllMDBjMTk3OWU3NzM3YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDdmMDAyMjNlZGNlODcwNDYyMzg2NWYwNmRiN2Q0OGQyNTA4MWYyMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjNmZjI1MmI1MDkxMGM3NDJhMTliOWQ1OTVjYTVmOGM0ODhmZjA2MTdlNDEz
|
10
|
+
NTFhOWNhNGZmMDFjOTgzYjk5NWVjZDU5ZTM4NmY2OWMzMTZmZmRjOTc5MjNl
|
11
|
+
ZTczODQ2ZTI2YTNlMDZmM2YwOTdlNDAwYWQ3MzI1ODQyNWZiNjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmFlMjNhY2ZmMGFkM2YyY2U2ZDBhMzA5MGJiYzE1ZjcyN2RkNGQwMzEyNGRk
|
14
|
+
NDhkOWViNzc5ZTEzZDIyODZiMWI1NGM3MjY0YjlmMGYzZmYzNGY1MWJjMmZh
|
15
|
+
NmQyNTQzZTdkY2NmNTlmMTllNjJkNmY5ZmMxNTMwMWEzZGM1ZWE=
|
data/lib/ander.rb
CHANGED
@@ -9,14 +9,38 @@ class Ander
|
|
9
9
|
def self.add_to_gemfile
|
10
10
|
# Include rspec, rails_spec and simplecov in Gemfile
|
11
11
|
puts "\nAdding rspec, rspec-rails and simplecov to the Gemfile"
|
12
|
-
|
13
|
-
open('Gemfile', '
|
14
|
-
f.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
# Check if any gems already exists in Gemfile
|
13
|
+
open('Gemfile', 'r') { |f|
|
14
|
+
x = f.readlines
|
15
|
+
x.each do |i|
|
16
|
+
if i.include? "'rspec'"
|
17
|
+
@rspec = true
|
18
|
+
end
|
19
|
+
if i.include? "'rspec-rails'"
|
20
|
+
@rspec_rails = true
|
21
|
+
end
|
22
|
+
if i.include? "'simplecov'"
|
23
|
+
@simplecov = true
|
24
|
+
end
|
25
|
+
end
|
19
26
|
}
|
27
|
+
# add to Gemfile only for the missing gems
|
28
|
+
unless @rspec and @rspec_rails and @simplecov
|
29
|
+
open('Gemfile', 'a') { |f|
|
30
|
+
f.puts 'group :development, :test do'
|
31
|
+
unless @rspec
|
32
|
+
f.puts " gem 'rspec'"
|
33
|
+
end
|
34
|
+
unless @rspec_rails
|
35
|
+
f.puts " gem 'rspec-rails'"
|
36
|
+
end
|
37
|
+
unless @simplecov
|
38
|
+
f.puts " gem 'simplecov'"
|
39
|
+
end
|
40
|
+
f.puts 'end'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
20
44
|
end
|
21
45
|
|
22
46
|
def self.bundle_install
|
@@ -45,4 +69,6 @@ class Ander
|
|
45
69
|
}
|
46
70
|
end
|
47
71
|
|
72
|
+
def self.modify_
|
73
|
+
|
48
74
|
end
|