water 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +50 -0
- data/Gemfile +13 -0
- data/LICENSE.txt +20 -0
- data/Rakefile +2 -0
- data/bin/water +4 -0
- data/lib/water.rb +15 -0
- data/readme.textile +9 -0
- data/water.gemspec +26 -0
- metadata +77 -0
data/.document
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# rcov generated
|
2
|
+
coverage
|
3
|
+
|
4
|
+
# rdoc generated
|
5
|
+
rdoc
|
6
|
+
|
7
|
+
# yard generated
|
8
|
+
doc
|
9
|
+
.yardoc
|
10
|
+
|
11
|
+
# bundler
|
12
|
+
.bundle
|
13
|
+
|
14
|
+
# jeweler generated
|
15
|
+
pkg
|
16
|
+
|
17
|
+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
18
|
+
#
|
19
|
+
# * Create a file at ~/.gitignore
|
20
|
+
# * Include files you want ignored
|
21
|
+
# * Run: git config --global core.excludesfile ~/.gitignore
|
22
|
+
#
|
23
|
+
# After doing this, these files will be ignored in all your git projects,
|
24
|
+
# saving you from having to 'pollute' every project you touch with them
|
25
|
+
#
|
26
|
+
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
27
|
+
#
|
28
|
+
# For MacOS:
|
29
|
+
#
|
30
|
+
#.DS_Store
|
31
|
+
|
32
|
+
# For TextMate
|
33
|
+
#*.tmproj
|
34
|
+
#tmtags
|
35
|
+
|
36
|
+
# For emacs:
|
37
|
+
#*~
|
38
|
+
#\#*
|
39
|
+
#.\#*
|
40
|
+
|
41
|
+
# For vim:
|
42
|
+
#*.swp
|
43
|
+
|
44
|
+
# For redcar:
|
45
|
+
#.redcar
|
46
|
+
|
47
|
+
# For rubinius:
|
48
|
+
#*.rbc
|
49
|
+
|
50
|
+
diff.html
|
data/Gemfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in water.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
# gem "shoulda", ">= 0"
|
10
|
+
# gem "bundler", "~> 1.0.0"
|
11
|
+
# gem "jeweler", "~> 1.6.2"
|
12
|
+
# gem "rcov", ">= 0"
|
13
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Kornelius Kalnbach
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
data/bin/water
ADDED
data/lib/water.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'coderay'
|
2
|
+
|
3
|
+
module Water
|
4
|
+
DIFF_FILE_NAME = 'diff.html'
|
5
|
+
|
6
|
+
def self.run
|
7
|
+
# FIXME: Don't just write into the currend folder.
|
8
|
+
File.open DIFF_FILE_NAME, 'w' do |file|
|
9
|
+
file.write CodeRay.scan(ARGF.read, :diff).page
|
10
|
+
end
|
11
|
+
|
12
|
+
# FIXME: Only works on Mac.
|
13
|
+
%x{open #{DIFF_FILE_NAME}}
|
14
|
+
end
|
15
|
+
end
|
data/readme.textile
ADDED
data/water.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "water"
|
6
|
+
s.version = '0.1'
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ["Kornelius Kalnbach"]
|
9
|
+
s.email = ["murphy@rubychan.de"]
|
10
|
+
s.homepage = "http://water.rubychan.de"
|
11
|
+
s.summary = "The diff washing machine. See your code changes clearly."
|
12
|
+
s.description = <<-DESCRIPTION
|
13
|
+
Water takes a unified diff as its input and opens a browser window
|
14
|
+
with a nicely formatted display of it. It uses CodeRay to highlight the code
|
15
|
+
inside of the diff.
|
16
|
+
DESCRIPTION
|
17
|
+
|
18
|
+
# s.rubyforge_project = "water"
|
19
|
+
|
20
|
+
s.add_dependency "coderay", '= 1.0.0.738.pre'
|
21
|
+
|
22
|
+
s.files = `git ls-files`.split("\n")
|
23
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
24
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
25
|
+
s.require_paths = ["lib"]
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: water
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: "0.1"
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Kornelius Kalnbach
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-06-10 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: coderay
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.0.0.738.pre
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
description: |
|
27
|
+
Water takes a unified diff as its input and opens a browser window
|
28
|
+
with a nicely formatted display of it. It uses CodeRay to highlight the code
|
29
|
+
inside of the diff.
|
30
|
+
|
31
|
+
email:
|
32
|
+
- murphy@rubychan.de
|
33
|
+
executables:
|
34
|
+
- water
|
35
|
+
extensions: []
|
36
|
+
|
37
|
+
extra_rdoc_files: []
|
38
|
+
|
39
|
+
files:
|
40
|
+
- .document
|
41
|
+
- .gitignore
|
42
|
+
- Gemfile
|
43
|
+
- LICENSE.txt
|
44
|
+
- Rakefile
|
45
|
+
- bin/water
|
46
|
+
- lib/water.rb
|
47
|
+
- readme.textile
|
48
|
+
- water.gemspec
|
49
|
+
homepage: http://water.rubychan.de
|
50
|
+
licenses: []
|
51
|
+
|
52
|
+
post_install_message:
|
53
|
+
rdoc_options: []
|
54
|
+
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: "0"
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: "0"
|
69
|
+
requirements: []
|
70
|
+
|
71
|
+
rubyforge_project:
|
72
|
+
rubygems_version: 1.8.5
|
73
|
+
signing_key:
|
74
|
+
specification_version: 3
|
75
|
+
summary: The diff washing machine. See your code changes clearly.
|
76
|
+
test_files: []
|
77
|
+
|