osrcry 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +18 -0
- data/CONTRIBUTING.md +22 -0
- data/CONTRIBUTORS.md +2 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +17 -0
- data/LICENSE.md +20 -0
- data/README.md +48 -0
- data/Rakefile +1 -0
- data/bin/osrcry +14 -0
- data/lib/osrcry/contributors.rb +11 -0
- data/lib/osrcry/license.rb +40 -0
- data/lib/osrcry/stale.rb +24 -0
- data/lib/osrcry/version.rb +3 -0
- data/lib/osrcry.rb +21 -0
- data/osrcry.gemspec +23 -0
- metadata +95 -0
data/.gitignore
ADDED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
## Getting Involved
|
2
|
+
|
3
|
+
New contributors are always welcome, when it doubt please ask questions. We strive to be an open and welcoming community. Please be nice to one another.
|
4
|
+
|
5
|
+
### Coding
|
6
|
+
|
7
|
+
* Pick a task:
|
8
|
+
* Offer feedback on open [pull requests](https://github.com/geemus/oscrcy/pulls).
|
9
|
+
* Review open [issues](https://github.com/geemus/oscrcy/issues) for things to help on.
|
10
|
+
* [Create an issue](https://github.com/geemus/oscrcy/issues/new) to start a discussion on additions or features.
|
11
|
+
* Fork the project, add your changes and tests to cover them in a topic branch.
|
12
|
+
* Commit your changes and rebase against `geemus/oscrcy` to ensure everything is up to date.
|
13
|
+
* [Submit a pull request](https://github.com/geemus/oscrcy/compare/).
|
14
|
+
|
15
|
+
### Non-Coding
|
16
|
+
|
17
|
+
* Offer feedback on open [issues](https://github.com/geemus/oscrcy/issues).
|
18
|
+
<!-- * Write and help edit [documentation](https://github.com/geemus/oscrcy/tree/gh-pages). -->
|
19
|
+
<!-- * Translate [documentation](https://github.com/geemus/oscrcy/tree/gh-pages) in to other languages. -->
|
20
|
+
* Organize or volunteer at events.
|
21
|
+
* [Donate](https://www.gittip.com/geemus/)!
|
22
|
+
* Discuss other ideas for contribution with [geemus](mailto:geemus+oscrcy@gmail.com).
|
data/CONTRIBUTORS.md
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 [CONTRIBUTORS.md](https://github.com/geemus/oscrcy/blob/master/CONTRIBUTORS.md)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# osrcry
|
2
|
+
|
3
|
+
Open Sourcery - Tools for open source project management.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'oscrcy'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install oscrcy
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
To generate an updated LICENSE.md (will update year-range of copyright if needed):
|
22
|
+
|
23
|
+
$ osrcry license
|
24
|
+
|
25
|
+
To generate an updated CONTRIBUTORS.md:
|
26
|
+
|
27
|
+
$ osrcry contributors
|
28
|
+
|
29
|
+
To lookup stale issues (years, months, weeks or days old):
|
30
|
+
|
31
|
+
$ osrcry stale years
|
32
|
+
$ osrcry stale months
|
33
|
+
$ osrcry stale weeks
|
34
|
+
$ osrcry stale days
|
35
|
+
|
36
|
+
## Getting Help
|
37
|
+
|
38
|
+
<!-- * [General Documentation](http://geemus.github.io/osrcry). -->
|
39
|
+
* Ask specific questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/osrcry).
|
40
|
+
* Report bugs and discuss potential features in [Github issues](https://github.com/geemus/osrcry/issues).
|
41
|
+
|
42
|
+
## Contributing
|
43
|
+
|
44
|
+
Please refer to [CONTRIBUTING.md](https://github.com/geemus/osrcry/blob/master/CONTRIBUTING.md).
|
45
|
+
|
46
|
+
## License
|
47
|
+
|
48
|
+
Please refer to [LICENSE.md](https://github.com/geemus/osrcry/blob/master/LICENSE.md).
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/osrcry
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'osrcry'))
|
4
|
+
|
5
|
+
case ARGV.first.downcase
|
6
|
+
when 'contributors', 'contributors.md'
|
7
|
+
Osrcry::Contributors.execute
|
8
|
+
when 'license', 'license.md'
|
9
|
+
Osrcry::License.execute
|
10
|
+
when 'stale'
|
11
|
+
Osrcry::Stale.execute
|
12
|
+
else
|
13
|
+
puts "Please specify: `contributors` or `license`"
|
14
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Osrcry
|
2
|
+
class License
|
3
|
+
def self.execute
|
4
|
+
unix_times = `git log --pretty=format:"%at"`.split("\n")
|
5
|
+
latest_year, earliest_year = Time.at(unix_times.first.to_i).utc.year, Time.at(unix_times.last.to_i).utc.year
|
6
|
+
year_range = if latest_year == earliest_year
|
7
|
+
latest_year.to_s
|
8
|
+
else
|
9
|
+
"#{earliest_year}-#{latest_year}"
|
10
|
+
end
|
11
|
+
|
12
|
+
license = <<-LICENSE
|
13
|
+
The MIT License (MIT)
|
14
|
+
|
15
|
+
Copyright (c) #{year_range} [CONTRIBUTORS.md](https://github.com/#{Osrcry.user}/#{Osrcry.repo}/blob/master/CONTRIBUTORS.md)
|
16
|
+
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
18
|
+
this software and associated documentation files (the "Software"), to deal in
|
19
|
+
the Software without restriction, including without limitation the rights to
|
20
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
21
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
22
|
+
subject to the following conditions:
|
23
|
+
|
24
|
+
The above copyright notice and this permission notice shall be included in all
|
25
|
+
copies or substantial portions of the Software.
|
26
|
+
|
27
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
28
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
29
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
30
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
31
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
32
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
33
|
+
LICENSE
|
34
|
+
|
35
|
+
File.open('LICENSE.md', 'w') do |file|
|
36
|
+
file.write(license)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/osrcry/stale.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
module Osrcry
|
2
|
+
class Stale
|
3
|
+
def self.execute
|
4
|
+
url = "https://github.com/#{Osrcry.user}/#{Osrcry.repo}/search?type=Issues&q=state:open+updated:<"
|
5
|
+
updated = case ARGV[1]
|
6
|
+
when 'days'
|
7
|
+
Time.now.utc - 86400 # 60 * 60 * 24
|
8
|
+
when 'weeks'
|
9
|
+
Time.now.utc - 604800 # 60 * 60 * 24 * 7
|
10
|
+
when 'months'
|
11
|
+
Time.now.utc - 2592000 # 60 * 60 * 24 * 30
|
12
|
+
when 'years'
|
13
|
+
Time.now.utc - 31536000 # 60 * 60 * 24 * 365
|
14
|
+
else
|
15
|
+
puts "Please specify: `days`, `months` or `years`"
|
16
|
+
end
|
17
|
+
if updated
|
18
|
+
url << updated.strftime("%Y-%m-%d")
|
19
|
+
puts url
|
20
|
+
`open "#{url}"`
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/osrcry.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
dir = File.dirname(__FILE__)
|
2
|
+
require File.join(dir, 'osrcry', 'contributors')
|
3
|
+
require File.join(dir, 'osrcry', 'license')
|
4
|
+
require File.join(dir, 'osrcry', 'stale')
|
5
|
+
require File.join(dir, 'osrcry', 'version')
|
6
|
+
|
7
|
+
module Osrcry
|
8
|
+
|
9
|
+
def self.remote
|
10
|
+
@remote ||= `git remote -v`.split("\n").detect {|line| line =~ /^origin/}
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.repo
|
14
|
+
@repo ||= remote.match(%r{github.com[:\/](\w+)\/(\w+)}).captures.last
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.user
|
18
|
+
@user ||= remote.match(%r{github.com[:\/](\w+)\/(\w+)}).captures.first
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/osrcry.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'osrcry/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "osrcry"
|
8
|
+
spec.version = Osrcry::VERSION
|
9
|
+
spec.authors = ["geemus"]
|
10
|
+
spec.email = ["geemus@gmail.com"]
|
11
|
+
spec.description = %q{Tools for open source project management.}
|
12
|
+
spec.summary = %q{Tools for open source project management.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: osrcry
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- geemus
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-12-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: Tools for open source project management.
|
47
|
+
email:
|
48
|
+
- geemus@gmail.com
|
49
|
+
executables:
|
50
|
+
- osrcry
|
51
|
+
extensions: []
|
52
|
+
extra_rdoc_files: []
|
53
|
+
files:
|
54
|
+
- .gitignore
|
55
|
+
- CONTRIBUTING.md
|
56
|
+
- CONTRIBUTORS.md
|
57
|
+
- Gemfile
|
58
|
+
- Gemfile.lock
|
59
|
+
- LICENSE.md
|
60
|
+
- README.md
|
61
|
+
- Rakefile
|
62
|
+
- bin/osrcry
|
63
|
+
- lib/osrcry.rb
|
64
|
+
- lib/osrcry/contributors.rb
|
65
|
+
- lib/osrcry/license.rb
|
66
|
+
- lib/osrcry/stale.rb
|
67
|
+
- lib/osrcry/version.rb
|
68
|
+
- osrcry.gemspec
|
69
|
+
homepage: ''
|
70
|
+
licenses:
|
71
|
+
- MIT
|
72
|
+
post_install_message:
|
73
|
+
rdoc_options: []
|
74
|
+
require_paths:
|
75
|
+
- lib
|
76
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
78
|
+
requirements:
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
requirements: []
|
89
|
+
rubyforge_project:
|
90
|
+
rubygems_version: 1.8.23
|
91
|
+
signing_key:
|
92
|
+
specification_version: 3
|
93
|
+
summary: Tools for open source project management.
|
94
|
+
test_files: []
|
95
|
+
has_rdoc:
|