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 +4 -4
- data/.gitignore +1 -0
- data/README.md +4 -0
- data/gemdiff.gemspec +1 -1
- data/lib/gemdiff/gem_updater.rb +6 -1
- data/lib/gemdiff/repo_finder.rb +1 -1
- data/lib/gemdiff/version.rb +1 -1
- data/test/gem_updater_test.rb +7 -0
- metadata +4 -5
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8be8bab433d81f4b0a02f483b0681fb27b325d0c
|
4
|
+
data.tar.gz: 17359359391001fe7516596987837361988e3519
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff589f3d0f4a1bb0d8401e93f09ed84f82448f2c4260546ef29c4524390dab6cd5aa045c602d4d99498b44b0893c719e843e4b5c96fae3d90df3e10365bf6dac
|
7
|
+
data.tar.gz: d9fc01663466d43caed8ced02e19cfccc4897a0fd0f2abe891d9a7b9c24449da40b4edb3731d4ea39a352e25507eeea4d1255d699c0f6a9ecda0ca16505d9f58
|
data/.gitignore
CHANGED
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)
|
data/gemdiff.gemspec
CHANGED
data/lib/gemdiff/gem_updater.rb
CHANGED
@@ -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
|
data/lib/gemdiff/repo_finder.rb
CHANGED
@@ -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
|
|
data/lib/gemdiff/version.rb
CHANGED
data/test/gem_updater_test.rb
CHANGED
@@ -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
|
+
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-
|
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: '
|
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: '
|
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
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.1.1
|