cdnget 0.3.0 → 1.0.2
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/CHANGES.md +35 -0
- data/MIT-LICENSE +1 -1
- data/README.md +32 -11
- data/Rakefile +2 -2
- data/bin/cdnget +381 -97
- data/cdnget.gemspec +5 -5
- data/lib/cdnget.rb +381 -97
- data/test/cdnget_test.rb +666 -115
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a15b7d4a8a638272f3e873db934d701725fbf8c8
|
4
|
+
data.tar.gz: 374210aaf1122decc1d332b98b21c6d3b047bd5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f73bfdda505b56f7fbcc1e6507740b86e627b6ee6a4d8962c56fa61a7f8a2171494cd8338cb526e55ae38ecced235bb1502c06f095aea14c9186c65d98e331fd
|
7
|
+
data.tar.gz: 4bfd3e5be8ef37557643252acef75902fa750f5b127cf95265ea21a1e6c738c0fa5cfb684ddcf0a7e45fc246584ed6ec2c0018050dd7a1d7148a268664dbd7fc
|
data/CHANGES.md
CHANGED
@@ -2,6 +2,41 @@ Changes
|
|
2
2
|
=======
|
3
3
|
|
4
4
|
|
5
|
+
Release 1.0.2 (2021-10-03)
|
6
|
+
---------------------------
|
7
|
+
|
8
|
+
* Improve help message.
|
9
|
+
* Update `README.md`.
|
10
|
+
|
11
|
+
|
12
|
+
Release 1.0.1 (2021-10-02)
|
13
|
+
---------------------------
|
14
|
+
|
15
|
+
* Skip downloading '.DS_Store' files from unpkg.com (due to 403 Forbidden)
|
16
|
+
|
17
|
+
|
18
|
+
Release 1.0.0 (2021-10-02)
|
19
|
+
---------------------------
|
20
|
+
|
21
|
+
* Download performance improved.
|
22
|
+
* New CDN `unpkg` supported.
|
23
|
+
* Change `jsdelivr` CDN to use new jsdelivr API.
|
24
|
+
* Detect latest version of JS library automatically when `latest` keyword specified as version.
|
25
|
+
* Increase output information of JS library.
|
26
|
+
- license
|
27
|
+
- tags
|
28
|
+
- page url on CDN web site
|
29
|
+
- url of npm package (`*.tgz`)
|
30
|
+
* Add '--debug' option.
|
31
|
+
|
32
|
+
|
33
|
+
Release 0.3.1 (2021-09-30)
|
34
|
+
---------------------------
|
35
|
+
|
36
|
+
* Fix to work on Ruby 3.
|
37
|
+
* Fix to follow API specification changes of CDNJS.com.
|
38
|
+
|
39
|
+
|
5
40
|
Release 0.3.0 (2016-09-07)
|
6
41
|
---------------------------
|
7
42
|
|
data/MIT-LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
$Copyright: copyright(c) 2016 kuwata-lab.com all rights reserved $
|
3
|
+
$Copyright: copyright(c) 2016-2021 kuwata-lab.com all rights reserved $
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
CDNget
|
2
2
|
======
|
3
3
|
|
4
|
-
($Release: 0.
|
4
|
+
($Release: 1.0.2 $)
|
5
5
|
|
6
|
-
CDNget is a utility script to download files from CDNJS, jsDelivr or Google.
|
6
|
+
CDNget is a utility script to download files from CDNJS, jsDelivr, UNPKG or Google.
|
7
7
|
|
8
8
|
|
9
9
|
Install
|
@@ -23,29 +23,50 @@ CDNget is implemented in Ruby and requires Ruby >= 2.0.
|
|
23
23
|
Usage
|
24
24
|
-----
|
25
25
|
|
26
|
-
$ cdnget # list CDN (cdnjs/jsdelivr/google)
|
27
|
-
$ cdnget [-q] cdnjs # list libraries
|
26
|
+
$ cdnget # list CDN (cdnjs/jsdelivr/unpkg/google)
|
27
|
+
$ cdnget [-q] cdnjs # list libraries (except jsdelivr/unpkg)
|
28
28
|
$ cdnget [-q] cdnjs '*jquery*' # search libraries
|
29
29
|
$ cdnget [-q] cdnjs jquery # list library versions
|
30
|
+
$ cdnget [-q] cdnjs jquery latest # show latest version
|
30
31
|
$ cdnget [-q] cdnjs jquery 2.2.0 # list library files
|
31
|
-
$
|
32
|
-
|
33
|
-
/
|
34
|
-
/
|
32
|
+
$ mkdir -p static/lib # create a directory
|
33
|
+
$ cdnget [-q] cdnjs jquery 2.2.0 static/lib # download files
|
34
|
+
static/lib/jquery/2.2.0/jquery.js ... Done (258,388 byte)
|
35
|
+
static/lib/jquery/2.2.0/jquery.min.js ... Done (85,589 byte)
|
36
|
+
static/lib/jquery/2.2.0/jquery.min.map ... Done (129,544 byte)
|
35
37
|
|
36
|
-
$ ls /
|
38
|
+
$ ls static/lib/jquery/2.2.0
|
37
39
|
jquery.js jquery.min.js jquery.min.map
|
38
40
|
|
39
41
|
|
42
|
+
Tips
|
43
|
+
----
|
44
|
+
|
45
|
+
CDNget downloads files with keeping file structures, therefore you can
|
46
|
+
switch file source URL easily (CDN <=> local development server).
|
47
|
+
|
48
|
+
```erb
|
49
|
+
<%
|
50
|
+
if ENV['RACK_ENV'] == "development"
|
51
|
+
static_baseurl = "/static/lib"
|
52
|
+
else # production
|
53
|
+
static_baseurl = "https://cdnjs.cloudflare.com/ajax/libs"
|
54
|
+
end
|
55
|
+
%>
|
56
|
+
<script src="<%= static_baseurl %>/jquery/2.2.0/jquery.min.js"></script>
|
57
|
+
```
|
58
|
+
|
59
|
+
|
40
60
|
Todo
|
41
61
|
----
|
42
62
|
|
43
|
-
* [
|
63
|
+
* [x] change to call api.cdnjs.com
|
64
|
+
* [x] support <https://unpkg.com/>
|
44
65
|
|
45
66
|
|
46
67
|
Copyright and License
|
47
68
|
---------------------
|
48
69
|
|
49
|
-
$Copyright: copyright(c) 2016 kuwata-lab.com all rights reserved $
|
70
|
+
$Copyright: copyright(c) 2016-2021 kuwata-lab.com all rights reserved $
|
50
71
|
|
51
72
|
$License: MIT License $
|
data/Rakefile
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
###
|
4
4
|
|
5
|
-
RELEASE = '$Release: 0.
|
6
|
-
COPYRIGHT = 'copyright(c) 2016 kuwata-lab.com all rights reserved'
|
5
|
+
RELEASE = '$Release: 1.0.2 $'.split()[1]
|
6
|
+
COPYRIGHT = 'copyright(c) 2016-2021 kuwata-lab.com all rights reserved'
|
7
7
|
LICENSE = 'MIT License'
|
8
8
|
|
9
9
|
PROJECT = 'cdnget'
|