make_it_so 0.0.7 → 0.0.9

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: ecc353cb742607b9a6bdce825f69dddb0b417f17
4
- data.tar.gz: 611e0994bddd88370147c325aaa3eba1bb82d264
3
+ metadata.gz: dde582c517272c49eaf1cce483bc897a322fd122
4
+ data.tar.gz: b01be3897cccc71c1a1d0ed97de3d02efe58b596
5
5
  SHA512:
6
- metadata.gz: f962f5cb9da4852c3fd43524a5d0ede46b528bd965689060481d493ea4fde8cb23be03ed5ae8b0d1dda6ba483f36d23c689e0251a9e02d80054b415ae0ea6baf
7
- data.tar.gz: b2a787a25c46347cc95034f577237f86c84847446c43bcdb27837910f64d7f6cc62f5bd09a93ab151f707a3b5bf4e2ebaea46ef1ed07cdeab53267bdb8dd85a9
6
+ metadata.gz: c77ad4e21bc38c48f1de992ea92b2fe4907b9503ab1d0a57c2f235dd2050fe909111163faf0a87b4019283a19a216af7c890d57aabf784806d34d55405904055
7
+ data.tar.gz: '0681af42be621f03fd0bc6b4b371257c7ba504e54f607280fa52fd06daeedc0e147e9c025bfd6aefa93a46a08136c58eb2af617eb1b2cf0d6c4a5db4bcfe33ca'
@@ -37,7 +37,7 @@ module MakeItSo
37
37
  if @options[:rspec]
38
38
  # don't generate Test::Unit - we have to dup to unfreeze
39
39
  @options = @options.dup
40
- @options[:skip_test_unit] = true
40
+ @options[:skip_test] = true
41
41
  end
42
42
  end
43
43
 
@@ -55,7 +55,7 @@ module MakeItSo
55
55
  if options[:rspec]
56
56
  build 'rspec_dependency'
57
57
  #build 'fix_generators'
58
- build 'factory_girl_rspec'
58
+ build 'factory_bot_rspec'
59
59
  build 'valid_attribute_rspec'
60
60
  build 'shoulda_rspec'
61
61
  build 'teaspoon_jasmine'
@@ -60,14 +60,14 @@ module MakeItSo
60
60
  end
61
61
  end
62
62
 
63
- def factory_girl_rspec
64
- self.gem 'factory_girl', group: [:development, :test]
63
+ def factory_bot_rspec
64
+ self.gem 'factory_bot', group: [:development, :test]
65
65
  after_bundle do
66
66
  inside 'spec' do
67
67
  uncomment_lines 'rails_helper.rb', /spec\/support\/\*\*\/\*.rb/
68
68
 
69
69
  inside 'support' do
70
- template 'factory_girl.rb'
70
+ template 'factory_bot.rb'
71
71
  end
72
72
  end
73
73
  end
@@ -125,8 +125,8 @@ module MakeItSo
125
125
  directory 'features'
126
126
 
127
127
  inside 'support' do
128
- insert_into_file 'factory_girl.rb',
129
- after: "FactoryGirl.define do\n" do
128
+ insert_into_file 'factory_bot.rb',
129
+ after: "FactoryBot.define do\n" do
130
130
 
131
131
  snippet('user_factory.rb')
132
132
  end
@@ -139,7 +139,7 @@ module MakeItSo
139
139
  end
140
140
 
141
141
  def foundation_dependency
142
- self.gem 'foundation-rails'
142
+ self.gem 'foundation-rails', '~> 5.0'
143
143
 
144
144
  after_bundle do
145
145
  generate 'foundation:install foundation'
@@ -1,3 +1,3 @@
1
1
  module MakeItSo
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
data/make_it_so.gemspec CHANGED
@@ -19,11 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "thor"
22
- spec.add_dependency "railties", ">= 4.2"
22
+ spec.add_dependency "railties", "~> 5.1"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.7"
25
25
  spec.add_development_dependency "appraisal"
26
- spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rake", "~> 12.0"
27
27
  spec.add_development_dependency "rspec"
28
28
  spec.add_development_dependency "capybara"
29
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
+ scenario 'includes viewport meta tag in layout for mobile' do
40
+ app_layout = File.join(app_path, 'app/views/layouts/application.html.erb')
41
+ expect(File.read(app_layout)).to include('initial-scale=1.0')
42
+ expect(File.read(app_layout)).to include('viewport')
43
+ end
44
+
39
45
  scenario 'creates a valid gemfile' do
40
46
  words = ['source', '#', 'gem', 'group', 'end']
41
47
 
@@ -82,17 +88,17 @@ feature 'user generates rails app' do
82
88
  end
83
89
  end
84
90
 
85
- context 'factory_girl' do
86
- it 'includes a factory_girl support file' do
87
- fg_support_path = join_paths(app_path, 'spec/support/factory_girl.rb')
88
- expect(FileTest.exists?(fg_support_path)).to eq(true)
91
+ context 'factory_bot' do
92
+ it 'includes a factory_bot support file' do
93
+ fb_support_path = join_paths(app_path, 'spec/support/factory_bot.rb')
94
+ expect(FileTest.exists?(fb_support_path)).to eq(true)
89
95
  end
90
96
 
91
- it 'includes the factory_girl gem' do
92
- expect(File.read(gemfile_path)).to include('factory_girl')
97
+ it 'includes the factory_bot gem' do
98
+ expect(File.read(gemfile_path)).to include('factory_bot')
93
99
  end
94
100
 
95
- it 'requires all support files, including factory girl' do
101
+ it 'requires all support files, including factory bot' do
96
102
  expect(File.read(rails_spec_helper)).
97
103
  to include("\nDir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }\n\n")
98
104
  end
@@ -176,5 +182,9 @@ feature 'user generates rails app' do
176
182
  it 'generates foundation' do
177
183
  expect(File.read(css_manifest_path)).to include('foundation_and_overrides')
178
184
  end
185
+
186
+ it 'includes modernizr in the layout' do
187
+ expect(File.read(File.join(app_path, 'app/views/layouts/application.html.erb'))).to include('modernizr')
188
+ end
179
189
  end
180
190
  end
@@ -2,7 +2,11 @@
2
2
  <html>
3
3
  <head>
4
4
  <title><%= camelized %></title>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
5
6
  <%%= stylesheet_link_tag 'application', media: 'all' %>
7
+ <% if options.foundation? %>
8
+ <%%= javascript_include_tag "vendor/modernizr" %>
9
+ <% end %>
6
10
  <%%= csrf_meta_tags %>
7
11
  </head>
8
12
  <body>
@@ -0,0 +1,5 @@
1
+ require 'factory_bot'
2
+
3
+ FactoryBot.define do
4
+
5
+ end
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.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Pickett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-11 00:00:00.000000000 Z
11
+ date: 2017-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.2'
33
+ version: '5.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.2'
40
+ version: '5.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '12.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '12.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -163,7 +163,7 @@ files:
163
163
  - templates/rails/spec/features/user_signs_in_spec.rb
164
164
  - templates/rails/spec/features/user_signs_out_spec.rb
165
165
  - templates/rails/spec/features/user_signs_up_spec.rb
166
- - templates/rails/spec/support/factory_girl.rb
166
+ - templates/rails/spec/support/factory_bot.rb
167
167
  - templates/rails/spec/support/valid_attribute.rb
168
168
  - templates/sinatra/.gitignore
169
169
  - templates/sinatra/.rspec
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  requirements: []
196
196
  rubyforge_project:
197
- rubygems_version: 2.4.5.1
197
+ rubygems_version: 2.6.13
198
198
  signing_key:
199
199
  specification_version: 4
200
200
  summary: An application generator for all things ruby
@@ -1,5 +0,0 @@
1
- require 'factory_girl'
2
-
3
- FactoryGirl.define do
4
-
5
- end