mock 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'http://rubygems.org'
2
+ gemspec
@@ -0,0 +1,9 @@
1
+ # What is Mock?
2
+ Mock is a tiny wee mini-server for serving static files out of a
3
+ directory, as well as compiling SCSS files on the fly.
4
+
5
+ ## Installation
6
+
7
+ gem install mock
8
+
9
+ You’ll now have access to the `mock` command. See `mock -h` for help.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ begin
4
+ require 'slop'
5
+ require 'mock'
6
+ rescue
7
+ retry if require 'rubygems'
8
+ end
9
+
10
+ options = Slop.parse(:help => true, :strict => true) do
11
+ banner "Usage: mock [options]"
12
+
13
+ on :p, :port, 'Server port', true, :default => 8080
14
+ on :v, :version do
15
+ puts "Mock v#{Mock::VERSION}"
16
+ exit
17
+ end
18
+ end
19
+
20
+ Mock.run!(options.to_hash)
@@ -0,0 +1,16 @@
1
+ require 'rack'
2
+ require 'mock/version'
3
+ require 'mock/compass'
4
+
5
+ module Mock
6
+ Application = Rack::Builder.new do
7
+ use Mock::Compass
8
+ run Rack::File.new '.'
9
+ end
10
+
11
+ def Mock.run!(options)
12
+ options[:Port] = options.delete(:port)
13
+
14
+ Rack::Server.start options.merge(:app => Application)
15
+ end
16
+ end
@@ -0,0 +1,20 @@
1
+ require 'compass'
2
+ require 'sass/plugin/rack'
3
+
4
+ module Mock
5
+ Compass = Sass::Plugin::Rack
6
+
7
+ ::Compass.configuration do |config|
8
+ config.project_type = :stand_alone
9
+
10
+ config.http_path = "/"
11
+ config.sass_dir = "stylesheets/"
12
+ config.css_dir = "stylesheets/"
13
+ config.images_dir = "images"
14
+
15
+ config.output_style = :expanded
16
+ end
17
+
18
+ ::Compass.configure_sass_plugin!
19
+ ::Compass.handle_configuration_change!
20
+ end
@@ -0,0 +1,4 @@
1
+ module Mock
2
+ # @see http://semver.org/
3
+ VERSION = "0.0.1"
4
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/mock/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = "mock"
6
+ gem.summary = "A tiny wee mini-server for static files and CSS serving"
7
+ gem.homepage = "http://github.com/Burgestrand/mock"
8
+ gem.authors = ["Kim Burgestrand"]
9
+ gem.email = "kim@burgestrand.se"
10
+
11
+ gem.files = `git ls-files`.split("\n")
12
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
13
+ gem.executables = %w[mock]
14
+ gem.require_paths = %w[lib]
15
+
16
+ gem.version = Mock::VERSION
17
+ gem.platform = Gem::Platform::RUBY
18
+
19
+ gem.add_dependency 'rack'
20
+ gem.add_dependency 'compass'
21
+ gem.add_dependency 'slop', '~> 2.1'
22
+ gem.add_development_dependency 'bundler', '~> 1.0'
23
+ gem.add_development_dependency 'rake', '~> 0.8'
24
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mock
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kim Burgestrand
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-08-17 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rack
16
+ requirement: &2156519900 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2156519900
25
+ - !ruby/object:Gem::Dependency
26
+ name: compass
27
+ requirement: &2156519480 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2156519480
36
+ - !ruby/object:Gem::Dependency
37
+ name: slop
38
+ requirement: &2156518980 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '2.1'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *2156518980
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: &2156518480 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *2156518480
58
+ - !ruby/object:Gem::Dependency
59
+ name: rake
60
+ requirement: &2156518020 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: '0.8'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *2156518020
69
+ description:
70
+ email: kim@burgestrand.se
71
+ executables:
72
+ - mock
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - Gemfile
78
+ - README.md
79
+ - Rakefile
80
+ - bin/mock
81
+ - lib/mock.rb
82
+ - lib/mock/compass.rb
83
+ - lib/mock/version.rb
84
+ - mock.gemspec
85
+ homepage: http://github.com/Burgestrand/mock
86
+ licenses: []
87
+ post_install_message:
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ requirements: []
104
+ rubyforge_project:
105
+ rubygems_version: 1.8.6
106
+ signing_key:
107
+ specification_version: 3
108
+ summary: A tiny wee mini-server for static files and CSS serving
109
+ test_files: []