blueberry_rails 0.4.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +47 -0
  3. data/.eslintrc +21 -0
  4. data/.hound.yml +0 -3
  5. data/.rubocop.yml +22 -13
  6. data/.ruby-version +1 -1
  7. data/README.md +1 -53
  8. data/blueberry_rails.gemspec +2 -2
  9. data/lib/blueberry_rails/app_builder.rb +45 -74
  10. data/lib/blueberry_rails/generators/app_generator.rb +21 -25
  11. data/lib/blueberry_rails/version.rb +3 -3
  12. data/spec/blueberry_rails_spec.rb +7 -23
  13. data/templates/Gemfile_custom.erb +24 -39
  14. data/templates/Procfile +1 -0
  15. data/templates/app.json.erb +2 -2
  16. data/templates/circle.yml.erb +68 -10
  17. data/templates/config/initializers/translation_engine.rb +1 -1
  18. data/templates/gitignore_custom.erb +7 -5
  19. data/templates/puma.rb +2 -3
  20. data/templates/spec/controllers/root_controller_spec.rb +2 -4
  21. data/templates/spec/drivers.rb +16 -0
  22. data/templates/spec/factories/administrators.rb +2 -2
  23. data/templates/spec/factories/users.rb +2 -2
  24. data/templates/spec/factories_spec.rb +3 -3
  25. data/templates/spec/factory_bot_syntax.rb +3 -0
  26. data/templates/spec/spec_helper.rb +0 -7
  27. data/templates/views/layouts/admin.html.slim.erb +3 -3
  28. data/templates/views/layouts/application.html.slim.erb +3 -3
  29. data/templates/views/layouts/mailer.html.slim.erb +7 -0
  30. metadata +13 -68
  31. data/circle.yml +0 -5
  32. data/templates/admin_assets/javascripts/admin.coffee +0 -6
  33. data/templates/admin_assets/javascripts/admin/.keep +0 -0
  34. data/templates/admin_assets/stylesheets/admin.sass +0 -4
  35. data/templates/admin_assets/stylesheets/admin/.keep +0 -0
  36. data/templates/assets/icons/_font_icons.scss +0 -18
  37. data/templates/assets/images/blueberry-logo.png +0 -0
  38. data/templates/assets/javascripts/application.coffee +0 -6
  39. data/templates/assets/javascripts/common/.keep +0 -0
  40. data/templates/assets/javascripts/frontend/.keep +0 -0
  41. data/templates/assets/stylesheets/application.sass +0 -9
  42. data/templates/assets/stylesheets/frontend/base/buttons.sass +0 -3
  43. data/templates/assets/stylesheets/frontend/base/typo.sass +0 -3
  44. data/templates/assets/stylesheets/frontend/common/bootstrap-ms.sass +0 -128
  45. data/templates/assets/stylesheets/frontend/common/bootstrap-override.sass +0 -3
  46. data/templates/assets/stylesheets/frontend/common/bootstrap.sass +0 -50
  47. data/templates/assets/stylesheets/frontend/common/variables.sass +0 -37
  48. data/templates/assets/stylesheets/frontend/components/.keep +0 -0
  49. data/templates/assets/stylesheets/frontend/components/blocks.sass +0 -19
  50. data/templates/assets/stylesheets/frontend/components/navbar.sass +0 -0
  51. data/templates/assets/stylesheets/frontend/layout/body.sass +0 -3
  52. data/templates/assets/stylesheets/frontend/layout/footer.sass +0 -3
  53. data/templates/assets/stylesheets/frontend/layout/header.sass +0 -3
  54. data/templates/assets/stylesheets/frontend/pages/.keep +0 -0
  55. data/templates/assets/stylesheets/frontend/third-party/includes.sass +0 -1
  56. data/templates/assets/stylesheets/frontend/utils/functions.sass +0 -23
  57. data/templates/assets/stylesheets/frontend/utils/make-columns.sass +0 -67
  58. data/templates/assets/stylesheets/frontend/utils/mixins.sass +0 -29
  59. data/templates/assets/stylesheets/frontend/utils/render-to.sass +0 -66
  60. data/templates/assets/stylesheets/frontend/utils/renderto-debug.sass +0 -22
  61. data/templates/gulp/application.js.coffee +0 -11
  62. data/templates/gulp/application.sass +0 -10
  63. data/templates/gulp/config.coffee +0 -47
  64. data/templates/gulp/global.coffee +0 -3
  65. data/templates/gulp/global.sass +0 -8
  66. data/templates/gulp/gulp_helper.rb +0 -16
  67. data/templates/gulp/gulpfile.js +0 -20
  68. data/templates/gulp/message.coffee +0 -1
  69. data/templates/gulp/package.json +0 -53
  70. data/templates/gulp/rev_manifest.rb +0 -5
  71. data/templates/gulp/tasks/browserSync.coffee +0 -6
  72. data/templates/gulp/tasks/browserify.coffee +0 -50
  73. data/templates/gulp/tasks/build.coffee +0 -25
  74. data/templates/gulp/tasks/clean.coffee +0 -6
  75. data/templates/gulp/tasks/default.coffee +0 -3
  76. data/templates/gulp/tasks/fontIcons/generateIconSass.coffee +0 -23
  77. data/templates/gulp/tasks/fontIcons/index.coffee +0 -9
  78. data/templates/gulp/tasks/fontIcons/template.sass +0 -33
  79. data/templates/gulp/tasks/images.coffee +0 -12
  80. data/templates/gulp/tasks/rev/index.coffee +0 -12
  81. data/templates/gulp/tasks/rev/rev-assets.coffee +0 -11
  82. data/templates/gulp/tasks/rev/rev-font-workaround.coffee +0 -49
  83. data/templates/gulp/tasks/sass.coffee +0 -24
  84. data/templates/gulp/tasks/watch.coffee +0 -14
  85. data/templates/gulp/tasks/watchify.coffee +0 -6
  86. data/templates/gulp/util/bundleLogger.coffee +0 -23
  87. data/templates/gulp/util/handleErrors.coffee +0 -11
  88. data/templates/secret_token.rb.erb +0 -18
  89. data/templates/spec/factory_girl_syntax.rb +0 -3
  90. data/templates/tasks/icons.rake +0 -19
@@ -1,3 +0,0 @@
1
- @import variables
2
- @import bootstrap
3
- @import bootstrap-ms
@@ -1,50 +0,0 @@
1
- // Core variables and mixins
2
- @import "bootstrap-sass/bootstrap/variables"
3
- @import "bootstrap-sass/bootstrap/mixins"
4
-
5
- // Reset and dependencies
6
- @import "bootstrap-sass/bootstrap/normalize"
7
- @import "bootstrap-sass/bootstrap/print"
8
- // @import "bootstrap-sass/bootstrap/glyphicons"
9
-
10
- // Core CSS
11
- @import "bootstrap-sass/bootstrap/scaffolding"
12
- @import "bootstrap-sass/bootstrap/type"
13
- @import "bootstrap-sass/bootstrap/code"
14
- @import "bootstrap-sass/bootstrap/grid"
15
- // @import "bootstrap-sass/bootstrap/tables"
16
- @import "bootstrap-sass/bootstrap/forms"
17
- @import "bootstrap-sass/bootstrap/buttons"
18
-
19
- // Components
20
- // @import "bootstrap-sass/bootstrap/component-animations"
21
- // @import "bootstrap-sass/bootstrap/dropdowns"
22
- // @import "bootstrap-sass/bootstrap/button-groups"
23
- // @import "bootstrap-sass/bootstrap/input-groups"
24
- // @import "bootstrap-sass/bootstrap/navs"
25
- // @import "bootstrap-sass/bootstrap/navbar"
26
- // @import "bootstrap-sass/bootstrap/breadcrumbs"
27
- // @import "bootstrap-sass/bootstrap/pagination"
28
- // @import "bootstrap-sass/bootstrap/pager"
29
- // @import "bootstrap-sass/bootstrap/labels"
30
- // @import "bootstrap-sass/bootstrap/badges"
31
- // @import "bootstrap-sass/bootstrap/jumbotron"
32
- // @import "bootstrap-sass/bootstrap/thumbnails"
33
- // @import "bootstrap-sass/bootstrap/alerts"
34
- // @import "bootstrap-sass/bootstrap/progress-bars"
35
- // @import "bootstrap-sass/bootstrap/media"
36
- // @import "bootstrap-sass/bootstrap/list-group"
37
- // @import "bootstrap-sass/bootstrap/panels"
38
- // @import "bootstrap-sass/bootstrap/responsive-embed"
39
- // @import "bootstrap-sass/bootstrap/wells"
40
- // @import "bootstrap-sass/bootstrap/close"
41
-
42
- // Components w/ JavaScript
43
- // @import "bootstrap-sass/bootstrap/modals"
44
- // @import "bootstrap-sass/bootstrap/tooltip"
45
- // @import "bootstrap-sass/bootstrap/popovers"
46
- // @import "bootstrap-sass/bootstrap/carousel"
47
-
48
- // Utility classes
49
- @import "bootstrap-sass/bootstrap/utilities"
50
- @import "bootstrap-sass/bootstrap/responsive-utilities"
@@ -1,37 +0,0 @@
1
- //
2
- // Variables
3
- // -------------------------------
4
-
5
- // Colors
6
- // $gray-darker: #123456
7
- // $gray-dark: #123456
8
- // $gray: #123456
9
- // $gray-light: #123456
10
- // $gray-lighter: #123456
11
-
12
- // $brand-primary: #123456
13
-
14
- // Scaffolding
15
- // $text-color: #123456
16
- // $link-color: #123456
17
-
18
- // Typography
19
- // $font-size-base: 15px
20
- // $line-height-base: 1.42
21
- // $font-family-sans-serif: 'Open Sans', sans-serif
22
-
23
- // $headings-font-family: $font-family-sans-serif
24
- // $headings-font-weight: 600
25
- // $headings-line-height: 1.2
26
- // $headings-color: inherit
27
-
28
- // Grid system
29
- // $grid-gutter-width: 30px
30
- // $grid-float-breakpoint: 1100px
31
-
32
- // Navbar
33
- // $navbar-default-color: #123456
34
- // $navbar-default-bg: #123456
35
-
36
- // $navbar-default-link-color: #123456
37
- // $navbar-default-link-hover-color: #123456
@@ -1,19 +0,0 @@
1
- //
2
- // Body
3
- // -------------------------------
4
-
5
- .block
6
- position: relative
7
- padding: 1px 0
8
- z-index: 10
9
-
10
- .block-content
11
- @extend .container
12
- margin-top: rem(50)
13
- margin-bottom: rem(50)
14
- position: relative
15
- z-index: 10
16
-
17
- &:before,
18
- &:after
19
- display: none
@@ -1,3 +0,0 @@
1
- //
2
- // Body
3
- // -------------------------------
@@ -1,3 +0,0 @@
1
- //
2
- // Footer
3
- // -------------------------------
@@ -1,3 +0,0 @@
1
- //
2
- // Header
3
- // -------------------------------
@@ -1,23 +0,0 @@
1
- @function getNumber($string)
2
- $strings: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
3
- $numbers: 0 1 2 3 4 5 6 7 8 9
4
- $result: 0
5
-
6
- @for $i from 1 through str-length($string)
7
- $character: str-slice($string, $i, $i)
8
- $index: index($strings, $character)
9
-
10
- @if $index
11
- $number: nth($numbers, $index)
12
- $result: $result * 10 + $number
13
-
14
- @return $result
15
-
16
- // calculate rem size from pixel size
17
- @function rem($px)
18
- $default: getNumber(inspect($font-size-base))
19
- @return $px / $default * 1rem
20
-
21
- // calculate em size from pixel size
22
- @function em($px, $parent: getNumber(inspect($font-size-base)))
23
- @return $px / $parent * 1em
@@ -1,67 +0,0 @@
1
- $sizes: ("0": 0,"1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9, "10": 10, "11": 11, "12": 12)
2
-
3
- @function to-number($value)
4
- @if type-of($value) == 'number'
5
- @return $value
6
- @else if type-of($value) != 'string'
7
- $_: log('Value for `to-number` should be a number or a string.')
8
-
9
- $result: 0
10
- $digits: 0
11
- $minus: str-slice($value, 1, 1) == '-'
12
- $numbers: ('0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9)
13
-
14
- @for $i from if($minus, 2, 1) through str-length($value)
15
- $character: str-slice($value, $i, $i)
16
-
17
- @if not (index(map-keys($numbers), $character) or $character == '.')
18
- @return to-length(if($minus, -$result, $result), str-slice($value, $i))
19
-
20
- @if $character == '.'
21
- $digits: 1
22
- @else if $digits == 0
23
- $result: $result * 10 + map-get($numbers, $character)
24
- @else
25
- $digits: $digits * 10
26
- $result: $result + map-get($numbers, $character) / $digits
27
-
28
- @return if($minus, -$result, $result)
29
-
30
- @function getsize($args, $i)
31
- $needle: str-slice(nth($args, $i), 3, str-length(nth($args, $i)))
32
-
33
- @if map-has-key($sizes, $needle)
34
- @return map-get($sizes, $needle)
35
- @else
36
- @return to-number($needle)
37
-
38
- =make-columns($args...)
39
- @for $i from 1 through length($args)
40
- $type: str-slice(nth($args, $i), 1, 2)
41
- $size: getsize($args, $i)
42
-
43
- @if $type == 'xs'
44
- +make-xs-column($size)
45
- @if $type == 'ms'
46
- +make-ms-column($size)
47
- @if $type == 'sm'
48
- +make-sm-column($size)
49
- @if $type == 'md'
50
- +make-md-column($size)
51
- @if $type == 'lg'
52
- +make-lg-column($size)
53
-
54
- =make-offsets($args...)
55
- @for $i from 1 through length($args)
56
- $type: str-slice(nth($args, $i), 1, 2)
57
- $size: map-get($sizes, str-slice(nth($args, $i), 3, str-length(nth($args, $i))))
58
- @if $type == 'xs'
59
- +make-xs-column-offset($size)
60
- @if $type == 'ms'
61
- +make-ms-column-offset($size)
62
- @if $type == 'sm'
63
- +make-sm-column-offset($size)
64
- @if $type == 'md'
65
- +make-md-column-offset($size)
66
- @if $type == 'lg'
67
- +make-lg-column-offset($size)
@@ -1,29 +0,0 @@
1
- //
2
- // Mixins
3
- // -------------------------------
4
-
5
- =all-abs($dist: 0)
6
- position: absolute
7
- top: $dist
8
- right: $dist
9
- bottom: $dist
10
- left: $dist
11
-
12
- =all-fix($dist: 0)
13
- position: fixed
14
- top: $dist
15
- right: $dist
16
- bottom: $dist
17
- left: $dist
18
-
19
- =antialiasing($type:antialiased)
20
- -webkit-font-smoothing: $type
21
- font-smoothing: $type
22
- font-smooth: always
23
-
24
- =display-flex
25
- display: flex
26
- flex-wrap: wrap
27
- &:after,
28
- &:before
29
- display: none
@@ -1,66 +0,0 @@
1
- $xs: "(max-width: #{$screen-xs-max-new})"
2
- $ms: "(min-width: #{$screen-ms-min}) and (max-width: #{$screen-ms-max})"
3
- $sm: "(min-width: #{$screen-sm-min}) and (max-width: #{$screen-sm-max})"
4
- $md: "(min-width: #{$screen-md-min}) and (max-width: #{$screen-md-max})"
5
- $lg: "(min-width: #{$screen-lg-min})"
6
-
7
- =render-for($type...)
8
- @if $type == "xs"
9
- @for $i from 1 through length($type)
10
- @if nth($type, $i) == xs
11
- @media #{$xs}
12
- @content
13
- @else if nth($type, $i) == sm
14
- @media #{$sm}
15
- @content
16
- @else if nth($type, $i) == ms
17
- @media #{$ms}
18
- @content
19
- @else if nth($type, $i) == md
20
- @media #{$md}
21
- @content
22
- @else if nth($type, $i) == lg
23
- @media #{$lg}
24
- @content
25
- @else if nth($type, $i) == navbar-lg
26
- @media (min-width: $grid-float-breakpoint)
27
- @content
28
- @else if nth($type, $i) == navbar-sm
29
- @media (max-width: $grid-float-breakpoint - 1)
30
- @content
31
- @else
32
- @media (max-width: $type)
33
- @content
34
-
35
- =render-up($type...)
36
- @for $i from 1 through length($type)
37
- @if nth($type, $i) == ms
38
- @media (min-width: $screen-ms-min)
39
- @content
40
- @else if nth($type, $i) == sm
41
- @media (min-width: $screen-sm-min)
42
- @content
43
- @else if nth($type, $i) == md
44
- @media (min-width: $screen-md-min)
45
- @content
46
- @media (min-width: $type)
47
- @content
48
-
49
- =render-to($type...)
50
- @if $type == "xs"
51
- @for $i from 1 through length($type)
52
- @if nth($type, $i) == xs
53
- @media (max-width: $screen-xs-max-new)
54
- @content
55
- @else if nth($type, $i) == ms
56
- @media (max-width: $screen-ms-max)
57
- @content
58
- @else if nth($type, $i) == sm
59
- @media (max-width: $screen-sm-max)
60
- @content
61
- @else if nth($type, $i) == md
62
- @media (max-width: $screen-md-max)
63
- @content
64
- @else
65
- @media (max-width: $type)
66
- @content
@@ -1,22 +0,0 @@
1
- body.development:before
2
- background-color: #FCF8E3
3
- border-bottom: 1px solid #FBEED5
4
- border-left: 1px solid #FBEED5
5
- color: #C09853
6
- font: small-caption
7
- padding: 3px 6px
8
- pointer-events: none
9
- position: fixed
10
- right: 0
11
- top: 0
12
- z-index: 1000001
13
- +render-to(xs)
14
- content: 'render to xs'
15
- +render-to(ms)
16
- content: 'render to ms'
17
- +render-to(sm)
18
- content: 'render to sm'
19
- +render-to(md)
20
- content: 'render to md'
21
- +render-to(lg)
22
- content: 'render to lg'
@@ -1,11 +0,0 @@
1
- # This is a manifest file that'll be compiled into application.js, which will
2
- # include all the files listed below.
3
- #
4
- # Only include gem installed javascript assets here. All other JS develoment
5
- # should use Common JS and will be compiled with Gulp and Browserify.
6
- #
7
- #= require jquery
8
- #= require jquery_ujs
9
- #
10
- # Pull compiled from /public/assets/javascripts
11
- #= require global
@@ -1,10 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will
3
- * include all the files listed below.
4
- *
5
- * Use this file to include any stylesheet assets from installed gems. All other
6
- * css is compiled with libsass with Gulp.
7
- *
8
- * Pull compiled from /public/assets/stylesheets
9
- *= require global
10
- */
@@ -1,47 +0,0 @@
1
- publicAssets = './public/assets'
2
- sourceFiles = './gulp/assets'
3
-
4
- module.exports =
5
- publicAssets: publicAssets
6
-
7
- browserSync:
8
- proxy: 'localhost:3000'
9
- files: [ './app/views/**' ]
10
-
11
- sass:
12
- src: sourceFiles + '/stylesheets/**/*.sass'
13
- dest: publicAssets + '/stylesheets'
14
- settings:
15
- indentedSyntax: true
16
- imagePath: '/assets/images'
17
- errLogToConsole: true
18
-
19
- images:
20
- src: sourceFiles + '/images/**'
21
- dest: publicAssets + '/images'
22
-
23
- fontIcons:
24
- name: 'Font Icons'
25
- src: sourceFiles + '/icons/*.svg'
26
- dest: publicAssets + '/fonts'
27
- sassDest: sourceFiles + '/stylesheets/base'
28
- template: './gulp/tasks/fontIcons/template.sass'
29
- sassOutputName: '_font_icons.sass'
30
- fontPath: '/assets/fonts'
31
- className: 'icon'
32
- options:
33
- fontName: 'font-icons'
34
- appendCodepoints: true
35
- normalize: false
36
-
37
- browserify: bundleConfigs: [ {
38
- entries: [
39
- # import React
40
- #'./node_modules/react/dist/react.js'
41
- sourceFiles + '/javascripts/global.coffee'
42
- ]
43
- dest: publicAssets + '/javascripts'
44
- outputName: 'global.js'
45
- extensions: [ '.js', '.coffee' ]
46
- debug: !process.env.RAILS_ENV == 'production'
47
- } ]
@@ -1,3 +0,0 @@
1
- message = require './message'
2
-
3
- console.log message
@@ -1,8 +0,0 @@
1
- @import node_modules/bootstrap-sass/assets/stylesheets/bootstrap
2
- // Uncomment after adding any SVG and running gulp fontIcons
3
- //@import base/font_icons
4
-
5
- body
6
- font-family: sans-serif
7
- background: fireBrick
8
- color: white
@@ -1,16 +0,0 @@
1
- module GulpHelper
2
-
3
- def gulp_asset_path(path)
4
- path = REV_MANIFEST[path] if defined?(REV_MANIFEST)
5
- "/assets/#{path}"
6
- end
7
-
8
- def image_alt(src)
9
- super.sub(/\s[0-9A-F]{8}\z/i, '')
10
- end
11
-
12
- def image_tag(image, options = {})
13
- super(gulp_asset_path("images/#{image}"), options)
14
- end
15
-
16
- end