humans 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ humans.txt
3
+ *.rbc
4
+ .bundle
5
+ .config
6
+ .yardoc
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in humans.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 TODO: Write your name
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # Humans
2
+
3
+ *Humans* is a ruby gem to help generate your [humans.txt](http://humanstxt.org/) file. It uses git log to find out who contributed to your website, and updates it accordingly.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'humans'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install humans
18
+
19
+ ## Usage
20
+
21
+ Run `humans` in the command-line while in a directory containing a git repository.
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'humans'
4
+
5
+ Humans.generate
6
+
7
+ puts "humans.txt generated."
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/humans/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Kristian Freeman"]
6
+ gem.email = ["kristian@redsashimi.com"]
7
+ gem.description = %q{humans.txt helper}
8
+ gem.summary = %q{Creates basic humans.txt from git log}
9
+ gem.homepage = "http://github.com/redsashimi/humans"
10
+
11
+ gem.add_development_dependency "rspec"
12
+
13
+ gem.files = `git ls-files`.split($\)
14
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
+ gem.name = "humans"
17
+ gem.require_paths = ["lib"]
18
+ gem.version = Humans::VERSION
19
+ end
@@ -0,0 +1,35 @@
1
+ require "humans/version"
2
+
3
+ module Humans
4
+
5
+ def self.generate
6
+ people = `git log --format='%aN|%aE' | sort -u`.split("\n")
7
+
8
+ File.open('humans.txt', 'w') do |f|
9
+
10
+ f << <<-eos
11
+ /* TEAM */
12
+
13
+
14
+ eos
15
+
16
+ people.each do |w|
17
+ name, match, email = w.rpartition('|')
18
+ name.gsub!(/[^0-9a-z ]/i, '')
19
+ email.gsub!(/[^0-9a-z \@\.]/i, '')
20
+
21
+ f << <<-eos
22
+ Name: #{ name }
23
+ Email: #{ email }
24
+
25
+ eos
26
+
27
+ end
28
+
29
+ end
30
+
31
+ puts `cat humans.txt`
32
+
33
+ end
34
+
35
+ end
@@ -0,0 +1,3 @@
1
+ module Humans
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe "foo" do
4
+ pending "write it"
5
+ end
@@ -0,0 +1,8 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'humans' # and any other gems you need
5
+
6
+ RSpec.configure do |config|
7
+ # some (optional) config here
8
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: humans
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kristian Freeman
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-06-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &70295956305600 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70295956305600
25
+ description: humans.txt helper
26
+ email:
27
+ - kristian@redsashimi.com
28
+ executables:
29
+ - humans
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - .gitignore
34
+ - Gemfile
35
+ - LICENSE
36
+ - README.md
37
+ - bin/humans
38
+ - humans.gemspec
39
+ - lib/humans.rb
40
+ - lib/humans/version.rb
41
+ - spec/.rspec
42
+ - spec/humans_spec.rb
43
+ - spec/spec_helper.rb
44
+ homepage: http://github.com/redsashimi/humans
45
+ licenses: []
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 1.8.11
65
+ signing_key:
66
+ specification_version: 3
67
+ summary: Creates basic humans.txt from git log
68
+ test_files:
69
+ - spec/.rspec
70
+ - spec/humans_spec.rb
71
+ - spec/spec_helper.rb