cdnget 1.0.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f08c962b34e126b4223544721dccd62fdfc242fc
4
- data.tar.gz: f461d62a21806c43c138c17a0fc69fb3df5a2f6c
3
+ metadata.gz: a15b7d4a8a638272f3e873db934d701725fbf8c8
4
+ data.tar.gz: 374210aaf1122decc1d332b98b21c6d3b047bd5d
5
5
  SHA512:
6
- metadata.gz: c9862859cc9a25407431036702dbbb7fddc4419b2306c9c5f87a6027f4fa650409c549bb14939c8844d85d55ef5e6e4b939788c5550faada3074a899d2108029
7
- data.tar.gz: 9aea1f38fcbb4e332d97c5993905d7d18761f57769fb489fb2aaa056bfa6cc4f71294ef9be50d7df7ef5088c7432a7465397ef2f2bbdd3de656f8602984712b2
6
+ metadata.gz: f73bfdda505b56f7fbcc1e6507740b86e627b6ee6a4d8962c56fa61a7f8a2171494cd8338cb526e55ae38ecced235bb1502c06f095aea14c9186c65d98e331fd
7
+ data.tar.gz: 4bfd3e5be8ef37557643252acef75902fa750f5b127cf95265ea21a1e6c738c0fa5cfb684ddcf0a7e45fc246584ed6ec2c0018050dd7a1d7148a268664dbd7fc
data/CHANGES.md CHANGED
@@ -2,6 +2,13 @@ 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
+
5
12
  Release 1.0.1 (2021-10-02)
6
13
  ---------------------------
7
14
 
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,7 +1,7 @@
1
1
  CDNget
2
2
  ======
3
3
 
4
- ($Release: 1.0.1 $)
4
+ ($Release: 1.0.2 $)
5
5
 
6
6
  CDNget is a utility script to download files from CDNJS, jsDelivr, UNPKG or Google.
7
7
 
@@ -24,20 +24,39 @@ Usage
24
24
  -----
25
25
 
26
26
  $ cdnget # list CDN (cdnjs/jsdelivr/unpkg/google)
27
- $ cdnget [-q] cdnjs # list libraries
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
30
  $ cdnget [-q] cdnjs jquery latest # show latest version
31
31
  $ cdnget [-q] cdnjs jquery 2.2.0 # list library files
32
- $ cdnget [-q] cdnjs jquery 2.2.0 /tmp # download files
33
- /tmp/jquery/2.2.0/jquery.js ... Done (258,388 byte)
34
- /tmp/jquery/2.2.0/jquery.min.js ... Done (85,589 byte)
35
- /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)
36
37
 
37
- $ ls /tmp/jquery/2.2.0
38
+ $ ls static/lib/jquery/2.2.0
38
39
  jquery.js jquery.min.js jquery.min.map
39
40
 
40
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
+
41
60
  Todo
42
61
  ----
43
62
 
@@ -48,6 +67,6 @@ Todo
48
67
  Copyright and License
49
68
  ---------------------
50
69
 
51
- $Copyright: copyright(c) 2016 kuwata-lab.com all rights reserved $
70
+ $Copyright: copyright(c) 2016-2021 kuwata-lab.com all rights reserved $
52
71
 
53
72
  $License: MIT License $
data/Rakefile CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  ###
4
4
 
5
- RELEASE = '$Release: 1.0.1 $'.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'
data/bin/cdnget CHANGED
@@ -30,7 +30,7 @@ require 'pp'
30
30
  module CDNGet
31
31
 
32
32
 
33
- RELEASE = '$Release: 1.0.1 $'.split()[1]
33
+ RELEASE = '$Release: 1.0.2 $'.split()[1]
34
34
 
35
35
 
36
36
  class HttpConnection
@@ -610,8 +610,14 @@ Example:
610
610
  $ #{script} [-q] cdnjs 'jquery*' # search libraries
611
611
  $ #{script} [-q] cdnjs jquery # list versions
612
612
  $ #{script} [-q] cdnjs jquery latest # show latest version
613
- $ #{script} [-q] cdnjs jquery 3.6.0 # list files
614
- $ #{script} [-q] cdnjs jquery 3.6.0 /tmp # download files into directory
613
+ $ #{script} [-q] cdnjs jquery 2.2.0 # list files
614
+ $ mkdir -p static/lib # create a directory
615
+ $ #{script} [-q] cdnjs jquery 2.2.0 static/lib # download files
616
+ static/lib/jquery/2.2.0/jquery.js ... Done (258,388 byte)
617
+ static/lib/jquery/2.2.0/jquery.min.js ... Done (85,589 byte)
618
+ static/lib/jquery/2.2.0/jquery.min.map ... Done (129,544 byte)
619
+ $ ls static/lib/jquery/2.2.0
620
+ jquery.js jquery.min.js jquery.min.map
615
621
 
616
622
  END
617
623
  end
data/cdnget.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |o|
4
4
  o.name = "cdnget"
5
- o.version = '$Release: 1.0.1 $'.split()[1]
5
+ o.version = '$Release: 1.0.2 $'.split()[1]
6
6
  o.authors = ["makoto kuwata"]
7
7
  o.email = ["kwa@kuwata-lab.com"]
8
8
 
data/lib/cdnget.rb CHANGED
@@ -30,7 +30,7 @@ require 'pp'
30
30
  module CDNGet
31
31
 
32
32
 
33
- RELEASE = '$Release: 1.0.1 $'.split()[1]
33
+ RELEASE = '$Release: 1.0.2 $'.split()[1]
34
34
 
35
35
 
36
36
  class HttpConnection
@@ -610,8 +610,14 @@ Example:
610
610
  $ #{script} [-q] cdnjs 'jquery*' # search libraries
611
611
  $ #{script} [-q] cdnjs jquery # list versions
612
612
  $ #{script} [-q] cdnjs jquery latest # show latest version
613
- $ #{script} [-q] cdnjs jquery 3.6.0 # list files
614
- $ #{script} [-q] cdnjs jquery 3.6.0 /tmp # download files into directory
613
+ $ #{script} [-q] cdnjs jquery 2.2.0 # list files
614
+ $ mkdir -p static/lib # create a directory
615
+ $ #{script} [-q] cdnjs jquery 2.2.0 static/lib # download files
616
+ static/lib/jquery/2.2.0/jquery.js ... Done (258,388 byte)
617
+ static/lib/jquery/2.2.0/jquery.min.js ... Done (85,589 byte)
618
+ static/lib/jquery/2.2.0/jquery.min.map ... Done (129,544 byte)
619
+ $ ls static/lib/jquery/2.2.0
620
+ jquery.js jquery.min.js jquery.min.map
615
621
 
616
622
  END
617
623
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cdnget
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - makoto kuwata