speedo 0.0.8 → 0.1.0
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.
- data/app/assets/stylesheets/application.css.scss +2 -0
- data/app/assets/stylesheets/speedo.css.scss +13 -15
- data/app/views/layouts/speedo/application.html.haml +1 -1
- data/lib/generators/speedo/install_generator.rb +42 -15
- data/lib/speedo/sass.rb +12 -4
- data/lib/speedo/version.rb +1 -1
- data/lib/speedo.rb +1 -1
- data/test/dummy/log/development.log +1358 -0
- data/test/dummy/tmp/cache/assets/C41/5B0/sprockets%2F095415e1141a435237aa9464752d21fd +0 -0
- data/test/dummy/tmp/cache/assets/CE5/650/sprockets%2F8ab512c9b33ac90e699b73469d71f061 +0 -0
- data/test/dummy/tmp/cache/assets/D1D/D50/sprockets%2F5b87bedce3ae871f14e41e2479290866 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -0
- data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
- data/test/dummy/tmp/cache/assets/DA1/670/sprockets%2Fb71f32bbfb530e59ad7a177cf54a888b +0 -0
- data/test/dummy/tmp/cache/assets/DE9/520/sprockets%2Fe9f8259c99da2f355198dc4bcdebb69d +0 -0
- data/test/dummy/tmp/cache/assets/DEA/9B0/sprockets%2F1db5ff81be17f1a21ea3e8a9ad44ba12 +0 -0
- data/test/dummy/tmp/cache/assets/DF2/CB0/sprockets%2F4500acae993e0fa07bd48dceee07e2b3 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- metadata +32 -18
- data/test/dummy/app/assets/stylesheets/application.css +0 -7
@@ -1,14 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
*= require uniform.default
|
10
|
-
*/
|
11
|
-
|
1
|
+
@import "normalize";
|
2
|
+
@import "autoSuggest";
|
3
|
+
@import "chosen";
|
4
|
+
@import "gh-buttons";
|
5
|
+
@import "jquery.dataTables";
|
6
|
+
@import "jquery.fancybox-1.3.4";
|
7
|
+
@import "jquery-ui-1.8.18.custom";
|
8
|
+
@import "uniform.default";
|
12
9
|
@import "bourbon";
|
13
10
|
|
14
11
|
|
@@ -310,9 +307,11 @@ ul.as-selections {
|
|
310
307
|
*/
|
311
308
|
|
312
309
|
#wrapper {
|
313
|
-
max-width:
|
314
|
-
padding:0
|
315
|
-
margin: 0 auto;
|
310
|
+
max-width: 960px; /* Set the width of the page here */
|
311
|
+
padding:0;
|
312
|
+
margin: 0 auto 20px;
|
313
|
+
@include border-bottom-radius(3px);
|
314
|
+
@include box-shadow(0 2px 2px rgba(0,0,0,0.5));
|
316
315
|
}
|
317
316
|
|
318
317
|
/* Layout for mobile < 480px width screens (see below for media queries) */
|
@@ -322,7 +321,6 @@ ul.as-selections {
|
|
322
321
|
float:left;
|
323
322
|
width:100%; /* width of whole page */
|
324
323
|
@include border-radius(0 0 3px 3px);
|
325
|
-
@include box-shadow(0 2px 2px rgba(0,0,0,0.5));
|
326
324
|
background:#fff;
|
327
325
|
overflow:hidden; /* This chops off any overhanging divs, including the leftcol bg */
|
328
326
|
}
|
@@ -7,33 +7,52 @@ module Speedo
|
|
7
7
|
|
8
8
|
# app/views/layouts/application.html.haml
|
9
9
|
def layout
|
10
|
-
if
|
10
|
+
if File.exist? 'app/views/layouts/application.html.haml'
|
11
|
+
if yes? 'application.html.haml already exists. Do you want the template as speedo.html.haml (for manual integration)? [yN]'
|
12
|
+
template 'app/views/layouts/speedo/application.html.haml',
|
13
|
+
'app/views/layouts/speedo.html.haml'
|
14
|
+
end
|
15
|
+
else
|
11
16
|
template 'app/views/layouts/speedo/application.html.haml',
|
12
17
|
'app/views/layouts/application.html.haml'
|
13
|
-
|
18
|
+
end
|
19
|
+
|
20
|
+
if File.exist? 'app/views/layouts/application.html.erb'
|
21
|
+
if yes? 'Do you want to remove the application.html.erb layout (otherwise delete it manually)? [yN]'
|
22
|
+
remove_file 'app/views/layouts/application.html.erb'
|
23
|
+
end
|
14
24
|
end
|
15
25
|
end
|
16
26
|
|
17
27
|
# app/assets/stylesheets/speedo.css.scss
|
18
28
|
def copy_stylesheet
|
19
|
-
|
20
|
-
|
29
|
+
copy_file 'app/assets/stylesheets/speedo.css.scss',
|
30
|
+
'app/assets/stylesheets/speedo.css.scss'
|
21
31
|
end
|
22
32
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
33
|
+
|
34
|
+
# app/assets/stylesheets/application.css.scss
|
35
|
+
def copy_application_css
|
36
|
+
if File.exist? 'app/assets/stylesheets/application.css.scss'
|
37
|
+
if yes? 'application.css.scss already exists. Do you want to replace it? [yN]'
|
38
|
+
copy_file 'app/assets/stylesheets/application.css.scss',
|
39
|
+
'app/assets/stylesheets/application.css.scss'
|
40
|
+
else
|
41
|
+
say 'Make sure to @import "speedo"; in your application.css.scss, and @import other files - do NOT use *=require.'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
if File.exist? 'app/assets/stylesheets/application.css'
|
46
|
+
if yes? 'Do you want to remove application.css (otherwise delete it manually)? [yN]'
|
47
|
+
remove_file 'app/assets/stylesheets/application.css'
|
29
48
|
end
|
30
49
|
end
|
31
50
|
end
|
32
51
|
|
33
52
|
# app/assets/javascripts/swim.js.coffee
|
34
53
|
def javascript
|
35
|
-
|
36
|
-
|
54
|
+
copy_file 'app/assets/javascripts/swim.js.coffee',
|
55
|
+
'app/assets/javascripts/swim.js.coffee'
|
37
56
|
end
|
38
57
|
|
39
58
|
def alter_application_js
|
@@ -48,8 +67,16 @@ module Speedo
|
|
48
67
|
|
49
68
|
# config/locales/speedo.en.yml
|
50
69
|
def locales
|
51
|
-
|
52
|
-
|
70
|
+
if File.exist? 'config/locales/en.yml'
|
71
|
+
unless File.read('config/locales/en.yml').match /app_name/
|
72
|
+
inject_into_file 'config/locales/en.yml', after: 'en:' do
|
73
|
+
"\n app_name: 'See config/locales to name this app'"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
else
|
77
|
+
copy_file 'config/locales/speedo.en.yml',
|
78
|
+
'config/locales/speedo.en.yml'
|
79
|
+
end
|
53
80
|
end
|
54
81
|
|
55
82
|
def routes
|
@@ -62,7 +89,7 @@ module Speedo
|
|
62
89
|
if File.exist? path
|
63
90
|
yield path
|
64
91
|
else
|
65
|
-
say "#{path} not found.
|
92
|
+
say "#{path} not found. Add '//= require_tree .' to application.js."
|
66
93
|
end
|
67
94
|
end
|
68
95
|
|
data/lib/speedo/sass.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
require 'bourbon'
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
#
|
3
|
+
module Speedo
|
4
|
+
class Railtie < ::Rails::Railtie
|
5
|
+
initializer "speedo.initialize_rails", :group => :all do
|
6
|
+
Sass::Engine::DEFAULT_OPTIONS[:load_paths].tap do |load_paths|
|
7
|
+
load_paths << "#{Gem.loaded_specs['bourbon'].full_gem_path}/app/assets/stylesheets/"
|
8
|
+
load_paths << "#{Rails.root}/app/assets/stylesheets"
|
9
|
+
load_paths << "#{Rails.root}/vendor/assets/stylesheets"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/speedo/version.rb
CHANGED
data/lib/speedo.rb
CHANGED