gemdiff 0.6.4 → 0.6.5

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: e4d9827327246a825deb839ac7e5ea07afe434e3
4
- data.tar.gz: 9479718c5e6bdee766590e6633d401325f4288a5
3
+ metadata.gz: 8be8bab433d81f4b0a02f483b0681fb27b325d0c
4
+ data.tar.gz: 17359359391001fe7516596987837361988e3519
5
5
  SHA512:
6
- metadata.gz: 53b04fe821274f501f6cb90bc193f76aa223f3994ae12a8d079c41dfa46f5ffaa16fa883e0842a77ecce8b5507252137530a275a7e689fecc5b193f32f75da6a
7
- data.tar.gz: 8421387ae02ce7615e6ec1974797a4f6d63630f2d4f75794c9ee17400454c6d43e835d6c91e1514f1d95c7bf4a2794dcba44416680339da78f41e53e9dc2fb8f
6
+ metadata.gz: ff589f3d0f4a1bb0d8401e93f09ed84f82448f2c4260546ef29c4524390dab6cd5aa045c602d4d99498b44b0893c719e843e4b5c96fae3d90df3e10365bf6dac
7
+ data.tar.gz: d9fc01663466d43caed8ced02e19cfccc4897a0fd0f2abe891d9a7b9c24449da40b4edb3731d4ea39a352e25507eeea4d1255d699c0f6a9ecda0ca16505d9f58
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  .bundle
2
2
  .config
3
+ .ruby-version
3
4
  Gemfile.lock
4
5
  pkg
5
6
  tmp
data/README.md CHANGED
@@ -180,3 +180,7 @@ See [`lib/gemdiff/outdated_gem.rb`](https://github.com/teeparham/gemdiff/blob/ma
180
180
  or anywhere in the description. `gemdiff` is much faster if so, and if not, it guesses the best match using
181
181
  the GitHub search API. If you find exceptions, open an issue or submit a pull request.
182
182
  See [`lib/gemdiff/repo_finder.rb`](https://github.com/teeparham/gemdiff/blob/master/lib/gemdiff/repo_finder.rb).
183
+
184
+ ### More Info
185
+
186
+ [Slides from lightning talk at Boulder Ruby 4/15/2014](http://www.slideshare.net/teeparham/gemdiff)
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = ">= 1.9.3"
22
22
 
23
- spec.add_dependency "octokit", "~> 2.7"
23
+ spec.add_dependency "octokit", "~> 3.1"
24
24
  spec.add_dependency "thor", "~> 0.19"
25
25
  spec.add_dependency "launchy", "~> 2.4"
26
26
 
@@ -43,11 +43,16 @@ module Gemdiff
43
43
  def git_commit
44
44
  added = git_changed_line
45
45
  return false if added.empty?
46
- version = added.split(' ').last.gsub(/[()]/, '')
46
+ version = added.split("\n").first.split(' ').last.gsub(/[()]/, '')
47
47
  git_add_and_commit_lockfile version
48
48
  true
49
49
  end
50
50
 
51
+ # example returns:
52
+ # + aws-sdk (1.35.0)
53
+ # or
54
+ # + sass-rails (4.0.3)
55
+ # + sass-rails
51
56
  def git_changed_line
52
57
  `git diff | grep #{name} | grep '+ '`
53
58
  end
@@ -16,6 +16,7 @@ module Gemdiff
16
16
  activerecord: 'rails/rails',
17
17
  activesupport: 'rails/rails',
18
18
  delayed_job: 'collectiveidea/delayed_job',
19
+ gosu: 'jlnr/gosu',
19
20
  nokogiri: 'sparklemotion/nokogiri',
20
21
  passenger: 'phusion/passenger',
21
22
  railties: 'rails/rails',
@@ -48,7 +49,6 @@ module Gemdiff
48
49
  query = "#{gem_name} language:ruby in:name"
49
50
  result = octokit_client.search_repositories(query)
50
51
  return nil if result.items.empty?
51
- result.items
52
52
  github_repo result.items.first.full_name
53
53
  end
54
54
 
@@ -1,3 +1,3 @@
1
1
  module Gemdiff
2
- VERSION = '0.6.4'
2
+ VERSION = '0.6.5'
3
3
  end
@@ -17,6 +17,13 @@ module Gemdiff
17
17
  updater.expects(:git_add_and_commit_lockfile).with("1.35.0")
18
18
  assert updater.commit
19
19
  end
20
+
21
+ it "adds a git commit for an update from a specific ref" do
22
+ updater = GemUpdater.new("sass-rails")
23
+ updater.stubs git_changed_line: "+ sass-rails (4.0.3)\n+ sass-rails"
24
+ updater.expects(:git_add_and_commit_lockfile).with("4.0.3")
25
+ assert updater.commit
26
+ end
20
27
  end
21
28
 
22
29
  describe "#reset" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tee Parham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-08 00:00:00.000000000 Z
11
+ date: 2014-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.7'
19
+ version: '3.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.7'
26
+ version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -118,7 +118,6 @@ extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
120
  - ".gitignore"
121
- - ".ruby-version"
122
121
  - ".travis.yml"
123
122
  - Gemfile
124
123
  - LICENSE.txt
@@ -1 +0,0 @@
1
- ruby-2.1.1