gem_collector 1.0.0 → 1.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: 1fe2c15637de46fba3c2a0c0018de249256364f1
4
- data.tar.gz: 17c6f80072475e010cdc77e5a4bd707f8202590f
3
+ metadata.gz: 25e67b8c1f7b199a2d55f04e2ce16293b0f7fe68
4
+ data.tar.gz: 129bf391663a3fa28ef6401897dc2623d942061c
5
5
  SHA512:
6
- metadata.gz: 9d6e030866974a479fed1d725112a9edc09f30d1c9c4da49ee354e3115eef3a20e36ac2d1f01320e159f1a4236a41ca7b5b7dbe48e70d629a3dd8f9691e6002c
7
- data.tar.gz: 8174947d708aea1323bd7d47cb171e1cdb5b1b53883794432b95fed6a89253c1c2b1b0229a4354b8471e65af747b2821043d2612cd964f38e1f7d913922c59e9
6
+ metadata.gz: 633e54bcef1f4a193b706bc979632ca24a8adc2ae0ed1f24ae88a329b9dbbdd346b2d3bdf28514127983a67bac6c3f47067ef96cded530dc42dd7f8d366f9f7f
7
+ data.tar.gz: 41798482b755f2ecaef11addbd65d361256afc8b72a4bf9248b15cfebeb9b6a820f1d9b6c15d2519a7165839cbbec9d8e4fe78a95f0c81372dd2dd9b1cd653c1
data/README.md CHANGED
@@ -1,26 +1,34 @@
1
1
  # GemCollector
2
+ [![Gem Version](https://badge.fury.io/rb/gem_collector.svg)](https://badge.fury.io/rb/gem_collector)
3
+ [![Build Status](https://travis-ci.org/cookpad/gem_collector.svg?branch=master)](https://travis-ci.org/cookpad/gem_collector)
4
+
2
5
  Collect gems used by applications.
3
6
 
7
+ - Collect Gemfile.lock of the repository via GitHub webhook
8
+ - Show gem versions of the repository
9
+ - Show repositories using the gem
10
+ - Show "how up-to-date?" of the repository
11
+ - Create a issue to repositories using the gem
12
+
4
13
  ## Usage
5
- How to use my plugin.
14
+ There're two ways to add GemCollector webhook to repository.
15
+
16
+ ### Add webhook from repository setting
17
+ Visit `https://github.com/:user/:repo/settings/hooks` and add `https://gem-collector.example.com/github-webhook` with `push` event.
18
+
19
+ ### Add webhook from GemCollector
20
+ Visit `https://gem-collector.example.com/repositories/new` and enter repository location.
21
+ It will automatically add `ENV['WEBHOOK_URL']` with `push` event.
6
22
 
7
23
  ## Installation
24
+ ### Gemfile
8
25
  Add this line to your application's Gemfile:
9
26
 
10
27
  ```ruby
11
28
  gem 'gem_collector'
12
29
  ```
13
30
 
14
- And then execute:
15
- ```bash
16
- $ bundle
17
- ```
18
-
19
- Or install it yourself as:
20
- ```bash
21
- $ gem install gem_collector
22
- ```
23
-
31
+ ### Octokit
24
32
  Put config/octokit.yml like below.
25
33
 
26
34
  ```yaml
@@ -40,6 +48,7 @@ production:
40
48
  <<: *default
41
49
  ```
42
50
 
51
+ ### Database
43
52
  Configure database.yml. GemCollector requires PostgreSQL.
44
53
 
45
54
  ```yaml
@@ -53,6 +62,7 @@ production:
53
62
  url: <%= ENV['DATABASE_URL'] %>
54
63
  ```
55
64
 
65
+ ### ActiveJob
56
66
  Configure ActiveJob adapter. We're using [Barbeque](https://github.com/cookpad/barbeque), but other adapters should work.
57
67
 
58
68
  ```ruby
@@ -73,6 +83,14 @@ BarbequeClient.configure do |config|
73
83
  end
74
84
  ```
75
85
 
86
+ ### Environment variables
87
+ - `WEBHOOK_URL` (required when `/repositories/new` is used)
88
+ - URL to be added when the repository is registered from `/repositories/new`
89
+ - Example: `https://gem-collector.example.com/github-webhook`
90
+ - `DEFAULT_GITHUB_SITE` (optional: default to `github.com`)
91
+ - Placeholder site for `/repositories/new`
92
+ - Example: `github-enterprise.example.com`
93
+
76
94
  ## Contributing
77
95
  Contribution directions go here.
78
96
 
data/Rakefile CHANGED
@@ -23,3 +23,7 @@ load 'rails/tasks/statistics.rake'
23
23
 
24
24
 
25
25
  require 'bundler/gem_tasks'
26
+
27
+ require 'rspec/core/rake_task'
28
+ RSpec::Core::RakeTask.new(:spec)
29
+ task default: :spec
@@ -79,6 +79,6 @@ class GemCollector::Repository < GemCollector::ApplicationRecord
79
79
  end
80
80
 
81
81
  private_class_method def self.build_version_exp(column_or_exp)
82
- "(regexp_split_to_array(regexp_replace(#{column_or_exp}, '\.[^0-9.].+$', ''), '[^0-9]+') :: bigint[])"
82
+ "(regexp_split_to_array(regexp_replace(#{column_or_exp}, '\.[^0-9.]+$', ''), '[^0-9]+') :: bigint[])"
83
83
  end
84
84
  end
@@ -1,3 +1,3 @@
1
1
  module GemCollector
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohei Suzuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-21 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-import
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 5.0.2
89
+ version: 5.1.3
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: 5.0.2
96
+ version: 5.1.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-rails
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -167,7 +167,6 @@ files:
167
167
  - lib/gem_collector.rb
168
168
  - lib/gem_collector/engine.rb
169
169
  - lib/gem_collector/version.rb
170
- - lib/tasks/gem_collector_tasks.rake
171
170
  homepage: https://github.com/cookpad/gem_collector
172
171
  licenses:
173
172
  - MIT
@@ -188,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
187
  version: '0'
189
188
  requirements: []
190
189
  rubyforge_project:
191
- rubygems_version: 2.6.10
190
+ rubygems_version: 2.6.11
192
191
  signing_key:
193
192
  specification_version: 4
194
193
  summary: Collect gems used by applications
@@ -1,6 +0,0 @@
1
- namespace :gem_collector do
2
- namespace :ridgepole do
3
- desc 'Apply Schemafile' do
4
- end
5
- end
6
- end