make_it_so 0.0.5 → 0.0.6

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: fc65d3862d2185b0170c51918ddd28fd7b487615
4
- data.tar.gz: 2b9dde02bb189631381b824662003403a72dc4f6
3
+ metadata.gz: 0abc31e727aa90f1aa8c49834da04c2cc686504c
4
+ data.tar.gz: 2f377092405cdd5cab683616c9fc0bd5d21b02ad
5
5
  SHA512:
6
- metadata.gz: bee10cbbbb3c8dd0eb04ec351d9fd78f6442573f250f475bca512ca16ea0af5a9d589ff47e5aa590b45307c8eb9d04ec664cdd39fa276997809bb5f30c9b4263
7
- data.tar.gz: 0d36d9ded514a38a977930c9bcafb2062e134b475140162d52ef8cbbbd23748a6f59078abd3b656546d38e40a1a93270196a51cca1c91307bf36dc2e87a10b1d
6
+ metadata.gz: 70de9664c91a01d508b5cf35c363dfb83cae28113e6ed0a862620622fe21b2cf8950df42d003f24e195aa46f1b3c6a2d62154ece3a60d23e6a1dce89d5a630e0
7
+ data.tar.gz: c746d3a2cb0c9d21feecb731d7d6df88e2ef04b7cb5244e723912a5c6601f628f404c2df60511d3b860e6806f847bb46d378765091a89eb21910dd846c033572
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ![Make It So](http://images.simplysyndicated.com/wp-content/uploads/2014/07/make-it-so-captain.jpg)
4
4
 
5
5
  Make It So is a command line utility that makes it easy to create starting points
6
- for all apps ruby. Right now, it only supports Rails, but support for Sinatra,
6
+ for all apps Ruby. Right now, it only supports Rails, but support for Sinatra,
7
7
  Gosu, and other paradigms are in progress.
8
8
 
9
9
  ## Installation
@@ -44,7 +44,9 @@ module MakeItSo
44
44
  def finish_template
45
45
  super
46
46
 
47
+ build 'pry_rails_dependency'
47
48
  build 'base_stylesheets'
49
+ build 'eliminate_byebug'
48
50
  unless options[:skip_javascript]
49
51
  build 'base_javascripts'
50
52
  end
@@ -56,6 +58,7 @@ module MakeItSo
56
58
  build 'factory_girl_rspec'
57
59
  build 'valid_attribute_rspec'
58
60
  build 'shoulda_rspec'
61
+ build 'teaspoon_jasmine'
59
62
  end
60
63
 
61
64
  if options[:devise]
@@ -21,12 +21,20 @@ module MakeItSo
21
21
  end
22
22
  end
23
23
 
24
+ def pry_rails_dependency
25
+ self.gem 'pry-rails', group: [:development, :test]
26
+ end
27
+
24
28
  def fix_generators
25
29
  inject_into_class 'config/application.rb', 'Application' do
26
30
  snippet('application_generator.rb')
27
31
  end
28
32
  end
29
33
 
34
+ def eliminate_byebug
35
+ gsub_file 'Gemfile', /gem '|"byebug'|"/, ''
36
+ end
37
+
30
38
  def rspec_dependency
31
39
  self.gem 'rspec-rails', group: [:development, :test]
32
40
  self.gem 'capybara', group: [:development, :test]
@@ -55,11 +63,7 @@ module MakeItSo
55
63
  self.gem 'factory_girl', group: [:development, :test]
56
64
  after_bundle do
57
65
  inside 'spec' do
58
- insert_into_file 'rails_helper.rb',
59
- after: rails_helper_insertion_hook do
60
-
61
- "require File.join(File.dirname(__FILE__), 'support/factory_girl')\n"
62
- end
66
+ uncomment_lines 'rails_helper.rb', /spec\/support\/\*\*\/\*.rb/
63
67
 
64
68
  inside 'support' do
65
69
  template 'factory_girl.rb'
@@ -100,6 +104,13 @@ module MakeItSo
100
104
  end
101
105
  end
102
106
 
107
+ def teaspoon_jasmine
108
+ self.gem 'teaspoon-jasmine'
109
+ after_bundle do
110
+ generate 'teaspoon:install'
111
+ end
112
+ end
113
+
103
114
  def devise_dependency
104
115
  self.gem 'devise'
105
116
 
@@ -1,3 +1,3 @@
1
1
  module MakeItSo
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/make_it_so.gemspec CHANGED
@@ -26,5 +26,4 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "rake", "~> 10.0"
27
27
  spec.add_development_dependency "rspec"
28
28
  spec.add_development_dependency "capybara"
29
- spec.add_development_dependency "pry"
30
29
  end
@@ -36,6 +36,12 @@ feature 'user generates rails app' do
36
36
  expect(File.read(app_layout)).to include('flash')
37
37
  end
38
38
 
39
+ context 'pry-rails' do
40
+ it 'is added as a dependency' do
41
+ expect(File.read(gemfile_path)).to match(/gem(.*)pry-rails/)
42
+ end
43
+ end
44
+
39
45
  context 'rspec' do
40
46
  it 'eliminates test/unit' do
41
47
  expect(FileTest.exists?(join_paths(app_path, 'test'))).to_not eq(true)
@@ -45,7 +51,11 @@ feature 'user generates rails app' do
45
51
  spec_helper = join_paths(app_path, 'spec/spec_helper.rb')
46
52
  expect(FileTest.exists?(spec_helper)).to eq(true)
47
53
  end
48
-
54
+ context 'byebug' do
55
+ it 'comments out the byebug dependency' do
56
+ expect(File.read(gemfile_path)).to_not match(/gem(.*)byebug/)
57
+ end
58
+ end
49
59
  context 'capybara' do
50
60
  it 'includes capybara as a Gemfile dependency' do
51
61
  expect(File.read(gemfile_path)).to include('capybara')
@@ -70,9 +80,9 @@ feature 'user generates rails app' do
70
80
  expect(File.read(gemfile_path)).to include('factory_girl')
71
81
  end
72
82
 
73
- it 'requires the factory_girl support file' do
83
+ it 'requires all support files, including factory girl' do
74
84
  expect(File.read(rails_spec_helper)).
75
- to match(/require(.*)support\/factory_girl/)
85
+ to include("\nDir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }\n\n")
76
86
  end
77
87
  end
78
88
 
@@ -102,6 +112,16 @@ feature 'user generates rails app' do
102
112
  to include("require 'shoulda-matchers'")
103
113
  end
104
114
  end
115
+
116
+ context 'teaspoon' do
117
+ it 'includes teaspoon-jasmine in the Gemfile' do
118
+ expect(File.read(gemfile_path)).to include('teaspoon-jasmine')
119
+ end
120
+
121
+ it 'generates a spec/javascripts directory' do
122
+ expect(FileTest.exists?(join_paths(app_path, 'spec/javascripts'))).to eq(true)
123
+ end
124
+ end
105
125
  end
106
126
 
107
127
  context 'devise' do
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.5
4
+ version: 0.0.6
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-08-28 00:00:00.000000000 Z
11
+ date: 2015-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: pry
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
111
  description: Generate ruby gems, sinatra apps, and rails apps
126
112
  email:
127
113
  - dan.pickett@launchacademy.com
@@ -208,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
194
  version: '0'
209
195
  requirements: []
210
196
  rubyforge_project:
211
- rubygems_version: 2.4.5
197
+ rubygems_version: 2.4.5.1
212
198
  signing_key:
213
199
  specification_version: 4
214
200
  summary: An application generator for all things ruby