flint-gs 2.0.6 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -11
  3. data/lib/flint/version.rb +1 -1
  4. data/stylesheets/_flint.scss +3 -3
  5. data/stylesheets/flint/config/_config.scss +24 -24
  6. data/stylesheets/flint/functions/_functions.scss +9 -9
  7. data/stylesheets/flint/functions/helpers/_helpers.scss +138 -138
  8. data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +13 -13
  9. data/stylesheets/flint/functions/lib/_calc-width.scss +17 -17
  10. data/stylesheets/flint/functions/lib/_exists.scss +12 -12
  11. data/stylesheets/flint/functions/lib/_fluid-width.scss +12 -12
  12. data/stylesheets/flint/functions/lib/_get-index.scss +11 -11
  13. data/stylesheets/flint/functions/lib/_get-instance-value.scss +12 -12
  14. data/stylesheets/flint/functions/lib/_get-value.scss +11 -11
  15. data/stylesheets/flint/functions/lib/_has-family-instance.scss +12 -12
  16. data/stylesheets/flint/functions/lib/_instance.scss +17 -17
  17. data/stylesheets/flint/functions/lib/_last.scss +11 -11
  18. data/stylesheets/flint/functions/lib/_list-to-string.scss +15 -15
  19. data/stylesheets/flint/functions/lib/_map-fetch.scss +12 -12
  20. data/stylesheets/flint/functions/lib/_next-index.scss +11 -11
  21. data/stylesheets/flint/functions/lib/_purge.scss +13 -13
  22. data/stylesheets/flint/functions/lib/_remove.scss +15 -15
  23. data/stylesheets/flint/functions/lib/_replace-substring.scss +13 -13
  24. data/stylesheets/flint/functions/lib/_replace.scss +15 -15
  25. data/stylesheets/flint/functions/lib/_steal-key.scss +11 -11
  26. data/stylesheets/flint/functions/lib/_steal-values.scss +12 -12
  27. data/stylesheets/flint/functions/lib/_string-to-list.scss +13 -13
  28. data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +11 -11
  29. data/stylesheets/flint/functions/lib/_support-syntax.scss +12 -12
  30. data/stylesheets/flint/functions/lib/_types-in-list.scss +13 -13
  31. data/stylesheets/flint/functions/lib/_use-syntax.scss +11 -11
  32. data/stylesheets/flint/globals/_globals.scss +80 -80
  33. data/stylesheets/flint/mixins/_mixins.scss +3 -3
  34. data/stylesheets/flint/mixins/lib/_box-sizing.scss +11 -11
  35. data/stylesheets/flint/mixins/lib/_calculate.scss +45 -45
  36. data/stylesheets/flint/mixins/lib/_clearfix.scss +11 -11
  37. data/stylesheets/flint/mixins/lib/_container.scss +10 -10
  38. data/stylesheets/flint/mixins/lib/_main.scss +511 -511
  39. data/stylesheets/flint/mixins/lib/_new-instance.scss +15 -15
  40. data/stylesheets/flint/mixins/lib/_print-instance.scss +17 -17
  41. data/tests/bootcamp/_bootcamp.scss +0 -0
  42. data/tests/bootcamp/bootcamp.coffee +101 -0
  43. data/tests/bootcamp/core/functions/_actual.scss +0 -0
  44. data/tests/bootcamp/core/functions/_error.scss +0 -0
  45. data/tests/bootcamp/core/functions/_expect.scss +0 -0
  46. data/tests/bootcamp/core/functions/_not-to.scss +0 -0
  47. data/tests/bootcamp/core/functions/_should.scss +0 -0
  48. data/tests/bootcamp/core/functions/_to.scss +0 -0
  49. data/tests/bootcamp/core/mixins/_describe.scss +0 -0
  50. data/tests/bootcamp/core/mixins/_it.scss +0 -0
  51. data/tests/bootcamp/core/mixins/_runner.scss +0 -0
  52. data/tests/bootcamp/core/mixins/_should.scss +0 -0
  53. data/tests/bootcamp/core/mixins/_xdescribe.scss +0 -0
  54. data/tests/bootcamp/core/mixins/_xit.scss +0 -0
  55. data/tests/bootcamp/core/variables/_helpers.scss +0 -0
  56. data/tests/bootcamp/core/variables/_settings.scss +0 -0
  57. data/tests/bootcamp/core/variables/_should.scss +0 -0
  58. data/tests/bootcamp/core/variables/_trackers.scss +0 -0
  59. data/tests/bootcamp/lib/_sassyjson.scss +0 -0
  60. data/tests/bootcamp/matchers/_be.scss +0 -0
  61. data/tests/bootcamp/matchers/_equal.scss +0 -0
  62. data/tests/bootcamp/matchers/lists/_be-empty.scss +0 -0
  63. data/tests/bootcamp/matchers/lists/_be-longer-than.scss +0 -0
  64. data/tests/bootcamp/matchers/lists/_be-shorter-than.scss +0 -0
  65. data/tests/bootcamp/matchers/lists/_contain.scss +0 -0
  66. data/tests/bootcamp/matchers/lists/_deep-contain.scss +0 -0
  67. data/tests/bootcamp/matchers/lists/_deep-equal.scss +0 -0
  68. data/tests/bootcamp/matchers/lists/_have-length-of.scss +0 -0
  69. data/tests/bootcamp/matchers/numbers/_be-close-to.scss +0 -0
  70. data/tests/bootcamp/matchers/numbers/_be-greater-than.scss +0 -0
  71. data/tests/bootcamp/matchers/numbers/_be-less-than.scss +0 -0
  72. data/tests/bootcamp/matchers/types/_be-falsy.scss +0 -0
  73. data/tests/bootcamp/matchers/types/_be-null.scss +0 -0
  74. data/tests/bootcamp/matchers/types/_be-truthy.scss +0 -0
  75. data/tests/bootcamp/matchers/types/_have-type-of.scss +0 -0
  76. data/tests/bootcamp/utils/_contain.scss +0 -0
  77. data/tests/bootcamp/utils/_equal.scss +0 -0
  78. data/tests/bootcamp/utils/_list-join.scss +0 -0
  79. data/tests/bootcamp/utils/_power.scss +0 -0
  80. data/tests/input/functions/_functions.scss +9 -9
  81. data/tests/input/functions/helpers/_helpers.scss +45 -45
  82. data/tests/input/functions/lib/_calc-breakpoint.scss +3 -3
  83. data/tests/input/functions/lib/_calc-width.scss +3 -3
  84. data/tests/input/functions/lib/_exists.scss +3 -3
  85. data/tests/input/functions/lib/_fluid-width.scss +3 -3
  86. data/tests/input/functions/lib/_get-index.scss +3 -3
  87. data/tests/input/functions/lib/_get-instance-value.scss +3 -3
  88. data/tests/input/functions/lib/_get-value.scss +3 -3
  89. data/tests/input/functions/lib/_has-family-instance.scss +3 -3
  90. data/tests/input/functions/lib/_instance.scss +3 -3
  91. data/tests/input/functions/lib/_last.scss +3 -3
  92. data/tests/input/functions/lib/_list-to-string.scss +3 -3
  93. data/tests/input/functions/lib/_map-fetch.scss +3 -3
  94. data/tests/input/functions/lib/_next-index.scss +3 -3
  95. data/tests/input/functions/lib/_purge.scss +3 -3
  96. data/tests/input/functions/lib/_remove.scss +3 -3
  97. data/tests/input/functions/lib/_replace-substring.scss +3 -3
  98. data/tests/input/functions/lib/_replace.scss +3 -3
  99. data/tests/input/functions/lib/_steal-key.scss +3 -3
  100. data/tests/input/functions/lib/_steal-values.scss +3 -3
  101. data/tests/input/functions/lib/_string-to-list.scss +3 -3
  102. data/tests/input/functions/lib/_support-syntax-bem.scss +3 -3
  103. data/tests/input/functions/lib/_support-syntax.scss +3 -3
  104. data/tests/input/functions/lib/_types-in-list.scss +3 -3
  105. data/tests/input/functions/lib/_use-syntax.scss +3 -3
  106. data/tests/input/output.scss +22 -22
  107. metadata +4 -2
@@ -1,18 +1,18 @@
1
- /**
2
- * Creates a new instance, adds to global instance map
3
- *
4
- * @access private
5
- *
6
- * @param {String} $calc-key
7
- * @param {Number} $calc-span
8
- * @param {Number} $calc-context
9
- * @param {Number} $calc-gutter
10
- * @param {Number} $output-width
11
- * @param {Number} $output-margin-right
12
- * @param {Number} $output-margin-left
13
- *
14
- * @group Internal Mixins
15
- */
1
+ ///
2
+ /// Creates a new instance, adds to global instance map
3
+ ///
4
+ /// @access private
5
+ ///
6
+ /// @param {String} $calc-key
7
+ /// @param {Number} $calc-span
8
+ /// @param {Number} $calc-context
9
+ /// @param {Number} $calc-gutter
10
+ /// @param {Number} $output-width
11
+ /// @param {Number} $output-margin-right
12
+ /// @param {Number} $output-margin-left
13
+ ///
14
+ /// @group Internal Mixins
15
+ ///
16
16
  @mixin flint-new-instance($calc-key, $calc-span, $calc-context, $calc-gutter, $output-width, $output-margin-right, $output-margin-left) {
17
17
  $flint__instances:
18
18
  flint-instance(
@@ -1,14 +1,14 @@
1
- /**
2
- * @group Internal Mixins
3
- **/
1
+ ////
2
+ /// @group Internal Mixins
3
+ ////
4
4
 
5
- /**
6
- * Prints debug properties
7
- *
8
- * @access private
9
- *
10
- * @param {String} $calc-key - breakpoint key to search for instance
11
- */
5
+ ///
6
+ /// Prints debug properties
7
+ ///
8
+ /// @access private
9
+ ///
10
+ /// @param {String} $calc-key - breakpoint key to search for instance
11
+ ///
12
12
  @mixin flint-debug-instance($calc-key) {
13
13
  @if flint-get-value("settings", "debug-mode") {
14
14
  // Lets clean up the selector a bit...
@@ -19,13 +19,13 @@
19
19
  }
20
20
  }
21
21
 
22
- /**
23
- * Prints all contents of instance map
24
- *
25
- * @access private
26
- *
27
- * @param {Map} $instance - instance map
28
- */
22
+ ///
23
+ /// Prints all contents of instance map
24
+ ///
25
+ /// @access private
26
+ ///
27
+ /// @param {Map} $instance - instance map
28
+ ///
29
29
  @mixin flint-print-instance($instance) {
30
30
 
31
31
  // Loop through each property in passed instance
File without changes
@@ -0,0 +1,101 @@
1
+ 'use strict'
2
+
3
+ fs = require 'fs'
4
+
5
+ module.exports =
6
+ test: (filepath) ->
7
+ error = null
8
+
9
+ file = fs.readFileSync filepath, 'utf8'
10
+
11
+ ###
12
+ # Get Camp
13
+ ###
14
+
15
+ camp = file.match /\/\* >> Bootcamp >> \*\/((.|\n|\r)*)\/\* << Bootcamp << \*\//
16
+
17
+ unless camp?
18
+ return incomplete: true, error: 'No Test Suite Found'
19
+ else
20
+ camp = camp[1]
21
+
22
+ ###
23
+ # Get Results
24
+ ###
25
+
26
+ results = camp.match /Test Results \{((.|\n|\r)*)\}/
27
+
28
+ unless results?
29
+ return incomplete: true, error: 'No Test Results Found'
30
+ else
31
+ results = results[1]
32
+
33
+ ###
34
+ # Get Specs
35
+ ###
36
+
37
+ specs = camp.replace( results, '' ).replace( /Test Results \{\}|\{|\}|;|:/g, '' )
38
+
39
+ ###
40
+ # method: getProperty
41
+ ###
42
+
43
+ getProperty = (property, force) ->
44
+ values = results.match new RegExp property + ': ((.|\n|\r)*?);', 'g'
45
+ property = []
46
+
47
+ if force and !values? then return property
48
+
49
+ unless values?
50
+ error = incomplete: true, error: "No #{property} Found"
51
+ return false
52
+ else
53
+ for value in values
54
+ value = value.replace(/;/, '')
55
+ value = value.replace(/(.*:)/, '')
56
+ value = value.trim()
57
+ value = parseInt value unless isNaN value
58
+ property.push value
59
+
60
+ return property
61
+
62
+ ###
63
+ # Get Properties
64
+ ###
65
+
66
+ success = getProperty('Success').indexOf('true') > -1
67
+ stats = getProperty 'Stats'
68
+ tests = getProperty 'Tests'
69
+ asserts = getProperty 'Asserts'
70
+ passed = getProperty 'Passed'
71
+ failed = getProperty 'Failed'
72
+ skipped = getProperty 'Skipped'
73
+ errors = getProperty 'Error', true
74
+
75
+ ###
76
+ # Return Any Errors
77
+ ###
78
+
79
+ return error if error
80
+
81
+ ###
82
+ # Return Final Values
83
+ ###
84
+
85
+ return {
86
+ camp: camp
87
+ results: results
88
+ specs: specs
89
+
90
+ success: success
91
+ stats: stats
92
+ details: "#{tests} Tests, #{asserts} assertions, #{failed} failures, #{skipped} skipped"
93
+
94
+ tests: tests
95
+ asserts: asserts
96
+ passed: passed
97
+ failed: failed
98
+ skipped: skipped
99
+
100
+ errors: errors
101
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,11 +1,11 @@
1
- /*
2
- * Helpers
3
- */
1
+ ///
2
+ /// Helpers
3
+ ///
4
4
  @import "helpers/helpers";
5
5
 
6
- /*
7
- * Functions
8
- */
6
+ ///
7
+ /// Functions
8
+ ///
9
9
  @import "lib/exists";
10
10
 
11
11
  // Getters
@@ -38,9 +38,9 @@
38
38
  @import "lib/replace-substring";
39
39
  @import "lib/string-to-list";
40
40
 
41
- /*
42
- * Support syntax
43
- */
41
+ ///
42
+ /// Support syntax
43
+ ///
44
44
  @import "lib/use-syntax";
45
45
  @import "lib/support-syntax";
46
46
 
@@ -1,6 +1,6 @@
1
- /*
2
- * Returns truthiness of a value
3
- */
1
+ //
2
+ // Returns truthiness of a value
3
+ //
4
4
  @include describe("[function] is-true") {
5
5
 
6
6
  @include it("should expect values to be truthy") {
@@ -34,9 +34,9 @@
34
34
  }
35
35
  }
36
36
 
37
- /*
38
- * Checks if item is map
39
- */
37
+ //
38
+ // Checks if item is map
39
+ //
40
40
  @include describe("[function] is-map") {
41
41
 
42
42
  $map: ("key": "value");
@@ -77,9 +77,9 @@
77
77
  }
78
78
  }
79
79
 
80
- /*
81
- * Checks if item is list
82
- */
80
+ //
81
+ // Checks if item is list
82
+ //
83
83
  @include describe("[function] is-list") {
84
84
 
85
85
  $map: ("key": "value");
@@ -120,9 +120,9 @@
120
120
  }
121
121
  }
122
122
 
123
- /*
124
- * Checks if item is number
125
- */
123
+ //
124
+ // Checks if item is number
125
+ //
126
126
  @include describe("[function] is-number") {
127
127
 
128
128
  $map: ("key": "value");
@@ -163,9 +163,9 @@
163
163
  }
164
164
  }
165
165
 
166
- /*
167
- * Checks if item is string
168
- */
166
+ //
167
+ // Checks if item is string
168
+ //
169
169
  @include describe("[function] is-string") {
170
170
 
171
171
  $map: ("key": "value");
@@ -206,9 +206,9 @@
206
206
  }
207
207
  }
208
208
 
209
- /*
210
- * Checks if item is not string
211
- */
209
+ //
210
+ // Checks if item is not string
211
+ //
212
212
  @include describe("[function] is-not-string") {
213
213
 
214
214
  $map: ("key": "value");
@@ -246,9 +246,9 @@
246
246
  }
247
247
  }
248
248
 
249
- /*
250
- * Get gutter value from config map
251
- */
249
+ //
250
+ // Get gutter value from config map
251
+ //
252
252
  @include describe("[function] get-gutter") {
253
253
 
254
254
  @include it("should expect gutter value from config") {
@@ -259,9 +259,9 @@
259
259
  }
260
260
  }
261
261
 
262
- /*
263
- * Gets list of each breakpoint's key
264
- */
262
+ //
263
+ // Gets list of each breakpoint's key
264
+ //
265
265
  @include describe("[function] get-all-keys") {
266
266
 
267
267
  @include it("should expect a list of all breakpoint keys") {
@@ -272,9 +272,9 @@
272
272
  }
273
273
  }
274
274
 
275
- /*
276
- * Gets list of all breakpoints
277
- */
275
+ //
276
+ // Gets list of all breakpoints
277
+ //
278
278
  @include describe("[function] get-all-breakpoints") {
279
279
 
280
280
  @include it("should expect a list of all breakpoint values") {
@@ -285,9 +285,9 @@
285
285
  }
286
286
  }
287
287
 
288
- /*
289
- * Checks if passed $key is the highest breakpoint
290
- */
288
+ //
289
+ // Checks if passed $key is the highest breakpoint
290
+ //
291
291
  @include describe("[function] is-highest-breakpoint") {
292
292
 
293
293
  @include it("should expect to be highest breakpoint") {
@@ -313,9 +313,9 @@
313
313
  }
314
314
  }
315
315
 
316
- /*
317
- * Checks if passed $key is the lowest breakpoint
318
- */
316
+ //
317
+ // Checks if passed $key is the lowest breakpoint
318
+ //
319
319
  @include describe("[function] is-lowest-breakpoint") {
320
320
 
321
321
  @include it("should expect to be lowest breakpoint") {
@@ -341,9 +341,9 @@
341
341
  }
342
342
  }
343
343
 
344
- /*
345
- * Checks if $key is grid default
346
- */
344
+ //
345
+ // Checks if $key is grid default
346
+ //
347
347
  @include describe("[function] is-default") {
348
348
 
349
349
  @include it("should expect to be default breakpoint") {
@@ -369,9 +369,9 @@
369
369
  }
370
370
  }
371
371
 
372
- /*
373
- * Gets all breakpoint column values
374
- */
372
+ //
373
+ // Gets all breakpoint column values
374
+ //
375
375
  @include describe("[function] get-all-columns") {
376
376
 
377
377
  @include it("should expect a list of all breakpoint column values") {
@@ -382,9 +382,9 @@
382
382
  }
383
383
  }
384
384
 
385
- /*
386
- * Returns the unit used in config
387
- */
385
+ //
386
+ // Returns the unit used in config
387
+ //
388
388
  @include describe("[function] get-config-unit") {
389
389
  @include it("should expect configuration unit to be ems") {
390
390
  @include should(expect(
@@ -394,9 +394,9 @@
394
394
  }
395
395
  }
396
396
 
397
- /*
398
- * Convert pixel value to em
399
- */
397
+ //
398
+ // Convert pixel value to em
399
+ //
400
400
  @include describe("[function] to-em") {
401
401
 
402
402
  @include it("should expect passed pixel value to be converted to ems") {