kentucky 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kentucky/generator.rb +4 -70
- data/lib/kentucky/version.rb +1 -1
- data/readme.md +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc7c794c8825e5bd49e57810f693c6e013a982c
|
4
|
+
data.tar.gz: 72b265e4b539b39ca98d56b2bb379e9581900633
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 789bd5110a094e5b36c536ff2ca2014d915db909c49af432c2762ab82787584d11617b3518e1cc1af197c069612ac6d9449af80563899757d2dfbe92220435b8
|
7
|
+
data.tar.gz: 45e9223dd25300b879e324313534842946f9479a839cc47755d1897686eb7ddeb44fa5acc83b2e552ad5293ad2bdaf4ddc02a0bc058e2d00eefad94a9d3d4c06
|
data/lib/kentucky/generator.rb
CHANGED
@@ -7,28 +7,10 @@ module Kentucky
|
|
7
7
|
map ['-v', '--version'] => :version
|
8
8
|
|
9
9
|
desc 'install', 'Install Kentucky into your project'
|
10
|
-
method_options :path => :string, :
|
10
|
+
method_options :path => :string, :dir => :boolean
|
11
11
|
def install
|
12
|
-
|
13
|
-
|
14
|
-
else
|
15
|
-
create_site_structure if !options[:force]
|
16
|
-
install_files
|
17
|
-
puts "Kentucky files installed to #{install_path_kentucky}/"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
desc 'update', 'Update Kentucky'
|
22
|
-
method_options :path => :string
|
23
|
-
def update
|
24
|
-
if kentucky_files_already_exist?
|
25
|
-
remove_kentucky_directory
|
26
|
-
create_kentucky_directory
|
27
|
-
install_files
|
28
|
-
puts "Kentucky files updated."
|
29
|
-
else
|
30
|
-
puts "No existing Kentucky installation. Doing nothing."
|
31
|
-
end
|
12
|
+
install_files
|
13
|
+
puts "Kentucky files installed! Happy coding!"
|
32
14
|
end
|
33
15
|
|
34
16
|
desc 'version', 'Show Kentucky version'
|
@@ -38,33 +20,6 @@ module Kentucky
|
|
38
20
|
|
39
21
|
private
|
40
22
|
|
41
|
-
def kentucky_files_already_exist?
|
42
|
-
install_path_kentucky.exist?
|
43
|
-
end
|
44
|
-
|
45
|
-
def create_site_structure
|
46
|
-
make_install_directory
|
47
|
-
if options[:dir]
|
48
|
-
dirs = %w(images scripts scss css)
|
49
|
-
dirs.each do |dir|
|
50
|
-
FileUtils.mkdir(install_path + Pathname.new(dir))
|
51
|
-
end
|
52
|
-
end
|
53
|
-
create_kentucky_directory
|
54
|
-
end
|
55
|
-
|
56
|
-
def make_install_directory
|
57
|
-
FileUtils.mkdir_p(install_path)
|
58
|
-
end
|
59
|
-
|
60
|
-
def create_kentucky_directory
|
61
|
-
FileUtils.mkdir(install_path_kentucky)
|
62
|
-
end
|
63
|
-
|
64
|
-
def remove_kentucky_directory
|
65
|
-
FileUtils.rm_rf(install_path_kentucky)
|
66
|
-
end
|
67
|
-
|
68
23
|
def install_path
|
69
24
|
if options[:path]
|
70
25
|
path = Pathname.new(options[:path])
|
@@ -81,34 +36,13 @@ module Kentucky
|
|
81
36
|
end
|
82
37
|
|
83
38
|
def copy_in_scss_files
|
84
|
-
FileUtils.cp_r(kentucky_stylesheets,
|
85
|
-
FileUtils.cp(master_stylesheet, install_path_scss)
|
86
|
-
end
|
87
|
-
|
88
|
-
def install_path_scss
|
89
|
-
if options[:dir]
|
90
|
-
return install_path + Pathname.new("scss")
|
91
|
-
else
|
92
|
-
return install_path
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
def install_path_kentucky
|
97
|
-
return install_path_scss
|
98
|
-
end
|
99
|
-
|
100
|
-
def master_stylesheet
|
101
|
-
Dir["#{stylesheets_directory}/style.scss"]
|
39
|
+
FileUtils.cp_r(kentucky_stylesheets, install_path)
|
102
40
|
end
|
103
41
|
|
104
42
|
def kentucky_stylesheets
|
105
43
|
Dir["#{kentucky_directory}/*"]
|
106
44
|
end
|
107
45
|
|
108
|
-
def all_stylesheets
|
109
|
-
Dir["#{stylesheets_directory}/*"]
|
110
|
-
end
|
111
|
-
|
112
46
|
def kentucky_directory
|
113
47
|
File.join(stylesheets_directory)
|
114
48
|
end
|
data/lib/kentucky/version.rb
CHANGED
data/readme.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# Kentucky
|
2
2
|
###### Straight from the source.
|
3
3
|
|
4
|
+
# Usage
|
5
|
+
|
6
|
+
- Run `gem install kentucky` from your Terminal app of choice.
|
7
|
+
- Navigate to your project's `scss` folder.
|
8
|
+
- Run `kentucky install`.
|
9
|
+
- Code and stuff!
|
10
|
+
|
11
|
+
---
|
12
|
+
|
4
13
|
[![Gem Version](https://badge.fury.io/rb/kentucky.svg)](https://badge.fury.io/rb/kentucky)
|
5
14
|
|
6
15
|
**Kentucky is a front-end project kickstart system to allow for rapidly beginning CSS development on a myriad of projects.**
|