Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f87db25d9 | |||
| dacf3f218f | |||
| 22c4abc14c | |||
| 7794328b2f |
@@ -1,15 +0,0 @@
|
||||
language: ruby
|
||||
before_install:
|
||||
- gem update --system
|
||||
- gem --version
|
||||
rvm:
|
||||
- 2.1.0
|
||||
gemfile:
|
||||
- Gemfile
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- sky4winder+githubchangeloggenerator@gmail.com
|
||||
on_success: never # [always|never|change]
|
||||
on_failure: change # [always|never|change]
|
||||
@@ -1,133 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
## [1.2.7](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.7)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.6...1.2.7)
|
||||
#### 26/01/15
|
||||
- *Merged pull-request:* Add compare link between older version and newer version [\#46](https://github.com/skywinder/Github-Changelog-Generator/pull/46) ([sue445](https://github.com/sue445))
|
||||
|
||||
## [1.2.6](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.6)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.5...1.2.6)
|
||||
#### 21/01/15
|
||||
- *Merged pull-request:* fix link tag format [\#45](https://github.com/skywinder/Github-Changelog-Generator/pull/45) ([sugamasao](https://github.com/sugamasao))
|
||||
|
||||
## [1.2.5](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.5)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.4...1.2.5)
|
||||
#### 15/01/15
|
||||
- *Merged pull-request:* PrettyPrint class is included using lowercase 'pp' [\#43](https://github.com/skywinder/Github-Changelog-Generator/pull/43) ([schwing](https://github.com/schwing))
|
||||
|
||||
- *Merged pull-request:* support enterprise github via command line options [\#42](https://github.com/skywinder/Github-Changelog-Generator/pull/42) ([glenlovett](https://github.com/glenlovett))
|
||||
|
||||
- *Implemented enhancement:* Use milestone to specify in which version bug was fixed [\#22](https://github.com/skywinder/Github-Changelog-Generator/issues/22)
|
||||
|
||||
- *Fixed bug:* Error when trying to generate log for repo without tags [\#32](https://github.com/skywinder/Github-Changelog-Generator/issues/32)
|
||||
|
||||
## [1.2.4](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.4)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.3...1.2.4)
|
||||
#### 16/12/14
|
||||
- *Merged pull-request:* Fix crash when user is NULL [\#40](https://github.com/skywinder/Github-Changelog-Generator/pull/40) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Implement async fetching [\#39](https://github.com/skywinder/Github-Changelog-Generator/pull/39) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Fixed bug:* Crash when try generate log for rails [\#35](https://github.com/skywinder/Github-Changelog-Generator/issues/35)
|
||||
|
||||
## [1.2.3](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.3)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.2...1.2.3)
|
||||
#### 16/12/14
|
||||
- *Implemented enhancement:* Add ability to run with one parameter instead -u -p [\#38](https://github.com/skywinder/Github-Changelog-Generator/issues/38)
|
||||
|
||||
- *Implemented enhancement:* Detailed output [\#33](https://github.com/skywinder/Github-Changelog-Generator/issues/33)
|
||||
|
||||
- *Fixed bug:* Docs lacking or basic behavior not as advertised [\#30](https://github.com/skywinder/Github-Changelog-Generator/issues/30)
|
||||
|
||||
## [1.2.2](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.2)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.1...1.2.2)
|
||||
#### 10/12/14
|
||||
- *Merged pull-request:* Add a Bitdeli Badge to README [\#36](https://github.com/skywinder/Github-Changelog-Generator/pull/36) ([bitdeli-chef](https://github.com/bitdeli-chef))
|
||||
|
||||
- *Fixed bug:* Encapsulate \[ \> \* \_ \ \] signs in issues names [\#34](https://github.com/skywinder/Github-Changelog-Generator/issues/34)
|
||||
|
||||
## [1.2.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.1)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.0...1.2.1)
|
||||
#### 22/11/14
|
||||
- *Merged pull-request:* Issues for last tag not in list [\#29](https://github.com/skywinder/Github-Changelog-Generator/pull/29) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Disable default --filter-pull-requests option. [\#28](https://github.com/skywinder/Github-Changelog-Generator/pull/28) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Fixed bug:* Script fills changelog only for first 30 tags. [\#20](https://github.com/skywinder/Github-Changelog-Generator/issues/20)
|
||||
|
||||
## [1.2.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.0)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.4...1.2.0)
|
||||
#### 19/11/14
|
||||
- *Merged pull-request:* Add filter for pull-requests labels. \(option --filter-pull-requests\) [\#27](https://github.com/skywinder/Github-Changelog-Generator/pull/27) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Test Pull-Request SHOULD NOT APPEAR IN LOG! [\#26](https://github.com/skywinder/Github-Changelog-Generator/pull/26) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Add ability to insert authors of pull-requests \(--\[no-\]author option\) [\#25](https://github.com/skywinder/Github-Changelog-Generator/pull/25) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Don't receive issues in case of --no-isses flag specied [\#24](https://github.com/skywinder/Github-Changelog-Generator/pull/24) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [1.1.4](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.4)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.2...1.1.4)
|
||||
#### 18/11/14
|
||||
- *Merged pull-request:* Sort tags by date [\#23](https://github.com/skywinder/Github-Changelog-Generator/pull/23) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Implemented enhancement:* Implement ability to retrieve GitHub token from ENV variable \(to not put it to script directly\) [\#19](https://github.com/skywinder/Github-Changelog-Generator/issues/19)
|
||||
|
||||
## [1.1.2](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.2)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.1...1.1.2)
|
||||
#### 12/11/14
|
||||
- *Merged pull-request:* Fix bug with dot signs in project name [\#18](https://github.com/skywinder/Github-Changelog-Generator/pull/18) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Fix bug with dot signs in user name [\#17](https://github.com/skywinder/Github-Changelog-Generator/pull/17) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [1.1.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.1)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.0...1.1.1)
|
||||
#### 10/11/14
|
||||
- *Merged pull-request:* Remove duplicates of issues and pull-requests with same number [\#15](https://github.com/skywinder/Github-Changelog-Generator/pull/15) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Sort issues by tags [\#14](https://github.com/skywinder/Github-Changelog-Generator/pull/14) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Add ability to add or exclude issues without any labels [\#13](https://github.com/skywinder/Github-Changelog-Generator/pull/13) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [1.1.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.0)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.0.1...1.1.0)
|
||||
#### 10/11/14
|
||||
- *Implemented enhancement:* Detect username and project form origin [\#11](https://github.com/skywinder/Github-Changelog-Generator/issues/11)
|
||||
|
||||
- *Fixed bug:* Markdown formating in the last line wrong [\#9](https://github.com/skywinder/Github-Changelog-Generator/issues/9)
|
||||
|
||||
- *Fixed bug:* Bug with wrong credentials in 1.0.1 [\#12](https://github.com/skywinder/Github-Changelog-Generator/issues/12)
|
||||
|
||||
## [1.0.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.0.1)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.0.0...1.0.1)
|
||||
#### 10/11/14
|
||||
## [1.0.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.0.0)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.1.0...1.0.0)
|
||||
#### 07/11/14
|
||||
- *Merged pull-request:* Implement support of different tags. [\#8](https://github.com/skywinder/Github-Changelog-Generator/pull/8) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Add support for issues in CHANGELOG [\#7](https://github.com/skywinder/Github-Changelog-Generator/pull/7) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Fix parsing date of pull request [\#3](https://github.com/skywinder/Github-Changelog-Generator/pull/3) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Implemented enhancement:* Implement option to specify output filename [\#4](https://github.com/skywinder/Github-Changelog-Generator/issues/4)
|
||||
|
||||
- *Implemented enhancement:* Add support for fixed issues and implemented enchanments. [\#6](https://github.com/skywinder/Github-Changelog-Generator/issues/6)
|
||||
|
||||
- *Fixed bug:* Last tag not appeared in changelog [\#5](https://github.com/skywinder/Github-Changelog-Generator/issues/5)
|
||||
|
||||
## [0.1.0](https://github.com/skywinder/Github-Changelog-Generator/tree/0.1.0)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.0.2...0.1.0)
|
||||
#### 07/11/14
|
||||
- *Merged pull-request:* Add changelog generation for last tag [\#2](https://github.com/skywinder/Github-Changelog-Generator/pull/2) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Add option \(-o --output\) to specify name of the output file. [\#1](https://github.com/skywinder/Github-Changelog-Generator/pull/1) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [0.0.2](https://github.com/skywinder/Github-Changelog-Generator/tree/0.0.2)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.0.1...0.0.2)
|
||||
#### 06/11/14
|
||||
## [0.0.1](https://github.com/skywinder/Github-Changelog-Generator/tree/0.0.1)
|
||||
#### 06/11/14
|
||||
|
||||
|
||||
\* *This changelog was generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
||||
@@ -1,4 +0,0 @@
|
||||
source 'https://rubygems.org'
|
||||
gem 'github_api'
|
||||
gem 'colorize'
|
||||
gem 'rake'
|
||||
@@ -1,42 +0,0 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.3.6)
|
||||
colorize (0.7.4)
|
||||
descendants_tracker (0.0.4)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
faraday (0.9.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
github_api (0.12.2)
|
||||
addressable (~> 2.3)
|
||||
descendants_tracker (~> 0.0.4)
|
||||
faraday (~> 0.8, < 0.10)
|
||||
hashie (>= 3.3)
|
||||
multi_json (>= 1.7.5, < 2.0)
|
||||
nokogiri (~> 1.6.3)
|
||||
oauth2
|
||||
hashie (3.3.2)
|
||||
jwt (1.2.0)
|
||||
mini_portile (0.6.1)
|
||||
multi_json (1.10.1)
|
||||
multi_xml (0.5.5)
|
||||
multipart-post (2.0.0)
|
||||
nokogiri (1.6.5)
|
||||
mini_portile (~> 0.6.0)
|
||||
oauth2 (1.0.0)
|
||||
faraday (>= 0.8, < 0.10)
|
||||
jwt (~> 1.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (~> 1.2)
|
||||
rack (1.5.2)
|
||||
rake (10.4.2)
|
||||
thread_safe (0.3.4)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
colorize
|
||||
github_api
|
||||
rake
|
||||
@@ -1,131 +0,0 @@
|
||||
GitHub Changelog Generator
|
||||
==================
|
||||
|
||||
[](http://badge.fury.io/rb/github_changelog_generator)
|
||||
[](https://travis-ci.org/skywinder/Github-Changelog-Generator)
|
||||
|
||||
Changelog generation has never been so easy.
|
||||
|
||||
**Fully automate changelog generation** - This script automatically generate change-log from your tags, issues and merged pull-requests from your project's **Github issue tracker**.
|
||||
|
||||
## Installation:
|
||||
|
||||
[sudo] gem install github_changelog_generator
|
||||
|
||||
## Output example:
|
||||
|
||||
- Look at **[CHANGELOG.md](https://github.com/skywinder/Github-Changelog-Generator/blob/master/CHANGELOG.md)** for this project
|
||||
- [ActionSheetPicker-3.0/CHANGELOG.md](https://github.com/skywinder/ActionSheetPicker-3.0/blob/master/CHANGELOG.md) was generated by command:
|
||||
|
||||
github_changelog_generator -u skywinder -p ActionSheetPicker-3.0
|
||||
|
||||
- In general it looks like this:
|
||||
|
||||
> ## [1.3.10](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.3.10)
|
||||
> #### 09/01/15
|
||||
> - *Merged pull-request:* add header file to public [\#115](https://github.com/skywinder/ActionSheetPicker-3.0/pull/115)
|
||||
> ([skywinder](https://github.com/skywinder))
|
||||
>
|
||||
> - *Merged pull-request:* Fix bad interaction with Git submodules.
|
||||
> [\#112](https://github.com/skywinder/ActionSheetPicker-3.0/pull/112)
|
||||
> ([JimDabell](https://github.com/JimDabell))
|
||||
>
|
||||
> - *Implemented enhancement:* Should have minimum/maximum date property exposed
|
||||
> [\#97](https://github.com/skywinder/ActionSheetPicker-3.0/issues/97)
|
||||
>
|
||||
> ## [1.3.9](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.3.9)
|
||||
> #### 11/12/14
|
||||
> - *Closed issue:* Bad interaction with submodules [\#111](https://github.com/skywinder/ActionSheetPicker-3.0/issues/111)
|
||||
>
|
||||
> - *Closed issue:* No "cancel" button [\#122](https://github.com/skywinder/ActionSheetPicker-3.0/issues/122)
|
||||
|
||||
|
||||
###Features and advantages of this project as compared to other:
|
||||
- Custom date format supported
|
||||
- Automatically split issues by type:
|
||||
- **Issues** (closed issues w/o any labels)
|
||||
- **Merged pull-requests** (all merged pull-requests)
|
||||
- **Bug-fixes** (by label `bug` in issue)
|
||||
- **Enhancements** (by label `enhancement` in issue)
|
||||
- Excluding "questions" from changelog (issues marked as `question` labels)
|
||||
- Ability to manually specify in which version issue was fixed (in case, when closed date is not match) by setting `milestone` of issue the same name as tag of required version
|
||||
- Ability to exclude some issues from changelog (by labels)
|
||||
|
||||
## Usage:
|
||||
**It's really simple**:
|
||||
|
||||
- If your **git remote** `origin` refer to your GitHub repo, then just go to your project folder and run:
|
||||
|
||||
github_changelog_generator
|
||||
|
||||
- or from anywhere:
|
||||
|
||||
github_changelog_generator -u github_username -p github_project
|
||||
|
||||
As output you will get `CHANGELOG.md` file with pretty *Markdown-formatted* changelog.
|
||||
|
||||
### Params:
|
||||
Type `github_changelog_generator --help` for detailed usage.
|
||||
|
||||
Usage: changelog_generator [options]
|
||||
-u, --user [USER] Username of the owner of target GitHub repo
|
||||
-p, --project [PROJECT] Name of project on GitHub
|
||||
-t, --token [TOKEN] To make more than 50 requests this script required your OAuth token for GitHub. You can generate here: https://github.com/settings/tokens/new
|
||||
-h, --help Displays Help
|
||||
--[no-]verbose Run verbosely. Default is true
|
||||
--[no-]issues Include closed issues to changelog. Default is true
|
||||
--[no-]issues-without-labels Include closed issues without any labels to changelog. Default is true
|
||||
--[no-]pull-requests Include pull-requests to changelog. Default is true
|
||||
-l, --last-changes Generate log between last 2 tags only
|
||||
--[no-]author Add author of pull-request in the end. Default is true
|
||||
-f, --date-format [FORMAT] Date format. Default is %d/%m/%y
|
||||
-o, --output [NAME] Output file. Default is CHANGELOG.md
|
||||
--labels x,y,z List of labels. Issues with that labels will be included to changelog. Default is 'bug,enhancement'
|
||||
-v, --version Print version number
|
||||
|
||||
|
||||
### GitHub token
|
||||
|
||||
Since GitHub allow to make only 50 requests without authentication it's recommended to run this script with token
|
||||
|
||||
**You can easily [generate it here](https://github.com/settings/applications)**.
|
||||
|
||||
And:
|
||||
|
||||
- Run with key `-t [your-16-digit-token]`
|
||||
- Or set environment variable `CHANGELOG_GITHUB_TOKEN` and specify there your token.
|
||||
|
||||
i.e. add to your `~/.bash_profile` or `~/.zshrc` or any other place to load ENV variables string :
|
||||
|
||||
export CHANGELOG_GITHUB_TOKEN="your-40-digit-github-token"
|
||||
|
||||
So, if you got error like this:
|
||||
>! /Library/Ruby/Gems/2.0.0/gems/github_api-0.12.2/lib/github_api/response/raise_error.rb:14:in `on_complete'
|
||||
|
||||
It's time to create this token or wait for 1 hour before GitHub reset the counter for your IP.
|
||||
|
||||
## Projects using this library
|
||||
[Wikipage with list of projects](https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator)
|
||||
|
||||
*If you are using `github_changelog_generator` for generation changelog in your project or know of project that uses it, please add it to [this] (https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator) list.*
|
||||
|
||||
## Am I missed some essential feature?
|
||||
|
||||
**Nothing is impossible!**
|
||||
|
||||
Open an [issue](https://github.com/skywinder/Github-Changelog-Generator/issues/new) and let's make generator better together!
|
||||
|
||||
*Bug reports, feature requests, patches, well-wishes are always welcome!*
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Create an issue to discuss about your idea
|
||||
2. [Fork it] (https://github.com/skywinder/Github-Changelog-Generator/fork)
|
||||
3. Create your feature branch (`git checkout -b my-new-feature`)
|
||||
4. Commit your changes (`git commit -am 'Add some feature'`)
|
||||
5. Push to the branch (`git push origin my-new-feature`)
|
||||
6. Create a new Pull Request
|
||||
|
||||
## License
|
||||
|
||||
Github Changelog Generator is released under the [MIT License](http://www.opensource.org/licenses/MIT).
|
||||
@@ -1,9 +0,0 @@
|
||||
require "rake/testtask"
|
||||
|
||||
task :default => [:test]
|
||||
|
||||
Rake::TestTask.new do |t|
|
||||
t.verbose = true
|
||||
t.libs.push("demo", "test")
|
||||
t.pattern = "test/**/*_test.rb"
|
||||
end
|
||||
@@ -1,4 +0,0 @@
|
||||
#! /usr/bin/env ruby
|
||||
|
||||
require 'github_changelog_generator'
|
||||
GitHubChangelogGenerator::ChangelogGenerator.new.compund_changelog
|
||||
@@ -1,227 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
require 'optparse'
|
||||
|
||||
SPEC_TYPE = 'gemspec'
|
||||
|
||||
:major
|
||||
:minor
|
||||
:patch
|
||||
|
||||
@options = {:dry_run => false, :bump_number => :patch}
|
||||
|
||||
OptionParser.new { |opts|
|
||||
opts.banner = 'Usage: bump.rb [options]'
|
||||
|
||||
opts.on('-d', '--dry-run', 'Dry run') do |v|
|
||||
@options[:dry_run] = v
|
||||
end
|
||||
opts.on('-a', '--major', 'Bump major version') do |v|
|
||||
@options[:bump_number] = :major
|
||||
end
|
||||
opts.on('-m', '--minor', 'Bump minor version') do |v|
|
||||
@options[:bump_number] = :minor
|
||||
end
|
||||
opts.on('-p', '--patch', 'Bump patch version') do |v|
|
||||
@options[:bump_number] = :patch
|
||||
end
|
||||
opts.on('-r', '--revert', 'Revert last bump') do |v|
|
||||
@options[:revert] = v
|
||||
end
|
||||
}.parse!
|
||||
|
||||
p @options
|
||||
|
||||
def check_repo_is_clean_or_dry_run
|
||||
value =%x[#{'git status --porcelain'}]
|
||||
|
||||
if value.empty?
|
||||
puts 'Repo is clean -> continue'
|
||||
else
|
||||
if @options[:dry_run]
|
||||
puts 'Repo not clean, "Dry run" enabled -> continue'
|
||||
else
|
||||
puts 'Repository not clean -> exit'
|
||||
exit
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def find_spec_file
|
||||
list_of_specs = execute_line("find . -name '*.#{SPEC_TYPE}'")
|
||||
arr = list_of_specs.split("\n")
|
||||
|
||||
spec_file = ''
|
||||
|
||||
case arr.count
|
||||
when 0
|
||||
puts "No #{SPEC_TYPE} files found. -> Exit."
|
||||
exit
|
||||
when 1
|
||||
spec_file = arr[0]
|
||||
else
|
||||
puts 'Which spec should be used?'
|
||||
arr.each_with_index { |file, index| puts "#{index+1}. #{file}" }
|
||||
input_index = Integer(gets.chomp)
|
||||
spec_file = arr[input_index-1]
|
||||
end
|
||||
|
||||
if spec_file == nil
|
||||
puts "Can't find specified spec file -> exit"
|
||||
exit
|
||||
end
|
||||
|
||||
spec_file.sub('./', '')
|
||||
|
||||
end
|
||||
|
||||
def find_current_gem_file
|
||||
list_of_specs = execute_line("find . -name '*.gem'")
|
||||
arr = list_of_specs.split("\n")
|
||||
|
||||
spec_file = ''
|
||||
|
||||
case arr.count
|
||||
when 0
|
||||
puts "No #{SPEC_TYPE} files found. -> Exit."
|
||||
exit
|
||||
when 1
|
||||
spec_file = arr[0]
|
||||
else
|
||||
puts 'Which spec should be used?'
|
||||
arr.each_with_index { |file, index| puts "#{index+1}. #{file}" }
|
||||
input_index = Integer(gets.chomp)
|
||||
spec_file = arr[input_index-1]
|
||||
end
|
||||
|
||||
if spec_file == nil
|
||||
puts "Can't find specified spec file -> exit"
|
||||
exit
|
||||
end
|
||||
|
||||
spec_file.sub('./', '')
|
||||
|
||||
end
|
||||
|
||||
def find_version_in_podspec(podspec)
|
||||
readme = File.read(podspec)
|
||||
|
||||
#try to find version in format 1.22.333
|
||||
re = /(\d+)\.(\d+)\.(\d+)/m
|
||||
|
||||
match_result = re.match(readme)
|
||||
|
||||
unless match_result
|
||||
puts 'Not found any versions'
|
||||
exit
|
||||
end
|
||||
|
||||
puts "Found version #{match_result[0]}"
|
||||
return match_result[0], match_result.captures
|
||||
end
|
||||
|
||||
def bump_version(versions_array)
|
||||
bumped_result = versions_array.dup
|
||||
bumped_result.map! { |x| x.to_i }
|
||||
|
||||
case @options[:bump_number]
|
||||
when :major
|
||||
bumped_result[0] += 1
|
||||
bumped_result[1] = 0
|
||||
bumped_result[2] = 0
|
||||
when :minor
|
||||
bumped_result[1] += 1
|
||||
bumped_result[2] = 0
|
||||
when :patch
|
||||
bumped_result[2] += 1
|
||||
else
|
||||
raise('unknown bump_number')
|
||||
end
|
||||
|
||||
|
||||
bumped_version = bumped_result.join('.')
|
||||
puts "Bump version: #{versions_array.join('.')} -> #{bumped_version}"
|
||||
bumped_version
|
||||
end
|
||||
|
||||
def execute_line(line)
|
||||
output = `#{line}`
|
||||
check_exit_status(output)
|
||||
|
||||
output
|
||||
end
|
||||
|
||||
def execute_line_if_not_dry_run(line)
|
||||
if @options[:dry_run]
|
||||
puts "Dry run: #{line}"
|
||||
nil
|
||||
else
|
||||
puts line
|
||||
value = %x[#{line}]
|
||||
puts value
|
||||
check_exit_status(value)
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
def check_exit_status(output)
|
||||
if $?.exitstatus != 0
|
||||
puts "Output:\n#{output}\nExit status = #{$?.exitstatus} ->Terminate script."
|
||||
exit
|
||||
end
|
||||
end
|
||||
|
||||
def run_bumping_script
|
||||
|
||||
check_repo_is_clean_or_dry_run
|
||||
spec_file = find_spec_file
|
||||
result, versions_array = find_version_in_podspec(spec_file)
|
||||
bumped_version = bump_version(versions_array)
|
||||
|
||||
unless @options[:dry_run]
|
||||
puts 'Are you sure? Press Y to continue:'
|
||||
str = gets.chomp
|
||||
if str != 'Y'
|
||||
puts '-> exit'
|
||||
exit
|
||||
end
|
||||
end
|
||||
|
||||
execute_line_if_not_dry_run("sed -i \"\" \"s/#{result}/#{bumped_version}/\" README.md")
|
||||
execute_line_if_not_dry_run("sed -i \"\" \"s/#{result}/#{bumped_version}/\" #{spec_file}")
|
||||
execute_line_if_not_dry_run("git commit --all -m \"Update #{$SPEC_TYPE} to version #{bumped_version}\"")
|
||||
execute_line_if_not_dry_run("git tag #{bumped_version}")
|
||||
execute_line_if_not_dry_run('git push')
|
||||
execute_line_if_not_dry_run('git push --tags')
|
||||
execute_line_if_not_dry_run("gem build #{spec_file}")
|
||||
|
||||
gem = find_current_gem_file
|
||||
execute_line_if_not_dry_run("gem push #{gem}")
|
||||
# execute_line_if_not_dry_run("pod trunk push #{spec_file}")
|
||||
|
||||
end
|
||||
|
||||
def revert_last_bump
|
||||
spec_file = find_spec_file
|
||||
result, _ = find_version_in_podspec(spec_file)
|
||||
|
||||
puts "DELETE tag #{result} and HARD reset HEAD~1?\nPress Y to continue:"
|
||||
str = gets.chomp
|
||||
if str != 'Y'
|
||||
puts '-> exit'
|
||||
exit
|
||||
end
|
||||
execute_line_if_not_dry_run("git tag -d #{result}")
|
||||
execute_line_if_not_dry_run('git reset --hard HEAD~1')
|
||||
execute_line_if_not_dry_run("git push --delete origin #{result}")
|
||||
end
|
||||
|
||||
if __FILE__ == $0
|
||||
|
||||
if @options[:revert]
|
||||
revert_last_bump
|
||||
else
|
||||
run_bumping_script
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,32 +0,0 @@
|
||||
# coding: utf-8
|
||||
|
||||
lib = File.expand_path('../lib', __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require 'github_changelog_generator/version'
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "github_changelog_generator"
|
||||
spec.version = GitHubChangelogGenerator::VERSION
|
||||
spec.default_executable = "github_changelog_generator"
|
||||
|
||||
spec.required_ruby_version = '>= 1.9.3'
|
||||
spec.authors = ["Petr Korolev"]
|
||||
spec.email = %q{sky4winder+github_changelog_generator@gmail.com}
|
||||
spec.date = `date +"%Y-%m-%d"`.strip!
|
||||
spec.summary = %q{Script, that automatically generate change-log from your tags and pull-requests.}
|
||||
spec.description = %q{Script, that automatically generate change-log from your tags and pull-requests}
|
||||
spec.homepage = %q{https://github.com/skywinder/Github-Changelog-Generator}
|
||||
spec.license = "MIT"
|
||||
|
||||
spec.files = `git ls-files -z`.split("\x0")
|
||||
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
||||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
||||
spec.require_paths = ["lib"]
|
||||
|
||||
spec.add_development_dependency "bundler", "~> 1.7"
|
||||
spec.add_development_dependency "rake", "~> 10.0"
|
||||
|
||||
spec.add_runtime_dependency(%q<github_api>, ["~> 0.12"])
|
||||
spec.add_runtime_dependency(%q<colorize>, ["~> 0.7"])
|
||||
|
||||
end
|
||||
|
After Width: | Height: | Size: 216 B |
|
After Width: | Height: | Size: 78 B |
|
After Width: | Height: | Size: 463 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 130 B |
|
After Width: | Height: | Size: 216 B |
|
After Width: | Height: | Size: 477 B |
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 741 B |
|
After Width: | Height: | Size: 735 B |
@@ -0,0 +1,352 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<title>Github-changelog-generator by skywinder</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
<div class="inner">
|
||||
|
||||
<header>
|
||||
<h1>Github-changelog-generator</h1>
|
||||
<h2>Automatically generate changelog from your tags, closed issues and merged pull requests.</h2>
|
||||
</header>
|
||||
|
||||
<section id="downloads" class="clearfix">
|
||||
<a href="https://github.com/skywinder/github-changelog-generator/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
|
||||
<a href="https://github.com/skywinder/github-changelog-generator/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
|
||||
<a href="https://github.com/skywinder/github-changelog-generator" id="view-on-github" class="button"><span>View on GitHub</span></a>
|
||||
</section>
|
||||
|
||||
<hr>
|
||||
|
||||
<section id="main_content">
|
||||
<p><a href="http://badge.fury.io/rb/github_changelog_generator"><img src="https://badge.fury.io/rb/github_changelog_generator.svg" alt="Gem Version"></a>
|
||||
<a href="https://travis-ci.org/skywinder/Github-Changelog-Generator"><img src="https://travis-ci.org/skywinder/Github-Changelog-Generator.svg?branch=master" alt="Build Status"></a></p>
|
||||
|
||||
<h1>
|
||||
<a id="github-changelog-generator" class="anchor" href="#github-changelog-generator" aria-hidden="true"><span class="octicon octicon-link"></span></a>GitHub Changelog Generator</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#installation">Installation</a></li>
|
||||
<li><a href="#output-example">Output example</a></li>
|
||||
<li>
|
||||
<a href="#usage">Usage</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="#params">Params</a></li>
|
||||
<li><a href="#github-token">GitHub token</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#features-and-advantages-of-this-project">Features and advantages of this project</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="#alternatives">Alternatives</a></li>
|
||||
<li><a href="#projects-using-this-library">Projects using this library</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#am-i-missed-some-essential-feature">Am I missed some essential feature?</a></li>
|
||||
<li><a href="#contributing">Contributing</a></li>
|
||||
<li><a href="#license">License</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>
|
||||
<a id="changelog-generation-has-never-been-so-easy" class="anchor" href="#changelog-generation-has-never-been-so-easy" aria-hidden="true"><span class="octicon octicon-link"></span></a>Changelog generation has never been so easy:</h3>
|
||||
|
||||
<p><strong>Fully automate changelog generation</strong> - This gem generate change log file based on <strong>tags</strong>, <strong>issues</strong> and merged <strong>pull requests</strong> (and split them to separate lists according labels) from <img class="emoji" title=":octocat:" alt=":octocat:" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png" height="20" width="20" align="absmiddle"> GitHub Issue Tracker.</p>
|
||||
|
||||
<p>Since now you don't have to fill your <code>CHANGELOG.md</code> manually: just run script, relax and take a cup of <img class="emoji" title=":coffee:" alt=":coffee:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/2615.png" height="20" width="20" align="absmiddle"> before your next release! <img class="emoji" title=":tada:" alt=":tada:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f389.png" height="20" width="20" align="absmiddle"></p>
|
||||
|
||||
<blockquote>
|
||||
<h3>
|
||||
<a id="whats-the-point-of-a-change-log" class="anchor" href="#whats-the-point-of-a-change-log" aria-hidden="true"><span class="octicon octicon-link"></span></a><em>What’s the point of a change log?</em>
|
||||
</h3>
|
||||
|
||||
<p>To make it easier for users and contributors to see precisely what notable changes have been made between each release (or version) of the project.</p>
|
||||
|
||||
<h3>
|
||||
<a id="why-should-i-care" class="anchor" href="#why-should-i-care" aria-hidden="true"><span class="octicon octicon-link"></span></a><em>Why should I care?</em>
|
||||
</h3>
|
||||
|
||||
<p>Because software tools are for people. If you don’t care, why are you contributing to open source? Surely, there must be a kernel (ha!) of care somewhere in that lovely little brain of yours.</p>
|
||||
|
||||
<p><img class="emoji" title=":copyright:" alt=":copyright:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/00a9.png" height="20" width="20" align="absmiddle"> <em><a href="http://keepachangelog.com/">http://keepachangelog.com</a></em></p>
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a id="installation" class="anchor" href="#installation" aria-hidden="true"><span class="octicon octicon-link"></span></a>Installation</h2>
|
||||
|
||||
<pre><code>[sudo] gem install github_changelog_generator
|
||||
</code></pre>
|
||||
|
||||
<h2>
|
||||
<a id="output-example" class="anchor" href="#output-example" aria-hidden="true"><span class="octicon octicon-link"></span></a>Output example</h2>
|
||||
|
||||
<ul>
|
||||
<li>Look at <strong><a href="https://github.com/skywinder/Github-Changelog-Generator/blob/master/CHANGELOG.md">CHANGELOG.md</a></strong> for this project</li>
|
||||
<li>
|
||||
<p><a href="https://github.com/skywinder/ActionSheetPicker-3.0/blob/master/CHANGELOG.md">ActionSheetPicker-3.0/CHANGELOG.md</a> was generated by command:</p>
|
||||
|
||||
<pre><code>github_changelog_generator -u skywinder -p ActionSheetPicker-3.0
|
||||
</code></pre>
|
||||
</li>
|
||||
<li><p>In general it looks like this:</p></li>
|
||||
</ul>
|
||||
|
||||
<blockquote>
|
||||
<h2>
|
||||
<a id="125-2015-01-15" class="anchor" href="#125-2015-01-15" aria-hidden="true"><span class="octicon octicon-link"></span></a>
|
||||
<a href="https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.5">1.2.5</a> (2015-01-15)</h2>
|
||||
|
||||
<p><a href="https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.4...1.2.5">Full Changelog</a></p>
|
||||
|
||||
<p><strong>Implemented enhancements:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li>Use milestone to specify in which version bug was fixed <a href="https://github.com/skywinder/Github-Changelog-Generator/issues/22">#22</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>Fixed bugs:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li>Error when trying to generate log for repo without tags <a href="https://github.com/skywinder/Github-Changelog-Generator/issues/32">#32</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>Merged pull requests:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><p>PrettyPrint class is included using lowercase 'pp' <a href="https://github.com/skywinder/Github-Changelog-Generator/pull/43">#43</a> (<a href="https://github.com/schwing">schwing</a>)</p></li>
|
||||
<li><p>support enterprise github via command line options <a href="https://github.com/skywinder/Github-Changelog-Generator/pull/42">#42</a> (<a href="https://github.com/glenlovett">glenlovett</a>)</p></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a id="usage" class="anchor" href="#usage" aria-hidden="true"><span class="octicon octicon-link"></span></a>Usage</h2>
|
||||
|
||||
<p><strong>It's really simple</strong>: </p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>If your <strong>git remote</strong> <code>origin</code> refer to your GitHub repo, then just go to your project folder and run:</p>
|
||||
|
||||
<pre><code>github_changelog_generator
|
||||
</code></pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>or from anywhere:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>github_changelog_generator -u github_username -p github_project</code></li>
|
||||
<li><code>github_changelog_generator github_username/github_project</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>As output you will get <code>CHANGELOG.md</code> file with pretty <em>Markdown-formatted</em> changelog.</p>
|
||||
|
||||
<h3>
|
||||
<a id="params" class="anchor" href="#params" aria-hidden="true"><span class="octicon octicon-link"></span></a>Params</h3>
|
||||
|
||||
<p>Type <code>github_changelog_generator --help</code> for detailed usage.</p>
|
||||
|
||||
<pre><code>Usage: changelog_generator [options]
|
||||
-u, --user [USER] Username of the owner of target GitHub repo
|
||||
-p, --project [PROJECT] Name of project on GitHub
|
||||
-t, --token [TOKEN] To make more than 50 requests per hour your GitHub token required. You can generate it here: https://github.com/settings/tokens/new
|
||||
-f, --date-format [FORMAT] Date format. Default is %d/%m/%y
|
||||
-o, --output [NAME] Output file. Default is CHANGELOG.md
|
||||
--[no-]verbose Run verbosely. Default is true
|
||||
--[no-]issues Include closed issues to changelog. Default is true
|
||||
--[no-]issues-wo-labels Include closed issues without labels to changelog. Default is true
|
||||
--[no-]pr-wo-labels Include pull requests without labels to changelog. Default is true
|
||||
--[no-]pull-requests Include pull-requests to changelog. Default is true
|
||||
--[no-]filter-by-milestone Use milestone to detect when issue was resolved. Default is true
|
||||
--[no-]author Add author of pull-request in the end. Default is true
|
||||
--unreleased-only Generate log from unreleased closed issues only.
|
||||
--[no-]unreleased Add to log unreleased closed issues. Default is true
|
||||
--[no-]compare-link Include compare link between older version and newer version. Default is true
|
||||
--include-labels x,y,z Issues only with that labels will be included to changelog. Default is 'bug,enhancement'
|
||||
--exclude-labels x,y,z Issues with that labels will be always excluded from changelog. Default is 'duplicate,question,invalid,wontfix'
|
||||
--github-site [URL] The Enterprise Github site on which your project is hosted.
|
||||
--github-api [URL] The enterprise endpoint to use for your Github API.
|
||||
-v, --version Print version number
|
||||
-h, --help Displays Help
|
||||
</code></pre>
|
||||
|
||||
<h3>
|
||||
<a id="github-token" class="anchor" href="#github-token" aria-hidden="true"><span class="octicon octicon-link"></span></a>GitHub token</h3>
|
||||
|
||||
<p>Since GitHub allow to make only 50 requests without authentication it's recommended to run this script with token (<code>-t, --token</code> option)</p>
|
||||
|
||||
<p><strong>You can easily <a href="https://github.com/settings/applications">generate it here</a></strong>.</p>
|
||||
|
||||
<p>And:</p>
|
||||
|
||||
<ul>
|
||||
<li>Run with key <code>-t [your-16-digit-token]</code> </li>
|
||||
<li>
|
||||
<p>Or set environment variable <code>CHANGELOG_GITHUB_TOKEN</code> and specify there your token. </p>
|
||||
|
||||
<p>i.e. add to your <code>~/.bash_profile</code> or <code>~/.zshrc</code> or any other place to load ENV variables string :</p>
|
||||
|
||||
<pre><code>export CHANGELOG_GITHUB_TOKEN="your-40-digit-github-token"
|
||||
</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>So, if you got error like this:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>! /Library/Ruby/Gems/2.0.0/gems/github_api-0.12.2/lib/github_api/response/raise_error.rb:14:in `on_complete'</p>
|
||||
</blockquote>
|
||||
|
||||
<p>It's time to create this token or wait for 1 hour before GitHub reset the counter for your IP.</p>
|
||||
|
||||
<h2>
|
||||
<a id="features-and-advantages-of-this-project" class="anchor" href="#features-and-advantages-of-this-project" aria-hidden="true"><span class="octicon octicon-link"></span></a>Features and advantages of this project</h2>
|
||||
|
||||
<ul>
|
||||
<li>Generate canonical, neat change log file, followed by <a href="http://keepachangelog.com/">basic change log guidlines</a> <img class="emoji" title=":gem:" alt=":gem:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f48e.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li>Possible to generate <strong>Unreleased</strong> changes (closed issues that have not released yet) <img class="emoji" title=":dizzy:" alt=":dizzy:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f4ab.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li>
|
||||
<strong>GitHub Enterprise support</strong> via command line options! <img class="emoji" title=":factory:" alt=":factory:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f3ed.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li>Flexible format <strong>customisation</strong>:
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<strong>Customize</strong> issues, that <strong>should be added</strong> to changelog <img class="emoji" title=":eight_spoked_asterisk:" alt=":eight_spoked_asterisk:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/2733.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li>
|
||||
<strong>Custom date format</strong> supported <img class="emoji" title=":date:" alt=":date:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f4c5.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li>Ability to manually specify in which version issue was fixed (in case, when closed date is not match) by setting <code>milestone</code> of issue the same name as tag of required version <img class="emoji" title=":pushpin:" alt=":pushpin:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f4cc.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li>Automatically <strong>exclude specific issues</strong>, not-related to change log (any issue, that has label <code>question</code> <code>duplicate</code> <code>invalid</code> <code>wontfix</code>by default) <img class="emoji" title=":scissors:" alt=":scissors:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/2702.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Distinguish</strong> issues <strong>according labels</strong>. <img class="emoji" title=":mag_right:" alt=":mag_right:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f50e.png" height="20" width="20" align="absmiddle"></p>
|
||||
|
||||
<ul>
|
||||
<li>Merged pull requests (all <code>merged</code> pull-requests) <img class="emoji" title=":twisted_rightwards_arrows:" alt=":twisted_rightwards_arrows:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f500.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li>Bug fixes (by label <code>bug</code> in issue) <img class="emoji" title=":beetle:" alt=":beetle:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f41e.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li>Enhancements (by label <code>enhancement</code> in issue) <img class="emoji" title=":star2:" alt=":star2:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f31f.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
<li> Issues (closed issues <code>w/o any labels</code>) <img class="emoji" title=":non-potable_water:" alt=":non-potable_water:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f6b1.png" height="20" width="20" align="absmiddle"><br>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p>You manually can set which labels should be included/excluded. <img class="emoji" title=":wrench:" alt=":wrench:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f527.png" height="20" width="20" align="absmiddle"></p></li>
|
||||
<li>Apply a lot of other customisations, to fit changelog for your personal style <img class="emoji" title=":tophat:" alt=":tophat:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f3a9.png" height="20" width="20" align="absmiddle">
|
||||
(<em>look <code>github_changelog_generator --help</code> for details)</em>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>
|
||||
<a id="alternatives" class="anchor" href="#alternatives" aria-hidden="true"><span class="octicon octicon-link"></span></a>Alternatives</h3>
|
||||
|
||||
<p>Here is a <a href="https://github.com/skywinder/Github-Changelog-Generator/wiki/Alternatives">wikipage list of alternatives</a>, that I found. But no one was satisfy my requirements.</p>
|
||||
|
||||
<p><em>If you know other projects - feel free to edit this Wiki page!</em></p>
|
||||
|
||||
<h3>
|
||||
<a id="projects-using-this-library" class="anchor" href="#projects-using-this-library" aria-hidden="true"><span class="octicon octicon-link"></span></a>Projects using this library</h3>
|
||||
|
||||
<p><a href="https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator">Wikipage with list of projects</a> </p>
|
||||
|
||||
<p><em>If you are using <code>github_changelog_generator</code> for generation change log in your project or know another project that uses it, please add it to <a href="https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator">this</a> list.</em></p>
|
||||
|
||||
<h2>
|
||||
<a id="am-i-missed-some-essential-feature" class="anchor" href="#am-i-missed-some-essential-feature" aria-hidden="true"><span class="octicon octicon-link"></span></a>Am I missed some essential feature?</h2>
|
||||
|
||||
<ul>
|
||||
<li><p><strong>Nothing is impossible!</strong> </p></li>
|
||||
<li><p>Open an <a href="https://github.com/skywinder/Github-Changelog-Generator/issues/new">issue</a> and let's make generator better together! </p></li>
|
||||
<li><p><em>Bug reports, feature requests, patches, well-wishes are always welcome</em> <img class="emoji" title=":heavy_exclamation_mark:" alt=":heavy_exclamation_mark:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/2757.png" height="20" width="20" align="absmiddle"></p></li>
|
||||
</ul>
|
||||
|
||||
<h2>
|
||||
<a id="faq" class="anchor" href="#faq" aria-hidden="true"><span class="octicon octicon-link"></span></a>FAQ</h2>
|
||||
|
||||
<ul>
|
||||
<li><strong><em>I already use GitHub Releases. Why do I need this?</em></strong></li>
|
||||
</ul>
|
||||
|
||||
<p>GitHub Releases is a very good thing. And it's very good practice to maintain it (not so much people using it yet)! <img class="emoji" title=":congratulations:" alt=":congratulations:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/3297.png" height="20" width="20" align="absmiddle"> </p>
|
||||
|
||||
<p>I'm not try to compare quality of auto-generated and manually generated logs.</p>
|
||||
|
||||
<p>The Changelog like this sometimes really helps. For example:</p>
|
||||
|
||||
<p>When I found a closed bug - it's very useful to understand, in which release it was fixed. In that case you can easily find this issue by # in <code>CHANGELOG.md</code>.</p>
|
||||
|
||||
<ul>
|
||||
<li>it's not so quite easy to find it in manually filled Releases notes.</li>
|
||||
<li>this file can also help you to build your Release note and not miss features in manually-filled list.</li>
|
||||
</ul>
|
||||
|
||||
<p>In the end:</p>
|
||||
|
||||
<p>I think, that GitHub Releases is more for end-users.
|
||||
But <code>CHANGELOG.md</code> could stay in the repo for developers with detailed list of changes.
|
||||
And it's nothing bad to combine GitHub Releases and <code>CHANGELOG.md</code> file together in that manner.</p>
|
||||
|
||||
<h2>
|
||||
<a id="contributing" class="anchor" href="#contributing" aria-hidden="true"><span class="octicon octicon-link"></span></a>Contributing</h2>
|
||||
|
||||
<ol>
|
||||
<li>Create an issue to discuss about your idea</li>
|
||||
<li><a href="https://github.com/skywinder/Github-Changelog-Generator/fork">Fork it</a></li>
|
||||
<li>Create your feature branch (<code>git checkout -b my-new-feature</code>)</li>
|
||||
<li>Commit your changes (<code>git commit -am 'Add some feature'</code>)</li>
|
||||
<li>Push to the branch (<code>git push origin my-new-feature</code>)</li>
|
||||
<li>Create a new Pull Request</li>
|
||||
<li>Profit! <img class="emoji" title=":white_check_mark:" alt=":white_check_mark:" src="https://assets-cdn.github.com/images/icons/emoji/unicode/2705.png" height="20" width="20" align="absmiddle">
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h2>
|
||||
<a id="license" class="anchor" href="#license" aria-hidden="true"><span class="octicon octicon-link"></span></a>License</h2>
|
||||
|
||||
<p>Github Changelog Generator is released under the <a href="http://www.opensource.org/licenses/MIT">MIT License</a>.</p>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
Github-changelog-generator is maintained by <a href="https://github.com/skywinder">skywinder</a><br>
|
||||
This page was generated by <a href="https://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
|
||||
</footer>
|
||||
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
var pageTracker = _gat._getTracker("UA-52127948-2");
|
||||
pageTracker._trackPageview();
|
||||
} catch(err) {}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
console.log('This would be the main JS file.');
|
||||
@@ -0,0 +1,20 @@
|
||||
fixScale = function(doc) {
|
||||
|
||||
var addEvent = 'addEventListener',
|
||||
type = 'gesturestart',
|
||||
qsa = 'querySelectorAll',
|
||||
scales = [1, 1],
|
||||
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
|
||||
|
||||
function fix() {
|
||||
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
|
||||
doc.removeEventListener(type, fix, true);
|
||||
}
|
||||
|
||||
if ((meta = meta[meta.length - 1]) && addEvent in doc) {
|
||||
fix();
|
||||
scales = [.25, 1.6];
|
||||
doc[addEvent](type, fix, true);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -1,133 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
## [1.2.7](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.7)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.6...1.2.7)
|
||||
#### 26/01/15
|
||||
- *Merged pull-request:* Add compare link between older version and newer version [\#46](https://github.com/skywinder/Github-Changelog-Generator/pull/46) ([sue445](https://github.com/sue445))
|
||||
|
||||
## [1.2.6](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.6)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.5...1.2.6)
|
||||
#### 21/01/15
|
||||
- *Merged pull-request:* fix link tag format [\#45](https://github.com/skywinder/Github-Changelog-Generator/pull/45) ([sugamasao](https://github.com/sugamasao))
|
||||
|
||||
## [1.2.5](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.5)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.4...1.2.5)
|
||||
#### 15/01/15
|
||||
- *Merged pull-request:* PrettyPrint class is included using lowercase 'pp' [\#43](https://github.com/skywinder/Github-Changelog-Generator/pull/43) ([schwing](https://github.com/schwing))
|
||||
|
||||
- *Merged pull-request:* support enterprise github via command line options [\#42](https://github.com/skywinder/Github-Changelog-Generator/pull/42) ([glenlovett](https://github.com/glenlovett))
|
||||
|
||||
- *Implemented enhancement:* Use milestone to specify in which version bug was fixed [\#22](https://github.com/skywinder/Github-Changelog-Generator/issues/22)
|
||||
|
||||
- *Fixed bug:* Error when trying to generate log for repo without tags [\#32](https://github.com/skywinder/Github-Changelog-Generator/issues/32)
|
||||
|
||||
## [1.2.4](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.4)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.3...1.2.4)
|
||||
#### 16/12/14
|
||||
- *Merged pull-request:* Fix crash when user is NULL [\#40](https://github.com/skywinder/Github-Changelog-Generator/pull/40) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Implement async fetching [\#39](https://github.com/skywinder/Github-Changelog-Generator/pull/39) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Implemented enhancement:* Add ability to run with one parameter instead -u -p [\#38](https://github.com/skywinder/Github-Changelog-Generator/issues/38)
|
||||
|
||||
- *Fixed bug:* Crash when try generate log for rails [\#35](https://github.com/skywinder/Github-Changelog-Generator/issues/35)
|
||||
|
||||
## [1.2.3](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.3)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.2...1.2.3)
|
||||
#### 16/12/14
|
||||
- *Implemented enhancement:* Detailed output [\#33](https://github.com/skywinder/Github-Changelog-Generator/issues/33)
|
||||
|
||||
- *Fixed bug:* Docs lacking or basic behavior not as advertised [\#30](https://github.com/skywinder/Github-Changelog-Generator/issues/30)
|
||||
|
||||
## [1.2.2](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.2)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.1...1.2.2)
|
||||
#### 10/12/14
|
||||
- *Merged pull-request:* Add a Bitdeli Badge to README [\#36](https://github.com/skywinder/Github-Changelog-Generator/pull/36) ([bitdeli-chef](https://github.com/bitdeli-chef))
|
||||
|
||||
- *Fixed bug:* Encapsulate \[ \> \* \_ \ \] signs in issues names [\#34](https://github.com/skywinder/Github-Changelog-Generator/issues/34)
|
||||
|
||||
## [1.2.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.1)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.0...1.2.1)
|
||||
#### 22/11/14
|
||||
- *Merged pull-request:* Issues for last tag not in list [\#29](https://github.com/skywinder/Github-Changelog-Generator/pull/29) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Disable default --filter-pull-requests option. [\#28](https://github.com/skywinder/Github-Changelog-Generator/pull/28) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Fixed bug:* Script fills changelog only for first 30 tags. [\#20](https://github.com/skywinder/Github-Changelog-Generator/issues/20)
|
||||
|
||||
## [1.2.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.0)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.4...1.2.0)
|
||||
#### 19/11/14
|
||||
- *Merged pull-request:* Add filter for pull-requests labels. \(option --filter-pull-requests\) [\#27](https://github.com/skywinder/Github-Changelog-Generator/pull/27) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Test Pull-Request SHOULD NOT APPEAR IN LOG! [\#26](https://github.com/skywinder/Github-Changelog-Generator/pull/26) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Add ability to insert authors of pull-requests \(--\[no-\]author option\) [\#25](https://github.com/skywinder/Github-Changelog-Generator/pull/25) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Don't receive issues in case of --no-isses flag specied [\#24](https://github.com/skywinder/Github-Changelog-Generator/pull/24) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [1.1.4](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.4)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.2...1.1.4)
|
||||
#### 18/11/14
|
||||
- *Merged pull-request:* Sort tags by date [\#23](https://github.com/skywinder/Github-Changelog-Generator/pull/23) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Implemented enhancement:* Implement ability to retrieve GitHub token from ENV variable \(to not put it to script directly\) [\#19](https://github.com/skywinder/Github-Changelog-Generator/issues/19)
|
||||
|
||||
## [1.1.2](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.2)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.1...1.1.2)
|
||||
#### 12/11/14
|
||||
- *Merged pull-request:* Fix bug with dot signs in project name [\#18](https://github.com/skywinder/Github-Changelog-Generator/pull/18) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Fix bug with dot signs in user name [\#17](https://github.com/skywinder/Github-Changelog-Generator/pull/17) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [1.1.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.1)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.0...1.1.1)
|
||||
#### 10/11/14
|
||||
- *Merged pull-request:* Remove duplicates of issues and pull-requests with same number [\#15](https://github.com/skywinder/Github-Changelog-Generator/pull/15) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Sort issues by tags [\#14](https://github.com/skywinder/Github-Changelog-Generator/pull/14) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Add ability to add or exclude issues without any labels [\#13](https://github.com/skywinder/Github-Changelog-Generator/pull/13) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [1.1.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.0)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.0.1...1.1.0)
|
||||
#### 10/11/14
|
||||
- *Implemented enhancement:* Detect username and project form origin [\#11](https://github.com/skywinder/Github-Changelog-Generator/issues/11)
|
||||
|
||||
- *Fixed bug:* Markdown formating in the last line wrong [\#9](https://github.com/skywinder/Github-Changelog-Generator/issues/9)
|
||||
|
||||
- *Fixed bug:* Bug with wrong credentials in 1.0.1 [\#12](https://github.com/skywinder/Github-Changelog-Generator/issues/12)
|
||||
|
||||
## [1.0.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.0.1)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.0.0...1.0.1)
|
||||
#### 10/11/14
|
||||
## [1.0.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.0.0)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.1.0...1.0.0)
|
||||
#### 07/11/14
|
||||
- *Merged pull-request:* Implement support of different tags. [\#8](https://github.com/skywinder/Github-Changelog-Generator/pull/8) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Add support for issues in CHANGELOG [\#7](https://github.com/skywinder/Github-Changelog-Generator/pull/7) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Fix parsing date of pull request [\#3](https://github.com/skywinder/Github-Changelog-Generator/pull/3) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Implemented enhancement:* Implement option to specify output filename [\#4](https://github.com/skywinder/Github-Changelog-Generator/issues/4)
|
||||
|
||||
- *Implemented enhancement:* Add support for fixed issues and implemented enchanments. [\#6](https://github.com/skywinder/Github-Changelog-Generator/issues/6)
|
||||
|
||||
- *Fixed bug:* Last tag not appeared in changelog [\#5](https://github.com/skywinder/Github-Changelog-Generator/issues/5)
|
||||
|
||||
## [0.1.0](https://github.com/skywinder/Github-Changelog-Generator/tree/0.1.0)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.0.2...0.1.0)
|
||||
#### 07/11/14
|
||||
- *Merged pull-request:* Add changelog generation for last tag [\#2](https://github.com/skywinder/Github-Changelog-Generator/pull/2) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Add option \(-o --output\) to specify name of the output file. [\#1](https://github.com/skywinder/Github-Changelog-Generator/pull/1) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [0.0.2](https://github.com/skywinder/Github-Changelog-Generator/tree/0.0.2)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.0.1...0.0.2)
|
||||
#### 06/11/14
|
||||
## [0.0.1](https://github.com/skywinder/Github-Changelog-Generator/tree/0.0.1)
|
||||
#### 06/11/14
|
||||
|
||||
|
||||
\* *This changelog was generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
||||
@@ -1,537 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'github_api'
|
||||
require 'json'
|
||||
require 'colorize'
|
||||
require 'benchmark'
|
||||
|
||||
require_relative 'github_changelog_generator/parser'
|
||||
require_relative 'github_changelog_generator/generator'
|
||||
require_relative 'github_changelog_generator/version'
|
||||
|
||||
module GitHubChangelogGenerator
|
||||
class ChangelogGenerator
|
||||
|
||||
attr_accessor :options, :all_tags, :github
|
||||
|
||||
PER_PAGE_NUMBER = 30
|
||||
|
||||
def initialize
|
||||
|
||||
@options = Parser.parse_options
|
||||
|
||||
if options[:verbose]
|
||||
puts 'Input options:'
|
||||
pp options
|
||||
puts ''
|
||||
end
|
||||
|
||||
github_token
|
||||
|
||||
github_options = {per_page: PER_PAGE_NUMBER}
|
||||
github_options[:oauth_token] = @github_token unless @github_token.nil?
|
||||
github_options[:endpoint] = options[:github_endpoint] unless options[:github_endpoint].nil?
|
||||
github_options[:site] = options[:github_endpoint] unless options[:github_site].nil?
|
||||
|
||||
@github = Github.new github_options
|
||||
|
||||
@generator = Generator.new(@options)
|
||||
|
||||
@all_tags = self.get_all_tags
|
||||
@pull_requests = self.get_filtered_pull_requests
|
||||
if @options[:issues]
|
||||
@issues = self.get_all_issues
|
||||
fetch_event_for_issues(@issues)
|
||||
detect_actual_closed_dates
|
||||
else
|
||||
@issues = []
|
||||
end
|
||||
|
||||
@tag_times_hash = {}
|
||||
end
|
||||
|
||||
def detect_actual_closed_dates
|
||||
|
||||
if @options[:verbose]
|
||||
print "Fetching close commit date for issues...\r"
|
||||
end
|
||||
|
||||
threads = []
|
||||
@issues.each{|issue|
|
||||
threads << Thread.new {
|
||||
find_closed_date_by_commit(issue)
|
||||
}
|
||||
}
|
||||
threads.each { |thr| thr.join }
|
||||
|
||||
if @options[:verbose]
|
||||
puts 'Fetching close commit date for issues: Done!'
|
||||
end
|
||||
end
|
||||
|
||||
def find_closed_date_by_commit(issue)
|
||||
unless issue['events'].nil?
|
||||
# reverse! - to find latest closed event. (event goes in date order)
|
||||
issue['events'].reverse!.each{|event|
|
||||
if event[:event].eql? 'closed'
|
||||
if event[:commit_id].nil?
|
||||
issue[:actual_date] = issue[:closed_at]
|
||||
else
|
||||
commit = @github.git_data.commits.get @options[:user], @options[:project], event[:commit_id]
|
||||
issue[:actual_date] = commit[:author][:date]
|
||||
end
|
||||
break
|
||||
end
|
||||
}
|
||||
end
|
||||
#TODO: assert issues, that remain without 'actual_date' hash for some reason.
|
||||
end
|
||||
|
||||
def print_json(json)
|
||||
puts JSON.pretty_generate(json)
|
||||
end
|
||||
|
||||
def exec_command(cmd)
|
||||
exec_cmd = "cd #{$project_path} and #{cmd}"
|
||||
%x[#{exec_cmd}]
|
||||
end
|
||||
|
||||
def get_all_closed_pull_requests
|
||||
if @options[:verbose]
|
||||
print "Fetching pull requests...\r"
|
||||
end
|
||||
response = @github.pull_requests.list @options[:user], @options[:project], :state => 'closed'
|
||||
|
||||
pull_requests = []
|
||||
page_i = 0
|
||||
response.each_page do |page|
|
||||
page_i += PER_PAGE_NUMBER
|
||||
count_pages = response.count_pages
|
||||
print "Fetching pull requests... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
||||
pull_requests.concat(page)
|
||||
end
|
||||
print " \r"
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Received pull requests: #{pull_requests.count}"
|
||||
end
|
||||
|
||||
pull_requests
|
||||
end
|
||||
|
||||
def get_filtered_pull_requests
|
||||
|
||||
pull_requests = self.get_all_closed_pull_requests
|
||||
|
||||
unless @options[:pull_request_labels].nil?
|
||||
|
||||
if @options[:verbose]
|
||||
puts 'Filter all pull requests by labels.'
|
||||
end
|
||||
|
||||
filtered_pull_requests = pull_requests.select { |pull_request|
|
||||
#fetch this issue to get labels array
|
||||
issue = @github.issues.get @options[:user], @options[:project], pull_request.number
|
||||
|
||||
#compare is there any labels from @options[:labels] array
|
||||
issue_without_labels = !issue.labels.map { |label| label.name }.any?
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Filter request \##{issue.number}."
|
||||
end
|
||||
|
||||
if @options[:pull_request_labels].any?
|
||||
select_by_label = (issue.labels.map { |label| label.name } & @options[:pull_request_labels]).any?
|
||||
else
|
||||
select_by_label = false
|
||||
end
|
||||
|
||||
select_by_label | issue_without_labels
|
||||
}
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Filtered pull requests with specified labels and w/o labels: #{filtered_pull_requests.count}"
|
||||
end
|
||||
return filtered_pull_requests
|
||||
end
|
||||
|
||||
pull_requests
|
||||
end
|
||||
|
||||
def compund_changelog
|
||||
|
||||
log = "# Changelog\n\n"
|
||||
|
||||
if @options[:last]
|
||||
log += self.generate_log_between_tags(self.all_tags[0], self.all_tags[1])
|
||||
elsif @options[:tag1] and @options[:tag2]
|
||||
tag1 = @options[:tag1]
|
||||
tag2 = @options[:tag2]
|
||||
tags_strings = []
|
||||
self.all_tags.each { |x| tags_strings.push(x['name']) }
|
||||
|
||||
if tags_strings.include?(tag1)
|
||||
if tags_strings.include?(tag2)
|
||||
hash = Hash[tags_strings.map.with_index.to_a]
|
||||
index1 = hash[tag1]
|
||||
index2 = hash[tag2]
|
||||
log += self.generate_log_between_tags(self.all_tags[index1], self.all_tags[index2])
|
||||
else
|
||||
puts "Can't find tag #{tag2} -> exit"
|
||||
exit
|
||||
end
|
||||
else
|
||||
puts "Can't find tag #{tag1} -> exit"
|
||||
exit
|
||||
end
|
||||
else
|
||||
log += self.generate_log_for_all_tags
|
||||
end
|
||||
|
||||
log += "\n\n\\* *This changelog was generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*"
|
||||
|
||||
output_filename = "#{@options[:output]}"
|
||||
File.open(output_filename, 'w') { |file| file.write(log) }
|
||||
|
||||
puts "Done! Generated log placed in #{`pwd`.strip!}/#{output_filename}"
|
||||
|
||||
end
|
||||
|
||||
def generate_log_for_all_tags
|
||||
log = ''
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Fetching tags dates.."
|
||||
end
|
||||
|
||||
# Async fetching tags:
|
||||
threads = []
|
||||
@all_tags.each { |tag|
|
||||
# explicit set @tag_times_hash to write data safety.
|
||||
threads << Thread.new { self.get_time_of_tag(tag, @tag_times_hash) }
|
||||
}
|
||||
threads.each { |thr| thr.join }
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Sorting tags.."
|
||||
end
|
||||
|
||||
@all_tags.sort_by! { |x| self.get_time_of_tag(x) }.reverse!
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Generating log.."
|
||||
end
|
||||
|
||||
(1 ... self.all_tags.size).each { |index|
|
||||
log += self.generate_log_between_tags(self.all_tags[index], self.all_tags[index-1])
|
||||
}
|
||||
|
||||
log += generate_log_between_tags(nil, self.all_tags.last)
|
||||
|
||||
log
|
||||
end
|
||||
|
||||
def is_megred(number)
|
||||
@github.pull_requests.merged? @options[:user], @options[:project], number
|
||||
end
|
||||
|
||||
def get_all_tags
|
||||
|
||||
if @options[:verbose]
|
||||
print "Fetching tags...\r"
|
||||
end
|
||||
|
||||
response = @github.repos.tags @options[:user], @options[:project]
|
||||
|
||||
tags = []
|
||||
page_i = 0
|
||||
count_pages = response.count_pages
|
||||
response.each_page do |page|
|
||||
page_i += PER_PAGE_NUMBER
|
||||
print "Fetching tags... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
||||
tags.concat(page)
|
||||
end
|
||||
print " \r"
|
||||
if @options[:verbose]
|
||||
puts "Found #{tags.count} tags"
|
||||
end
|
||||
|
||||
tags
|
||||
end
|
||||
|
||||
def github_token
|
||||
if @options[:token]
|
||||
return @github_token ||= @options[:token]
|
||||
end
|
||||
|
||||
env_var = ENV.fetch 'CHANGELOG_GITHUB_TOKEN', nil
|
||||
|
||||
unless env_var
|
||||
puts "Warning: No token provided (-t option) and variable $CHANGELOG_GITHUB_TOKEN was not found.".yellow
|
||||
puts "This script can make only 50 requests to GitHub API per hour without token!".yellow
|
||||
end
|
||||
|
||||
@github_token ||= env_var
|
||||
|
||||
end
|
||||
|
||||
|
||||
def generate_log_between_tags(older_tag, newer_tag)
|
||||
|
||||
if newer_tag.nil?
|
||||
puts "Can't find tag -> terminate"
|
||||
exit 1
|
||||
end
|
||||
|
||||
newer_tag_time = self.get_time_of_tag(newer_tag)
|
||||
newer_tag_name = newer_tag['name']
|
||||
|
||||
filtered_pull_requests = delete_by_time(@pull_requests, :merged_at, newer_tag_time, older_tag)
|
||||
filtered_issues = delete_by_time(@issues, :actual_date, newer_tag_time, older_tag)
|
||||
|
||||
older_tag_name = older_tag.nil? ? nil : older_tag['name']
|
||||
|
||||
if @options[:filter_issues_by_milestone]
|
||||
#delete excess irrelevant issues (according milestones)
|
||||
filtered_issues.select! { |issue|
|
||||
if issue.milestone.nil?
|
||||
true
|
||||
else
|
||||
#check, that this milestone in tag list:
|
||||
milestone_is_tag = @all_tags.find { |tag|
|
||||
tag.name == issue.milestone.title
|
||||
}
|
||||
milestone_is_tag.nil?
|
||||
end
|
||||
|
||||
}
|
||||
|
||||
#add missed issues (according milestones)
|
||||
issues_to_add = @issues.select { |issue|
|
||||
if issue.milestone.nil?
|
||||
false
|
||||
else
|
||||
#check, that this milestone in tag list:
|
||||
milestone_is_tag = @all_tags.find { |tag|
|
||||
tag.name == issue.milestone.title
|
||||
}
|
||||
|
||||
if milestone_is_tag.nil?
|
||||
false
|
||||
else
|
||||
issue.milestone.title == newer_tag_name
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
filtered_issues |= issues_to_add
|
||||
end
|
||||
|
||||
self.create_log(filtered_pull_requests, filtered_issues, newer_tag_name, newer_tag_time, older_tag_name)
|
||||
|
||||
end
|
||||
|
||||
def delete_by_time(array, hash_key, newer_tag_time, older_tag = nil)
|
||||
|
||||
older_tag_time = self.get_time_of_tag(older_tag)
|
||||
|
||||
array.select { |req|
|
||||
if req[hash_key]
|
||||
t = Time.parse(req[hash_key]).utc
|
||||
|
||||
if older_tag_time.nil?
|
||||
tag_in_range_old = true
|
||||
else
|
||||
tag_in_range_old = t > older_tag_time
|
||||
end
|
||||
|
||||
tag_in_range_new = t <= newer_tag_time
|
||||
|
||||
tag_in_range = (tag_in_range_old) && (tag_in_range_new)
|
||||
|
||||
tag_in_range
|
||||
else
|
||||
false
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
# @param [Array] pull_requests
|
||||
# @param [Array] issues
|
||||
# @param [String] newer_tag_name
|
||||
# @param [String] newer_tag_time
|
||||
# @param [String] older_tag_name
|
||||
# @return [String]
|
||||
def create_log(pull_requests, issues, newer_tag_name, newer_tag_time, older_tag_name = nil)
|
||||
|
||||
github_site = options[:github_site] || 'https://github.com'
|
||||
|
||||
project_url = "#{github_site}/#{@options[:user]}/#{@options[:project]}"
|
||||
|
||||
# Generate tag name and link
|
||||
log = "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_name})\n"
|
||||
|
||||
if @options[:compare_link] && older_tag_name
|
||||
# Generate compare link
|
||||
log += "[Full Changelog](#{project_url}/compare/#{older_tag_name}...#{newer_tag_name})\n"
|
||||
end
|
||||
|
||||
#Generate date string:
|
||||
time_string = newer_tag_time.strftime @options[:format]
|
||||
log += "#### #{time_string}\n"
|
||||
|
||||
if @options[:pulls]
|
||||
# Generate pull requests:
|
||||
pull_requests.each { |pull_request|
|
||||
merge = @generator.get_string_for_pull_request(pull_request)
|
||||
log += "- #{merge}"
|
||||
|
||||
} if pull_requests
|
||||
end
|
||||
|
||||
if @options[:issues]
|
||||
# Generate issues:
|
||||
if issues
|
||||
issues.sort! { |x, y|
|
||||
if x.labels.any? && y.labels.any?
|
||||
x.labels[0].name <=> y.labels[0].name
|
||||
else
|
||||
if x.labels.any?
|
||||
1
|
||||
else
|
||||
if y.labels.any?
|
||||
-1
|
||||
else
|
||||
0
|
||||
end
|
||||
end
|
||||
end
|
||||
}.reverse!
|
||||
end
|
||||
issues.each { |dict|
|
||||
is_bug = false
|
||||
is_enhancement = false
|
||||
dict.labels.each { |label|
|
||||
if label.name == 'bug'
|
||||
is_bug = true
|
||||
end
|
||||
if label.name == 'enhancement'
|
||||
is_enhancement = true
|
||||
end
|
||||
}
|
||||
|
||||
intro = 'Closed issue'
|
||||
if is_bug
|
||||
intro = 'Fixed bug'
|
||||
end
|
||||
|
||||
if is_enhancement
|
||||
intro = 'Implemented enhancement'
|
||||
end
|
||||
|
||||
enc_string = @generator.encapsulate_string dict[:title]
|
||||
|
||||
merge = "*#{intro}:* #{enc_string} [\\##{dict[:number]}](#{dict.html_url})\n\n"
|
||||
log += "- #{merge}"
|
||||
}
|
||||
end
|
||||
log
|
||||
end
|
||||
|
||||
def get_time_of_tag(tag_name, tag_times_hash = @tag_times_hash)
|
||||
|
||||
if tag_name.nil?
|
||||
return nil
|
||||
end
|
||||
|
||||
if tag_times_hash[tag_name['name']]
|
||||
return @tag_times_hash[tag_name['name']]
|
||||
end
|
||||
|
||||
github_git_data_commits_get = @github.git_data.commits.get @options[:user], @options[:project], tag_name['commit']['sha']
|
||||
time_string = github_git_data_commits_get['committer']['date']
|
||||
@tag_times_hash[tag_name['name']] = Time.parse(time_string)
|
||||
end
|
||||
|
||||
def get_all_issues
|
||||
|
||||
if @options[:verbose]
|
||||
print "Fetching closed issues...\r"
|
||||
end
|
||||
|
||||
response = @github.issues.list user: @options[:user], repo: @options[:project], state: 'closed', filter: 'all', labels: nil
|
||||
|
||||
issues = []
|
||||
page_i = 0
|
||||
count_pages = response.count_pages
|
||||
response.each_page do |page|
|
||||
page_i += PER_PAGE_NUMBER
|
||||
print "Fetching issues... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
||||
issues.concat(page)
|
||||
end
|
||||
|
||||
print " \r"
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Received issues: #{issues.count}"
|
||||
end
|
||||
|
||||
# remove pull request from issues:
|
||||
issues.select! { |x|
|
||||
x.pull_request == nil
|
||||
}
|
||||
|
||||
filtered_issues = issues.select { |issue|
|
||||
#compare is there any labels from @options[:labels] array
|
||||
(issue.labels.map { |label| label.name } & @options[:labels]).any?
|
||||
}
|
||||
|
||||
|
||||
if @options[:add_issues_wo_labels]
|
||||
issues_wo_labels = issues.select {
|
||||
# add issues without any labels
|
||||
|issue| !issue.labels.map { |label| label.name }.any?
|
||||
}
|
||||
filtered_issues.concat(issues_wo_labels)
|
||||
end
|
||||
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Filtered issues with labels #{@options[:labels]}#{@options[:add_issues_wo_labels] ? ' and w/o labels' : ''}: #{filtered_issues.count}"
|
||||
end
|
||||
|
||||
filtered_issues
|
||||
|
||||
end
|
||||
|
||||
def fetch_event_for_issues(filtered_issues)
|
||||
if @options[:verbose]
|
||||
print "Fetching events for issues: 0/#{filtered_issues.count}\r"
|
||||
end
|
||||
|
||||
# Async fetching events:
|
||||
threads = []
|
||||
|
||||
i = 0
|
||||
filtered_issues.each { |issue|
|
||||
threads << Thread.new {
|
||||
obj = @github.issues.events.list user: @options[:user], repo: @options[:project], issue_number: issue['number']
|
||||
issue[:events] = obj.body
|
||||
print "Fetching events for issues: #{i+1}/#{filtered_issues.count}\r"
|
||||
i +=1
|
||||
}
|
||||
}
|
||||
threads.each { |thr| thr.join }
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Fetching events for issues: Done!"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if __FILE__ == $0
|
||||
GitHubChangelogGenerator::ChangelogGenerator.new.compund_changelog
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,38 +0,0 @@
|
||||
module GitHubChangelogGenerator
|
||||
class Generator
|
||||
|
||||
def initialize(options = nil)
|
||||
@options = options
|
||||
end
|
||||
|
||||
def get_string_for_pull_request(pull_request)
|
||||
encapsulated_title = self.encapsulate_string pull_request[:title]
|
||||
|
||||
merge = "#{@options[:merge_prefix]}#{encapsulated_title} [\\##{pull_request[:number]}](#{pull_request.html_url})"
|
||||
if @options[:author]
|
||||
if pull_request.user.nil?
|
||||
merge += " ({Null user})\n\n"
|
||||
else
|
||||
merge += " ([#{pull_request.user.login}](#{pull_request.user.html_url}))\n\n"
|
||||
end
|
||||
else
|
||||
merge += "\n\n"
|
||||
end
|
||||
merge
|
||||
end
|
||||
|
||||
def encapsulate_string(string)
|
||||
|
||||
string.gsub! '\\', '\\\\'
|
||||
|
||||
encpas_chars = %w(> * _ \( \) [ ])
|
||||
encpas_chars.each{ |char|
|
||||
string.gsub! char, "\\#{char}"
|
||||
}
|
||||
|
||||
string
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,118 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
require 'optparse'
|
||||
require 'pp'
|
||||
require_relative 'version'
|
||||
|
||||
module GitHubChangelogGenerator
|
||||
class Parser
|
||||
def self.parse_options
|
||||
options = {:tag1 => nil, :tag2 => nil, :format => '%d/%m/%y', :output => 'CHANGELOG.md', :labels => %w(bug enhancement), :pulls => true, :issues => true, :verbose => true, :add_issues_wo_labels => true, :merge_prefix => '*Merged pull-request:* ', :author => true, :pull_request_labels => nil, :filter_issues_by_milestone => true, :compare_link => true}
|
||||
|
||||
parser = OptionParser.new { |opts|
|
||||
opts.banner = 'Usage: changelog_generator [options]'
|
||||
opts.on('-u', '--user [USER]', 'Username of the owner of target GitHub repo') do |last|
|
||||
options[:user] = last
|
||||
end
|
||||
opts.on('-p', '--project [PROJECT]', 'Name of project on GitHub') do |last|
|
||||
options[:project] = last
|
||||
end
|
||||
opts.on('-t', '--token [TOKEN]', 'To make more than 50 requests per hour your GitHub token required. You can generate it here: https://github.com/settings/tokens/new') do |last|
|
||||
options[:token] = last
|
||||
end
|
||||
opts.on('-f', '--date-format [FORMAT]', 'Date format. Default is %d/%m/%y') do |last|
|
||||
options[:format] = last
|
||||
end
|
||||
opts.on('-o', '--output [NAME]', 'Output file. Default is CHANGELOG.md') do |last|
|
||||
options[:output] = last
|
||||
end
|
||||
opts.on('--[no-]verbose', 'Run verbosely. Default is true') do |v|
|
||||
options[:verbose] = v
|
||||
end
|
||||
opts.on('--[no-]issues', 'Include closed issues to changelog. Default is true') do |v|
|
||||
options[:issues] = v
|
||||
end
|
||||
opts.on('--[no-]issues-wo-labels', 'Include closed issues without any labels to changelog. Default is true') do |v|
|
||||
options[:add_issues_wo_labels] = v
|
||||
end
|
||||
opts.on('--[no-]pull-requests', 'Include pull-requests to changelog. Default is true') do |v|
|
||||
options[:pulls] = v
|
||||
end
|
||||
opts.on('--[no-]filter-by-milestone', 'Use milestone to detect when issue was resolved. Default is true') do |last|
|
||||
options[:filter_issues_by_milestone] = last
|
||||
end
|
||||
opts.on('--[no-]author', 'Add author of pull-request in the end. Default is true') do |author|
|
||||
options[:last] = author
|
||||
end
|
||||
opts.on('--[no-]compare-link', 'Include compare link between older version and newer version. Default is true') do |v|
|
||||
options[:compare_link] = v
|
||||
end
|
||||
opts.on('--labels x,y,z', Array, 'Issues with that labels will be included to changelog. Default is \'bug,enhancement\'') do |list|
|
||||
options[:labels] = list
|
||||
end
|
||||
opts.on('--labels-pr x,y,z', Array, 'Only pull requests with specified labels will be included to changelog. Default is nil') do |list|
|
||||
options[:pull_request_labels] = list
|
||||
end
|
||||
opts.on('--github-site [URL]', 'The Enterprise Github site on which your project is hosted.') do |last|
|
||||
options[:github_site] = last
|
||||
end
|
||||
opts.on('--github-api [URL]', 'The enterprise endpoint to use for your Github API.') do |last|
|
||||
options[:github_endpoint] = last
|
||||
end
|
||||
opts.on('-v', '--version', 'Print version number') do |v|
|
||||
puts "Version: #{GitHubChangelogGenerator::VERSION}"
|
||||
exit
|
||||
end
|
||||
opts.on('-h', '--help', 'Displays Help') do
|
||||
puts opts
|
||||
exit
|
||||
end
|
||||
}
|
||||
|
||||
parser.parse!
|
||||
|
||||
if ARGV[0] && !ARGV[1]
|
||||
github_site = options[:github_site] ? options[:github_site] : 'github.com'
|
||||
# this match should parse strings such "https://github.com/skywinder/Github-Changelog-Generator" or "skywinder/Github-Changelog-Generator" to user and name
|
||||
match = /(?:.+#{Regexp.escape(github_site)}\/)?(.+)\/(.+)/.match(ARGV[0])
|
||||
|
||||
begin
|
||||
param = match[2].nil?
|
||||
rescue
|
||||
puts "Can't detect user and name from first parameter: '#{ARGV[0]}' -> exit'"
|
||||
exit
|
||||
end
|
||||
if param
|
||||
exit
|
||||
else
|
||||
options[:user] = match[1]
|
||||
options[:project]= match[2]
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
if !options[:user] && !options[:project]
|
||||
remote = `git remote -vv`.split("\n")
|
||||
match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)?(?:\.git).*/.match(remote[0])
|
||||
|
||||
if match && match[1] && match[2]
|
||||
puts "Detected user:#{match[1]}, project:#{match[2]}"
|
||||
options[:user], options[:project] = match[1], match[2]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if !options[:user] || !options[:project]
|
||||
puts parser.banner
|
||||
exit
|
||||
end
|
||||
|
||||
if ARGV[1]
|
||||
options[:tag1] = ARGV[0]
|
||||
options[:tag2] = ARGV[1]
|
||||
end
|
||||
|
||||
options
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,3 +0,0 @@
|
||||
module GitHubChangelogGenerator
|
||||
VERSION = '1.2.8'
|
||||
end
|
||||
@@ -0,0 +1,228 @@
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
border: 0;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #d5000d;
|
||||
}
|
||||
|
||||
header {
|
||||
padding-top: 35px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
line-height: 1.2;
|
||||
color: #303030;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
header h2 {
|
||||
font-size: 24px;
|
||||
font-weight: normal;
|
||||
line-height: 1.3;
|
||||
color: #aaa;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
#downloads {
|
||||
display: none;
|
||||
}
|
||||
#main_content {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
code, pre {
|
||||
margin-bottom: 30px;
|
||||
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
|
||||
font-size: 12px;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
border: solid 1px #ddd;
|
||||
}
|
||||
pre code {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul, ol, dl {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* COMMON STYLES */
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
td {
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
form {
|
||||
padding: 20px;
|
||||
background: #f2f2f2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* GENERAL ELEMENT TYPE STYLES */
|
||||
|
||||
h1 {
|
||||
font-size: 2.8em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 8px;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 8px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #d5000d;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: .8em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p a {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 0 0 0 30px;
|
||||
margin-bottom: 20px;
|
||||
font-size: 1.6em;
|
||||
border-left: 10px solid #e9e9e9;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style-position: inside;
|
||||
list-style: disc;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
ol li {
|
||||
list-style-position: inside;
|
||||
list-style: decimal;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
font-style: italic;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
margin-top: 40px;
|
||||
font-size: 13px;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
.clearfix:after {
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
content: '.';
|
||||
}
|
||||
|
||||
.clearfix {display: inline-block;}
|
||||
* html .clearfix {height: 1%;}
|
||||
.clearfix {display: block;}
|
||||
@@ -0,0 +1,69 @@
|
||||
.highlight { background: #ffffff; }
|
||||
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
||||
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||
.highlight .k { font-weight: bold } /* Keyword */
|
||||
.highlight .o { font-weight: bold } /* Operator */
|
||||
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
||||
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
||||
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
||||
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #999999 } /* Generic.Heading */
|
||||
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
||||
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
||||
.highlight .go { color: #888888 } /* Generic.Output */
|
||||
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
|
||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
||||
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
|
||||
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
||||
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
||||
.highlight .m { color: #009999 } /* Literal.Number */
|
||||
.highlight .s { color: #d14 } /* Literal.String */
|
||||
.highlight .na { color: #008080 } /* Name.Attribute */
|
||||
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
||||
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #008080 } /* Name.Constant */
|
||||
.highlight .ni { color: #800080 } /* Name.Entity */
|
||||
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
||||
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
||||
.highlight .nn { color: #555555 } /* Name.Namespace */
|
||||
.highlight .nt { color: #000080 } /* Name.Tag */
|
||||
.highlight .nv { color: #008080 } /* Name.Variable */
|
||||
.highlight .ow { font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
||||
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
||||
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
||||
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
||||
|
||||
.type-csharp .highlight .k { color: #0000FF }
|
||||
.type-csharp .highlight .kt { color: #0000FF }
|
||||
.type-csharp .highlight .nf { color: #000000; font-weight: normal }
|
||||
.type-csharp .highlight .nc { color: #2B91AF }
|
||||
.type-csharp .highlight .nn { color: #000000 }
|
||||
.type-csharp .highlight .s { color: #A31515 }
|
||||
.type-csharp .highlight .sc { color: #A31515 }
|
||||
@@ -0,0 +1,421 @@
|
||||
@import url(https://fonts.googleapis.com/css?family=Arvo:400,700,400italic);
|
||||
|
||||
/* MeyerWeb Reset */
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
|
||||
/* Base text styles */
|
||||
|
||||
body {
|
||||
padding:10px 50px 0 0;
|
||||
font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
color: #232323;
|
||||
background-color: #FBFAF7;
|
||||
margin: 0;
|
||||
line-height: 1.8em;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color:#232323;
|
||||
margin:36px 0 10px;
|
||||
}
|
||||
|
||||
p, ul, ol, table, dl {
|
||||
margin:0 0 22px;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
font-family: Arvo, Monaco, serif;
|
||||
line-height:1.3;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1,h2, h3 {
|
||||
display: block;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
h4, h5, h6 {
|
||||
font-family: Arvo, Monaco, serif;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
a {
|
||||
color:#C30000;
|
||||
font-weight:200;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a small {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: inside;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style: decimal inside;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0;
|
||||
padding: 0 0 0 20px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
dl, dt, dd, dl p {
|
||||
font-color: #444;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
padding-left: 20px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
dl p {
|
||||
padding-left: 20px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
hr {
|
||||
border:0;
|
||||
background:#ccc;
|
||||
height:1px;
|
||||
margin:0 0 24px;
|
||||
}
|
||||
|
||||
/* Images */
|
||||
|
||||
img {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
max-width: 650px;
|
||||
padding: 5px;
|
||||
margin: 10px 0 32px 0;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
p img {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
|
||||
code, pre {
|
||||
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
|
||||
color:#000;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 4px 12px;
|
||||
background: #FDFEFB;
|
||||
border-radius:4px;
|
||||
border:1px solid #D7D8C8;
|
||||
overflow: auto;
|
||||
overflow-y: hidden;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
|
||||
/* Tables */
|
||||
|
||||
table {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 32px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
font-family: 'Arvo', Helvetica, Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
padding: 10px;
|
||||
background: #232323;
|
||||
color: #FDFEFB;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px;
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
|
||||
/* Wrapper */
|
||||
.wrapper {
|
||||
width:960px;
|
||||
}
|
||||
|
||||
|
||||
/* Header */
|
||||
|
||||
header {
|
||||
background-color: #171717;
|
||||
color: #FDFDFB;
|
||||
width:170px;
|
||||
float:left;
|
||||
position:fixed;
|
||||
border: 1px solid #000;
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-moz-border-radius-topright: 4px;
|
||||
-moz-border-radius-bottomright: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
padding: 34px 25px 22px 50px;
|
||||
margin: 30px 25px 0 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
p.header {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
h1.header {
|
||||
font-family: Arvo, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 300;
|
||||
line-height: 1.3em;
|
||||
border-bottom: none;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
h1.header, a.header, a.name, header a{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a.header {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a.name {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
header ul {
|
||||
list-style:none;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
header li {
|
||||
list-style-type: none;
|
||||
width:132px;
|
||||
height:15px;
|
||||
margin-bottom: 12px;
|
||||
line-height: 1em;
|
||||
padding: 6px 6px 6px 7px;
|
||||
|
||||
background: #AF0011;
|
||||
background: -moz-linear-gradient(top, #AF0011 0%, #820011 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
|
||||
background: -webkit-linear-gradient(top, #AF0011 0%,#820011 100%);
|
||||
background: -o-linear-gradient(top, #AF0011 0%,#820011 100%);
|
||||
background: -ms-linear-gradient(top, #AF0011 0%,#820011 100%);
|
||||
background: linear-gradient(top, #AF0011 0%,#820011 100%);
|
||||
|
||||
border-radius:4px;
|
||||
border:1px solid #0D0D0D;
|
||||
|
||||
-webkit-box-shadow: inset 0px 1px 1px 0 rgba(233,2,38, 1);
|
||||
box-shadow: inset 0px 1px 1px 0 rgba(233,2,38, 1);
|
||||
|
||||
}
|
||||
|
||||
header li:hover {
|
||||
background: #C3001D;
|
||||
background: -moz-linear-gradient(top, #C3001D 0%, #950119 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
|
||||
background: -webkit-linear-gradient(top, #C3001D 0%,#950119 100%);
|
||||
background: -o-linear-gradient(top, #C3001D 0%,#950119 100%);
|
||||
background: -ms-linear-gradient(top, #C3001D 0%,#950119 100%);
|
||||
background: linear-gradient(top, #C3001D 0%,#950119 100%);
|
||||
}
|
||||
|
||||
a.buttons {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
background: url(../images/arrow-down.png) no-repeat;
|
||||
font-weight: normal;
|
||||
text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;
|
||||
padding: 2px 2px 2px 22px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
a.github {
|
||||
background: url(../images/octocat-small.png) no-repeat 1px;
|
||||
}
|
||||
|
||||
a.buttons:hover {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
/* Section - for main page content */
|
||||
|
||||
section {
|
||||
width:650px;
|
||||
float:right;
|
||||
padding-bottom:50px;
|
||||
}
|
||||
|
||||
|
||||
/* Footer */
|
||||
|
||||
footer {
|
||||
width:170px;
|
||||
float:left;
|
||||
position:fixed;
|
||||
bottom:10px;
|
||||
padding-left: 50px;
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 960px) {
|
||||
|
||||
div.wrapper {
|
||||
width:auto;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
header, section, footer {
|
||||
float:none;
|
||||
position:static;
|
||||
width:auto;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 1px solid #ccc;
|
||||
margin:0 84px 0 50px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
header {
|
||||
padding-right:320px;
|
||||
}
|
||||
|
||||
section {
|
||||
padding:20px 84px 20px 50px;
|
||||
margin:0 0 20px;
|
||||
}
|
||||
|
||||
header a small {
|
||||
display:inline;
|
||||
}
|
||||
|
||||
header ul {
|
||||
position:absolute;
|
||||
right:130px;
|
||||
top:84px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 720px) {
|
||||
body {
|
||||
word-wrap:break-word;
|
||||
}
|
||||
|
||||
header {
|
||||
padding:10px 20px 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
section {
|
||||
padding:10px 0 10px 20px;
|
||||
margin:0 0 30px;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin: 0 0 0 30px;
|
||||
}
|
||||
|
||||
header ul, header p.view {
|
||||
position:static;
|
||||
}
|
||||
}
|
||||
|
||||
@media print, screen and (max-width: 480px) {
|
||||
|
||||
header ul li.download {
|
||||
display:none;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin: 0 0 0 20px;
|
||||
}
|
||||
|
||||
footer a{
|
||||
display:block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
padding:0.4in;
|
||||
font-size:12pt;
|
||||
color:#444;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,373 @@
|
||||
/* http://meyerweb.com/eric/tools/css/reset/
|
||||
v2.0 | 20110126
|
||||
License: none (public domain)
|
||||
*/
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
border: 0;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* LAYOUT STYLES */
|
||||
body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
|
||||
font-size: 1em;
|
||||
line-height: 1.5;
|
||||
color: #6d6d6d;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||
background: #e7e7e7 url(../images/body-bg.png) 0 0 repeat;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #d5000d;
|
||||
}
|
||||
a:hover {
|
||||
color: #c5000c;
|
||||
}
|
||||
|
||||
header {
|
||||
padding-top: 35px;
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-family: 'Chivo', 'Helvetica Neue', Helvetica, Arial, serif;
|
||||
font-size: 48px; font-weight: 900;
|
||||
line-height: 1.2;
|
||||
color: #303030;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
header h2 {
|
||||
font-size: 24px;
|
||||
font-weight: normal;
|
||||
line-height: 1.3;
|
||||
color: #aaa;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
#container {
|
||||
min-height: 595px;
|
||||
background: transparent url(../images/highlight-bg.jpg) 50% 0 no-repeat;
|
||||
}
|
||||
|
||||
.inner {
|
||||
width: 620px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#container .inner img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#downloads {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
a.button {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 179px;
|
||||
padding: 12px 8px 12px 8px;
|
||||
margin-right: 14px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
line-height: 25px;
|
||||
color: #303030;
|
||||
background: #fdfdfd; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #fdfdfd 0%, #f2f2f2 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f2f2f2)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f2f2f2',GradientType=0 ); /* IE6-9 */
|
||||
border-top: solid 1px #cbcbcb;
|
||||
border-right: solid 1px #b7b7b7;
|
||||
border-bottom: solid 1px #b3b3b3;
|
||||
border-left: solid 1px #b7b7b7;
|
||||
border-radius: 30px;
|
||||
-webkit-box-shadow: 10px 10px 5px #888;
|
||||
-moz-box-shadow: 10px 10px 5px #888;
|
||||
box-shadow: 0px 1px 5px #e8e8e8;
|
||||
-moz-border-radius: 30px;
|
||||
-webkit-border-radius: 30px;
|
||||
}
|
||||
a.button:hover {
|
||||
background: #fafafa; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #fdfdfd 0%, #f6f6f6 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #fdfdfd 0%,#f6f6f6, 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
|
||||
border-top: solid 1px #b7b7b7;
|
||||
border-right: solid 1px #b3b3b3;
|
||||
border-bottom: solid 1px #b3b3b3;
|
||||
border-left: solid 1px #b3b3b3;
|
||||
}
|
||||
|
||||
a.button span {
|
||||
display: block;
|
||||
height: 23px;
|
||||
padding-left: 50px;
|
||||
}
|
||||
|
||||
#download-zip span {
|
||||
background: transparent url(../images/zip-icon.png) 12px 50% no-repeat;
|
||||
}
|
||||
#download-tar-gz span {
|
||||
background: transparent url(../images/tar-gz-icon.png) 12px 50% no-repeat;
|
||||
}
|
||||
#view-on-github span {
|
||||
background: transparent url(../images/octocat-icon.png) 12px 50% no-repeat;
|
||||
}
|
||||
#view-on-github {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
code, pre {
|
||||
margin-bottom: 30px;
|
||||
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
|
||||
font-size: 14px;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0 3px;
|
||||
background-color: #f2f2f2;
|
||||
border: solid 1px #ddd;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
color: #f2f2f2;
|
||||
text-shadow: none;
|
||||
background: #303030;
|
||||
}
|
||||
pre code {
|
||||
padding: 0;
|
||||
color: #f2f2f2;
|
||||
background-color: #303030;
|
||||
border: none;
|
||||
}
|
||||
|
||||
ul, ol, dl {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* COMMON STYLES */
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
padding-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
line-height: 1px;
|
||||
background: transparent url('../images/hr.png') 50% 0 no-repeat;
|
||||
border: none;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
td {
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
form {
|
||||
padding: 20px;
|
||||
background: #f2f2f2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* GENERAL ELEMENT TYPE STYLES */
|
||||
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 8px;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 8px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #d5000d;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: .8em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p a {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 0 0 0 30px;
|
||||
margin-bottom: 20px;
|
||||
font-size: 1.6em;
|
||||
border-left: 10px solid #e9e9e9;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style-position: inside;
|
||||
list-style: disc;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
ol li {
|
||||
list-style-position: inside;
|
||||
list-style: decimal;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
margin-top: 40px;
|
||||
font-size: 13px;
|
||||
color: #aaa;
|
||||
background: transparent url('../images/hr.png') 0 0 no-repeat;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #666;
|
||||
}
|
||||
footer a:hover {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
.clearfix:after {
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
content: '.';
|
||||
}
|
||||
|
||||
.clearfix {display: inline-block;}
|
||||
* html .clearfix {height: 1%;}
|
||||
.clearfix {display: block;}
|
||||
|
||||
/* #Media Queries
|
||||
================================================== */
|
||||
|
||||
/* Smaller than standard 960 (devices and browsers) */
|
||||
@media only screen and (max-width: 959px) { }
|
||||
|
||||
/* Tablet Portrait size to standard 960 (devices and browsers) */
|
||||
@media only screen and (min-width: 768px) and (max-width: 959px) { }
|
||||
|
||||
/* All Mobile Sizes (devices and browser) */
|
||||
@media only screen and (max-width: 767px) {
|
||||
header {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
#downloads {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
#download-zip, #download-tar-gz {
|
||||
display: none;
|
||||
}
|
||||
.inner {
|
||||
width: 94%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
|
||||
@media only screen and (min-width: 480px) and (max-width: 767px) { }
|
||||
|
||||
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
|
||||
@media only screen and (max-width: 479px) { }
|
||||