sassfmt 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: d83a8169e0b7de81f640010584ba7b34e9e6a7c8
4
- data.tar.gz: 2bd1de8908d4bee2c809243b5d864525b0434aa5
3
+ metadata.gz: 9ccee59eed79cb807ca0f9dcd7a6149d278dea4f
4
+ data.tar.gz: 405d957f694a190fb82b78967a04fb58fc4a9e8c
5
5
  SHA512:
6
- metadata.gz: 527b02df3e782feecb2feb8a6d23462c015e8f65b1b93a5668d9b4d8380667d0933e03b2d98db9d169be96ddabf35fce653b4e60304e9cae9214beaf4e706f3b
7
- data.tar.gz: c33c6cb0e14ef2002921d72e91425e19ee66a0fa9a06d7819439b3ce75dda4f6d0c781a08361658916ccbe14bd9c929f2d584fa544143f5804e90fa3e2b7b2a0
6
+ metadata.gz: c423460c3827c3a173fe9f241003c1f0a5cd6a228dd0390f4271dc71227a790272c36e484338d43ae66911e486028b4894d7ff226ed4071a01d76298fedfcc73
7
+ data.tar.gz: 78f5ddab4f2e3f3f0e4e728ca93f599b32e523b0e830d2b25abed7784be3a160a83ce34a65bdc049c6be19a3fffd57dc499542b9d2807c75ec6bfbf15902dedd
data/exe/sassfmt CHANGED
@@ -1,5 +1,20 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require "slop"
3
4
  require "sassfmt"
4
5
 
5
- print Sassfmt.format(ARGF.read)
6
+ opts = Slop.parse do |o|
7
+ o.bool "-w", "--overwrite", "write result to source file instead of stdout"
8
+ end
9
+
10
+ if opts.arguments.any?
11
+ opts.arguments.each do |file|
12
+ if opts.overwrite?
13
+ File.write(file, Sassfmt.format(File.read(file)))
14
+ else
15
+ print Sassfmt.format(File.read(file))
16
+ end
17
+ end
18
+ else
19
+ print Sassfmt.format($stdin.read)
20
+ end
@@ -1,3 +1,3 @@
1
1
  module Sassfmt
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/sassfmt.gemspec CHANGED
@@ -22,4 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "bundler", "~> 1.10"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "minitest"
25
+
26
+ spec.add_dependency "slop", "~> 4.2.1"
25
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassfmt
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
  - Utkarsh Kukreti
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-31 00:00:00.000000000 Z
11
+ date: 2016-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: slop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 4.2.1
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 4.2.1
55
69
  description: Sorts properties in your Sass files according to Twitter RECESS
56
70
  email:
57
71
  - utkarshkukreti@gmail.com