pgit 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a72ba79fbaa4bfba38e13548cff4ac44812fb0b1
4
- data.tar.gz: fd94693b8ff782640064f0a134d822b4922ab4bd
3
+ metadata.gz: e11d6044b7f8bd8030a10c3e563eafbf594a498f
4
+ data.tar.gz: 517300daf5c4126e417940f0af925e669a65f0bb
5
5
  SHA512:
6
- metadata.gz: 5491115049d8c35b86df684a793be62ad71a7b3678379a3eb5337be7692c7e67903cd3a088cd0b729c419473db5a0a6d69031ec5386426de3a4e9f0a3cb3de75
7
- data.tar.gz: ea5e67ecc7a8ca90e475ec261fec625581b6bbe92bd337d25631f345df57d8efee6dead19f0a49ca9db735da4569d4e152797513b5b1a0c29860feb0d6372d7a
6
+ metadata.gz: 4649d681d4b7e8dbbfcfe33e6ce55ae113bf4ec7e8bbef9db81f5944738a1b196f36ab9d14971892d38a6d2c3e52d314393a7d02f692d558cc07c360ed55c7f7
7
+ data.tar.gz: 32e1abf53d85783fa22004377823035bc0ac6ca527d5c2a45af4befceb28b17eec0324ed8269d78014d00dda283750aebf21c547619e1e9392421b4025dc3c07
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  *.un~
2
+ Gemfile.lock
@@ -0,0 +1,6 @@
1
+ rvm:
2
+ - 2.1.0
3
+ - 2.1.2
4
+ - 2.1.3
5
+ - 2.1.5
6
+ script: "bundle exec rake"
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
1
  source 'https://rubygems.org'
2
- gem 'pry'
2
+
3
3
  gemspec
@@ -1,5 +1,7 @@
1
1
  # PGit
2
2
 
3
+ ![Travis CI Build](https://travis-ci.org/Edderic/pgit.svg?branch=master)
4
+ [![Code Climate](https://codeclimate.com/github/Edderic/pgit/badges/gpa.svg)](https://codeclimate.com/github/Edderic/pgit)
3
5
  ## Example Usage
4
6
 
5
7
  Assuming that:
@@ -16,17 +18,27 @@ will create a branch for you named `implement-really-cool-feature-10102004`
16
18
 
17
19
  ## Installation
18
20
 
19
- 1. Install via RubyGems:
21
+ * Install via RubyGems:
20
22
 
21
23
  ```
22
24
  $ gem install pgit
23
25
  ```
24
26
 
25
- 2. Setup configuration file:
27
+ * Setup configuration file:
26
28
 
27
29
  ```
28
30
  $ pgit install
29
31
  ```
30
32
 
31
- This will generate a YAML file under `~/.pgit.rc.yml`. Edit that file to add information about projects that you're working on. Each project needs a project `id`, Pivotal Tracker `api_token`, and `path`
33
+ This will generate a YAML file under `~/.pgit.rc.yml`. Edit that file to add
34
+ information about projects that you're working on. Each project needs a
35
+ project `id`, Pivotal Tracker `api_token`, and `path`.
32
36
 
37
+ The `api_token` can be found here: https://www.pivotaltracker.com/profile
38
+
39
+ The project id is in the URL when visiting a project (i.e.
40
+ https://pivotaltracker.com/projects/12345678)
41
+
42
+
43
+ ## Development
44
+ See https://www.pivotaltracker.com/n/projects/1228944 for information.
data/Rakefile CHANGED
@@ -15,10 +15,6 @@ Gem::PackageTask.new(spec) do |pkg|
15
15
  end
16
16
 
17
17
  desc 'Run specs'
18
- require 'rake/testtask'
19
- Rake::TestTask.new(:spec) do |s|
20
- s.libs << "spec"
21
- s.test_files = FileList['spec/**/*_test.rb']
22
- end
23
-
18
+ require 'rspec/core/rake_task'
19
+ RSpec::Core::RakeTask.new
24
20
  task :default => [:spec]
@@ -1,3 +1,3 @@
1
1
  module Pgit
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -5,7 +5,7 @@ spec = Gem::Specification.new do |s|
5
5
  s.version = Pgit::VERSION
6
6
  s.author = 'Edderic Ugaddan'
7
7
  s.email = 'edderic@gmail.com'
8
- s.homepage = 'http://edderic.github.io'
8
+ s.homepage = 'https://github.com/Edderic/pgit'
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.summary = 'Optimize your Pivotal Tracker and Github workflow'
11
11
  s.files = `git ls-files`.split("
@@ -17,5 +17,23 @@ spec = Gem::Specification.new do |s|
17
17
  s.bindir = 'bin'
18
18
  s.executables << 'pgit'
19
19
  s.add_development_dependency('rake')
20
+ s.add_development_dependency('rspec', '~> 3.1')
20
21
  s.add_runtime_dependency('gli','2.12.2')
22
+ s.license = 'MIT'
23
+ s.requirements << 'At least one project that uses Pivotal Tracker and Git'
24
+ s.requirements << 'cURL, at least 7.35.0'
25
+ s.required_ruby_version = '>= 1.9.3'
26
+ s.post_install_message = <<-MESSAGE
27
+
28
+ If you are a first time user, please run `pgit install` to save the example
29
+ configuration file under ~/.pgit.rc.yml and edit the file accordingly.
30
+
31
+ For more info:
32
+ `pgit --help`
33
+
34
+ For feature requests and bug reporting: https://github.com/Edderic/pgit
35
+
36
+ Thanks for installing!
37
+
38
+ MESSAGE
21
39
  end
@@ -11,7 +11,7 @@ describe 'PGit::CurrentBranch' do
11
11
  some-other-branch
12
12
  FAKE_BRANCHES
13
13
 
14
- allow(PGit::CurrentBranch).to receive(:`).with(git_branch_command).and_return(fake_branches)
14
+ allow_any_instance_of(PGit::CurrentBranch).to receive(:`).with(git_branch_command).and_return(fake_branches)
15
15
  current_branch_name = PGit::CurrentBranch.new.name
16
16
 
17
17
  expect(current_branch_name).to eq fake_current_branch
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edderic Ugaddan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-12 00:00:00.000000000 Z
11
+ date: 2014-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.1'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: gli
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -48,8 +62,8 @@ extra_rdoc_files:
48
62
  files:
49
63
  - ".gitignore"
50
64
  - ".rspec"
65
+ - ".travis.yml"
51
66
  - Gemfile
52
- - Gemfile.lock
53
67
  - LICENSE
54
68
  - README.markdown
55
69
  - Rakefile
@@ -64,7 +78,6 @@ files:
64
78
  - lib/pgit/story_branch.rb
65
79
  - lib/pgit/story_branch/application.rb
66
80
  - lib/pgit/version.rb
67
- - lib/pgit_configuration.rb
68
81
  - man/pgit.1
69
82
  - man/pgit.1.html
70
83
  - man/pgit.1.ronn
@@ -80,10 +93,22 @@ files:
80
93
  - spec/pgit/story_branch/name_parser_spec.rb
81
94
  - spec/pgit/story_branch_spec.rb
82
95
  - spec/pgit/story_spec.rb
83
- homepage: http://edderic.github.io
84
- licenses: []
96
+ homepage: https://github.com/Edderic/pgit
97
+ licenses:
98
+ - MIT
85
99
  metadata: {}
86
- post_install_message:
100
+ post_install_message: |2+
101
+
102
+ If you are a first time user, please run `pgit install` to save the example
103
+ configuration file under ~/.pgit.rc.yml and edit the file accordingly.
104
+
105
+ For more info:
106
+ `pgit --help`
107
+
108
+ For feature requests and bug reporting: https://github.com/Edderic/pgit
109
+
110
+ Thanks for installing!
111
+
87
112
  rdoc_options:
88
113
  - "--title"
89
114
  - pgit
@@ -95,13 +120,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
120
  requirements:
96
121
  - - ">="
97
122
  - !ruby/object:Gem::Version
98
- version: '0'
123
+ version: 1.9.3
99
124
  required_rubygems_version: !ruby/object:Gem::Requirement
100
125
  requirements:
101
126
  - - ">="
102
127
  - !ruby/object:Gem::Version
103
128
  version: '0'
104
- requirements: []
129
+ requirements:
130
+ - At least one project that uses Pivotal Tracker and Git
131
+ - cURL, at least 7.35.0
105
132
  rubyforge_project:
106
133
  rubygems_version: 2.2.2
107
134
  signing_key:
@@ -1,26 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- pgit (0.0.2)
5
- gli (= 2.12.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- coderay (1.1.0)
11
- gli (2.12.2)
12
- method_source (0.8.2)
13
- pry (0.10.1)
14
- coderay (~> 1.1.0)
15
- method_source (~> 0.8.1)
16
- slop (~> 3.4)
17
- rake (10.4.2)
18
- slop (3.6.0)
19
-
20
- PLATFORMS
21
- ruby
22
-
23
- DEPENDENCIES
24
- pgit!
25
- pry
26
- rake
@@ -1,57 +0,0 @@
1
- #
2
- # Loads the Pivotal-Git configuration file
3
- #
4
- # - config_path is the path to the pivotal-git configuration file
5
- # This loads the file. Throws an error if a key (such as api_token, path, id)
6
- # is missing. Check #general_error_message for more info
7
- #
8
-
9
- module Pivotal
10
- class Configuration
11
- def initialize(config_path = '~/.edderic-dotfiles/config/pivotal.yml')
12
- @expanded_path = File.expand_path(config_path)
13
- config_file = File.open(@expanded_path, 'r')
14
- @yaml = YAML.load(config_file)
15
-
16
- validate_existence_of_at_least_one_project
17
- validate_presence_of_items_in_each_project
18
- end
19
-
20
- def to_yaml
21
- @yaml
22
- end
23
-
24
- private
25
-
26
- def general_error_message
27
- "Please have the following layout:\n" +
28
- "\n" +
29
- "projects:\n" +
30
- " - path: ~/some/path/to/a/pivotal-git/project\n" +
31
- " id: 12345\n" +
32
- " api_token: somepivotalatoken124"
33
- end
34
-
35
- def validate_presence_of_items_in_each_project
36
- projects = @yaml["projects"]
37
- all_present = projects.all? do |project|
38
- project["api_token"] &&
39
- project["path"] &&
40
- project["id"]
41
- end
42
-
43
- unless all_present
44
- raise "Error: Must have a path, id, and api_token for each project.\n" +
45
- general_error_message
46
- end
47
- end
48
-
49
- def validate_existence_of_at_least_one_project
50
- unless @yaml["projects"]
51
- raise "Error: #{@expanded_path} needs at least one project.\n" +
52
- general_error_message
53
-
54
- end
55
- end
56
- end
57
- end