pullcrusher 0.0.3.pre1 → 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.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/Brewfile +1 -0
- data/CHANGELOG +7 -0
- data/README.md +11 -17
- data/README.rdoc +1 -2
- data/Rakefile +0 -3
- data/lib/auth/github.rb +2 -6
- data/lib/pullcrusher.rb +13 -2
- data/lib/pullcrusher/version.rb +1 -1
- data/pullcrusher.gemspec +21 -17
- metadata +43 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ffcee52b7af88d0bb7e4f49dcbce96e6fdf9595
|
4
|
+
data.tar.gz: 2ddb060c09ba71d4bdc6416bb742acde3ad2a33e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9fd8f250cd64deb9b17860d6dd4e121dd43caa717fc532cb32b16c672ab363729a51aa4257f28600b858983a3ce097e85e76b99e7ecb6ba3cf6c18f21967368
|
7
|
+
data.tar.gz: f07627aee9fd6ef0cba0dc0cdc8406316b290bdd59d938cd559627c0bcc8ee041a15ed1187e156eae795edf92d58be66e580f80908d607c86fa7e64ef44321bf
|
data/.travis.yml
CHANGED
data/Brewfile
CHANGED
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
0.1.0 (5 September 2014)
|
2
|
+
* Update most dependencies so things should work more reliably with all the
|
3
|
+
changes in the world since I first wrote this.
|
4
|
+
* Uses latest version of `image_optim`, which now requires `pngquant` for
|
5
|
+
insanity-level PNG optimization powers.
|
6
|
+
* Drop support for Ruby 1.8.7 as it is EOL.
|
7
|
+
|
1
8
|
0.0.3 (18 March 2014)
|
2
9
|
* fix gem install issue on 1.9.3
|
3
10
|
|
data/README.md
CHANGED
@@ -8,18 +8,18 @@ optimizations back to the maintainer as a pull request.
|
|
8
8
|
We stand on the shoulders of giants! Thanks to: [image_optim](https://github.com/toy/image_optim), [ruby-git](https://github.com/schacon/ruby-git), [methadone](https://github.com/davetron5000/methadone/)
|
9
9
|
and [octokit](https://github.com/pengwynn/octokit).
|
10
10
|
|
11
|
-
[](http://travis-ci.org/mroth/pullcrusher)
|
12
|
+
[](https://gemnasium.com/mroth/pullcrusher)
|
13
13
|
|
14
14
|
## Prerequisites
|
15
15
|
|
16
16
|
Get dependencies for image optimization, on MacOSX, using homebrew:
|
17
17
|
|
18
|
-
brew install advancecomp gifsicle jhead jpegoptim jpeg optipng pngcrush
|
18
|
+
brew install advancecomp gifsicle jhead jpegoptim jpeg optipng pngcrush pngquant
|
19
19
|
|
20
20
|
Debian/Ubuntu:
|
21
21
|
|
22
|
-
sudo apt-get install -y advancecomp gifsicle jpegoptim libjpeg-progs optipng pngcrush
|
22
|
+
sudo apt-get install -y advancecomp gifsicle jhead jpegoptim libjpeg-progs optipng pngcrush pngquant
|
23
23
|
|
24
24
|
## Installation
|
25
25
|
|
@@ -41,7 +41,7 @@ Simply type "Y" if you like and you are done!
|
|
41
41
|
### Sample output
|
42
42
|
|
43
43
|
% pullcrusher waferbaby/usesthis
|
44
|
-
*** Asking
|
44
|
+
*** Asking GitHub to find us the URI for waferbaby/usesthis
|
45
45
|
*** Cloning git@github.com:waferbaby/usesthis.git to local filesystem
|
46
46
|
*** Finding and processing any candidate files
|
47
47
|
public/images/interviews/chris.ilias.knives.jpg
|
@@ -76,11 +76,11 @@ this is something we need to add to pullcrusher).
|
|
76
76
|
### GitHub Credentials
|
77
77
|
The first time you run pullcrusher, it will ask for your GitHub username
|
78
78
|
and password to obtain a oAuth token (or possibly just your password, if
|
79
|
-
it can locate your
|
79
|
+
it can locate your GitHub username in your git configuration). This is
|
80
80
|
totally cool and awesome, but if you don't want that token on your hard
|
81
81
|
drive for any reason, its located at `~/.config/pullcrusher.yml`.
|
82
82
|
|
83
|
-
We use this so we can use the
|
83
|
+
We use this so we can use the GitHub API to handle forking
|
84
84
|
repositories.
|
85
85
|
|
86
86
|
## Contributing
|
@@ -95,13 +95,7 @@ I'm trying to learn more about using tests so bonus points if you
|
|
95
95
|
include a test for your new functionality or fix. (Or, if you just want
|
96
96
|
to write some tests for existing functionality, that's awesome too!)
|
97
97
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
* Minimal error handling (somewhat taken care of since Methadone handles exceptions okay) √
|
103
|
-
* Handle your own repos not just others (cant do a pull request
|
104
|
-
really? I guess just leave it in branch and ask person to do
|
105
|
-
manually?) (PUNTING ON THIS TILL NEXT VERSION)
|
106
|
-
* Some very very basic tests, and setup travis-ci to ensure we run on
|
107
|
-
ruby 1.8.7 as well. √
|
98
|
+
NOTE: This was one of the first things I ever wrote in Ruby, and I was a much
|
99
|
+
poorer programmer back then! A pull request to clean it up and modernize it
|
100
|
+
would very welcome, but I've moved on to other projects and it isn't worth it
|
101
|
+
for me to do it myself since it currently performs its function.
|
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
data/lib/auth/github.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# stating point for this was this gist: https://gist.github.com/2771702
|
3
3
|
#
|
4
|
-
|
5
|
-
# Use Octokit 1.3.0 or higher for great justice (and Authorizations)
|
6
|
-
#require 'bundler/setup' #this was causing trouble with VERSION
|
7
4
|
require 'octokit'
|
8
5
|
require 'yaml'
|
9
6
|
require 'highline/import'
|
@@ -39,7 +36,7 @@ class GitHubAuth
|
|
39
36
|
auth = auth_client.create_authorization(:scopes => SCOPES, :note => NOTE)
|
40
37
|
end
|
41
38
|
File.open(CREDENTIALS, 'w') do |f|
|
42
|
-
f.puts({ :login => login, :
|
39
|
+
f.puts({ :login => login, :access_token => auth.token }.to_yaml)
|
43
40
|
end
|
44
41
|
end
|
45
42
|
|
@@ -48,8 +45,7 @@ class GitHubAuth
|
|
48
45
|
end
|
49
46
|
|
50
47
|
def ask_password
|
51
|
-
ask("Enter your
|
48
|
+
ask("Enter your GitHub password (this will NOT be stored): ") { |q| q.echo = '*' }
|
52
49
|
end
|
53
50
|
|
54
51
|
end
|
55
|
-
|
data/lib/pullcrusher.rb
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# NOTE: This was one of the first things I ever wrote in Ruby, & I was a _much_
|
2
|
+
# poorer programmer back then! A pull request to clean it up and modernize it
|
3
|
+
# would very welcome, but I've moved on to other projects and it isn't worth it
|
4
|
+
# for me to do it myself since it currently performs its function.
|
5
|
+
#
|
6
|
+
# Good luck.
|
7
|
+
#
|
8
|
+
# xoxo,
|
9
|
+
# -mroth
|
10
|
+
|
1
11
|
require "pullcrusher/version"
|
2
12
|
require "auth/github"
|
3
13
|
|
@@ -79,7 +89,7 @@ module Pullcrusher
|
|
79
89
|
#
|
80
90
|
# Returns an array containing both a Results hash, and the fs_repo reference that was cloned
|
81
91
|
def process_repo(repo_name)
|
82
|
-
info "*** Asking
|
92
|
+
info "*** Asking GitHub to find us the URI for #{repo_name}"
|
83
93
|
orig_repo = repo_from_shortname(repo_name)
|
84
94
|
|
85
95
|
info "*** Cloning #{orig_repo.ssh_url} to local filesystem"
|
@@ -175,6 +185,7 @@ module Pullcrusher
|
|
175
185
|
)
|
176
186
|
info "*** Done! Pull request is at #{pr.html_url}"
|
177
187
|
end
|
178
|
-
|
188
|
+
|
189
|
+
end
|
179
190
|
|
180
191
|
end
|
data/lib/pullcrusher/version.rb
CHANGED
data/pullcrusher.gemspec
CHANGED
@@ -2,25 +2,27 @@
|
|
2
2
|
require File.expand_path('../lib/pullcrusher/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.authors
|
6
|
-
gem.email
|
7
|
-
gem.
|
8
|
-
gem.
|
9
|
-
|
5
|
+
gem.authors = ["Matthew Rothenberg"]
|
6
|
+
gem.email = ["mrothenberg@gmail.com"]
|
7
|
+
gem.summary = "Optimize all images in a GitHub repo and make pull request."
|
8
|
+
gem.description = <<-EOF
|
9
|
+
Optimize all images in a GitHub repository losslessly, then easily send a
|
10
|
+
pull request with the changes for review.
|
11
|
+
EOF
|
12
|
+
gem.homepage = "http://github.com/mroth/pullcrusher"
|
13
|
+
gem.license = "MIT"
|
10
14
|
|
11
|
-
gem.add_development_dependency
|
12
|
-
gem.add_development_dependency
|
13
|
-
gem.add_development_dependency
|
15
|
+
gem.add_development_dependency 'rdoc', '~> 4.1.1'
|
16
|
+
gem.add_development_dependency 'aruba', '~> 0.6.1'
|
17
|
+
gem.add_development_dependency 'rake', '~> 10.3'
|
18
|
+
gem.add_development_dependency 'rspec', '~> 2.99'
|
14
19
|
|
15
|
-
gem.
|
16
|
-
|
17
|
-
gem.add_runtime_dependency
|
18
|
-
gem.add_runtime_dependency
|
19
|
-
gem.add_runtime_dependency
|
20
|
-
gem.add_runtime_dependency
|
21
|
-
gem.add_runtime_dependency "highline", "~>1.6.21"
|
22
|
-
gem.add_runtime_dependency "json" #needed for ruby 1.8 #TODO: figure out how to scope to platform?
|
23
|
-
gem.add_runtime_dependency "multipart-post", "~>1.2.0" #force version to avoid 1.9.3 install error?
|
20
|
+
gem.add_runtime_dependency 'methadone', '~> 1.7.0'
|
21
|
+
gem.add_runtime_dependency 'git', '~> 1.2.8'
|
22
|
+
gem.add_runtime_dependency 'octokit', '~> 3.3.1'
|
23
|
+
gem.add_runtime_dependency 'virtus', '~> 0.5.4' #1.0x breaks 1.8.7/1.9.2 compatibility
|
24
|
+
gem.add_runtime_dependency 'image_optim', '~> 0.15'
|
25
|
+
gem.add_runtime_dependency 'highline', '~> 1.6.21'
|
24
26
|
|
25
27
|
gem.files = `git ls-files`.split($\)
|
26
28
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -28,4 +30,6 @@ Gem::Specification.new do |gem|
|
|
28
30
|
gem.name = "pullcrusher"
|
29
31
|
gem.require_paths = ["lib"]
|
30
32
|
gem.version = Pullcrusher::VERSION
|
33
|
+
|
34
|
+
gem.required_ruby_version = '>= 1.9.2'
|
31
35
|
end
|
metadata
CHANGED
@@ -1,171 +1,158 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pullcrusher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Rothenberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.1.1
|
20
20
|
type: :development
|
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: 4.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: aruba
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.6.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.6.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '10.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '10.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
type: :
|
61
|
+
version: '2.99'
|
62
|
+
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '2.99'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: methadone
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.7.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: 1.7.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: git
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 1.2.8
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.2.8
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: octokit
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 3.3.1
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 3.3.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: virtus
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.5.4
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.5.4
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: image_optim
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: '0.15'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: '0.15'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :runtime
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: multipart-post
|
140
|
+
name: highline
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
156
142
|
requirements:
|
157
143
|
- - "~>"
|
158
144
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
145
|
+
version: 1.6.21
|
160
146
|
type: :runtime
|
161
147
|
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
149
|
requirements:
|
164
150
|
- - "~>"
|
165
151
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
167
|
-
description:
|
168
|
-
|
152
|
+
version: 1.6.21
|
153
|
+
description: |2
|
154
|
+
Optimize all images in a GitHub repository losslessly, then easily send a
|
155
|
+
pull request with the changes for review.
|
169
156
|
email:
|
170
157
|
- mrothenberg@gmail.com
|
171
158
|
executables:
|
@@ -193,7 +180,8 @@ files:
|
|
193
180
|
- test/test_git.rb
|
194
181
|
- test/test_github.rb
|
195
182
|
homepage: http://github.com/mroth/pullcrusher
|
196
|
-
licenses:
|
183
|
+
licenses:
|
184
|
+
- MIT
|
197
185
|
metadata: {}
|
198
186
|
post_install_message:
|
199
187
|
rdoc_options: []
|
@@ -203,19 +191,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
191
|
requirements:
|
204
192
|
- - ">="
|
205
193
|
- !ruby/object:Gem::Version
|
206
|
-
version:
|
194
|
+
version: 1.9.2
|
207
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
196
|
requirements:
|
209
|
-
- - "
|
197
|
+
- - ">="
|
210
198
|
- !ruby/object:Gem::Version
|
211
|
-
version:
|
199
|
+
version: '0'
|
212
200
|
requirements: []
|
213
201
|
rubyforge_project:
|
214
202
|
rubygems_version: 2.2.2
|
215
203
|
signing_key:
|
216
204
|
specification_version: 4
|
217
|
-
summary: Optimize all images in a GitHub
|
218
|
-
with the changes.
|
205
|
+
summary: Optimize all images in a GitHub repo and make pull request.
|
219
206
|
test_files:
|
220
207
|
- features/pullcrusher.feature
|
221
208
|
- features/step_definitions/pullcrusher_steps.rb
|