shoestrap 1.0.0.pre1 → 1.0.0.pre2

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +1 -2
  4. data/CHANGELOG.md +12 -1
  5. data/Guardfile +1 -0
  6. data/Rakefile +1 -1
  7. data/circle.yml +3 -0
  8. data/features/command_wrapper_helper.rb +94 -0
  9. data/features/custom_matcher.rb +23 -0
  10. data/features/features_helper.rb +76 -29
  11. data/features/postgres_helper.rb +69 -0
  12. data/features/shoestrap/commands/new_command_spec.rb +234 -0
  13. data/features/shoestrap/generators/{bdd_generator_feature.rb → bdd_generator_spec.rb} +7 -5
  14. data/features/shoestrap/generators/bootstrap_generator_spec.rb +21 -0
  15. data/features/shoestrap/generators/cms_generator_spec.rb +149 -0
  16. data/features/shoestrap/generators/{coffee_files_generator_feature.rb → coffee_files_generator_spec.rb} +0 -0
  17. data/features/shoestrap/generators/{foundation_generator_feature.rb → foundation_generator_spec.rb} +7 -0
  18. data/features/shoestrap/generators/kuhsaft_generator_spec.rb +57 -0
  19. data/features/shoestrap/generators/{smacss_files_generator_feature.rb → smacss_files_generator_spec.rb} +0 -0
  20. data/features/shoestrap/generators/view_files_generator_spec.rb +20 -0
  21. data/lib/generators/shoestrap/base_generator.rb +41 -0
  22. data/lib/generators/shoestrap/bdd_generator.rb +1 -5
  23. data/lib/generators/shoestrap/bootstrap_generator.rb +3 -0
  24. data/lib/generators/shoestrap/cms_generator.rb +59 -0
  25. data/lib/generators/shoestrap/coffee_files_generator.rb +1 -5
  26. data/lib/generators/shoestrap/foundation_generator.rb +5 -5
  27. data/lib/generators/shoestrap/kuhsaft_generator.rb +6 -5
  28. data/lib/generators/shoestrap/mailcatcher_generator.rb +12 -0
  29. data/lib/generators/shoestrap/simple_navigation_generator.rb +14 -0
  30. data/lib/generators/shoestrap/smacss_file_generator.rb +1 -5
  31. data/lib/generators/shoestrap/view_files_generator.rb +11 -0
  32. data/lib/shoestrap/application_generator.rb +14 -38
  33. data/lib/shoestrap/shell.rb +1 -0
  34. data/lib/shoestrap/version.rb +1 -1
  35. data/shoestrap.gemspec +12 -3
  36. data/spec/shoestrap/application_generator_spec.rb +37 -20
  37. data/spec/spec_helper.rb +1 -1
  38. data/templates/application_generator/_typekit.html.haml +4 -0
  39. data/templates/application_generator/application.html.haml +10 -10
  40. data/templates/application_generator/application_template.rb +19 -3
  41. data/templates/bdd_generator/active_record_spec_helper.rb +1 -1
  42. data/templates/cms_generator/base_controller.rb +2 -0
  43. data/templates/{coffee_generator → coffee_files_generator}/application.js.coffee +0 -0
  44. data/templates/simple_navigation_generator/navigation.rb +76 -0
  45. data/templates/{smacss_generator → smacss_files_generator}/application.css.sass +0 -0
  46. metadata +39 -21
  47. data/features/shoestrap/commands/new_command_feature.rb +0 -191
  48. data/features/shoestrap/generators/bootstrap_generator_feature.rb +0 -11
  49. data/features/shoestrap/generators/kuhsaft_generator_feature.rb +0 -38
@@ -2,7 +2,7 @@ require 'active_record'
2
2
  require 'database_cleaner'
3
3
  require_relative './fast_spec_helper'
4
4
 
5
- connection_info = YAML.load_file("config/database.yml")["test"]
5
+ connection_info = YAML.load(ERB.new(File.read("config/database.yml")).result)["test"]
6
6
  ActiveRecord::Base.establish_connection(connection_info)
7
7
 
8
8
  RSpec.configure do |config|
@@ -0,0 +1,2 @@
1
+ class Shoestrap::BaseController < InheritedResources::Base
2
+ end
@@ -0,0 +1,76 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Configures your navigation
3
+ SimpleNavigation::Configuration.run do |navigation|
4
+ # Specify a custom renderer if needed.
5
+ # The default renderer is SimpleNavigation::Renderer::List which renders HTML lists.
6
+ # The renderer can also be specified as option in the render_navigation call.
7
+ # navigation.renderer = Your::Custom::Renderer
8
+
9
+ # Specify the class that will be applied to active navigation items. Defaults to 'selected'
10
+ # navigation.selected_class = 'your_selected_class'
11
+
12
+ # Specify the class that will be applied to the current leaf of
13
+ # active navigation items. Defaults to 'simple-navigation-active-leaf'
14
+ # navigation.active_leaf_class = 'your_active_leaf_class'
15
+
16
+ # Item keys are normally added to list items as id.
17
+ # This setting turns that off
18
+ # navigation.autogenerate_item_ids = false
19
+
20
+ # You can override the default logic that is used to autogenerate the item ids.
21
+ # To do this, define a Proc which takes the key of the current item as argument.
22
+ # The example below would add a prefix to each key.
23
+ # navigation.id_generator = Proc.new {|key| "my-prefix-#{key}"}
24
+
25
+ # If you need to add custom html around item names, you can define a proc that will be called with the name you pass in to the navigation.
26
+ # The example below shows how to wrap items spans.
27
+ # navigation.name_generator = Proc.new {|name| "<span>#{name}</span>"}
28
+
29
+ # The auto highlight feature is turned on by default.
30
+ # This turns it off globally (for the whole plugin)
31
+ # navigation.auto_highlight = false
32
+
33
+ # Define the primary navigation
34
+ navigation.items do |primary|
35
+ # Add an item to the primary navigation. The following params apply:
36
+ # key - a symbol which uniquely defines your navigation item in the scope of the primary_navigation
37
+ # name - will be displayed in the rendered navigation. This can also be a call to your I18n-framework.
38
+ # url - the address that the generated item links to. You can also use url_helpers (named routes, restful routes helper, url_for etc.)
39
+ # options - can be used to specify attributes that will be included in the rendered navigation item (e.g. id, class etc.)
40
+ # some special options that can be set:
41
+ # :if - Specifies a proc to call to determine if the item should
42
+ # be rendered (e.g. <tt>:if => Proc.new { current_user.admin? }</tt>). The
43
+ # proc should evaluate to a true or false value and is evaluated in the context of the view.
44
+ # :unless - Specifies a proc to call to determine if the item should not
45
+ # be rendered (e.g. <tt>:unless => Proc.new { current_user.admin? }</tt>). The
46
+ # proc should evaluate to a true or false value and is evaluated in the context of the view.
47
+ # :method - Specifies the http-method for the generated link - default is :get.
48
+ # :highlights_on - if autohighlighting is turned off and/or you want to explicitly specify
49
+ # when the item should be highlighted, you can set a regexp which is matched
50
+ # against the current URI. You may also use a proc, or the symbol <tt>:subpath</tt>.
51
+ #
52
+ # primary.item :key_1, 'name', url, options
53
+
54
+ # Add an item which has a sub navigation (same params, but with block)
55
+ # primary.item :key_2, 'name', url, options do |sub_nav|
56
+ # Add an item to the sub navigation (same params again)
57
+ # sub_nav.item :key_2_1, 'name', url, options
58
+ # end
59
+
60
+ # You can also specify a condition-proc that needs to be fullfilled to display an item.
61
+ # Conditions are part of the options. They are evaluated in the context of the views,
62
+ # thus you can use all the methods and vars you have available in the views.
63
+ # primary.item :key_3, 'Admin', url, :class => 'special', :if => Proc.new { current_user.admin? }
64
+ # primary.item :key_4, 'Account', url, :unless => Proc.new { logged_in? }
65
+
66
+ # you can also specify a css id or class to attach to this particular level
67
+ # works for all levels of the menu
68
+ # primary.dom_id = 'menu-id'
69
+ # primary.dom_class = 'menu-class'
70
+
71
+ # You can turn off auto highlighting for a specific level
72
+ # primary.auto_highlight = false
73
+
74
+ end
75
+
76
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoestrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre1
4
+ version: 1.0.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Kaufmann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-17 00:00:00.000000000 Z
11
+ date: 2013-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: pry
42
+ name: pry-debugger
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: ruby_gntp
98
+ name: terminal-notifier-guard
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '>='
@@ -184,23 +184,33 @@ files:
184
184
  - README.md
185
185
  - Rakefile
186
186
  - bin/shoestrap
187
+ - circle.yml
188
+ - features/command_wrapper_helper.rb
189
+ - features/custom_matcher.rb
187
190
  - features/features_helper.rb
188
- - features/shoestrap/commands/new_command_feature.rb
189
- - features/shoestrap/generators/bdd_generator_feature.rb
190
- - features/shoestrap/generators/bootstrap_generator_feature.rb
191
- - features/shoestrap/generators/coffee_files_generator_feature.rb
192
- - features/shoestrap/generators/foundation_generator_feature.rb
193
- - features/shoestrap/generators/kuhsaft_generator_feature.rb
194
- - features/shoestrap/generators/smacss_files_generator_feature.rb
191
+ - features/postgres_helper.rb
192
+ - features/shoestrap/commands/new_command_spec.rb
193
+ - features/shoestrap/generators/bdd_generator_spec.rb
194
+ - features/shoestrap/generators/bootstrap_generator_spec.rb
195
+ - features/shoestrap/generators/cms_generator_spec.rb
196
+ - features/shoestrap/generators/coffee_files_generator_spec.rb
197
+ - features/shoestrap/generators/foundation_generator_spec.rb
198
+ - features/shoestrap/generators/kuhsaft_generator_spec.rb
199
+ - features/shoestrap/generators/smacss_files_generator_spec.rb
200
+ - features/shoestrap/generators/view_files_generator_spec.rb
201
+ - lib/generators/shoestrap/base_generator.rb
195
202
  - lib/generators/shoestrap/bdd_generator.rb
196
203
  - lib/generators/shoestrap/bootstrap_generator.rb
204
+ - lib/generators/shoestrap/cms_generator.rb
197
205
  - lib/generators/shoestrap/coffee_files_generator.rb
198
206
  - lib/generators/shoestrap/database_generator.rb
199
207
  - lib/generators/shoestrap/foundation_generator.rb
200
208
  - lib/generators/shoestrap/gem_install_generator.rb
201
209
  - lib/generators/shoestrap/kuhsaft_generator.rb
202
210
  - lib/generators/shoestrap/mailcatcher_generator.rb
211
+ - lib/generators/shoestrap/simple_navigation_generator.rb
203
212
  - lib/generators/shoestrap/smacss_file_generator.rb
213
+ - lib/generators/shoestrap/view_files_generator.rb
204
214
  - lib/shoestrap.rb
205
215
  - lib/shoestrap/application_generator.rb
206
216
  - lib/shoestrap/cli.rb
@@ -211,6 +221,7 @@ files:
211
221
  - spec/shoestrap/application_generator_spec.rb
212
222
  - spec/shoestrap/cli_spec.rb
213
223
  - spec/spec_helper.rb
224
+ - templates/application_generator/_typekit.html.haml
214
225
  - templates/application_generator/application.html.haml
215
226
  - templates/application_generator/application_helper.rb
216
227
  - templates/application_generator/application_template.rb
@@ -221,12 +232,14 @@ files:
221
232
  - templates/bdd_generator/dotrspec
222
233
  - templates/bdd_generator/fast_spec_helper.rb
223
234
  - templates/bdd_generator/spec_helper.rb
224
- - templates/coffee_generator/application.js.coffee
235
+ - templates/cms_generator/base_controller.rb
236
+ - templates/coffee_files_generator/application.js.coffee
225
237
  - templates/foundation_generator/_ie8_grid.css
226
238
  - templates/foundation_generator/_settings.css.sass
227
239
  - templates/kuhsaft_generator/kuhsaft.rb
228
- - templates/smacss_generator/application.css.sass
229
- homepage: ''
240
+ - templates/simple_navigation_generator/navigation.rb
241
+ - templates/smacss_files_generator/application.css.sass
242
+ homepage: https://github.com/screenconcept/shoestrap
230
243
  licenses:
231
244
  - MIT
232
245
  metadata: {}
@@ -251,14 +264,19 @@ signing_key:
251
264
  specification_version: 4
252
265
  summary: Rails App Bootstrapper and Generator used at Screen Concept
253
266
  test_files:
267
+ - features/command_wrapper_helper.rb
268
+ - features/custom_matcher.rb
254
269
  - features/features_helper.rb
255
- - features/shoestrap/commands/new_command_feature.rb
256
- - features/shoestrap/generators/bdd_generator_feature.rb
257
- - features/shoestrap/generators/bootstrap_generator_feature.rb
258
- - features/shoestrap/generators/coffee_files_generator_feature.rb
259
- - features/shoestrap/generators/foundation_generator_feature.rb
260
- - features/shoestrap/generators/kuhsaft_generator_feature.rb
261
- - features/shoestrap/generators/smacss_files_generator_feature.rb
270
+ - features/postgres_helper.rb
271
+ - features/shoestrap/commands/new_command_spec.rb
272
+ - features/shoestrap/generators/bdd_generator_spec.rb
273
+ - features/shoestrap/generators/bootstrap_generator_spec.rb
274
+ - features/shoestrap/generators/cms_generator_spec.rb
275
+ - features/shoestrap/generators/coffee_files_generator_spec.rb
276
+ - features/shoestrap/generators/foundation_generator_spec.rb
277
+ - features/shoestrap/generators/kuhsaft_generator_spec.rb
278
+ - features/shoestrap/generators/smacss_files_generator_spec.rb
279
+ - features/shoestrap/generators/view_files_generator_spec.rb
262
280
  - spec/shoestrap/application_generator_spec.rb
263
281
  - spec/shoestrap/cli_spec.rb
264
282
  - spec/spec_helper.rb
@@ -1,191 +0,0 @@
1
- require_relative '../../features_helper'
2
-
3
- describe 'application generated with shoestrap new <application_name>' do
4
- before :all do
5
- generate_test_app_with_shoestrap
6
- end
7
-
8
- it 'has timezone set for switzerland' do
9
- expect(application_file('config/application.rb')).to match(/config.time_zone = 'Bern'/)
10
- end
11
-
12
- it 'has :de as default locale' do
13
- expect(application_file('config/application.rb')).to match(/config.i18n.default_locale = :de/)
14
- end
15
-
16
- it 'has :de as only available locale for a satrt' do
17
- expect(application_file('config/application.rb')).to match(/config.i18n.available_locales = \[:de\]/)
18
- end
19
-
20
- it 'has translation files load path' do
21
- expect(application_file('config/application.rb')).to match(/config.i18n.load_path \+= Dir\[Rails.root.join\('config', 'locales', '\*\*', '\*.{rb,yml}'\).to_s\]/)
22
- end
23
-
24
- it 'has rspec-rails in the Gemfile' do
25
- expect(application_file('Gemfile')).to match(/gem "rspec-rails"/)
26
- end
27
-
28
- it 'has guard-rspec in the Gemfile' do
29
- expect(application_file('Gemfile')).to match(/gem "guard-rspec"/)
30
- end
31
-
32
- # TODO: fix this in rails. Gems added with gem method of app template have double quotes!
33
-
34
- %w[
35
- simple_form
36
- haml
37
- haml-rails
38
- simple-navigation
39
- mail
40
- fabrication
41
- shoestrap
42
- kuhsaft
43
- pry
44
- ruby_gntp
45
- database_cleaner
46
- selectivizr-rails
47
- modernizr-rails
48
- bourbon
49
- ].each do |gem_name|
50
- it "has #{gem_name} in the Gemfile" do
51
- expect(application_file('Gemfile')).to match "gem \"#{gem_name}\""
52
- end
53
- end
54
-
55
- it 'has pg in the Gemfile' do
56
- expect(application_file('Gemfile')).to match "gem 'pg'"
57
- end
58
-
59
- context 'application layout' do
60
- it 'has no application layout written in erb' do
61
- expect { application_file('app/views/layouts/application.html.erb') }.to raise_error(Errno::ENOENT)
62
- end
63
-
64
- it 'has an application layout written in haml' do
65
- expect(application_file('app/views/layouts/application.html.haml')).not_to be_nil
66
- end
67
-
68
- it 'sets the html lang' do
69
- expect(application_file('app/views/layouts/application.html.haml')).to match "%html.no-js{ lang: I18n.locale }"
70
- end
71
-
72
- it 'sets a page title' do
73
- expect(application_file('app/views/layouts/application.html.haml')).to match(/%title=\ content_for\?\(:title\)\ \?\ yield\(:title\)\ :\ 'Untitled'/)
74
- end
75
-
76
- it 'has meta tags' do
77
- expect(application_file('app/views/layouts/application.html.haml')).to match "%meta{ charset: 'utf-8' }"
78
- expect(application_file('app/views/layouts/application.html.haml')).to match "%meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge,chrome=1' }"
79
- expect(application_file('app/views/layouts/application.html.haml')).to match "%meta{ name: 'keywords', content: '' }"
80
- expect(application_file('app/views/layouts/application.html.haml')).to match "%meta{ name: 'description', content: '' }"
81
- expect(application_file('app/views/layouts/application.html.haml')).to match "%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }"
82
- expect(application_file('app/views/layouts/application.html.haml')).to match "= csrf_meta_tags"
83
- end
84
-
85
- it 'has favicons' do
86
- expect(application_file('app/views/layouts/application.html.haml')).to match(/favicon_link_tag\('favicons\/favicon\-sc\-129x129\.png',\ rel:\ 'apple\-touch\-icon',\ type:\ 'image\/png'\)/)
87
- expect(application_file('app/views/layouts/application.html.haml')).to match(/favicon_link_tag\('favicons\/favicon\-sc\-32x32\.png',\ rel:\ 'icon',\ type:\ 'image\/png'\)/)
88
- expect(application_file('app/views/layouts/application.html.haml')).to match(/favicon_link_tag\('favicons\/favicon\-sc\-16x16\.ico'\)/)
89
- end
90
-
91
- it 'has typekit integration' do
92
- expect(application_file('app/views/layouts/application.html.haml')).to match(/javascript_include_tag\ '\/\/use\.typekit\.net\/XXXX\.js',\ :media\ =>\ 'all'/)
93
- expect(application_file('app/views/layouts/application.html.haml')).to match(/try\{Typekit\.load\(\);\}catch\(e\)\{\}/)
94
- end
95
-
96
- it 'has an application stylehseet link' do
97
- expect(application_file('app/views/layouts/application.html.haml')).to match "= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true"
98
- end
99
-
100
- it 'has javascript links' do
101
- expect(application_file('app/views/layouts/application.html.haml')).to match "= javascript_include_tag 'modernizr', 'data-turbolinks-track' => true"
102
- expect(application_file('app/views/layouts/application.html.haml')).to match "= javascript_include_tag 'application', 'data-turbolinks-track' => true"
103
- expect(application_file('app/views/layouts/application.html.haml')).to match "= javascript_include_tag 'selectivizr'"
104
- end
105
-
106
- it 'has a body class helper included' do
107
- expect(application_file('app/views/layouts/application.html.haml')).to match "%body{ class: body_class }"
108
- end
109
-
110
- it 'renders the navigation' do
111
- expect(application_file('app/views/layouts/application.html.haml')).to match "= render_navigation"
112
- end
113
-
114
- it 'renders the content' do
115
- expect(application_file('app/views/layouts/application.html.haml')).to match "= yield"
116
- end
117
-
118
- it 'has google analytics integrated' do
119
- expect(application_file('app/views/layouts/application.html.haml')).to match(/var\ _gaq=\[\['_setAccount','UA\-XXXXX\-X'\],\['_trackPageview'\],\['_trackPageLoadTime'\]\];/)
120
- expect(application_file('app/views/layouts/application.html.haml')).to match(/\(function\(d,t\)\{var\ g=d\.createElement\(t\),s=d\.getElementsByTagName\(t\)\[0\];g\.async=1;/)
121
- expect(application_file('app/views/layouts/application.html.haml')).to match(/g\.src=\('https:'==location\.protocol\?'\/\/ssl':'\/\/www'\)\+'\.google\-analytics\.com\/ga\.js';/)
122
- expect(application_file('app/views/layouts/application.html.haml')).to match(/s\.parentNode\.insertBefore\(g,s\)\}\(document,'script'\)\);/)
123
- end
124
- end
125
-
126
- context 'favicons' do
127
- it 'has a favicon' do
128
- expect(application_file('app/assets/images/favicons/favicon-sc-32x32.png')).not_to be_nil
129
- end
130
-
131
- it 'has a favicon for iDevices' do
132
- expect(application_file('app/assets/images/favicons/favicon-sc-129x129.png')).not_to be_nil
133
- end
134
-
135
- it 'has a favicton for IE' do
136
- expect(application_file('app/assets/images/favicons/favicon-sc-16x16.ico')).not_to be_nil
137
- end
138
- end
139
-
140
- context 'application helper' do
141
- it 'has an application layout written in haml' do
142
- expect(application_file('app/helpers/application_helper.rb')).not_to be_nil
143
- end
144
-
145
- it 'has a body_class method' do
146
- expect(application_file('app/helpers/application_helper.rb')).to match "def body_class"
147
- end
148
- end
149
-
150
- context 'generators' do
151
- it 'use haml as a template engine' do
152
- expect(application_file('config/application.rb')).to match "g.template_engine :haml"
153
- end
154
-
155
- it 'use rspec as test framework' do
156
- expect(application_file('config/application.rb')).to match "test_framework :rspec"
157
- end
158
-
159
- it 'do not generate stylesheets' do
160
- expect(application_file('config/application.rb')).to match "g.stylesheets false"
161
- end
162
-
163
- it 'do not generate javascripts' do
164
- expect(application_file('config/application.rb')).to match "g.javascripts false"
165
- end
166
-
167
- it 'do not generate assets' do
168
- expect(application_file('config/application.rb')).to match "g.assets false"
169
- end
170
-
171
- it 'does not generate helpers' do
172
- expect(application_file('config/application.rb')).to match "g.helper false"
173
- end
174
-
175
- it 'uses simple_form as form builder' do
176
- expect(application_file('config/application.rb')).to match(/form_builder :simple_form/)
177
- end
178
-
179
- context 'mailcatcher' do
180
- it 'is configured for development environment' do
181
- expect(application_file('config/environments/development.rb')).to match(/config\.action_mailer\.delivery_method = :smtp/)
182
- expect(application_file('config/environments/development.rb')).to match(/config\.action_mailer\.smtp_settings = { address: 'localhost', port: 1025 }/)
183
- end
184
-
185
- it 'is documented in the readme' do
186
- pending "implement proper readme template"
187
- expect(application_file('README.md')).to match(/This Application uses Mailcatcher/)
188
- end
189
- end
190
- end
191
- end
@@ -1,11 +0,0 @@
1
- require_relative '../../features_helper'
2
-
3
- describe 'application generated with shoestrap new <name> --css=bootstrap' do
4
- before :all do
5
- generate_test_app_with_shoestrap('--css=bootstrap')
6
- end
7
-
8
- it 'has bootstrap-sass in the Gemfile' do
9
- expect(application_file('Gemfile')).to match /gem "bootstrap-sass"/
10
- end
11
- end
@@ -1,38 +0,0 @@
1
- require_relative '../../features_helper'
2
-
3
- describe 'application generated with shoestrap new <name> --kuhsaft true' do
4
-
5
- let(:migrations_count) { Dir.glob(File.join(application_path,'db/migrate/*kuhsaft*.rb')).size }
6
-
7
- before :all do
8
- generate_test_app_with_shoestrap
9
- end
10
-
11
- it 'has the kuhsaft migrations installed' do
12
- expect(migrations_count).to be 12
13
- end
14
-
15
- it 'has db migrated with kuhsaft migrations' do
16
- reload_application_gemfile
17
- migration_status = Dir.chdir(application_path) { `bundle exec rake db:migrate:status` }
18
- expect(migration_status.split("\n").select { |x| x.include? 'kuhsaft' }.size).to be 12
19
- end
20
-
21
- it 'has the db with kuhsaft seeds' do
22
- expect(Dir.chdir(application_path) { `bundle exec rails runner "puts Kuhsaft::BrickType.all.size"` }.to_i).to be 11
23
- end
24
-
25
- it 'has the kuhsaft assets installed' do
26
- expect(application_file('app/assets/stylesheets/kuhsaft/cms/customizations.css.sass')).not_to be_nil
27
- expect(application_file('app/assets/javascripts/kuhsaft/cms/customizations.js.coffee')).not_to be_nil
28
- expect(application_file('app/assets/javascripts/kuhsaft/cms/ck-config.js.coffee')).not_to be_nil
29
- end
30
-
31
- it 'has kuhsaft mounted as an engine on /' do
32
- expect(application_file('config/routes.rb')).to match("mount Kuhsaft::Engine => '/'")
33
- end
34
-
35
- it 'has the default image size initializer' do
36
- expect(application_file('config/initializers/kuhsaft.rb')).not_to be_nil
37
- end
38
- end