bower_vendor 0.0.17 → 0.0.18

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: 54a5d9f8d4b2f1d909b7946b3dd852b02a0b8ccf
4
- data.tar.gz: 8b173d0a72b29d5c3412dabbd534aa0aa375a550
3
+ metadata.gz: e2143404e8b00fb878d79591d322abd096bcc0de
4
+ data.tar.gz: a0cfb58598f9280a3aa43842ecd271268a8342d2
5
5
  SHA512:
6
- metadata.gz: ba3443d2eed8579c29eaa68b853987694844d54bc273bb20bf760e154eda6b2b0640b57b959697a027cbd92065b93f53759217b45483c59b092b47a2b93cf2b0
7
- data.tar.gz: ba05d3c1da4440f361e15cc7c2a2952eb63a765cf40d2a15453acbbf6dd76d17515d20f5041f2ab8f0868cac9c23e733b8009d00f6cf1c38b3d5ad10596cff75
6
+ metadata.gz: 72803a3b96b4c42768c9be4a46e75b11bb970d817171b58f76ff547c61897313cab131c25bc225643fb3f43382e51123f704da6ee1f7d9a428ecd6647b8188a0
7
+ data.tar.gz: 0b898156a61e220de861d56d162d820e9d1eb743e9c31aa56f76e7e0d16c578f207119270d978b753b2b957bf7b17a7de20d2cf8435fa305ed217f3e1bbddf95
data/.gitignore CHANGED
@@ -14,4 +14,5 @@
14
14
  *.gem
15
15
  mkmf.log
16
16
  /vendor
17
- /vendor.yml
17
+ node_modules
18
+ package-lock.json
data/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 9.7.1
data/README.md CHANGED
@@ -30,19 +30,26 @@ gem 'bower_vendor'
30
30
 
31
31
  1) Configuration file
32
32
 
33
- Syntax
33
+ github Syntax
34
34
  ```ruby
35
35
  # git & tag for the cases when bower central repo doesn't
36
36
  # have some package registered
37
37
  bootstrap-multiselect:
38
38
  version: X.Y.Z
39
- # git: git@github.com:gituser/repo-path.git
40
- # tag: <git-tag>
39
+ git: git@github.com:gituser/repo-path.git
40
+ tag: <git-tag>
41
41
  assets:
42
42
  - <asset-pattern>
43
43
  - <asset-path>:
44
44
  - <asset pattern>
45
+ ```
46
+
47
+ URL Syntax
45
48
  ```ruby
49
+ bootstrap-multiselect:
50
+ version: X.Y.Z
51
+ url: https://some.host/some.js
52
+ ```
46
53
 
47
54
 
48
55
  vendor.yml
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "bundler", "~> 1.7"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_development_dependency "pry"
26
+ spec.add_development_dependency "pry-byebug"
26
27
  end
@@ -35,15 +35,19 @@ module BowerVendor
35
35
  end
36
36
 
37
37
  def work_dir
38
- if defined?(Rails)
39
- "#{Rails.root}/tmp"
40
- else
41
- 'tmp'
42
- end
38
+ "#{self.root_dir}/tmp"
43
39
  end
44
40
 
45
41
  def local_node_bin
46
- "#{Rails.root}/node_modules/.bin"
42
+ "#{self.root_dir}/node_modules/.bin"
43
+ end
44
+
45
+ def root_dir
46
+ @root_dir ||= if defined?(Rails)
47
+ Rails.root
48
+ else
49
+ Dir.pwd
50
+ end
47
51
  end
48
52
 
49
53
  def load_vendors
@@ -13,6 +13,7 @@ module BowerVendor
13
13
 
14
14
  def executable
15
15
  f = "#{local_node_bin}/bcu"
16
+ puts "BCU: #{f}"
16
17
  File.exists?(f) ? f : 'bcu'
17
18
  end
18
19
  end
@@ -48,7 +48,7 @@ module BowerVendor
48
48
  msg level, asset
49
49
 
50
50
  version = asset_data['version'].to_s
51
- raise "VERSION MISSING: #{asset_data.inspect}" if version.blank?
51
+ raise "VERSION MISSING: #{asset_data.inspect}" if version.empty?
52
52
 
53
53
  asset_path = asset.gsub("{{VERSION}}", version)
54
54
  src = "#{full_asset_key_src_dir(asset_key)}/#{asset_path}"
@@ -23,6 +23,11 @@ module BowerVendor
23
23
  tag_version = tag ? "#{git}##{tag}" : git
24
24
  end
25
25
 
26
+ url = vendor['url']
27
+ if url
28
+ tag_version = url
29
+ end
30
+
26
31
  data[:dependencies][vendor_key] = tag_version
27
32
  data[:resolutions][vendor_key] = version
28
33
  end
@@ -1,3 +1,3 @@
1
1
  module BowerVendor
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
@@ -0,0 +1,9 @@
1
+ {
2
+ "description": "shut up node",
3
+ "repository": "shut up node",
4
+ "license": "UNLICENSED",
5
+ "dependencies": {
6
+ "bower": "^1.8.2",
7
+ "bower-check-updates": "^2.2.3-1"
8
+ }
9
+ }
@@ -0,0 +1,3 @@
1
+ (function() {
2
+ var test = "test1";
3
+ })();
@@ -0,0 +1,3 @@
1
+ (function() {
2
+ var test = "test2";
3
+ })();
@@ -0,0 +1,23 @@
1
+ angular:
2
+ version: 1.3.15
3
+ assets:
4
+ - angular.js
5
+
6
+ test_1:
7
+ version: test1
8
+ git: git@github.com:kikonen/bower_vendor.git
9
+ tag: test1
10
+ assets:
11
+ - test/test1.js
12
+
13
+ test_2:
14
+ url: https://code.jquery.com/jquery-3.3.1.slim.min.js
15
+ version: test2
16
+ assets:
17
+ - index.js
18
+
19
+ test_3:
20
+ url: https://www.ikari.fi/images/kari.jpg
21
+ version: test3
22
+ assets:
23
+ - index.jpg
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bower_vendor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - kari
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry-byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: Manage vendor assets using simple configuration file
56
70
  email:
57
71
  - mr.kari.ikonen@gmail.com
@@ -60,6 +74,7 @@ extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
62
76
  - ".gitignore"
77
+ - ".nvmrc"
63
78
  - ".ruby-gemset"
64
79
  - ".ruby-version"
65
80
  - Gemfile
@@ -79,6 +94,10 @@ files:
79
94
  - lib/bower_vendor/version.rb
80
95
  - lib/tasks/bower_vendor.rake
81
96
  - lib/tasks/console.rake
97
+ - package.json
98
+ - test/test1.js
99
+ - test/test2.js
100
+ - vendor.yml
82
101
  homepage: https://github.com/kikonen/bower_vendor
83
102
  licenses:
84
103
  - MIT
@@ -103,4 +122,6 @@ rubygems_version: 2.5.1
103
122
  signing_key:
104
123
  specification_version: 4
105
124
  summary: Use bower to manage resources for rails application
106
- test_files: []
125
+ test_files:
126
+ - test/test1.js
127
+ - test/test2.js