gist_updater 0.4.5 → 0.4.6

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
  SHA256:
3
- metadata.gz: 970aabc3c1fa183505e9778af6923892e9d7d32550df3ef1a174ded468ef118e
4
- data.tar.gz: f205afc4c763355043be0b0d3996b3361f5008a2cf109bb91e9b02f6bd248978
3
+ metadata.gz: 9712505000e40a55b9f9541e41b4df7fdedb7e984bcf1912ca8319cdd6bae3ae
4
+ data.tar.gz: 6f72273734fc4c03ae7de9aefdfb4dbbd83ed1dde4e6e0dcaaebb0ab4e95e7e5
5
5
  SHA512:
6
- metadata.gz: 93b9b6efa8887c1b5eab2e6b119966e1a67853e9128c2cd1cc70c2cfeee0407edd4a7e26ae49e050e22c7378f268e586f9d7106e8683f6db9706c0fc5981434d
7
- data.tar.gz: 1f22355b4a6447184b21ef8f044277d0f4d9aee3739b9ec726b2beb2537f316979a3757e9578ddda39c7ab172a7e6a40355dbaba348529009d8fb39fc0aebfd8
6
+ metadata.gz: ffc94492de1ae1625e01924555c145f7bcb0cd30232f3c91a39d90ccb9d54b014512119740d8c416e36fed742b738de34ae835373cf4129d0c34e22dd299c22c
7
+ data.tar.gz: 9e39f2a23cefcf948a15a2395b4ba78e2e7dc35bd4e260981e48c7e0486c1a3cd862a49cf95d1dc537a3bc0b5d3ea700688d2445762efa55e2fd9b6a536a2239
@@ -3,7 +3,7 @@ AllCops:
3
3
  - Rakefile
4
4
  - bin/*
5
5
  - vendor/**/*
6
- TargetRubyVersion: 2.2
6
+ TargetRubyVersion: 2.3
7
7
 
8
8
  Metrics/BlockLength:
9
9
  Exclude:
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.9
4
- - 2.3.6
5
- - 2.4.3
6
- - 2.5.0
3
+ - 2.5.1
4
+ - 2.4.4
5
+ - 2.3.7
7
6
  before_install: gem install -N bundler
8
- before_script: bundle exec rubocop
7
+ before_script:
8
+ - ./bin/validate-target-ruby-version.rb
9
+ - bundle exec rubocop
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'yaml'
4
+
5
+ # rubocop's TargetRubyVersion should be the oldest version in .travis.yml
6
+
7
+ target = YAML.load_file('.rubocop.yml')['AllCops']['TargetRubyVersion'].to_s
8
+ oldest = YAML.load_file('.travis.yml')['rvm'].min
9
+
10
+ exit 1 unless oldest.start_with?(target)
@@ -52,7 +52,8 @@ module GistUpdater
52
52
  end
53
53
 
54
54
  def pick_a_file(resource)
55
- resource.files[file_name] if resource
55
+ files = resource&.files
56
+ files[file_name] if files
56
57
  end
57
58
 
58
59
  # Update a Gist file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GistUpdater
4
- VERSION = '0.4.5'.freeze
4
+ VERSION = '0.4.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gist_updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Masuda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-14 00:00:00.000000000 Z
11
+ date: 2018-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
@@ -143,6 +143,7 @@ files:
143
143
  - Rakefile
144
144
  - bin/console
145
145
  - bin/setup
146
+ - bin/validate-target-ruby-version.rb
146
147
  - exe/gist_updater
147
148
  - gist_updater.gemspec
148
149
  - gist_updater.yml.example
@@ -173,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
174
  version: '0'
174
175
  requirements: []
175
176
  rubyforge_project:
176
- rubygems_version: 2.7.3
177
+ rubygems_version: 2.7.6
177
178
  signing_key:
178
179
  specification_version: 4
179
180
  summary: Updates your Gist files defined in YAML