targit 2.0.1 → 2.0.2

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: 4d5af52f31f0edde2574cf143e782216ba207078
4
- data.tar.gz: e5a0394194eb4e149c7627af42e73670d57e8f34
3
+ metadata.gz: 2efa0aed47550747427bd8829df163e7c2e3bbb8
4
+ data.tar.gz: 8dd30e7659ceed401b0c194ffa4383139a47616b
5
5
  SHA512:
6
- metadata.gz: 4eb183cecad0c4c2d94b94ef3e353b61ccf791828ffa3168912d6a3e2c33695213c30928e84801d3198de587dd1f1a7c5ef5d7735931ccc77f7e03ee994f1c63
7
- data.tar.gz: d035ace96f3a6e823134d9beddb1133c834521a44293cc30652dfe2df48d5b21f046a220c336e7358a03d26bdfb53c7425ed21e8493180992daf827fee5d81e8
6
+ metadata.gz: 556daa0e317c44b9e03a17c28bd1ae2f5137bf7bea413da791f4767a24ac04b7d169729058457797fd340bcf4479f437d855b8af9b5a990a8f4c1143ee591e6e
7
+ data.tar.gz: fc26a26c6b4aa7e7db04260d97dd857f7ceb54a408621ca0c1a90fc1bb7a5ccb7b91d0632c5db4d234e18924ead43b9cdab5a5b082819f5ac8c065cd90bcb373
data/.circle-ruby ADDED
@@ -0,0 +1,3 @@
1
+ 2.4.1
2
+ 2.3.4
3
+ 2.2.7
data/.rubocop.yml CHANGED
@@ -1,2 +1,5 @@
1
1
  Encoding:
2
2
  Enabled: false
3
+ Metrics/BlockLength:
4
+ Exclude:
5
+ - spec/**/*
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.0.2 / 2017-04-27
2
+
3
+ * [ENHANCEMENT] Update version w/ new dependency pins
4
+
1
5
  # 2.0.1 / 2016-01-23
2
6
 
3
7
  * [BUGFIX] Update scopes for auth file
data/README.md CHANGED
@@ -3,7 +3,7 @@ targit
3
3
 
4
4
  [![Gem Version](https://img.shields.io/gem/v/targit.svg)](https://rubygems.org/gems/targit)
5
5
  [![Dependency Status](https://img.shields.io/gemnasium/akerl/targit.svg)](https://gemnasium.com/akerl/targit)
6
- [![Build Status](https://img.shields.io/circleci/project/akerl/targit.svg)](https://circleci.com/gh/akerl/targit)
6
+ [![Build Status](https://img.shields.io/circleci/project/akerl/targit/master.svg)](https://circleci.com/gh/akerl/targit)
7
7
  [![Coverage Status](https://img.shields.io/codecov/c/github/akerl/targit.svg)](https://codecov.io/github/akerl/targit)
8
8
  [![Code Quality](https://img.shields.io/codacy/596c329739534caeb1df1f14a5381355.svg)](https://www.codacy.com/app/akerl/targit)
9
9
  [![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)
data/bin/targit CHANGED
@@ -9,6 +9,7 @@ def upload(file, repo, tag, options)
9
9
  puts "Successfully created asset! #{asset.url}"
10
10
  end
11
11
 
12
+ # rubocop:disable Metrics/BlockLength
12
13
  Mercenary.program(:targit) do |p|
13
14
  p.version Targit::VERSION
14
15
  p.description 'Tool for adding GitHub release assets'
@@ -28,13 +29,13 @@ Mercenary.program(:targit) do |p|
28
29
  if !repo || !tag
29
30
  puts p
30
31
  elsif !ARGV.empty?
31
- ARGV.each { |file| fail("#{file} not found") unless File.exist? file }
32
+ ARGV.each { |file| raise("#{file} not found") unless File.exist? file }
32
33
  ARGV.each do |file|
33
34
  puts "Adding #{file} on #{tag} of #{repo}"
34
35
  upload file, repo, tag, options
35
36
  end
36
37
  elsif !STDIN.tty?
37
- fail('Name required if file is passed via STDIN') unless options[:name]
38
+ raise('Name required if file is passed via STDIN') unless options[:name]
38
39
  upload STDIN, repo, tag, options
39
40
  else
40
41
  puts p
data/circle.yml CHANGED
@@ -1,10 +1,7 @@
1
1
  dependencies:
2
2
  override:
3
- - 'rvm-exec 2.0.0-p645 bundle install'
4
- - 'rvm-exec 2.1.6 bundle install'
5
- - 'rvm-exec 2.2.2 bundle install'
3
+ - 'for i in $(cat .circle-ruby) ; do rvm-exec $i gem update --system --no-doc || exit 1 ; done'
4
+ - 'for i in $(cat .circle-ruby) ; do rvm-exec $i bundle install || exit 1 ; done'
6
5
  test:
7
6
  override:
8
- - 'rvm-exec 2.0.0-p645 bundle exec rake'
9
- - 'rvm-exec 2.1.6 bundle exec rake'
10
- - 'rvm-exec 2.2.2 bundle exec rake'
7
+ - 'for i in $(cat .circle-ruby) ; do rvm-exec $i bundle exec rake || exit 1 ; done'
data/lib/targit/asset.rb CHANGED
@@ -21,7 +21,7 @@ module Targit
21
21
 
22
22
  def upload!
23
23
  delete! if @options[:force]
24
- fail('Release asset already exists') if already_exists?
24
+ raise('Release asset already exists') if already_exists?
25
25
  asset = client.upload_asset @release.data[:url], @asset, @upload_options
26
26
  client.release_asset asset[:url]
27
27
  end
@@ -42,7 +42,7 @@ module Targit
42
42
 
43
43
  def url
44
44
  data = github_data
45
- data ? data[:browser_download_url] : fail('Asset URL not found')
45
+ data ? data[:browser_download_url] : raise('Asset URL not found')
46
46
  end
47
47
 
48
48
  private
@@ -52,7 +52,7 @@ module Targit
52
52
  end
53
53
 
54
54
  def _upload_options
55
- options = [:name, :content_type].each_with_object({}) do |option, hash|
55
+ options = %i[name content_type].each_with_object({}) do |option, hash|
56
56
  hash[option] = @options[option] if @options[option]
57
57
  end
58
58
  options[:content_type] ||= guess_type
@@ -12,7 +12,7 @@ module Targit
12
12
  @options = params
13
13
  @options[:client] ||= client
14
14
  create if @options.include?(:create) && data.nil?
15
- fail('No release found') if data.nil?
15
+ raise('No release found') if data.nil?
16
16
  end
17
17
 
18
18
  def data
@@ -32,7 +32,7 @@ module Targit
32
32
  def create_options
33
33
  opts = {}
34
34
  opts[:name] = @options[:release_name] if @options[:release_name]
35
- [:prerelease, :target_commitish].each_with_object(opts) do |option, hash|
35
+ %i[prerelease target_commitish].each_with_object(opts) do |option, hash|
36
36
  hash[option] = @options[option] if @options[option]
37
37
  end
38
38
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  ##
3
4
  # Set the version (needed for Mercenary -v)
4
5
  module Targit
5
- VERSION = '2.0.1'.freeze
6
+ VERSION = '2.0.2'.freeze
6
7
  end
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,9 @@ end
9
9
 
10
10
  require 'rspec'
11
11
  require 'targit'
12
+ require 'webmock'
13
+
14
+ WebMock.enable!
12
15
 
13
16
  unless File.exist? 'spec/.creds'
14
17
  File.open('spec/.creds', 'w') do |fh|
@@ -22,7 +25,7 @@ VCR.configure do |c|
22
25
  c.hook_into :webmock
23
26
  c.before_record do |i|
24
27
  i.request.headers.delete 'Authorization'
25
- %w(Etag X-Github-Request-Id X-Served-By).each do |header|
28
+ %w[Etag X-Github-Request-Id X-Served-By].each do |header|
26
29
  i.response.headers.delete header
27
30
  end
28
31
  end
data/targit.gemspec CHANGED
@@ -17,16 +17,16 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files spec/*`.split
18
18
  s.executables = ['targit']
19
19
 
20
- s.add_dependency 'octokit', '~> 4.2.0'
21
- s.add_dependency 'octoauth', '~> 1.4.0'
20
+ s.add_dependency 'octokit', '~> 4.7.0'
21
+ s.add_dependency 'octoauth', '~> 1.4.7'
22
22
  s.add_dependency 'mercenary', '~> 0.3.4'
23
23
  s.add_dependency 'mime-types', '~> 3.0'
24
24
 
25
- s.add_development_dependency 'rubocop', '~> 0.36.0'
26
- s.add_development_dependency 'rake', '~> 10.5.0'
25
+ s.add_development_dependency 'rubocop', '~> 0.48.0'
26
+ s.add_development_dependency 'rake', '~> 12.0.0'
27
27
  s.add_development_dependency 'codecov', '~> 0.1.1'
28
- s.add_development_dependency 'rspec', '~> 3.4.0'
29
- s.add_development_dependency 'fuubar', '~> 2.0.0'
30
- s.add_development_dependency 'webmock', '~> 1.22.0'
28
+ s.add_development_dependency 'rspec', '~> 3.5.0'
29
+ s.add_development_dependency 'fuubar', '~> 2.2.0'
30
+ s.add_development_dependency 'webmock', '~> 3.0.0'
31
31
  s.add_development_dependency 'vcr', '~> 3.0.0'
32
32
  end
metadata CHANGED
@@ -1,167 +1,167 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: targit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-24 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0
19
+ version: 4.7.0
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: 4.2.0
26
+ version: 4.7.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: octoauth
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 1.4.0
33
+ version: 1.4.7
34
34
  type: :runtime
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: 1.4.0
40
+ version: 1.4.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mercenary
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.3.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.3.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mime-types
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: 0.36.0
75
+ version: 0.48.0
76
76
  type: :development
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: 0.36.0
82
+ version: 0.48.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: 10.5.0
89
+ version: 12.0.0
90
90
  type: :development
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: 10.5.0
96
+ version: 12.0.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: codecov
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.1.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.1.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 3.4.0
117
+ version: 3.5.0
118
118
  type: :development
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: 3.4.0
124
+ version: 3.5.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: fuubar
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
- version: 2.0.0
131
+ version: 2.2.0
132
132
  type: :development
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: 2.0.0
138
+ version: 2.2.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: webmock
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
- version: 1.22.0
145
+ version: 3.0.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
- version: 1.22.0
152
+ version: 3.0.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: vcr
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ~>
158
158
  - !ruby/object:Gem::Version
159
159
  version: 3.0.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ~>
165
165
  - !ruby/object:Gem::Version
166
166
  version: 3.0.0
167
167
  description: Manages GitHub release assets for pushing binaries and other large files
@@ -171,10 +171,11 @@ executables:
171
171
  extensions: []
172
172
  extra_rdoc_files: []
173
173
  files:
174
- - ".gitignore"
175
- - ".prospectus"
176
- - ".rspec"
177
- - ".rubocop.yml"
174
+ - .circle-ruby
175
+ - .gitignore
176
+ - .prospectus
177
+ - .rspec
178
+ - .rubocop.yml
178
179
  - CHANGELOG.md
179
180
  - Gemfile
180
181
  - LICENSE
@@ -224,17 +225,17 @@ require_paths:
224
225
  - lib
225
226
  required_ruby_version: !ruby/object:Gem::Requirement
226
227
  requirements:
227
- - - ">="
228
+ - - '>='
228
229
  - !ruby/object:Gem::Version
229
230
  version: '0'
230
231
  required_rubygems_version: !ruby/object:Gem::Requirement
231
232
  requirements:
232
- - - ">="
233
+ - - '>='
233
234
  - !ruby/object:Gem::Version
234
235
  version: '0'
235
236
  requirements: []
236
237
  rubyforge_project:
237
- rubygems_version: 2.5.1
238
+ rubygems_version: 2.0.14.1
238
239
  signing_key:
239
240
  specification_version: 4
240
241
  summary: Tool for adding GitHub release assets