philosophies-suspenders 2.0.0 → 2.0.2

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: 7a982c6590778438fcb8339dc511202137777de9
4
- data.tar.gz: f75305597dee18f3b83fff5ec37f0e3966c9a279
3
+ metadata.gz: f4d6c7f9c63ca8ae28fdc7a6b1e28a33287b6de1
4
+ data.tar.gz: 4a0c56e3cfce4a914bd73769803beafcf1243174
5
5
  SHA512:
6
- metadata.gz: a7fa4ade06a61496f4b40cecacade97db4a1d8eb3ecfda2da55f4fc9ee572dd7cea5409728ff4d276aba263adbce1d5873c7cb6a28f06dbdb471edb5a19a6b8e
7
- data.tar.gz: 3c137ad784fc66e5f62e7d6a76a28353295d9f96df41f84b211202a79499ed492cf3302b1d1aff0167b48637b0433e381d328364832c1be4db7aedb64dd726a4
6
+ metadata.gz: 898984d912915fd1662a85593a03ef0afa38ffcfe26c39223269f2cd692edf43c3da7eda5062c51500e55fa1ef69cdc9303a65e6155c9b5995d696c80f0248c6
7
+ data.tar.gz: aa1e575faabc660d67541b2c4593a6ea5f1eedab69fc42520df73afac57ef286d61b4ea270257585984232b5d3db8a83b52a5f3906c5f280dc86140f19146c98
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- philosophies-suspenders (2.0.0)
4
+ philosophies-suspenders (2.0.2)
5
5
  bundler (~> 1.3)
6
6
  rails (= 4.2.3)
7
7
 
@@ -43,23 +43,35 @@ GEM
43
43
  minitest (~> 5.1)
44
44
  thread_safe (~> 0.3, >= 0.3.4)
45
45
  tzinfo (~> 1.1)
46
- arel (6.0.0)
46
+ arel (6.0.3)
47
47
  builder (3.2.2)
48
+ byebug (4.0.5)
49
+ columnize (= 0.9.0)
50
+ coderay (1.1.0)
51
+ columnize (0.9.0)
48
52
  diff-lcs (1.2.5)
49
53
  erubis (2.7.0)
50
- globalid (0.3.5)
54
+ globalid (0.3.6)
51
55
  activesupport (>= 4.1.0)
52
56
  i18n (0.7.0)
53
57
  json (1.8.3)
54
- loofah (2.0.2)
58
+ loofah (2.0.3)
55
59
  nokogiri (>= 1.5.9)
56
60
  mail (2.6.3)
57
61
  mime-types (>= 1.16, < 3)
62
+ method_source (0.8.2)
58
63
  mime-types (2.6.1)
59
64
  mini_portile (0.6.2)
60
- minitest (5.7.0)
65
+ minitest (5.8.0)
61
66
  nokogiri (1.6.6.2)
62
67
  mini_portile (~> 0.6.0)
68
+ pry (0.10.1)
69
+ coderay (~> 1.1.0)
70
+ method_source (~> 0.8.1)
71
+ slop (~> 3.4)
72
+ pry-byebug (3.1.0)
73
+ byebug (~> 4.0)
74
+ pry (~> 0.10)
63
75
  rack (1.6.4)
64
76
  rack-test (0.6.3)
65
77
  rack (>= 1.0)
@@ -76,7 +88,7 @@ GEM
76
88
  sprockets-rails
77
89
  rails-deprecated_sanitizer (1.0.3)
78
90
  activesupport (>= 4.2.0.alpha)
79
- rails-dom-testing (1.0.6)
91
+ rails-dom-testing (1.0.7)
80
92
  activesupport (>= 4.2.0.beta, < 5.0)
81
93
  nokogiri (~> 1.6.0)
82
94
  rails-deprecated_sanitizer (>= 1.0.1)
@@ -88,20 +100,21 @@ GEM
88
100
  rake (>= 0.8.7)
89
101
  thor (>= 0.18.1, < 2.0)
90
102
  rake (10.4.2)
91
- rspec (3.2.0)
92
- rspec-core (~> 3.2.0)
93
- rspec-expectations (~> 3.2.0)
94
- rspec-mocks (~> 3.2.0)
95
- rspec-core (3.2.3)
96
- rspec-support (~> 3.2.0)
97
- rspec-expectations (3.2.1)
103
+ rspec (3.3.0)
104
+ rspec-core (~> 3.3.0)
105
+ rspec-expectations (~> 3.3.0)
106
+ rspec-mocks (~> 3.3.0)
107
+ rspec-core (3.3.2)
108
+ rspec-support (~> 3.3.0)
109
+ rspec-expectations (3.3.1)
98
110
  diff-lcs (>= 1.2.0, < 2.0)
99
- rspec-support (~> 3.2.0)
100
- rspec-mocks (3.2.1)
111
+ rspec-support (~> 3.3.0)
112
+ rspec-mocks (3.3.2)
101
113
  diff-lcs (>= 1.2.0, < 2.0)
102
- rspec-support (~> 3.2.0)
103
- rspec-support (3.2.2)
104
- sprockets (3.2.0)
114
+ rspec-support (~> 3.3.0)
115
+ rspec-support (3.3.0)
116
+ slop (3.6.0)
117
+ sprockets (3.3.2)
105
118
  rack (~> 1.0)
106
119
  sprockets-rails (2.3.2)
107
120
  actionpack (>= 3.0)
@@ -117,7 +130,9 @@ PLATFORMS
117
130
 
118
131
  DEPENDENCIES
119
132
  philosophies-suspenders!
133
+ pry
134
+ pry-byebug
120
135
  rspec (~> 3.2)
121
136
 
122
137
  BUNDLED WITH
123
- 1.10.1
138
+ 1.10.5
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Suspenders
2
2
 
3
+ [![Stories in Backlog](https://badge.waffle.io/philosophie/suspenders.svg?label=ready&title=Backlog)](http://waffle.io/philosophie/suspenders)
4
+
3
5
  This is Philosophie's fork of Suspenders, a Rails application template
4
6
  originally created by thoughtbot. This repo has strayed significantly from
5
7
  thoughtbot's and is not intended to go back upstream.
@@ -10,6 +12,10 @@ First install the gem:
10
12
 
11
13
  gem install philosophies-suspenders
12
14
 
15
+ Or update if you already have the gem installed:
16
+
17
+ gem update philosophies-suspenders
18
+
13
19
  Then run:
14
20
 
15
21
  philosophies-suspenders projectname
@@ -32,7 +38,6 @@ It includes application gems like:
32
38
  * [Sidekiq](https://github.com/mperham/sidekiq) for background processing
33
39
  * [Flutie](https://github.com/thoughtbot/flutie) for `page_title` and `body_class` view
34
40
  helpers
35
- * [High Voltage](https://github.com/thoughtbot/high_voltage) for static pages
36
41
  * [Rails Assets](https://rails-assets.org/) for managing frontend dependencies,
37
42
  including by default:
38
43
  * jquery
@@ -100,6 +105,13 @@ Suspenders also comes with:
100
105
  [i18n]: https://github.com/thoughtbot/suspenders/pull/304
101
106
  [segment]: https://segment.com
102
107
 
108
+ ## CSS Frameworks
109
+
110
+ You can optionally install a CSS Framework
111
+ options: bourbon_n_friends, bootstrap, foundation
112
+
113
+ philosophies-suspenders my_new_app --css-framework=CSS_FRAMEWORK
114
+
103
115
  ## Heroku
104
116
 
105
117
  By default, suspenders will:
@@ -117,7 +129,7 @@ By default, suspenders will:
117
129
 
118
130
  You can optionally specify alternate Heroku flags:
119
131
 
120
- suspenders app \
132
+ philosophies-suspenders app \
121
133
  --heroku-flags "--region eu --addons newrelic,pgbackups,ssl"
122
134
 
123
135
  See all possible Heroku flags:
@@ -143,7 +155,7 @@ will push all branches to that remote.
143
155
 
144
156
  You can bypass all git functionality with the `--skip-git` option:
145
157
 
146
- suspenders app --skip-git true
158
+ philosophies-suspenders app --skip-git true
147
159
 
148
160
  ## GitHub
149
161
 
@@ -151,7 +163,7 @@ You can optionally create a GitHub repository for the suspended Rails app. It
151
163
  requires that you have [Hub](https://github.com/github/hub) on your system:
152
164
 
153
165
  curl http://hub.github.com/standalone -sLo ~/bin/hub && chmod +x ~/bin/hub
154
- suspenders app --github organization/project
166
+ philosophies-suspenders app --github organization/project
155
167
 
156
168
  This has the same effect as running:
157
169
 
@@ -305,11 +305,96 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
305
305
  create_empty_directory('app/assets/javascripts/application')
306
306
  end
307
307
 
308
+ def install_bourbon_n_friends
309
+ inject_into_file(
310
+ 'Gemfile',
311
+ %{\ngem 'bourbon'\ngem 'neat'},
312
+ after: Regexp.new("gem 'rails', '#{Suspenders::RAILS_VERSION}'")
313
+ )
314
+ bundle_command 'install'
315
+
316
+ inject_into_file(
317
+ 'app/assets/stylesheets/application.scss',
318
+ %{
319
+ @import "bourbon";
320
+ @import "neat";
321
+ @import "base/grid-settings";
322
+ @import "base/base";
323
+ },
324
+ after: /@charset "utf-8";/
325
+ )
326
+ end
327
+
328
+ def install_bootstrap
329
+ inject_into_file(
330
+ 'Gemfile',
331
+ %{\ngem 'bootstrap-sass'},
332
+ after: /gem 'sass-rails',.*$/
333
+ )
334
+ bundle_command 'install'
335
+
336
+ inject_into_file(
337
+ 'app/assets/stylesheets/application.scss',
338
+ %{\n@import "bootstrap-sprockets";\n@import "bootstrap";},
339
+ after: /@charset "utf-8";/
340
+ )
341
+
342
+ inject_into_file(
343
+ 'app/assets/javascripts/application.js',
344
+ %{\n\/\/= require bootstrap-sprockets},
345
+ after: /\/\/= require jquery-ujs/
346
+ )
347
+ end
348
+
349
+ def install_foundation
350
+ inject_into_file(
351
+ 'Gemfile',
352
+ %{\ngem 'foundation-rails'},
353
+ after: /gem 'sass-rails',.*$/
354
+ )
355
+
356
+ inject_into_file(
357
+ 'app/assets/stylesheets/application.scss',
358
+ %{\n@import "foundation_and_overrides";},
359
+ after: /@charset "utf-8";/
360
+ )
361
+
362
+ inject_into_file(
363
+ 'app/assets/javascripts/application.js',
364
+ %{\n\/\/= require foundation},
365
+ after: /\/\/= require jquery-ujs/
366
+ )
367
+
368
+ inject_into_file(
369
+ 'app/assets/javascripts/application.js',
370
+ %{\n$(document).foundation();},
371
+ after: /\/\/= require_tree ./
372
+ )
373
+
374
+ inject_into_file(
375
+ 'app/views/layouts/application.html.erb',
376
+ %{<%= javascript_include_tag "vendor/modernizr" %>\n},
377
+ before: /<title>.*$/
378
+ )
379
+
380
+ bundle_command 'install'
381
+
382
+ result = run('bundle show foundation-rails', capture: true ).gsub("\n",'')
383
+ settings_file = File.join(
384
+ result,
385
+ 'vendor', 'assets', 'stylesheets', 'foundation', '_settings.scss'
386
+ )
387
+
388
+ create_file(
389
+ "app/assets/stylesheets/foundation_and_overrides.scss",
390
+ File.read(settings_file)
391
+ )
392
+ end
393
+
308
394
  def gitignore_files
309
395
  remove_file '.gitignore'
310
396
  copy_file 'suspenders_gitignore', '.gitignore'
311
397
  [
312
- 'app/views/pages',
313
398
  'app/workers',
314
399
  'spec/lib',
315
400
  'spec/controllers',
@@ -1,5 +1,6 @@
1
1
  require 'rails/generators'
2
2
  require 'rails/generators/rails/app/app_generator'
3
+ require 'pry-byebug'
3
4
 
4
5
  module Suspenders
5
6
  class AppGenerator < Rails::Generators::AppGenerator
@@ -18,6 +19,18 @@ module Suspenders
18
19
  class_option :origin, type: :string, default: nil,
19
20
  desc: "Add and push to git remote for origin"
20
21
 
22
+ class_option(
23
+ :css_framework,
24
+ type: :string,
25
+ aliases: "-C",
26
+ default: nil,
27
+ desc: "Install a css framework "\
28
+ "(options: bourbon_n_friends/bootstrap/foundation)"
29
+ )
30
+
31
+ class_option :skip_test_unit, type: :boolean, aliases: "-T", default: true,
32
+ desc: "Skip Test::Unit files"
33
+
21
34
  class_option :skip_git, type: :boolean, default: false,
22
35
  desc: "Don't create and commit to git repository"
23
36
 
@@ -50,6 +63,7 @@ module Suspenders
50
63
  invoke :run_stairs
51
64
  invoke :initial_commit_and_branching
52
65
  invoke :push_to_origin
66
+ invoke :setup_css_framework
53
67
  invoke :outro
54
68
  end
55
69
 
@@ -151,6 +165,18 @@ module Suspenders
151
165
  build :setup_javascripts
152
166
  end
153
167
 
168
+ def setup_css_framework
169
+ if options[:css_framework]
170
+ say "Installing #{options[:css_framework]}"
171
+ case options[:css_framework]
172
+ when 'bourbon_n_friends' then build :install_bourbon_n_friends
173
+ when 'bootstrap' then build :install_bootstrap
174
+ when 'foundation' then build :install_foundation
175
+ else say "Unrecognized Css Framework"
176
+ end
177
+ end
178
+ end
179
+
154
180
  def setup_git
155
181
  if !options[:skip_git]
156
182
  say 'Initializing git'
@@ -1,5 +1,5 @@
1
1
  module Suspenders
2
2
  RAILS_VERSION = "4.2.3"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.2"
5
5
  end
@@ -30,5 +30,7 @@ rush to build something amazing; don't use it if you like missing deadlines.
30
30
  s.add_dependency 'bundler', '~> 1.3'
31
31
  s.add_dependency 'rails', Suspenders::RAILS_VERSION
32
32
 
33
+ s.add_development_dependency 'pry'
34
+ s.add_development_dependency 'pry-byebug'
33
35
  s.add_development_dependency 'rspec', '~> 3.2'
34
36
  end
@@ -1,19 +1,20 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  ruby "<%= Suspenders::RUBY_VERSION %>"
4
+ gem "rails", "<%= Suspenders::RAILS_VERSION %>"
4
5
 
5
6
  gem "airbrake"
6
7
  gem "autoprefixer-rails"
7
8
  gem "bundler", ">= 1.8.4"
8
9
  gem "coffee-rails", "~> 4.1.0"
9
10
  gem "flutie"
10
- gem "high_voltage"
11
11
  gem "i18n-tasks"
12
12
  gem "newrelic_rpm", ">= 3.9.8"
13
13
  gem "pg"
14
14
  gem "quiet_assets"
15
15
  gem "rack-canonical-host"
16
16
  gem "rails", "<%= Suspenders::RAILS_VERSION %>"
17
+ gem "recipient_interceptor"
17
18
  gem "sass-rails", "~> 5.0"
18
19
  gem "sidekiq"
19
20
  gem "simple_form"
@@ -41,7 +42,6 @@ group :development, :test do
41
42
  gem "pry-byebug"
42
43
  gem "pry-rails"
43
44
  gem "rspec-rails", "~> 3.1.0"
44
- gem "rspec-sidekiq"
45
45
  gem "rubocop"
46
46
  end
47
47
 
@@ -49,6 +49,7 @@ group :test do
49
49
  gem "capybara-webkit", ">= 1.2.0"
50
50
  gem "database_cleaner"
51
51
  gem "launchy"
52
+ gem "rspec-sidekiq"
52
53
  gem "shoulda-matchers", require: false
53
54
  gem "timecop"
54
55
  end
@@ -3,7 +3,8 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="ROBOTS" content="NOODP" />
6
- <meta name="viewport" content="initial-scale=1" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+
7
8
  <%%#
8
9
  Configure default and controller-, and view-specific titles in
9
10
  config/locales/en.yml. For more see:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: philosophies-suspenders
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philosophie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-09 00:00:00.000000000 Z
11
+ date: 2015-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 4.2.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry-byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: rspec
43
71
  requirement: !ruby/object:Gem::Requirement