ptlog 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --default_path spec
2
+ --order rand
3
+ --warnings
4
+ --color
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem 'rake'
6
+ gem 'rspec'
7
+ gem 'vcr', '~> 2.7'
8
+ gem 'webmock'
9
+
10
+ gem 'pivotal-tracker'
11
+ gem 'git'
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Dmitry Larkin
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # PTLog
2
+
3
+ Chagelog based on Git commits with a PivotalTracker story IDs.
4
+
5
+ Integration with Capostrano.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'ptlog'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install ptlog
20
+
21
+ ## Usage
22
+
23
+ Capistrano tasks
24
+
25
+ set :ptlog_project_id, PROJECT_ID
26
+ set :ptlog_token, TOKEN
27
+ set :ptlog_output, "{release_path}/changelog.html"
28
+
29
+ Hooks
30
+
31
+ # Generates ChangeLog file
32
+ #
33
+ after :deploy, 'ptlog:changes'
34
+
35
+ # Generates version.json with last commit hash
36
+ #
37
+ after "deploy:update_code", "ptlog:release"
38
+
39
+
40
+
41
+ ## Contributing
42
+
43
+ 1. Fork it
44
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
45
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
46
+ 4. Push to the branch (`git push origin my-new-feature`)
47
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require "bundler/gem_tasks"
2
+ require 'bundler'
3
+ require "rspec/core/rake_task"
4
+
5
+ Bundler::GemHelper.install_tasks
6
+
7
+ desc "Run all examples"
8
+ RSpec::Core::RakeTask.new(:spec) do |t|
9
+ t.ruby_opts = %w[-w]
10
+ end
11
+
12
+ task :default => [:spec]
@@ -0,0 +1,15 @@
1
+ require 'ptlog'
2
+
3
+ Capistrano::Configuration.instance(:must_exist).load do
4
+ namespace :ptlog do
5
+ desc "Generates changelog"
6
+ task :changes do
7
+ # put PTLog::ChangeLog.generate.to_html, "#{release_path}/public/changelog.html"
8
+ end
9
+
10
+ desc "Generates release file. RESTART=(true|false) option could be specified (by default is false)"
11
+ task :release do
12
+ put PTLog::Release.generate, "#{release_path}/version.json"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,4 @@
1
+ module PTLog
2
+ class ChangeLog
3
+ end
4
+ end
@@ -0,0 +1,9 @@
1
+ require 'git'
2
+
3
+ module PTLog
4
+ class Release
5
+ def self.generate
6
+ JSON.dump({ :restart => ( ENV['RESTART'] || false ), :version => (`git describe --always`).strip })
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module PTLog
2
+ VERSION = "0.1.0"
3
+ end
data/lib/ptlog.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "ptlog/version"
2
+
3
+ module PTLog
4
+ autoload :Release, "ptlog/release"
5
+ autoload :ChangeLog, "ptlog/change_log"
6
+ end
data/ptlog.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ptlog/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ptlog"
8
+ spec.version = PTLog::VERSION
9
+ spec.authors = ["Dmitry Larkin"]
10
+ spec.email = ["dmitry.larkin@gmail.com"]
11
+ spec.description = %q{Generages changelog based on PivotalTracker stories and Git commits}
12
+ spec.summary = %q{Generages changelog based on PivotalTracker stories and Git commits}
13
+ spec.homepage = "https://github.com/dml/ptlog"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^spec/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+
24
+ spec.add_runtime_dependency "pivotal-tracker", "~> 0.5.12"
25
+ spec.add_runtime_dependency "git", "~> 1.2.6"
26
+ spec.add_runtime_dependency "capistrano", "~> 2.0"
27
+ end
@@ -0,0 +1,7 @@
1
+ require 'rspec'
2
+ require 'ptlog'
3
+ require 'vcr'
4
+
5
+ RSpec.configure do |c|
6
+ c.mock_with :rspec
7
+ end
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ptlog
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dmitry Larkin
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-11-20 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: pivotal-tracker
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 0.5.12
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.5.12
62
+ - !ruby/object:Gem::Dependency
63
+ name: git
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 1.2.6
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 1.2.6
78
+ - !ruby/object:Gem::Dependency
79
+ name: capistrano
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '2.0'
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '2.0'
94
+ description: Generages changelog based on PivotalTracker stories and Git commits
95
+ email:
96
+ - dmitry.larkin@gmail.com
97
+ executables: []
98
+ extensions: []
99
+ extra_rdoc_files: []
100
+ files:
101
+ - .gitignore
102
+ - .rspec
103
+ - Gemfile
104
+ - LICENSE.txt
105
+ - README.md
106
+ - Rakefile
107
+ - lib/ptlog.rb
108
+ - lib/ptlog/capistrno.rb
109
+ - lib/ptlog/change_log.rb
110
+ - lib/ptlog/release.rb
111
+ - lib/ptlog/version.rb
112
+ - ptlog.gemspec
113
+ - spec/spec_helper.rb
114
+ homepage: https://github.com/dml/ptlog
115
+ licenses:
116
+ - MIT
117
+ post_install_message:
118
+ rdoc_options: []
119
+ require_paths:
120
+ - lib
121
+ required_ruby_version: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ requirements: []
134
+ rubyforge_project:
135
+ rubygems_version: 1.8.25
136
+ signing_key:
137
+ specification_version: 3
138
+ summary: Generages changelog based on PivotalTracker stories and Git commits
139
+ test_files:
140
+ - spec/spec_helper.rb