cdnget 0.3.0 → 1.0.2

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: 055befc004f39cde2638cf0cc31dc01e4cbc3226
4
- data.tar.gz: 694c18db9e4128ee93119f985c66c7d4656aee27
3
+ metadata.gz: a15b7d4a8a638272f3e873db934d701725fbf8c8
4
+ data.tar.gz: 374210aaf1122decc1d332b98b21c6d3b047bd5d
5
5
  SHA512:
6
- metadata.gz: 4ab7fed7ebd4a61804930cf168deb89e1b30b2326ed9ca3bd609b755236f14d2c905066a24bb39f65b7a090bb4eeffb36b43996550c651d2c6acefdcf6f28b67
7
- data.tar.gz: dea35e5ab6ca166933650c0ff670b0e419ebc5e24b906b31ac45c492c87073cc78abd6840b556574519bacfc7881780cae21296532bca988603727fa684cd1d5
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.3.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
- $ 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/>
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.3.0 $'.split()[1]
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'