jets-bundler 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0bbb66ddef1d0f9f9e7c0f3f1548fdb03e07c098265f6ecb4e02cd3fd29be7b2
4
+ data.tar.gz: 77c58208366756512400c19d58edc9b0765b2774d52bc210968cfb43d821abf6
5
+ SHA512:
6
+ metadata.gz: 3945c2aa56145a2a066e4e607616ff3b268605a1d0643f4ddb334ecf91c8d7ba7c3f9326b7fb9f500eeb65fb8985100eb7ed8ef63f5c499e78793be8f3a9f09d
7
+ data.tar.gz: 07e006e85a793b92b877a3ec355f476c93d2e59ba16f08c09fde0a38e4c322fc80811e31b22bcb0d8ac0fa5e7958aac405491ab3a54f438a49406252aecfcff8
@@ -0,0 +1,34 @@
1
+ return if Bundler::Dsl.instance_methods.include?(:component)
2
+
3
+ require_relative "./eval_gemfile"
4
+
5
+ class Bundler::Dsl
6
+ def component(name, namespace: "engines")
7
+ Dir.chdir(__dir__) do
8
+ component_group = name.to_sym
9
+ group :default, component_group do
10
+ gem name, path: "#{namespace}/#{name}"
11
+
12
+ if File.readable?("#{namespace}/#{name}/Gemfile.runtime")
13
+ eval_gemfile "#{namespace}/#{name}/Gemfile.runtime"
14
+ end
15
+ end
16
+
17
+ group component_group do
18
+ expanded_spec_path = Pathname.new("#{namespace}/#{name}/#{name}.gemspec").expand_path(@gemfile&.parent)
19
+
20
+ spec = Gem::Specification.load(expanded_spec_path.to_s)
21
+
22
+ spec.dependencies.select { |s| s.type == :development }.each do |dep|
23
+ current = @dependencies.find { |current_dep| current_dep.name == dep.name }
24
+
25
+ if current
26
+ next if current.source.is_a?(Bundler::Source::Path)
27
+ end
28
+
29
+ gem dep.name, *dep.requirement.to_s.split(/,\s*/)
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,12 @@
1
+ return if Bundler::Dsl.instance_methods.include?(:eval_gemfile_original)
2
+
3
+ class Bundler::Dsl
4
+ alias eval_gemfile_original eval_gemfile
5
+
6
+ def eval_gemfile(gemfile, contents = nil)
7
+ expanded_gemfile_path = Pathname.new(gemfile).expand_path(@gemfile&.parent)
8
+ return if @gemfiles.any? { |path| path == expanded_gemfile_path }
9
+
10
+ eval_gemfile_original(gemfile, contents)
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jets-bundler
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Lauri Jutila
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-11-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry-byebug
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.6'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '13.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '13.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.9'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: fuubar
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.5'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.5'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-instafail
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec_junit_formatter
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.4'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.4'
125
+ - !ruby/object:Gem::Dependency
126
+ name: jets-rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.1'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.1'
139
+ description: Bundler patches for Jets
140
+ email: ruby@laurijutila.com
141
+ executables: []
142
+ extensions: []
143
+ extra_rdoc_files: []
144
+ files:
145
+ - lib/bundler/component.rb
146
+ - lib/bundler/eval_gemfile.rb
147
+ homepage: https://github.com/getjets/jets-bundler
148
+ licenses:
149
+ - MIT
150
+ metadata: {}
151
+ post_install_message:
152
+ rdoc_options: []
153
+ require_paths:
154
+ - lib
155
+ required_ruby_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ required_rubygems_version: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ requirements: []
166
+ rubygems_version: 3.1.2
167
+ signing_key:
168
+ specification_version: 4
169
+ summary: Bundler patches for Jets
170
+ test_files: []