circleci-bundle-update-pr 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +5 -5
- data/.rspec +4 -0
- data/Gemfile.lock +16 -1
- data/circleci-bundle-update-pr.gemspec +1 -0
- data/lib/circleci/bundle/update/pr.rb +2 -2
- data/lib/circleci/bundle/update/pr/version.rb +1 -1
- data/spec/circleci/bundle/update/pr_spec.rb +21 -0
- data/spec/spec_helper.rb +102 -0
- metadata +22 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1d92f8cd11f20a795228b31634a9b9438e43737b926b8ce375e09e36143b9da
|
4
|
+
data.tar.gz: 4964a2668e8124b9b2421893419c3b83c95639b279539b4dd2073ab99a8134dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e665445e3504a1ea055578ad11025ec05fa380c4feade2ca3ec5b1a60ed50f1e7be9f95fb642a96abf33183cbfca43ca7f90968306d931585bb5ba6e9eaf392
|
7
|
+
data.tar.gz: 4c240992f51d70d8a0a81a3a0d623065b2b9a9d139f0cf1a0725288c7ea01b439d35b9c41078ae99c71d045987453b0b8b415d71a99dc0d6d7f02582b86de2df
|
data/.circleci/config.yml
CHANGED
@@ -2,7 +2,7 @@ version: 2
|
|
2
2
|
jobs:
|
3
3
|
build:
|
4
4
|
docker: &docker
|
5
|
-
- image: ruby:2.
|
5
|
+
- image: ruby:2.5.1-alpine
|
6
6
|
working_directory: /work
|
7
7
|
steps:
|
8
8
|
- run: &setup_requirements
|
@@ -31,6 +31,9 @@ jobs:
|
|
31
31
|
key: gems-{{ .Environment.COMMON_CACHE_KEY }}-{{ checksum "Gemfile.lock" }}
|
32
32
|
paths:
|
33
33
|
- /usr/local/bundle
|
34
|
+
- run:
|
35
|
+
name: Run RSpec
|
36
|
+
command: rspec
|
34
37
|
continuous_bundle_update:
|
35
38
|
docker: *docker
|
36
39
|
working_directory: /work
|
@@ -50,10 +53,7 @@ workflows:
|
|
50
53
|
version: 2
|
51
54
|
build:
|
52
55
|
jobs:
|
53
|
-
- build
|
54
|
-
filters:
|
55
|
-
branches:
|
56
|
-
only: master
|
56
|
+
- build
|
57
57
|
nightly:
|
58
58
|
triggers:
|
59
59
|
- schedule:
|
data/.rspec
ADDED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
circleci-bundle-update-pr (1.9.
|
4
|
+
circleci-bundle-update-pr (1.9.1)
|
5
5
|
compare_linker (>= 1.4.0)
|
6
6
|
octokit
|
7
7
|
|
@@ -13,6 +13,7 @@ GEM
|
|
13
13
|
compare_linker (1.4.0)
|
14
14
|
httpclient
|
15
15
|
octokit
|
16
|
+
diff-lcs (1.3)
|
16
17
|
faraday (0.15.2)
|
17
18
|
multipart-post (>= 1.2, < 3)
|
18
19
|
httpclient (2.8.3)
|
@@ -21,6 +22,19 @@ GEM
|
|
21
22
|
sawyer (~> 0.8.0, >= 0.5.3)
|
22
23
|
public_suffix (3.0.2)
|
23
24
|
rake (12.3.1)
|
25
|
+
rspec (3.7.0)
|
26
|
+
rspec-core (~> 3.7.0)
|
27
|
+
rspec-expectations (~> 3.7.0)
|
28
|
+
rspec-mocks (~> 3.7.0)
|
29
|
+
rspec-core (3.7.1)
|
30
|
+
rspec-support (~> 3.7.0)
|
31
|
+
rspec-expectations (3.7.0)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.7.0)
|
34
|
+
rspec-mocks (3.7.0)
|
35
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
+
rspec-support (~> 3.7.0)
|
37
|
+
rspec-support (3.7.1)
|
24
38
|
sawyer (0.8.1)
|
25
39
|
addressable (>= 2.3.5, < 2.6)
|
26
40
|
faraday (~> 0.8, < 1.0)
|
@@ -34,6 +48,7 @@ DEPENDENCIES
|
|
34
48
|
bundler
|
35
49
|
circleci-bundle-update-pr!
|
36
50
|
rake
|
51
|
+
rspec (~> 3.7)
|
37
52
|
|
38
53
|
BUNDLED WITH
|
39
54
|
1.16.2
|
@@ -87,10 +87,10 @@ Powered by [compare_linker](https://rubygems.org/gems/compare_linker)
|
|
87
87
|
private_class_method :github_access_token
|
88
88
|
|
89
89
|
def self.github_host
|
90
|
-
# A format like git@github.com:masutaka/compare_linker.git
|
91
|
-
return $1 if ENV['CIRCLE_REPOSITORY_URL'] =~ %r{([^@]+?):}
|
92
90
|
# A format like https://github.com/masutaka/circleci-bundle-update-pr.git
|
93
91
|
return $1 if ENV['CIRCLE_REPOSITORY_URL'] =~ %r{https://(.+?)/}
|
92
|
+
# A format like git@github.com:masutaka/compare_linker.git
|
93
|
+
return $1 if ENV['CIRCLE_REPOSITORY_URL'] =~ %r{([^@]+?):}
|
94
94
|
'github.com'
|
95
95
|
end
|
96
96
|
private_class_method :github_host
|
@@ -0,0 +1,21 @@
|
|
1
|
+
describe Circleci::Bundle::Update::Pr do
|
2
|
+
describe '.github_host' do
|
3
|
+
subject { Circleci::Bundle::Update::Pr.send(:github_host) }
|
4
|
+
after { ENV['CIRCLE_REPOSITORY_URL'] = nil }
|
5
|
+
|
6
|
+
context 'given git@github.com:masutaka/compare_linker.git' do
|
7
|
+
before { ENV['CIRCLE_REPOSITORY_URL'] = 'git@github.com:masutaka/compare_linker.git' }
|
8
|
+
it { is_expected.to eq 'github.com' }
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'given https://github.com/masutaka/circleci-bundle-update-pr.git' do
|
12
|
+
before { ENV['CIRCLE_REPOSITORY_URL'] = 'https://github.com/masutaka/circleci-bundle-update-pr.git' }
|
13
|
+
it { is_expected.to eq 'github.com' }
|
14
|
+
end
|
15
|
+
|
16
|
+
context 'given nil' do
|
17
|
+
before { ENV['CIRCLE_REPOSITORY_URL'] = nil }
|
18
|
+
it { is_expected.to eq 'github.com' }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
require 'circleci/bundle/update/pr'
|
2
|
+
|
3
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
4
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
5
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
6
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
7
|
+
# files.
|
8
|
+
#
|
9
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
10
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
11
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
12
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
13
|
+
# a separate helper file that requires the additional dependencies and performs
|
14
|
+
# the additional setup, and require it from the spec files that actually need
|
15
|
+
# it.
|
16
|
+
#
|
17
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
18
|
+
RSpec.configure do |config|
|
19
|
+
# rspec-expectations config goes here. You can use an alternate
|
20
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
21
|
+
# assertions if you prefer.
|
22
|
+
config.expect_with :rspec do |expectations|
|
23
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
24
|
+
# and `failure_message` of custom matchers include text for helper methods
|
25
|
+
# defined using `chain`, e.g.:
|
26
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
27
|
+
# # => "be bigger than 2 and smaller than 4"
|
28
|
+
# ...rather than:
|
29
|
+
# # => "be bigger than 2"
|
30
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
31
|
+
end
|
32
|
+
|
33
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
34
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
35
|
+
config.mock_with :rspec do |mocks|
|
36
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
37
|
+
# a real object. This is generally recommended, and will default to
|
38
|
+
# `true` in RSpec 4.
|
39
|
+
mocks.verify_partial_doubles = true
|
40
|
+
end
|
41
|
+
|
42
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
43
|
+
# have no way to turn it off -- the option exists only for backwards
|
44
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
45
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
46
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
47
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
48
|
+
|
49
|
+
# The settings below are suggested to provide a good initial experience
|
50
|
+
# with RSpec, but feel free to customize to your heart's content.
|
51
|
+
=begin
|
52
|
+
# This allows you to limit a spec run to individual examples or groups
|
53
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
54
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
55
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
56
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
57
|
+
config.filter_run_when_matching :focus
|
58
|
+
|
59
|
+
# Allows RSpec to persist some state between runs in order to support
|
60
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
61
|
+
# you configure your source control system to ignore this file.
|
62
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
63
|
+
|
64
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
65
|
+
# recommended. For more details, see:
|
66
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
67
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
68
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
69
|
+
config.disable_monkey_patching!
|
70
|
+
|
71
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
72
|
+
# be too noisy due to issues in dependencies.
|
73
|
+
config.warnings = true
|
74
|
+
|
75
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
76
|
+
# file, and it's useful to allow more verbose output when running an
|
77
|
+
# individual spec file.
|
78
|
+
if config.files_to_run.one?
|
79
|
+
# Use the documentation formatter for detailed output,
|
80
|
+
# unless a formatter has already been configured
|
81
|
+
# (e.g. via a command-line flag).
|
82
|
+
config.default_formatter = "doc"
|
83
|
+
end
|
84
|
+
|
85
|
+
# Print the 10 slowest examples and example groups at the
|
86
|
+
# end of the spec run, to help surface which specs are running
|
87
|
+
# particularly slow.
|
88
|
+
config.profile_examples = 10
|
89
|
+
|
90
|
+
# Run specs in random order to surface order dependencies. If you find an
|
91
|
+
# order dependency and want to debug it, you can fix the order by providing
|
92
|
+
# the seed, which is printed after each run.
|
93
|
+
# --seed 1234
|
94
|
+
config.order = :random
|
95
|
+
|
96
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
97
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
98
|
+
# test failures related to randomization by passing the same `--seed` value
|
99
|
+
# as the one that triggered the failure.
|
100
|
+
Kernel.srand config.seed
|
101
|
+
=end
|
102
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circleci-bundle-update-pr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Masuda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.7'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.7'
|
69
83
|
description: A script for continues bundle update. Use in CircleCI
|
70
84
|
email:
|
71
85
|
- masutaka.net@gmail.com
|
@@ -76,6 +90,7 @@ extra_rdoc_files: []
|
|
76
90
|
files:
|
77
91
|
- ".circleci/config.yml"
|
78
92
|
- ".gitignore"
|
93
|
+
- ".rspec"
|
79
94
|
- Gemfile
|
80
95
|
- Gemfile.lock
|
81
96
|
- LICENSE.txt
|
@@ -86,6 +101,8 @@ files:
|
|
86
101
|
- circleci-bundle-update-pr.gemspec
|
87
102
|
- lib/circleci/bundle/update/pr.rb
|
88
103
|
- lib/circleci/bundle/update/pr/version.rb
|
104
|
+
- spec/circleci/bundle/update/pr_spec.rb
|
105
|
+
- spec/spec_helper.rb
|
89
106
|
homepage: https://github.com/masutaka/circleci-bundle-update-pr
|
90
107
|
licenses:
|
91
108
|
- MIT
|
@@ -110,4 +127,6 @@ rubygems_version: 2.7.6
|
|
110
127
|
signing_key:
|
111
128
|
specification_version: 4
|
112
129
|
summary: Create GitHub PullRequest of bundle update in CircleCI
|
113
|
-
test_files:
|
130
|
+
test_files:
|
131
|
+
- spec/circleci/bundle/update/pr_spec.rb
|
132
|
+
- spec/spec_helper.rb
|