make_it_so 0.0.7 → 0.0.9
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 +4 -4
- data/lib/generators/rails_app_generator.rb +2 -2
- data/lib/make_it_so/rails/app_builder.rb +6 -6
- data/lib/make_it_so/version.rb +1 -1
- data/make_it_so.gemspec +2 -2
- data/spec/features/user_generates_rails_spec.rb +17 -7
- data/templates/rails/app/views/layouts/application.html.erb.tt +4 -0
- data/templates/rails/spec/support/factory_bot.rb +5 -0
- metadata +10 -10
- data/templates/rails/spec/support/factory_girl.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dde582c517272c49eaf1cce483bc897a322fd122
|
4
|
+
data.tar.gz: b01be3897cccc71c1a1d0ed97de3d02efe58b596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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[:
|
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 '
|
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
|
64
|
-
self.gem '
|
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 '
|
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 '
|
129
|
-
after: "
|
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'
|
data/lib/make_it_so/version.rb
CHANGED
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", "
|
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", "~>
|
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 '
|
86
|
-
it 'includes a
|
87
|
-
|
88
|
-
expect(FileTest.exists?(
|
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
|
92
|
-
expect(File.read(gemfile_path)).to include('
|
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
|
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>
|
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.
|
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:
|
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: '
|
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: '
|
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: '
|
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: '
|
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/
|
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.
|
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
|