sassy-strings 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/sassy-strings.rb +26 -0
  2. metadata +76 -0
@@ -0,0 +1,26 @@
1
+ require 'compass'
2
+ Compass::Frameworks.register("sassy-strings", :path => "#{File.dirname(__FILE__)}/..")
3
+
4
+ # Sassy String Functions
5
+ module Sass::Script::Functions
6
+ def str_replace(needle, replace, haystack)
7
+ result = haystack.value.gsub(needle.value, replace.value)
8
+ Sass::Script::String.new(result)
9
+ end
10
+
11
+ def split_string(string, key)
12
+ items = string.value.split(key.value)
13
+ if items.count == 1
14
+ Sass::Script::Bool.new(false)
15
+ else
16
+ Sass::Script::List.new(items.map{|i| Sass::Script::String.new(i)}, :comma)
17
+ end
18
+ end
19
+ end
20
+
21
+ module SassyStrings
22
+
23
+ VERSION = "0.1"
24
+ DATE = "2013-01-14"
25
+
26
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sassy-strings
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ version: "0.1"
9
+ platform: ruby
10
+ authors:
11
+ - Sam Richard
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+
16
+ date: 2013-01-14 00:00:00 -05:00
17
+ default_executable:
18
+ dependencies:
19
+ - !ruby/object:Gem::Dependency
20
+ name: compass
21
+ prerelease: false
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ segments:
27
+ - 0
28
+ - 12
29
+ - 2
30
+ version: 0.12.2
31
+ type: :runtime
32
+ version_requirements: *id001
33
+ description: Superpower Strings!
34
+ email:
35
+ - snugug@gmail.com
36
+ executables: []
37
+
38
+ extensions: []
39
+
40
+ extra_rdoc_files: []
41
+
42
+ files:
43
+ - lib/sassy-strings.rb
44
+ has_rdoc: true
45
+ homepage: https://github.com/snugug/sassy-strings
46
+ licenses: []
47
+
48
+ post_install_message:
49
+ rdoc_options: []
50
+
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ segments:
65
+ - 1
66
+ - 2
67
+ version: "1.2"
68
+ requirements: []
69
+
70
+ rubyforge_project: sassy-strings
71
+ rubygems_version: 1.3.6
72
+ signing_key:
73
+ specification_version: 3
74
+ summary: Advanced String handling for Sass
75
+ test_files: []
76
+