File tree Expand file tree Collapse file tree 9 files changed +146
-37
lines changed Expand file tree Collapse file tree 9 files changed +146
-37
lines changed Original file line number Diff line number Diff line change 4
4
- ` type.eql?("Convert 2 SCSS") `
5
5
Stupid mistake, now it can convert properly to scss
6
6
- added VERSION and CHANGELOG
7
+
8
+ ## 0.1.1 (Jun 21, 2011)
9
+
10
+ - Added spec dir for hopefully better testing.
Original file line number Diff line number Diff line change 1
1
source :gemcutter
2
2
3
- gem 'thin'
4
3
gem 'sinatra'
5
4
gem 'hpricot'
6
5
gem 'haml'
@@ -11,3 +10,19 @@ gem 'erubis'
11
10
gem 'ruby_parser'
12
11
gem 'rack-flash'
13
12
gem 'sinatra-redirect-with-flash'
13
+
14
+ group :development , :test do
15
+ gem 'rspec'
16
+ gem 'webrat'
17
+ gem 'rspec-core'
18
+ gem 'rspec-instafail'
19
+ gem 'rack-test'
20
+ gem 'awesome_print'
21
+ gem 'ruby-debug19'
22
+ gem 'libnotify'
23
+ gem 'guard-rspec'
24
+ gem 'guard-bundler'
25
+ gem 'rb-inotify'
26
+ gem 'shotgun'
27
+ gem 'heroku'
28
+ end
Original file line number Diff line number Diff line change 1
1
GEM
2
2
remote: http://rubygems.org/
3
3
specs:
4
+ archive-tar-minitar (0.5.2 )
5
+ awesome_print (0.4.0 )
4
6
builder (3.0.0 )
5
- daemons (1.1.4 )
7
+ columnize (0.3.3 )
8
+ configuration (1.3.1 )
9
+ diff-lcs (1.1.2 )
6
10
erubis (2.7.0 )
7
- eventmachine (0.12.10 )
11
+ ffi (1.0.9 )
12
+ guard (0.4.2 )
13
+ thor (~> 0.14.6 )
14
+ guard-bundler (0.1.3 )
15
+ bundler (>= 1.0.0 )
16
+ guard (>= 0.2.2 )
17
+ guard-rspec (0.4.0 )
18
+ guard (>= 0.4.0 )
8
19
haml (3.1.2 )
20
+ heroku (2.3.3 )
21
+ launchy (>= 0.3.2 )
22
+ rest-client (~> 1.6.1 )
23
+ term-ansicolor (~> 1.0.5 )
9
24
hpricot (0.8.4 )
10
25
json (1.5.3 )
26
+ launchy (0.4.0 )
27
+ configuration (>= 0.0.5 )
28
+ rake (>= 0.8.1 )
29
+ libnotify (0.5.6 )
30
+ linecache19 (0.5.12 )
31
+ ruby_core_source (>= 0.1.4 )
32
+ mime-types (1.16 )
33
+ nokogiri (1.4.6 )
11
34
rack (1.3.0 )
12
35
rack-flash (0.1.1 )
13
36
rack
37
+ rack-test (0.6.0 )
38
+ rack (>= 1.0 )
39
+ rake (0.9.2 )
40
+ rb-inotify (0.8.5 )
41
+ ffi (>= 0.5.0 )
42
+ rest-client (1.6.3 )
43
+ mime-types (>= 1.16 )
44
+ rspec (2.6.0 )
45
+ rspec-core (~> 2.6.0 )
46
+ rspec-expectations (~> 2.6.0 )
47
+ rspec-mocks (~> 2.6.0 )
48
+ rspec-core (2.6.4 )
49
+ rspec-expectations (2.6.0 )
50
+ diff-lcs (~> 1.1.2 )
51
+ rspec-instafail (0.1.8 )
52
+ rspec-mocks (2.6.0 )
53
+ ruby-debug-base19 (0.11.25 )
54
+ columnize (>= 0.3.1 )
55
+ linecache19 (>= 0.5.11 )
56
+ ruby_core_source (>= 0.1.4 )
57
+ ruby-debug19 (0.11.6 )
58
+ columnize (>= 0.3.1 )
59
+ linecache19 (>= 0.5.11 )
60
+ ruby-debug-base19 (>= 0.11.19 )
61
+ ruby_core_source (0.1.5 )
62
+ archive-tar-minitar (>= 0.5.2 )
14
63
ruby_parser (2.0.6 )
15
64
sexp_processor (~> 3.0 )
16
65
sass (3.1.3 )
17
66
sexp_processor (3.0.5 )
67
+ shotgun (0.9 )
68
+ rack (>= 1.0 )
18
69
sinatra (1.2.6 )
19
70
rack (~> 1.1 )
20
71
tilt (< 2.0 , >= 1.2.2 )
21
72
sinatra-redirect-with-flash (0.1.2 )
22
73
rack-flash (>= 0.1.1 )
23
74
sinatra (>= 0.9.1 )
24
- thin (1.2.11 )
25
- daemons (>= 1.0.9 )
26
- eventmachine (>= 0.12.6 )
27
- rack (>= 1.0.0 )
75
+ term-ansicolor (1.0.5 )
76
+ thor (0.14.6 )
28
77
tilt (1.3.2 )
78
+ webrat (0.7.3 )
79
+ nokogiri (>= 1.2.0 )
80
+ rack (>= 1.0 )
81
+ rack-test (>= 0.5.3 )
29
82
30
83
PLATFORMS
31
84
ruby
32
85
33
86
DEPENDENCIES
87
+ awesome_print
34
88
builder
35
89
erubis
90
+ guard-bundler
91
+ guard-rspec
36
92
haml
93
+ heroku
37
94
hpricot
38
95
json
96
+ libnotify
39
97
rack-flash
98
+ rack-test
99
+ rb-inotify
100
+ rspec
101
+ rspec-core
102
+ rspec-instafail
103
+ ruby-debug19
40
104
ruby_parser
41
105
sass
106
+ shotgun
42
107
sinatra
43
108
sinatra-redirect-with-flash
44
- thin
109
+ webrat
Original file line number Diff line number Diff line change
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+ guard 'bundler' do
4
+ watch ( 'Gemfile' )
5
+ end
6
+
7
+ guard 'rspec' , :version => 2 , :cli => '-r rspec/instafail -f RSpec::Instafail' do
8
+ watch ( %r{^spec/.+_spec\. rb} )
9
+ watch ( %r{^lib/(.+)\. rb} ) { |m | "spec/lib/#{ m [ 1 ] } _spec.rb" }
10
+ watch ( 'spec/spec_helper.rb' ) { "spec" }
11
+ end
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ class Css2sass < Sinatra::Base
11
11
set :show_exceptions , true if development?
12
12
set :raise_errors , false
13
13
14
+ def self . testing_string
15
+ puts "testing string"
16
+ end
17
+
14
18
helpers do
15
19
include Rack ::Utils
16
20
alias_method :h , :escape_html
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ require 'spec_helper'
2
+
3
+ describe Css2sass do
4
+
5
+ context 'the API' do
6
+ it "speak json" do
7
+ post '/json' , { :page => { :css => ".content-navigation { border-color: #3bbfce; color: #2b9eab; }" } }
8
+ last_response . should be_ok
9
+ last_response . body . should == '{"page":{"css":".content-navigation { border-color: #3bbfce; color: #2b9eab; }","sass":".content-navigation\n border-color: #3bbfce\n color: #2b9eab\n"}}'
10
+ end
11
+
12
+ it "speak XML" do
13
+ post '/xml' , { :page => { :css => ".content-navigation { border-color: #3bbfce; color: #2b9eab; }" } }
14
+ last_response . should be_ok
15
+ last_response . body . should == "<?xml version=\" 1.0\" encoding=\" UTF-8\" ?>\n <page>\n <css>\n <![CDATA[.content-navigation { border-color: #3bbfce; color: #2b9eab; }]]>\n </css>\n <sass>\n <![CDATA[.content-navigation\n border-color: #3bbfce\n color: #2b9eab\n ]]>\n </sass>\n </page>\n "
16
+ end
17
+
18
+ end
19
+ end
Original file line number Diff line number Diff line change
1
+ --colour
2
+ --format progress
3
+ --loadby mtime
4
+ --reverse
Original file line number Diff line number Diff line change
1
+ require File . dirname ( __FILE__ ) + '/../css2sass'
2
+ require 'bundler'
3
+ Bundler . require
4
+ require 'rack/test'
5
+ require 'rspec'
6
+
7
+ # set test environment
8
+ set :environment , :test
9
+
10
+ RSpec . configure do |conf |
11
+ conf . include Rack ::Test ::Methods
12
+ end
13
+
14
+ def app
15
+ @app ||= Sinatra ::Application
16
+ end
You can’t perform that action at this time.
0 commit comments