kentucky 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ // ------------------------------------------------------------------- //
2
+ // Standard Imports
3
+ // ------------------------------------------------------------------- //
4
+
5
+ @import 'normalize';
6
+ @import 'defaults';
7
+ @import 'helpers';
8
+
9
+ // ------------------------------------------------------------------- //
10
+ // For those last minute changes you'll come back to later
11
+ // ------------------------------------------------------------------- //
12
+
13
+ @import 'shame';
14
+
15
+ // ------------------------------------------------------------------- //
16
+ // Conditional Imports
17
+ // Only loaded if options in _defaults are set to TRUE
18
+ // ------------------------------------------------------------------- //
19
+
20
+ @import 'debug';
@@ -0,0 +1,243 @@
1
+ // ------------------------------------------------------------------- //
2
+ // Normalize by Nicolas Gallagher
3
+ // http://necolas.github.io/normalize.css/
4
+ //
5
+ // Edited for use with Kentucky
6
+ // ------------------------------------------------------------------- //
7
+
8
+ *{
9
+ @include box-sizing(border-box);
10
+ }
11
+
12
+ article,
13
+ aside,
14
+ details,
15
+ figcaption,
16
+ figure,
17
+ footer,
18
+ header,
19
+ hgroup,
20
+ main,
21
+ nav,
22
+ section,
23
+ summary {
24
+ display: block;
25
+ }
26
+
27
+ audio,
28
+ canvas,
29
+ video {
30
+ display: inline-block;
31
+ }
32
+
33
+ audio:not([controls]) {
34
+ display: none;
35
+ height: 0;
36
+ }
37
+
38
+ [hidden] {
39
+ display: none;
40
+ }
41
+
42
+ // ------------------------------------------------------------------- //
43
+ // Base
44
+ // ------------------------------------------------------------------- //
45
+
46
+ html {
47
+ font-family: sans-serif;
48
+ -ms-text-size-adjust: 100%;
49
+ -webkit-text-size-adjust: 100%;
50
+ }
51
+
52
+ body {
53
+ margin: 0;
54
+ }
55
+
56
+ // ------------------------------------------------------------------- //
57
+ // Links
58
+ // ------------------------------------------------------------------- //
59
+
60
+ a:focus {
61
+ outline: thin dotted;
62
+ }
63
+
64
+ a:active,
65
+ a:hover {
66
+ outline: 0;
67
+ }
68
+
69
+ // ------------------------------------------------------------------- //
70
+ // Typography
71
+ // ------------------------------------------------------------------- //
72
+
73
+ abbr[title] {
74
+ border-bottom: 1px dotted;
75
+ }
76
+
77
+ b,
78
+ strong {
79
+ font-weight: bold;
80
+ }
81
+
82
+ dfn {
83
+ font-style: italic;
84
+ }
85
+
86
+ hr {
87
+ display: block;
88
+ height: 1px;
89
+ background: #ccc;
90
+ border: none;
91
+ }
92
+
93
+ mark {
94
+ background: #ff0;
95
+ color: #000;
96
+ }
97
+
98
+ code,
99
+ kbd,
100
+ pre,
101
+ samp {
102
+ font-family: monospace,serif;
103
+ font-size: 1em;
104
+ }
105
+
106
+ pre {
107
+ white-space: pre-wrap;
108
+ }
109
+
110
+ q {
111
+ quotes: "\201C" "\201D" "\2018" "\2019";
112
+ }
113
+
114
+ small {
115
+ font-size: 80%;
116
+ }
117
+
118
+ sub,
119
+ sup {
120
+ position: relative;
121
+ font-size: 75%;
122
+ line-height: 0;
123
+ vertical-align: baseline;
124
+ }
125
+
126
+ sup {
127
+ top: -.5em;
128
+ }
129
+
130
+ sub {
131
+ bottom: -.25em;
132
+ }
133
+
134
+ // ------------------------------------------------------------------- //
135
+ // Embedded Content
136
+ // ------------------------------------------------------------------- //
137
+
138
+ img {
139
+ border: 0;
140
+ }
141
+
142
+ svg:not(:root) {
143
+ overflow: hidden;
144
+ }
145
+
146
+ // ------------------------------------------------------------------- //
147
+ // Figures
148
+ // ------------------------------------------------------------------- //
149
+
150
+ figure {
151
+ margin:0;
152
+ }
153
+
154
+ // ------------------------------------------------------------------- //
155
+ // Forms
156
+ // ------------------------------------------------------------------- //
157
+
158
+ fieldset {
159
+ margin: 0 2px;
160
+ padding: .35em .625em .75em;
161
+ border: 1px solid #ccc;
162
+ }
163
+
164
+ legend {
165
+ padding: 0;
166
+ border: 0;
167
+ }
168
+
169
+ button,
170
+ input,
171
+ select,
172
+ textarea {
173
+ margin: 0;
174
+ font-family: inherit;
175
+ font-size: 100%;
176
+ }
177
+
178
+ button,
179
+ input {
180
+ line-height: normal;
181
+ }
182
+
183
+ button,
184
+ select {
185
+ text-transform: none;
186
+ }
187
+
188
+ button,
189
+ html input[type="button"],
190
+ input[type="reset"],
191
+ input[type="submit"] {
192
+ -webkit-appearance: button;
193
+ cursor: pointer;
194
+ }
195
+
196
+ button[disabled],
197
+ html input[disabled] {
198
+ cursor: default;
199
+ }
200
+
201
+ input[type="checkbox"],
202
+ input[type="radio"] {
203
+ padding: 0;
204
+ }
205
+
206
+ input[type="search"] {
207
+ -webkit-appearance: textfield;
208
+ }
209
+
210
+ input[type="search"]::-webkit-search-cancel-button,
211
+ input[type="search"]::-webkit-search-decoration {
212
+ -webkit-appearance: none;
213
+ }
214
+
215
+ button::-moz-focus-inner,
216
+ input::-moz-focus-inner {
217
+ padding: 0;
218
+ border: 0;
219
+ }
220
+
221
+ textarea {
222
+ overflow: auto;
223
+ vertical-align:top;
224
+ }
225
+
226
+ // ------------------------------------------------------------------- //
227
+ // Lists
228
+ // ------------------------------------------------------------------- //
229
+
230
+ ul,
231
+ ol,
232
+ dl{
233
+ margin: 0;
234
+ }
235
+
236
+ // ------------------------------------------------------------------- //
237
+ // Tables
238
+ // ------------------------------------------------------------------- //
239
+
240
+ table {
241
+ border-collapse: collapse;
242
+ border-spacing: 0;
243
+ }
@@ -0,0 +1,3 @@
1
+ // ------------------------------------------------------------------- //
2
+ // Get hacky in here...
3
+ // ------------------------------------------------------------------- //
@@ -0,0 +1,12 @@
1
+ // ------------------------------------------------------------------- //
2
+ // Framework Imports
3
+ // ------------------------------------------------------------------- //
4
+
5
+ @import 'bourbon/bourbon';
6
+ @import 'neat/neat';
7
+ @import 'kentucky/kentucky';
8
+
9
+
10
+ // ------------------------------------------------------------------- //
11
+ // Project Imports
12
+ // ------------------------------------------------------------------- //
data/bin/kentucky ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # CodeKit needs relative paths
4
+ require File.dirname(__FILE__) + '/../lib/kentucky.rb'
5
+
6
+ Kentucky::Generator.start
@@ -0,0 +1,29 @@
1
+ @disable-bundler
2
+ Feature: Install kentucky files
3
+
4
+ Scenario: Kentucky generates a new kentucky installation
5
+ When I run `bundle exec kentucky install`
6
+ Then the sass directories should have been generated
7
+ And the following directories should exist:
8
+ | kentucky |
9
+ And the master kentucky partial should have been generated
10
+ And the output should contain "Kentucky files installed to kentucky/"
11
+
12
+ Scenario: Generating does not overwrite an existing kentucky directory
13
+ Given kentucky is already installed
14
+ When I run `bundle exec kentucky install`
15
+ Then the output should contain "Kentucky files already installed, doing nothing."
16
+
17
+ Scenario: Install Kentucky into a custom path
18
+ When I run `bundle exec kentucky install --path=custom_path`
19
+ Then the sass directories with "custom_path" prefix should have been generated
20
+ And the following directories should exist:
21
+ | custom_path/kentucky |
22
+ And the master kentucky partial should have been generated within "custom_path" directory
23
+ And the output should contain "Kentucky files installed to custom_path/kentucky/"
24
+
25
+ Scenario: Forcing install of kentucky
26
+ Given kentucky is already installed
27
+ When I run `bundle exec kentucky install --force`
28
+ Then the output from "bundle exec kentucky install --force" should contain "Kentucky files installed to kentucky/"
29
+ And the output should not contain "Kentucky files already installed, doing nothing."
@@ -0,0 +1,25 @@
1
+ Given /^kentucky is already installed$/ do
2
+ install_kentucky
3
+ end
4
+
5
+ Given /^I install kentucky to "([^"]*)"$/ do |path|
6
+ end
7
+
8
+ Then /^the sass directories(?: with "([^"]+)" prefix)? should have been generated$/ do |prefix|
9
+ sass_directories = []
10
+ sass_directories.map!{ |directory| kentucky_path(prefix, directory) }
11
+ check_directory_presence(sass_directories, true)
12
+ end
13
+
14
+ Then /^the master kentucky partial should have been generated(?: within "([^"]+)" directory)?$/ do |prefix|
15
+ check_file_presence([kentucky_path(prefix, '_kentucky.scss')], true)
16
+ end
17
+
18
+ Then /^kentucky should not have been generated$/ do
19
+ check_directory_presence(['kentucky'], false)
20
+ end
21
+
22
+ Then /^the output should contain the current version of Kentucky$/ do
23
+ step %(the output should contain exactly "Kentucky #{Kentucky::VERSION}\n")
24
+ end
25
+
@@ -0,0 +1 @@
1
+ require "aruba/cucumber"
@@ -0,0 +1,19 @@
1
+ module KentuckySupport
2
+ def install_kentucky(path = nil)
3
+ if path
4
+ run_simple("bundle exec kentucky install --path '#{path}'")
5
+ else
6
+ run_simple("bundle exec kentucky install")
7
+ end
8
+ end
9
+
10
+ def kentucky_path(prefix, path)
11
+ if prefix
12
+ File.join(prefix, 'kentucky', path)
13
+ else
14
+ File.join('kentucky', path)
15
+ end
16
+ end
17
+ end
18
+
19
+ World(KentuckySupport)
@@ -0,0 +1,30 @@
1
+ @disable-bundler
2
+ Feature: Update kentucky files
3
+
4
+ Scenario: Updating updates an existing kentucky install
5
+ Given kentucky is already installed
6
+ When I write to "kentucky/_kentucky.scss" with:
7
+ """
8
+ foobar
9
+ """
10
+ And I run `bundle exec kentucky update`
11
+ Then the output should contain "Kentucky files updated."
12
+ And the file "kentucky/_kentucky.scss" should not contain "foobar"
13
+
14
+ Scenario: Updating with a --path option
15
+ Given I install kentucky to "custom_path"
16
+ When I write to "custom_path/kentucky/_kentucky.scss" with:
17
+ """
18
+ foobar
19
+ """
20
+ And I run `bundle exec kentucky update`
21
+ Then the output should contain "No existing Kentucky installation. Doing nothing."
22
+
23
+ When I run `bundle exec kentucky update --path custom_path`
24
+ Then the output should contain "Kentucky files updated."
25
+ And the file "custom_path/kentucky/_kentucky.scss" should not contain "foobar"
26
+
27
+ Scenario: Updating does not generate a new kentucky install
28
+ And I run `bundle exec kentucky update`
29
+ Then kentucky should not have been generated
30
+ And the output should contain "No existing Kentucky installation. Doing nothing."
@@ -0,0 +1,6 @@
1
+ @disable-bundler
2
+ Feature: Show version
3
+ Scenario: Viewing version
4
+ When I successfully run `bundle exec kentucky --version`
5
+ Then the output should contain the current version of Kentucky
6
+
data/kentucky.gemspec ADDED
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "kentucky/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "kentucky"
7
+ s.version = Kentucky::VERSION
8
+ s.license = "MIT"
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ["Aaron Clemmer", "Greg Bruening", "Chris Brinson"]
11
+ s.email = ["greg@lookthink.com"]
12
+ s.homepage = "https://bitbucket.org/lookthink/kentucky"
13
+ s.summary = "Kentucky Bourbon, Neat SCSS Mixins and Grid System"
14
+ s.description = <<-DESC
15
+ Kentucky is LookThink's contribution to further enhance an already stellar SCSS library put together by the people at ThoughtBot. Their mixin library (Bourbon) and grid system (Neat) now serve as the base to all LookThink projects. Kentucky also includes a variety of mixins from various projects that we find useful and weren't included in Bourbon. Additionally, it includes a handy-dandy file (_defaults.scss) for handling all of your variables, keeping them centralized and easy to maintain.
16
+ DESC
17
+
18
+ #s.rubyforge_project = "bourbon"
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
23
+ s.require_paths = ["lib"]
24
+
25
+ s.add_dependency('sass', '>= 3.2.0')
26
+ s.add_dependency('bourbon', '~> 3.1')
27
+ s.add_dependency('neat', '~> 1.2')
28
+ s.add_dependency('thor')
29
+
30
+ s.add_development_dependency('aruba', '= 0.4.11')
31
+ s.add_development_dependency('rake')
32
+ end