pullcrusher 0.0.3.pre1 → 0.1.0

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: 1f869c22918ee3116e6103601447d99bc5c24a11
4
- data.tar.gz: 7c5043665918be9d824990e02e4d40820ce9b442
3
+ metadata.gz: 2ffcee52b7af88d0bb7e4f49dcbce96e6fdf9595
4
+ data.tar.gz: 2ddb060c09ba71d4bdc6416bb742acde3ad2a33e
5
5
  SHA512:
6
- metadata.gz: 109a97919fa854572bf9beb7d22d68a03245a042696766c0e88a95628afaaad866feb9a606ef2be436bad3ea0709c300c4858a78cce7afbc44d837bf63e10a9a
7
- data.tar.gz: a248d2dab1c8f0a1a9719919bd8802a10fe8579254d74b6ac8c0035ba95336f62e639f1e8cf285a079d591d6717e3a0fdb662f10249a41ce6299066e8a526d56
6
+ metadata.gz: d9fd8f250cd64deb9b17860d6dd4e121dd43caa717fc532cb32b16c672ab363729a51aa4257f28600b858983a3ce097e85e76b99e7ecb6ba3cf6c18f21967368
7
+ data.tar.gz: f07627aee9fd6ef0cba0dc0cdc8406316b290bdd59d938cd559627c0bcc8ee041a15ed1187e156eae795edf92d58be66e580f80908d607c86fa7e64ef44321bf
@@ -1,6 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
3
  - 1.9.2
5
4
  - 1.9.3
6
5
  - 2.0.0
data/Brewfile CHANGED
@@ -6,3 +6,4 @@ install jpegoptim
6
6
  install jpeg
7
7
  install optipng
8
8
  install pngcrush
9
+ install pngquant
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
- [![Build Status](https://secure.travis-ci.org/mroth/pullcrusher.png?branch=master)](http://travis-ci.org/mroth/pullcrusher)
12
- [![Dependency Status](https://gemnasium.com/mroth/pullcrusher.png)](https://gemnasium.com/mroth/pullcrusher)
11
+ [![Build Status](https://secure.travis-ci.org/mroth/pullcrusher.svg?branch=master)](http://travis-ci.org/mroth/pullcrusher)
12
+ [![Dependency Status](https://gemnasium.com/mroth/pullcrusher.svg)](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 Github to find us the URI for waferbaby/usesthis
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 Github username in your git configuration). This is
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 Github API to handle forking
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
- ## TODO
99
- Things that still need to be done before v0.0.1 of this gem gets
100
- released.
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.
@@ -8,7 +8,7 @@ DESCRIBE YOUR GEM HERE
8
8
 
9
9
  == Links
10
10
 
11
- * {Source on Github}[LINK TO GITHUB]
11
+ * {Source on GitHub}[LINK TO GITHUB]
12
12
  * RDoc[LINK TO RDOC.INFO]
13
13
 
14
14
  == Install
@@ -16,4 +16,3 @@ DESCRIBE YOUR GEM HERE
16
16
  == Examples
17
17
 
18
18
  == Contributing
19
-
data/Rakefile CHANGED
@@ -26,11 +26,8 @@ Cucumber::Rake::Task.new(:features) do |t|
26
26
  end
27
27
 
28
28
  Rake::RDocTask.new do |rd|
29
-
30
29
  rd.main = "README.rdoc"
31
-
32
30
  rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
33
31
  end
34
32
 
35
33
  task :default => [:test,:features]
36
-
@@ -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, :oauth_token => auth.token }.to_yaml)
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 Github password (this will NOT be stored): ") { |q| q.echo = '*' }
48
+ ask("Enter your GitHub password (this will NOT be stored): ") { |q| q.echo = '*' }
52
49
  end
53
50
 
54
51
  end
55
-
@@ -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 Github to find us the URI for #{repo_name}"
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
- end
188
+
189
+ end
179
190
 
180
191
  end
@@ -1,3 +1,3 @@
1
1
  module Pullcrusher
2
- VERSION = "0.0.3.pre1"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -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 = ["Matthew Rothenberg"]
6
- gem.email = ["mrothenberg@gmail.com"]
7
- gem.description = %q{Optimize all images in a GitHub repository, then easily send a pull request with the changes.}
8
- gem.summary = %q{Optimize all images in a GitHub repository, then easily send a pull request with the changes.}
9
- gem.homepage = "http://github.com/mroth/pullcrusher"
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('rdoc')
12
- gem.add_development_dependency('aruba')
13
- gem.add_development_dependency('rake','~> 0.9.2')
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.add_dependency('methadone', '~>1.3.2')
16
-
17
- gem.add_runtime_dependency "git", "~>1.2.6"
18
- gem.add_runtime_dependency "octokit", "~>1.3" #1.3.0 added authorizations, 2.x adds breaking changes
19
- gem.add_runtime_dependency "virtus", "~>0.5.4" #1.0x breaks 1.8.7/1.9.2 compatibility
20
- gem.add_runtime_dependency "image_optim", "~>0.12.1"
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.3.pre1
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-03-18 00:00:00.000000000 Z
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: '0'
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: '0'
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: '0'
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: '0'
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: 0.9.2
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: 0.9.2
54
+ version: '10.3'
55
55
  - !ruby/object:Gem::Dependency
56
- name: methadone
56
+ name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.3.2
62
- type: :runtime
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: 1.3.2
68
+ version: '2.99'
69
69
  - !ruby/object:Gem::Dependency
70
- name: git
70
+ name: methadone
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.2.6
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.2.6
82
+ version: 1.7.0
83
83
  - !ruby/object:Gem::Dependency
84
- name: octokit
84
+ name: git
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.3'
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: '1.3'
96
+ version: 1.2.8
97
97
  - !ruby/object:Gem::Dependency
98
- name: virtus
98
+ name: octokit
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.5.4
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: 0.5.4
110
+ version: 3.3.1
111
111
  - !ruby/object:Gem::Dependency
112
- name: image_optim
112
+ name: virtus
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.12.1
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.12.1
124
+ version: 0.5.4
125
125
  - !ruby/object:Gem::Dependency
126
- name: highline
126
+ name: image_optim
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.6.21
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: 1.6.21
138
+ version: '0.15'
139
139
  - !ruby/object:Gem::Dependency
140
- name: json
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.2.0
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.2.0
167
- description: Optimize all images in a GitHub repository, then easily send a pull request
168
- with the changes.
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: '0'
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: 1.3.1
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 repository, then easily send a pull request
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