make_it_so 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0abc31e727aa90f1aa8c49834da04c2cc686504c
4
- data.tar.gz: 2f377092405cdd5cab683616c9fc0bd5d21b02ad
3
+ metadata.gz: ecc353cb742607b9a6bdce825f69dddb0b417f17
4
+ data.tar.gz: 611e0994bddd88370147c325aaa3eba1bb82d264
5
5
  SHA512:
6
- metadata.gz: 70de9664c91a01d508b5cf35c363dfb83cae28113e6ed0a862620622fe21b2cf8950df42d003f24e195aa46f1b3c6a2d62154ece3a60d23e6a1dce89d5a630e0
7
- data.tar.gz: c746d3a2cb0c9d21feecb731d7d6df88e2ef04b7cb5244e723912a5c6601f628f404c2df60511d3b860e6806f847bb46d378765091a89eb21910dd846c033572
6
+ metadata.gz: f962f5cb9da4852c3fd43524a5d0ede46b528bd965689060481d493ea4fde8cb23be03ed5ae8b0d1dda6ba483f36d23c689e0251a9e02d80054b415ae0ea6baf
7
+ data.tar.gz: b2a787a25c46347cc95034f577237f86c84847446c43bcdb27837910f64d7f6cc62f5bd09a93ab151f707a3b5bf4e2ebaea46ef1ed07cdeab53267bdb8dd85a9
@@ -32,7 +32,8 @@ module MakeItSo
32
32
  end
33
33
 
34
34
  def eliminate_byebug
35
- gsub_file 'Gemfile', /gem '|"byebug'|"/, ''
35
+ both_lines = /^[[:space:]]*# Call 'byebug'.*gem 'byebug'.*?$\n/m
36
+ gsub_file 'Gemfile', both_lines, "\n"
36
37
  end
37
38
 
38
39
  def rspec_dependency
@@ -1,3 +1,3 @@
1
1
  module MakeItSo
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -36,6 +36,16 @@ feature 'user generates rails app' do
36
36
  expect(File.read(app_layout)).to include('flash')
37
37
  end
38
38
 
39
+ scenario 'creates a valid gemfile' do
40
+ words = ['source', '#', 'gem', 'group', 'end']
41
+
42
+ File.readlines('Gemfile').each do |line|
43
+ unless line.strip.empty?
44
+ expect(line.strip.start_with?(*words)).to eq(true)
45
+ end
46
+ end
47
+ end
48
+
39
49
  context 'pry-rails' do
40
50
  it 'is added as a dependency' do
41
51
  expect(File.read(gemfile_path)).to match(/gem(.*)pry-rails/)
@@ -51,11 +61,13 @@ feature 'user generates rails app' do
51
61
  spec_helper = join_paths(app_path, 'spec/spec_helper.rb')
52
62
  expect(FileTest.exists?(spec_helper)).to eq(true)
53
63
  end
64
+
54
65
  context 'byebug' do
55
- it 'comments out the byebug dependency' do
66
+ it 'removes the byebug dependency' do
56
67
  expect(File.read(gemfile_path)).to_not match(/gem(.*)byebug/)
57
68
  end
58
69
  end
70
+
59
71
  context 'capybara' do
60
72
  it 'includes capybara as a Gemfile dependency' do
61
73
  expect(File.read(gemfile_path)).to include('capybara')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: make_it_so
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Pickett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-29 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor