bookends 2.1.3 → 2.2.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/bookends/cli.rb +15 -4
- data/lib/bookends/flag_handler.rb +17 -0
- data/lib/bookends/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11e7990788a93bca1d6d1cfea3baca8b0e04a76f
|
4
|
+
data.tar.gz: d3c545da7fee2528575aabd4f1b50da12aad02a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee1b556345ab4f91d37750959157925b9d88b3cd6a9a17a7dd6000a72e0046fbc6ff4fcd4b8f070d887d59cced26eef552013a494560f5be032bfadba208fb90
|
7
|
+
data.tar.gz: 8738d2b46dcc1887a84e2cbc5aea98a40c7cdc3589af49feee536b1cd4b4919e8504b868e16fc3d7666d222510539dc33b9e3bded84fd5694e3a7800ace0773e
|
data/README.md
CHANGED
@@ -55,7 +55,7 @@ See all rake tasks with `rake -T`
|
|
55
55
|
|
56
56
|
#### Jekyll version
|
57
57
|
1. `gem install bookends --local ../bookends/pkg/bookends-<latest_pkg>` from the
|
58
|
-
root of the Jekyll project.
|
58
|
+
root of the Jekyll project.
|
59
59
|
* Run `rake build` from bookends if there are no `*.gem` files in
|
60
60
|
`bookends/pkg/`
|
61
61
|
2. `bundle install` from the Jekyll application
|
data/lib/bookends/cli.rb
CHANGED
@@ -4,6 +4,7 @@ require 'ostruct'
|
|
4
4
|
|
5
5
|
require_relative 'rails_handler'
|
6
6
|
require_relative 'jekyll_handler'
|
7
|
+
require_relative 'flag_handler'
|
7
8
|
require_relative 'config/framework'
|
8
9
|
require_relative 'config/turbolinks'
|
9
10
|
|
@@ -12,16 +13,26 @@ module Bookends
|
|
12
13
|
at_exit { puts "\nThank you for using Bookends v#{Bookends::VERSION}" }
|
13
14
|
@@post_install_messages = ["\n", "\n"]
|
14
15
|
|
15
|
-
desc "install", "
|
16
|
+
desc "install", "Installs bookends"
|
17
|
+
option :app
|
16
18
|
def install
|
17
|
-
|
18
|
-
ask_about_turbolinks if rails?
|
19
|
+
ask_about_app unless valid_app_flag?
|
19
20
|
move_files
|
20
21
|
puts @@post_install_messages
|
21
22
|
end
|
22
23
|
|
23
|
-
|
24
24
|
private
|
25
|
+
def valid_app_flag?
|
26
|
+
return false unless options[:app]
|
27
|
+
|
28
|
+
Bookends::FlagHandler.handle_app_flag(options[:app], config)
|
29
|
+
end
|
30
|
+
|
31
|
+
def ask_about_app
|
32
|
+
ask_for_framework
|
33
|
+
ask_about_turbolinks if rails?
|
34
|
+
end
|
35
|
+
|
25
36
|
def move_files
|
26
37
|
self.send "handle_#{config.framework.get}"
|
27
38
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Bookends::FlagHandler
|
2
|
+
extend self
|
3
|
+
|
4
|
+
def handle_app_flag(app, config)
|
5
|
+
has_valid_app_flag = true
|
6
|
+
|
7
|
+
case app.downcase.strip
|
8
|
+
when 'www' then config.framework.set(:rails); config.turbolinks.set(false)
|
9
|
+
when 'blog' then config.framework.set(:rails); config.turbolinks.set(false)
|
10
|
+
when 'elements' then config.framework.set(:rails); config.turbolinks.set(true)
|
11
|
+
when 'engineering' then config.framework.set(:jekyll); config.turbolinks.set(false)
|
12
|
+
else has_valid_app_flag = false
|
13
|
+
end
|
14
|
+
|
15
|
+
has_valid_app_flag
|
16
|
+
end
|
17
|
+
end
|
data/lib/bookends/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookends
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marketing Web Ops at heroku
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -221,6 +221,7 @@ files:
|
|
221
221
|
- lib/bookends/config/turbolinks.rb
|
222
222
|
- lib/bookends/engine.rb
|
223
223
|
- lib/bookends/file_actions.rb
|
224
|
+
- lib/bookends/flag_handler.rb
|
224
225
|
- lib/bookends/jekyll_handler.rb
|
225
226
|
- lib/bookends/rails_handler.rb
|
226
227
|
- lib/bookends/templates/footer.html
|