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 +4 -4
- data/README.md +29 -11
- data/Rakefile +4 -0
- data/app/models/gem_collector/repository.rb +1 -1
- data/lib/gem_collector/version.rb +1 -1
- metadata +5 -6
- data/lib/tasks/gem_collector_tasks.rake +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25e67b8c1f7b199a2d55f04e2ce16293b0f7fe68
|
4
|
+
data.tar.gz: 129bf391663a3fa28ef6401897dc2623d942061c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
@@ -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.]
|
82
|
+
"(regexp_split_to_array(regexp_replace(#{column_or_exp}, '\.[^0-9.]+$', ''), '[^0-9]+') :: bigint[])"
|
83
83
|
end
|
84
84
|
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.
|
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-
|
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.
|
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.
|
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.
|
190
|
+
rubygems_version: 2.6.11
|
192
191
|
signing_key:
|
193
192
|
specification_version: 4
|
194
193
|
summary: Collect gems used by applications
|