veye 0.0.9 → 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +80 -29
- data/Makefile +6 -0
- data/README.md +12 -224
- data/bin/veye +13 -22
- data/changelogs.md +95 -0
- data/lib/veye/api/base_resource.rb +8 -9
- data/lib/veye/api/github.rb +77 -0
- data/lib/veye/api/json_response.rb +21 -25
- data/lib/veye/api/package.rb +98 -0
- data/lib/veye/api/project.rb +107 -0
- data/lib/veye/api/resource.rb +9 -8
- data/lib/veye/api/service.rb +15 -0
- data/lib/veye/api/user.rb +32 -0
- data/lib/veye/api.rb +22 -2
- data/lib/veye/base_executor.rb +13 -9
- data/lib/veye/github/delete.rb +10 -20
- data/lib/veye/github/import.rb +7 -14
- data/lib/veye/github/info.rb +6 -12
- data/lib/veye/github/list.rb +9 -19
- data/lib/veye/github/search.rb +9 -17
- data/lib/veye/github/sync.rb +9 -18
- data/lib/veye/github.rb +1 -1
- data/lib/veye/helpers/format_helpers.rb +15 -5
- data/lib/veye/package/follow.rb +24 -47
- data/lib/veye/package/info.rb +8 -25
- data/lib/veye/package/references.rb +9 -36
- data/lib/veye/package/search.rb +14 -24
- data/lib/veye/package.rb +14 -6
- data/lib/veye/pagination.rb +2 -0
- data/lib/veye/project/check.rb +39 -117
- data/lib/veye/project/license.rb +23 -0
- data/lib/veye/project.rb +4 -3
- data/lib/veye/service.rb +13 -17
- data/lib/veye/user/me.rb +11 -30
- data/lib/veye/user.rb +2 -1
- data/lib/veye/version.rb +1 -1
- data/lib/veye/views/github/info_csv.rb +3 -3
- data/lib/veye/views/github/info_json.rb +4 -0
- data/lib/veye/views/github/list_csv.rb +5 -3
- data/lib/veye/views/github/list_pretty.rb +2 -2
- data/lib/veye/views/github/list_table.rb +3 -2
- data/lib/veye/views/package/info_pretty.rb +1 -1
- data/lib/veye/views/package/search_csv.rb +2 -3
- data/lib/veye/views/package/search_table.rb +1 -3
- data/lib/veye/views/package.rb +1 -1
- data/lib/veye/views/project/licence_csv.rb +3 -3
- data/lib/veye/views/project/licence_json.rb +1 -1
- data/lib/veye/views/project/licence_pretty.rb +1 -1
- data/lib/veye/views/project/licence_table.rb +3 -3
- data/lib/veye/views/user/profile_table.rb +4 -1
- data/lib/veye/views/user.rb +3 -1
- data/lib/veye.rb +29 -61
- data/test/api/github_test.rb +84 -0
- data/test/api/package_test.rb +80 -0
- data/test/api/project_test.rb +118 -0
- data/test/api/service_test.rb +15 -0
- data/test/api/user_test.rb +30 -0
- data/test/fixtures/vcr_cassettes/github_delete.yml +48 -0
- data/test/fixtures/vcr_cassettes/github_import.yml +53 -0
- data/test/fixtures/vcr_cassettes/github_info.yml +49 -0
- data/test/fixtures/vcr_cassettes/github_list.yml +80 -0
- data/test/fixtures/vcr_cassettes/github_sync.yml +48 -0
- data/test/fixtures/vcr_cassettes/package_follow.yml +52 -0
- data/test/fixtures/vcr_cassettes/package_follow_status.yml +48 -0
- data/test/fixtures/vcr_cassettes/package_info.yml +56 -0
- data/test/fixtures/vcr_cassettes/package_reference.yml +46 -0
- data/test/fixtures/vcr_cassettes/package_search.yml +46 -0
- data/test/fixtures/vcr_cassettes/package_unfollow.yml +48 -0
- data/test/fixtures/vcr_cassettes/project_delete.yml +48 -0
- data/test/fixtures/vcr_cassettes/project_get.yml +49 -0
- data/test/fixtures/vcr_cassettes/project_license.yml +49 -0
- data/test/fixtures/vcr_cassettes/project_list.yml +48 -0
- data/test/fixtures/vcr_cassettes/project_update.yml +105 -0
- data/test/fixtures/vcr_cassettes/project_upload.yml +104 -0
- data/test/fixtures/vcr_cassettes/services_ping.yml +46 -0
- data/test/fixtures/vcr_cassettes/user_get_favorites.yml +48 -0
- data/test/fixtures/vcr_cassettes/user_get_profile.yml +48 -0
- data/test/github_delete_test.rb +31 -0
- data/test/github_import_test.rb +94 -0
- data/test/github_info_test.rb +73 -0
- data/test/github_list_test.rb +84 -0
- data/test/github_sync_test.rb +20 -0
- data/test/package_follow_test.rb +38 -0
- data/test/package_info_test.rb +73 -0
- data/test/package_reference_test.rb +67 -0
- data/test/package_search_test.rb +66 -0
- data/test/project_check_test.rb +326 -0
- data/test/project_license_test.rb +72 -0
- data/test/service_test.rb +29 -0
- data/test/test_helper.rb +29 -4
- data/test/user_me_test.rb +126 -0
- data/veye.gemspec +45 -0
- metadata +163 -37
- data/DEPENDENCIES.md +0 -25
- data/lib/veye/helpers/repo_helpers.rb +0 -5
- data/lib/veye/project/licence.rb +0 -38
- data/test/default_test.rb +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e59c86ff9adc88e828f20fe20a362396069afe54
|
|
4
|
+
data.tar.gz: f59ad4dff2e52e45161135fb2d4cf4b9a1f53d28
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6553c798d51e911cf99254244e84150b85ed196af82e220f0204f8c6927342a5f5e82f7e835c2bc659829b99774146fcd2da8f4cd051da3ee8fb6346182e619a
|
|
7
|
+
data.tar.gz: 646f494fc56ba9e2df277859b51f35efcff008d00045d0b281084339f7fcb8cf4e2e616c8a95519c1c2da81694a4bbb0217fb35bbefc2430c51b2f087893725b
|
data/Gemfile.lock
CHANGED
|
@@ -1,58 +1,109 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
veye (0.
|
|
5
|
-
awesome_print (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
veye (0.1)
|
|
5
|
+
awesome_print (>= 1.6)
|
|
6
|
+
contracts (>= 0.11)
|
|
7
|
+
gli (> 2.13)
|
|
8
|
+
rainbow (>= 2.0)
|
|
9
|
+
render-as-markdown
|
|
10
|
+
rest-client (>= 1.8)
|
|
11
|
+
terminal-table (>= 1.4)
|
|
11
12
|
|
|
12
13
|
GEM
|
|
13
14
|
remote: https://rubygems.org/
|
|
14
15
|
specs:
|
|
15
|
-
|
|
16
|
+
addressable (2.3.8)
|
|
17
|
+
ansi (1.5.0)
|
|
18
|
+
aruba (0.7.1)
|
|
16
19
|
childprocess (>= 0.3.6)
|
|
17
20
|
cucumber (>= 1.1.1)
|
|
18
21
|
rspec-expectations (>= 2.7.0)
|
|
19
|
-
|
|
22
|
+
ast (2.1.0)
|
|
23
|
+
astrolabe (1.3.1)
|
|
24
|
+
parser (~> 2.2)
|
|
25
|
+
awesome_print (1.6.1)
|
|
20
26
|
builder (3.2.2)
|
|
21
|
-
childprocess (0.5.
|
|
27
|
+
childprocess (0.5.6)
|
|
22
28
|
ffi (~> 1.0, >= 1.0.11)
|
|
23
|
-
|
|
29
|
+
contracts (0.11.0)
|
|
30
|
+
crack (0.4.2)
|
|
31
|
+
safe_yaml (~> 1.0.0)
|
|
32
|
+
cucumber (2.0.0)
|
|
24
33
|
builder (>= 2.1.2)
|
|
34
|
+
cucumber-core (~> 1.1.3)
|
|
25
35
|
diff-lcs (>= 1.1.3)
|
|
26
36
|
gherkin (~> 2.12)
|
|
27
37
|
multi_json (>= 1.7.5, < 2.0)
|
|
28
|
-
multi_test (>= 0.1.
|
|
38
|
+
multi_test (>= 0.1.2)
|
|
39
|
+
cucumber-core (1.1.3)
|
|
40
|
+
gherkin (~> 2.12.0)
|
|
29
41
|
diff-lcs (1.2.5)
|
|
30
|
-
|
|
42
|
+
domain_name (0.5.24)
|
|
43
|
+
unf (>= 0.0.5, < 1.0.0)
|
|
44
|
+
ffi (1.9.10)
|
|
31
45
|
gherkin (2.12.2)
|
|
32
46
|
multi_json (~> 1.3)
|
|
33
|
-
gli (2.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
gli (2.13.1)
|
|
48
|
+
http-cookie (1.0.2)
|
|
49
|
+
domain_name (~> 0.5)
|
|
50
|
+
json (1.8.3)
|
|
51
|
+
mime-types (2.6.1)
|
|
52
|
+
minitest (5.7.0)
|
|
53
|
+
minitest-reporters (1.0.17)
|
|
54
|
+
ansi
|
|
55
|
+
builder
|
|
56
|
+
minitest (>= 5.0)
|
|
57
|
+
ruby-progressbar
|
|
58
|
+
multi_json (1.11.1)
|
|
59
|
+
multi_test (0.1.2)
|
|
60
|
+
netrc (0.10.3)
|
|
61
|
+
parser (2.2.2.6)
|
|
62
|
+
ast (>= 1.1, < 3.0)
|
|
63
|
+
powerpack (0.1.1)
|
|
38
64
|
rainbow (2.0.0)
|
|
39
|
-
rake (10.
|
|
40
|
-
rdoc (4.
|
|
65
|
+
rake (10.4.2)
|
|
66
|
+
rdoc (4.2.0)
|
|
41
67
|
json (~> 1.4)
|
|
42
68
|
render-as-markdown (0.0.6)
|
|
43
|
-
rest-client (1.
|
|
44
|
-
|
|
45
|
-
|
|
69
|
+
rest-client (1.8.0)
|
|
70
|
+
http-cookie (>= 1.0.2, < 2.0)
|
|
71
|
+
mime-types (>= 1.16, < 3.0)
|
|
72
|
+
netrc (~> 0.7)
|
|
73
|
+
rspec-expectations (3.3.0)
|
|
46
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
47
|
-
rspec-support (~> 3.
|
|
48
|
-
rspec-support (3.0
|
|
49
|
-
|
|
75
|
+
rspec-support (~> 3.3.0)
|
|
76
|
+
rspec-support (3.3.0)
|
|
77
|
+
rubocop (0.33.0)
|
|
78
|
+
astrolabe (~> 1.3)
|
|
79
|
+
parser (>= 2.2.2.5, < 3.0)
|
|
80
|
+
powerpack (~> 0.1)
|
|
81
|
+
rainbow (>= 1.99.1, < 3.0)
|
|
82
|
+
ruby-progressbar (~> 1.4)
|
|
83
|
+
ruby-progressbar (1.7.5)
|
|
84
|
+
safe_yaml (1.0.4)
|
|
85
|
+
terminal-table (1.5.2)
|
|
86
|
+
unf (0.1.4)
|
|
87
|
+
unf_ext
|
|
88
|
+
unf_ext (0.0.7.1)
|
|
89
|
+
vcr (2.9.3)
|
|
90
|
+
webmock (1.21.0)
|
|
91
|
+
addressable (>= 2.3.6)
|
|
92
|
+
crack (>= 0.3.2)
|
|
50
93
|
|
|
51
94
|
PLATFORMS
|
|
52
95
|
ruby
|
|
53
96
|
|
|
54
97
|
DEPENDENCIES
|
|
55
|
-
aruba (
|
|
56
|
-
|
|
57
|
-
|
|
98
|
+
aruba (>= 0.7)
|
|
99
|
+
minitest (>= 5.7)
|
|
100
|
+
minitest-reporters (>= 1.0)
|
|
101
|
+
rake (>= 10.4)
|
|
102
|
+
rdoc (~> 4.2)
|
|
103
|
+
rubocop (>= 0.33)
|
|
104
|
+
vcr (>= 2.9)
|
|
58
105
|
veye!
|
|
106
|
+
webmock (>= 1.21)
|
|
107
|
+
|
|
108
|
+
BUNDLED WITH
|
|
109
|
+
1.10.5
|
data/Makefile
CHANGED
data/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Veye
|
|
2
2
|
|
|
3
|
-
[](https://gitter.im/versioneye/veye?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
4
4
|
|
|
5
|
-
[](https://www.versioneye.com/ruby/veye/0.1)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
[VersionEye](http://www.versioneye.com/) is a cross-platform search engine and crowdsourcing app for opensource software libraries.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Contribute to this crowdsourcing project to make the world a better place for software developers.
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
**veye** is
|
|
16
|
+
**veye** is opensource commandline tool and API client to make all this available on your console and allows you write scripts for continous updating and due diligence.
|
|
17
17
|
|
|
18
18
|
Most endpoints require the api-key, which you can get [here](https://www.versioneye.com/settings/api).
|
|
19
19
|
|
|
@@ -72,7 +72,7 @@ Please visit [your settings page](https://www.versioneye.com/settings/api) on Ve
|
|
|
72
72
|
|
|
73
73
|
```
|
|
74
74
|
$> veye change_key abj23j2bj33k14
|
|
75
|
-
Success: your
|
|
75
|
+
Success: your key is now saved.
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
# Basic usage
|
|
@@ -148,7 +148,6 @@ $> veye projects show rubygem_gemfile_lock_1 --format=md > dependencies.md
|
|
|
148
148
|
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
|
|
152
151
|
#### Empty response
|
|
153
152
|
|
|
154
153
|
There will be situation, when [VersionEye](http://versioneye.com) dont have information about your search, then you will see similar response on commandline:
|
|
@@ -190,240 +189,29 @@ If you want to change timeout settings permanently, then you shall change timeou
|
|
|
190
189
|
|
|
191
190
|
There may be a situation when you need to update/re-write saved config file. Then you you can use `veye initconfig --force` command to re-write already existing configuration file.
|
|
192
191
|
|
|
193
|
-
# Commands
|
|
194
|
-
|
|
195
|
-
## Package
|
|
196
|
-
|
|
197
|
-
#### Package search
|
|
198
|
-
|
|
199
|
-
This command opens window to magnificient world of software packages - VersionEye has ~ 300K software libraries and it's reachable via your commandline.
|
|
200
|
-
|
|
201
|
-
###### Get command help
|
|
202
|
-
|
|
203
|
-
```bash
|
|
204
|
-
$> veye search help
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
###### Basic package search with language filtering
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
$> veye search junit
|
|
211
|
-
$> veye search -l java
|
|
212
|
-
$> veye search --language java
|
|
213
|
-
$> veye search --language-name=java
|
|
214
|
-
|
|
215
|
-
#search packages for multiple languages
|
|
216
|
-
$> veye search --lang=nodejs,php
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
###### Paginate through results
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
$> veye search junit --page 2
|
|
223
|
-
$> veye search junit --page-number=2
|
|
224
|
-
$> veye search json --lang=r,php --page=2
|
|
225
|
-
|
|
226
|
-
#you can cancel pagination with --no-pagination argument
|
|
227
|
-
$> veye search junit --page 3 --no-pagination
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
#### package information
|
|
231
|
-
|
|
232
|
-
Ok, thats most trickiest part of our tool. You need to prepend a language of package just before product's key. For example, if you have Java package with product key junit/junit, then you have to encode this value as: `java/junit/junit`.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
It supports also `--format` flag with same values.
|
|
236
|
-
|
|
237
|
-
```
|
|
238
|
-
$> veye info java/junit/junit
|
|
239
|
-
Asking information about: junit/junit
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-

|
|
243
|
-
|
|
244
|
-
#### package references
|
|
245
192
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
```
|
|
249
|
-
$> veye references java/log4j/log4j
|
|
250
|
-
$> veye references java/log4j/log4j --format=table
|
|
251
|
-
$> veye references java/log4j/log4j --no-pagination
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
#### personal connection with packages
|
|
255
|
-
|
|
256
|
-
`product` command has subcommands to control your personal connections with libraries.
|
|
257
|
-
|
|
258
|
-
```
|
|
259
|
-
;;follow some package to add it into your RSS feed
|
|
260
|
-
$> veye products follow clojure/ztellman/aleph
|
|
261
|
-
$> veye products unfollow clojure/ztellman/aleph
|
|
262
|
-
|
|
263
|
-
;; show the list of products in your's RSS feed
|
|
264
|
-
$> veye products
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
## Project
|
|
268
|
-
|
|
269
|
-
The `project` command holds a multiple subcommands for working with our project files.
|
|
270
|
-
|
|
271
|
-
#### show existing projects
|
|
272
|
-
|
|
273
|
-
```
|
|
274
|
-
$> veye projects list
|
|
275
|
-
$> veye projects --format=table
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
#### show information of specific project
|
|
279
|
-
|
|
280
|
-
A `show` command expects a proper project_key, which you can from the list of already existing projects.
|
|
281
|
-
|
|
282
|
-
```
|
|
283
|
-
$> veye projects show rubygem_gemfile_1
|
|
284
|
-
$> veye projects show rubygem_gemfile_1 --format=table
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
#### check project file
|
|
288
|
-
|
|
289
|
-
Use `check` command to upload your project file and check the state of dependencies. **NB!** it only shows information about dependencies, if you need also project info, then please use `veye project upload` command.
|
|
290
|
-
|
|
291
|
-
```
|
|
292
|
-
$> veye check test/files/Gemfile
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
#### upload project file
|
|
296
|
-
|
|
297
|
-
Use `upload` command to create new project. This command expects proper filepath to the file and the file is smaller than 500KB. VersionEye supports currently 8 different package managers(*Leiningen, Gem, Maven, NPM, Packagist, Pip, Setup.py, R*), Bower and Obj-C is already on pipeline.
|
|
298
|
-
|
|
299
|
-
```
|
|
300
|
-
$> veye projects upload test/files/Gemfile
|
|
301
|
-
$> veye projects upload test/files/maven.pom
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
#### re-upload project file for existing project
|
|
305
|
-
|
|
306
|
-
You can use `update` command to update the information of already existing project.
|
|
307
|
-
This command expects correct project_key and a path to file.
|
|
308
|
-
|
|
309
|
-
```
|
|
310
|
-
$> veye projects update rubygem_gemfile_1 test/files/Gemfile
|
|
311
|
-
$> veye projects update rubygem_gemfile_1 test/files/Gemfile --format=table
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
#### Delete project
|
|
315
|
-
|
|
316
|
-
This command removes the specified project from your project's list.
|
|
317
|
-
|
|
318
|
-
```
|
|
319
|
-
$> veye projects delete rubygem_gemfile_1
|
|
320
|
-
Deleted
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
#### Licences
|
|
324
|
-
|
|
325
|
-
`licence` command returns all licenses used in your project.
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
$> veye projects licences rubygem_gemfile_1 --format=table
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
## Me
|
|
333
|
-
|
|
334
|
-
`me` command returns short overview of your profile and your current payment plan.
|
|
335
|
-
|
|
336
|
-
```
|
|
337
|
-
$> veye me
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
#### Favorite packages
|
|
341
|
-
|
|
342
|
-
`me` command has a `favorite` subcommand, which returns all packages you're currently following.
|
|
343
|
-
|
|
344
|
-
```
|
|
345
|
-
$> veye me favorites
|
|
346
|
-
$> veye me favorites --page=2 --format=table
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
## Github
|
|
350
|
-
|
|
351
|
-
`Github` command includes subcommands to manage your Github repositories on VersionEye.
|
|
352
|
-
|
|
353
|
-
All subcommands expect that you had already connected your Github with your VersionEye account. Otherwise you'll get plain exception message.
|
|
354
|
-
|
|
355
|
-
#### Sync
|
|
356
|
-
|
|
357
|
-
Updates your Github data - this api's resource tries to be lazy: it pulls updates only if there's no cached repositories or Github shows there's any changes on your repositories. But you can use `--force` switch to re-import all data regardless there's any changes on your repositories. Beware this command can takes time.
|
|
358
|
-
|
|
359
|
-
```
|
|
360
|
-
$> veye github sync
|
|
361
|
-
$> veye github sync --force
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
#### List
|
|
365
|
-
|
|
366
|
-
`list` commands shows paginated view of your repositories.
|
|
367
|
-
|
|
368
|
-
```
|
|
369
|
-
$> veye github list --format=table
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
#### Info
|
|
373
|
-
|
|
374
|
-
This command shows more detailed information.
|
|
375
|
-
|
|
376
|
-
```
|
|
377
|
-
$> veye github info versioneye/veye
|
|
378
|
-
$> veye github info versioneye/veye --format=table
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
#### Import
|
|
382
|
-
|
|
383
|
-
`import` command takes fullname of repository and tries to import project file from that repository. Fullname have to include the owner and the name of repository.
|
|
384
|
-
|
|
385
|
-
By default, it tries to read project file on master branch; you can use a `--branch` flag to specify the name of branch.
|
|
386
|
-
|
|
387
|
-
This command gives exception when you are trying to import already imported repository.
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
```
|
|
391
|
-
$> veye github import versioneye/veye
|
|
392
|
-
$> veye github import versioneye/veye --branch=dev
|
|
393
|
-
```
|
|
193
|
+
## Contributing
|
|
394
194
|
|
|
195
|
+
All contributions are welcome - comments, new ideas, help with documentation & help with features;
|
|
395
196
|
|
|
396
|
-
####
|
|
197
|
+
#### Running tests
|
|
397
198
|
|
|
398
|
-
It removes imported project.
|
|
399
199
|
|
|
400
200
|
```
|
|
401
|
-
$>
|
|
402
|
-
$>
|
|
201
|
+
$> rake test
|
|
202
|
+
$> rake test TEST=test/file_you_changed.rb
|
|
403
203
|
```
|
|
404
204
|
|
|
405
|
-
####
|
|
406
|
-
|
|
407
|
-
This command makes authorized request to the Github search api for repositories. As authorized user, you can make up to *5000* request per hour.
|
|
205
|
+
#### Rubocop
|
|
408
206
|
|
|
409
207
|
```
|
|
410
|
-
$>
|
|
411
|
-
|
|
412
|
-
;; filter results by language
|
|
413
|
-
$> veye github search json --language=php --page=2
|
|
414
|
-
|
|
415
|
-
;; filter results by users
|
|
416
|
-
$> veye github search veye --user versioneye
|
|
208
|
+
$> rubocop lib/your_file.rb
|
|
417
209
|
```
|
|
418
210
|
|
|
419
|
-
# Contibuting
|
|
420
|
-
|
|
421
|
-
All contributions are welcome - comments, new ideas, help with documentation & help with features;
|
|
422
|
-
|
|
423
211
|
# License
|
|
424
212
|
The MIT License (MIT)
|
|
425
213
|
|
|
426
|
-
Copyright (c)2015 **VersionEye
|
|
214
|
+
Copyright (c)2015 **VersionEye GmbH**
|
|
427
215
|
|
|
428
216
|
|
|
429
217
|
[MIT licence](http://choosealicense.com/licenses/mit/)
|
data/bin/veye
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
require 'gli'
|
|
4
|
-
require '
|
|
4
|
+
require 'rest-client'
|
|
5
5
|
require 'json'
|
|
6
6
|
require 'rainbow'
|
|
7
7
|
require 'rainbow/ext/string'
|
|
@@ -111,7 +111,7 @@ command :info do |c|
|
|
|
111
111
|
error_msg = Rainbow("package_key is missing").red
|
|
112
112
|
help_now!(error_msg) if args.empty?
|
|
113
113
|
package_key = args.shift
|
|
114
|
-
|
|
114
|
+
Veye::Package::Info.get_package(package_key, options)
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
@@ -133,7 +133,7 @@ command :references do |c|
|
|
|
133
133
|
error_msg = Rainbow("package_key is missing").red
|
|
134
134
|
help_now!(error_msg) if args.empty?
|
|
135
135
|
package_key = args.shift
|
|
136
|
-
|
|
136
|
+
Veye::Package::References.get_references(package_key, options)
|
|
137
137
|
end
|
|
138
138
|
end
|
|
139
139
|
|
|
@@ -149,7 +149,7 @@ command :check do |c|
|
|
|
149
149
|
help_now!("Project file is missing.".color(:red)) if args.empty?
|
|
150
150
|
file_name = args.shift
|
|
151
151
|
api_key = global_options[:api_key]
|
|
152
|
-
|
|
152
|
+
Veye::Project::Check.upload(file_name, api_key, options)
|
|
153
153
|
end
|
|
154
154
|
end
|
|
155
155
|
|
|
@@ -203,14 +203,14 @@ command :projects do |c|
|
|
|
203
203
|
end
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
-
c.desc "show
|
|
206
|
+
c.desc "show licenses of subdependencies"
|
|
207
207
|
c.arg_name "project_key"
|
|
208
|
-
c.command :licenses do |
|
|
209
|
-
|
|
208
|
+
c.command :licenses do |licenses|
|
|
209
|
+
licenses.action do |global_options, options, args|
|
|
210
210
|
help_now!("Project's key is unspecified".color(:red)) if args.empty?
|
|
211
211
|
proj_key = args.shift
|
|
212
212
|
api_key = global_options[:api_key]
|
|
213
|
-
Veye::Project::
|
|
213
|
+
Veye::Project::License.get_licenses(proj_key, api_key, options)
|
|
214
214
|
end
|
|
215
215
|
end
|
|
216
216
|
|
|
@@ -265,7 +265,6 @@ command :products do |c|
|
|
|
265
265
|
end
|
|
266
266
|
end
|
|
267
267
|
|
|
268
|
-
|
|
269
268
|
desc "handle your personal data"
|
|
270
269
|
command :me do |c|
|
|
271
270
|
c.desc "change output format"
|
|
@@ -313,6 +312,9 @@ command :github do |c|
|
|
|
313
312
|
|
|
314
313
|
c.desc "specify branch"
|
|
315
314
|
c.flag [:branch], :default_value => "master"
|
|
315
|
+
|
|
316
|
+
c.desc "specify the name of the project file"
|
|
317
|
+
c.flag [:file, 'file'], :default_value => nil
|
|
316
318
|
|
|
317
319
|
c.action do |global_options, options, args|
|
|
318
320
|
help_now!
|
|
@@ -331,7 +333,7 @@ command :github do |c|
|
|
|
331
333
|
|
|
332
334
|
list.action do |global_options, options, args|
|
|
333
335
|
api_key = global_options[:api_key]
|
|
334
|
-
|
|
336
|
+
Veye::Github::List.get_list(api_key, options)
|
|
335
337
|
end
|
|
336
338
|
end #end-of-list
|
|
337
339
|
|
|
@@ -342,21 +344,10 @@ command :github do |c|
|
|
|
342
344
|
|
|
343
345
|
sync.action do |global_options, options, args|
|
|
344
346
|
api_key = global_options[:api_key]
|
|
345
|
-
|
|
347
|
+
Veye::Github::Sync.import_all(api_key, options)
|
|
346
348
|
end
|
|
347
349
|
end #end of sync
|
|
348
350
|
|
|
349
|
-
c.desc "search repositories on github"
|
|
350
|
-
c.arg_name "search_term"
|
|
351
|
-
c.command :search do |gsearch|
|
|
352
|
-
gsearch.action do |global_options, options, args|
|
|
353
|
-
help_now!("the search term is mandatory.".color(:red)) if args.empty?
|
|
354
|
-
search_term = args.shift
|
|
355
|
-
api_key = global_options[:api_key]
|
|
356
|
-
Veye::Github::Search.search(api_key, search_term, options)
|
|
357
|
-
end
|
|
358
|
-
end # end of search
|
|
359
|
-
|
|
360
351
|
c.desc "show more specific information for the repository"
|
|
361
352
|
c.arg_name "repo_name"
|
|
362
353
|
c.command :info do |info|
|
data/changelogs.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Changelogs
|
|
2
|
+
|
|
3
|
+
## 0.1
|
|
4
|
+
|
|
5
|
+
* first stable release - no new functionalities
|
|
6
|
+
* all commands' have tests
|
|
7
|
+
* refactored API calls out of commands
|
|
8
|
+
* moved API into own namespace
|
|
9
|
+
* made API accessible from other projects
|
|
10
|
+
* fixed SSL issue;
|
|
11
|
+
* removed SSL generatation
|
|
12
|
+
* added Rubocop and removed biggest code smells
|
|
13
|
+
* github import supports now file and branch parameters
|
|
14
|
+
* fixed bugs in presentations when fields are nil
|
|
15
|
+
* updated dependencies
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 0.0.9
|
|
19
|
+
|
|
20
|
+
* added references endpoint
|
|
21
|
+
* updated docs
|
|
22
|
+
* added OSS license
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 0.0.8
|
|
26
|
+
|
|
27
|
+
* added timeout opts
|
|
28
|
+
* cleanups
|
|
29
|
+
|
|
30
|
+
## 0.0.7
|
|
31
|
+
|
|
32
|
+
* added commands to work with Github repositories.
|
|
33
|
+
* big view refactoring
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## 0.0.6
|
|
37
|
+
|
|
38
|
+
first usable gem
|
|
39
|
+
|
|
40
|
+
* no key checking for `ping` and `search` command (contributed by Richard Metzler)
|
|
41
|
+
* seemless SSL key generation - no cmd-line hack anymore
|
|
42
|
+
* command `project list` shows now licence information
|
|
43
|
+
* `project` command supports now markdown format. (contributed by Richard Metzler)
|
|
44
|
+
* added helper method `format_supported?` to check output format is supported.
|
|
45
|
+
* renamed licence command to `license`
|
|
46
|
+
* `ping`, `search` can now execut without identification
|
|
47
|
+
*
|
|
48
|
+
|
|
49
|
+
#### Bug fixes
|
|
50
|
+
|
|
51
|
+
* [issue #15 - SSL issues ](https://github.com/versioneye/veye/issues/15)
|
|
52
|
+
* [issue #12 - Table format doesn't show outdated:true](https://github.com/versioneye/veye/issues/12)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Big thanks all contibutors:
|
|
56
|
+
|
|
57
|
+
* [Richard Metzler](https://github.com/rmetzler)
|
|
58
|
+
|
|
59
|
+
## 0.0.5
|
|
60
|
+
|
|
61
|
+
fix release
|
|
62
|
+
|
|
63
|
+
## 0.0.4
|
|
64
|
+
|
|
65
|
+
fix release
|
|
66
|
+
|
|
67
|
+
* added automatic SSL generation
|
|
68
|
+
* updated dependencies
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## 0.0.3
|
|
72
|
+
|
|
73
|
+
fix release
|
|
74
|
+
|
|
75
|
+
* added command `change_apikey`
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## 0.0.2
|
|
79
|
+
|
|
80
|
+
experimental gem
|
|
81
|
+
|
|
82
|
+
* refactored to use newer API version V2.
|
|
83
|
+
* added SSL support
|
|
84
|
+
* added external config file
|
|
85
|
+
* added support to override global options on commandline
|
|
86
|
+
* added `update` command
|
|
87
|
+
|
|
88
|
+
## 0.0.1
|
|
89
|
+
|
|
90
|
+
first experimental release
|
|
91
|
+
|
|
92
|
+
* added rest-client
|
|
93
|
+
* supports VersionEye only API version V1, over plain http.
|
|
94
|
+
* added 4 different output formats: csv, json, pretty, table
|
|
95
|
+
* added pagination helpers
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
module Veye
|
|
2
2
|
module API
|
|
3
|
-
|
|
3
|
+
# extends child classes with URL and API helpers
|
|
4
|
+
class BaseResource
|
|
4
5
|
attr_reader :resource, :full_path
|
|
5
6
|
|
|
6
7
|
def initialize(path = nil)
|
|
7
|
-
@full_path = $global_options[:url]
|
|
8
|
-
@full_path = "#{@full_path}#{path}" unless path.nil?
|
|
8
|
+
@full_path = "#{$global_options[:url]}#{path}"
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def self.build_url(global_options)
|
|
12
12
|
resource_url = nil
|
|
13
13
|
protocol = global_options[:protocol]
|
|
14
14
|
server = global_options[:server]
|
|
15
|
-
port = global_options.fetch(:port,
|
|
15
|
+
port = global_options.fetch(:port, '')
|
|
16
16
|
path = global_options[:path]
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
if port.to_s.empty?
|
|
19
|
+
resource_url = "#{protocol}://#{server}/#{path}"
|
|
20
20
|
else
|
|
21
|
-
|
|
21
|
+
resource_url = "#{protocol}://#{server}:#{port}/#{path}"
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
resource_url
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
|
-
|
|
28
27
|
end
|
|
29
28
|
end
|