stampy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/lib/stampy.rb +7 -0
- data/lib/stampy/functions.rb +46 -0
- data/lib/stampy/version.rb +3 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dae10f889296ef95df819608e0297850e739d06d
|
4
|
+
data.tar.gz: fa046deba9b7bb82b7c77dc4184d8779d84e880d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26838ef27f963c31715c0336955576386d171a6d2dafb966592151d62578deb3645e27c2924cf092619d68f6b0242c35b84ca35912e474c09576a5989291c995
|
7
|
+
data.tar.gz: 4e32b1a1919c28651a1b6aa399f9677577bf941b108b8a9ab82dbc367069e8482867ad2694f8583d2f1abcd5b359d2d845284db158644e973ad373da456be83b
|
data/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Stampy [![Gem Version](https://badge.fury.io/rb/stampy.svg)](http://badge.fury.io/rb/stampy)
|
2
|
+
|
3
|
+
Stampy outputs a nifty timestamp, the current Sass version and other fun stuff into your compiled stylesheets. Just put a little something like this at the top of your main Sass file, and BAM!
|
4
|
+
|
5
|
+
```scss
|
6
|
+
/*!
|
7
|
+
* #{stampy()} // Or... stamp()
|
8
|
+
*/
|
9
|
+
```
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
1. `gem install stampy`
|
14
|
+
1. Add `require "stampy"` to your `config.rb`
|
15
|
+
1. ???
|
16
|
+
1. Profit
|
data/lib/stampy.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
module Stampy
|
2
|
+
module Functions
|
3
|
+
|
4
|
+
def self.declare(*args)
|
5
|
+
Sass::Script::Functions.declare *args
|
6
|
+
end
|
7
|
+
|
8
|
+
#
|
9
|
+
# @return {String}
|
10
|
+
#
|
11
|
+
def stamp
|
12
|
+
@timestamp = timestamp
|
13
|
+
@version = version
|
14
|
+
Sass::Script::String.new(comment)
|
15
|
+
end
|
16
|
+
declare :stamp, []
|
17
|
+
|
18
|
+
def stampy
|
19
|
+
stamp
|
20
|
+
end
|
21
|
+
declare :stampy, []
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
#
|
26
|
+
# @return {String}
|
27
|
+
#
|
28
|
+
def timestamp
|
29
|
+
Time.now.strftime "%Y-%m-%d at %H:%M:%S"
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# @return {Hash}
|
34
|
+
#
|
35
|
+
def version
|
36
|
+
Sass.version
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# @return {String}
|
41
|
+
#
|
42
|
+
def comment
|
43
|
+
"Compiled on #{@timestamp} using Sass version #{@version.fetch(:string)}"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stampy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezekiel Gabrielse
|
@@ -31,7 +31,11 @@ email:
|
|
31
31
|
executables: []
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
|
-
files:
|
34
|
+
files:
|
35
|
+
- lib/stampy/functions.rb
|
36
|
+
- lib/stampy/version.rb
|
37
|
+
- lib/stampy.rb
|
38
|
+
- README.md
|
35
39
|
homepage: https://github.com/ezekg/stampy/
|
36
40
|
licenses:
|
37
41
|
- MIT
|