cdnget 0.3.1 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76f77978f1ad34c63939c6b3de40f5f37dce102e7fd007e5839485639f6139f0
4
- data.tar.gz: 3af8ce6cbd1723c8e9b8b1e456e1e470355dfdcc2dafe0173dfe74f0c5177f24
3
+ metadata.gz: 0ee85665d1f521277447a37d2b2057eb3a0cb16be76a874ef05bf8424d88138e
4
+ data.tar.gz: c71790bb1ca6e875250888e1130e3b49ee3179e92a6e897cbfd8c58c35c3c152
5
5
  SHA512:
6
- metadata.gz: 26d7e63a270feaeb099c1b2f3a94993bc0b06946bf09827d38e6161d748105ac1f1e0efd50c2207e86b5ef67fda4faf86c7323ae25d5b4f5a9166f72438cb897
7
- data.tar.gz: bf2f70316d9176f6066f24533e1239d203c2bcf8063b3e3e3d3e7c2c37650ad1f244d10965b68369d8d77618eeafacc4a64bfb6fc6d3fe16ea119b74ecef3d42
6
+ metadata.gz: 64f843f73b1437e98221a71cd96f0cbc0ffa92ab8bc7245b6eeccd2b8165b0ad60e95df383ae50047cb876158f63b32e4f3f21b031ca7db303fe7a9d502ad69b
7
+ data.tar.gz: c47564dee5d43ddb407156c5b33c18c12ba709d00372d7800d3b366e2b222762d416bac8bcdfc971d4a572660b3b2f24abcce02695c049db58be68afde336887
data/CHANGES.md CHANGED
@@ -2,6 +2,46 @@ Changes
2
2
  =======
3
3
 
4
4
 
5
+ Release 1.1.0 (2021-10-10)
6
+ ---------------------------
7
+
8
+ * Fix to ignore alpha or beta versions when using `latest` keyword on jsDelivr or UNPKG.
9
+ * Support `@author/name` style NPM package name on jsDelivr and UNPKG.
10
+ * Tweak help message.
11
+ * Tweak error messages
12
+ * (internal) Change UNPKG to use metadata from unpkg.com.
13
+ * (internal) Make source code refactored.
14
+ * (internal) Change testing library from `minitest` to `oktest`.
15
+
16
+
17
+ Release 1.0.2 (2021-10-03)
18
+ ---------------------------
19
+
20
+ * Improve help message.
21
+ * Update `README.md`.
22
+
23
+
24
+ Release 1.0.1 (2021-10-02)
25
+ ---------------------------
26
+
27
+ * Skip downloading '.DS_Store' files from unpkg.com (due to 403 Forbidden)
28
+
29
+
30
+ Release 1.0.0 (2021-10-02)
31
+ ---------------------------
32
+
33
+ * Download performance improved.
34
+ * New CDN `unpkg` supported.
35
+ * Change `jsdelivr` CDN to use new jsdelivr API.
36
+ * Detect latest version of JS library automatically when `latest` keyword specified as version.
37
+ * Increase output information of JS library.
38
+ - license
39
+ - tags
40
+ - page url on CDN web site
41
+ - url of npm package (`*.tgz`)
42
+ * Add '--debug' option.
43
+
44
+
5
45
  Release 0.3.1 (2021-09-30)
6
46
  ---------------------------
7
47
 
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.3.1 $)
4
+ ($Release: 1.1.0 $)
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,51 @@ 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
- $ cdnget [-q] cdnjs jquery 2.2.0 /tmp # download files
32
- /tmp/jquery/2.2.0/jquery.js ... Done (258,388 byte)
33
- /tmp/jquery/2.2.0/jquery.min.js ... Done (85,589 byte)
34
- /tmp/jquery/2.2.0/jquery.min.map ... Done (129,544 byte)
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 /tmp/jquery/2.2.0
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
- * [_] change to call api.cdnjs.com
63
+ * [x] change to call api.cdnjs.com
64
+ * [x] support <https://unpkg.com/>
65
+ * [x] support `@author/name` style NPM package name
44
66
 
45
67
 
46
68
  Copyright and License
47
69
  ---------------------
48
70
 
49
- $Copyright: copyright(c) 2016 kuwata-lab.com all rights reserved $
71
+ $Copyright: copyright(c) 2016-2021 kuwata-lab.com all rights reserved $
50
72
 
51
73
  $License: MIT License $
data/Rakefile CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  ###
4
4
 
5
- RELEASE = '$Release: 0.3.1 $'.split()[1]
6
- COPYRIGHT = 'copyright(c) 2016 kuwata-lab.com all rights reserved'
5
+ RELEASE = '$Release: 1.1.0 $'.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'