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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55f0574d80686e6e05e2a411233043e8781dcea0
4
- data.tar.gz: 48fb4862955ff362da3f4fb439406388f98443cc
3
+ metadata.gz: dae10f889296ef95df819608e0297850e739d06d
4
+ data.tar.gz: fa046deba9b7bb82b7c77dc4184d8779d84e880d
5
5
  SHA512:
6
- metadata.gz: 82f4cfde98db96d50e99c7c4d76f1a50efd9d2abdcec8fd26ba9cdded3361823d7e4c0871581553a1ab3b23b74b8be23933c5da4320a4b282c5111819fcc073a
7
- data.tar.gz: 53d1179b63fa209e73d1a3cbc890938ebfa897870a74ac485e87540de6f24cfb86615fe9445aa65c4ff9cf4049f083ed4d87601d5a614a736279d16c8fb8349e
6
+ metadata.gz: 26838ef27f963c31715c0336955576386d171a6d2dafb966592151d62578deb3645e27c2924cf092619d68f6b0242c35b84ca35912e474c09576a5989291c995
7
+ data.tar.gz: 4e32b1a1919c28651a1b6aa399f9677577bf941b108b8a9ab82dbc367069e8482867ad2694f8583d2f1abcd5b359d2d845284db158644e973ad373da456be83b
@@ -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
@@ -0,0 +1,7 @@
1
+ require "sass"
2
+ require_relative "stampy/version"
3
+ require_relative "stampy/functions"
4
+
5
+ module Stampy
6
+ Sass::Script::Functions.send(:include, Stampy::Functions)
7
+ end
@@ -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
@@ -0,0 +1,3 @@
1
+ module Stampy
2
+ VERSION = "0.1.1"
3
+ 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.0
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