landrush 0.18.0 → 0.19.0

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: 6565b76889bc1b8e51cc9b0c84f18dea5e098f26
4
- data.tar.gz: db1b157372c569ad550c4fc428a7c76415ff0b53
3
+ metadata.gz: 3a510542af9198a77fc55d8804dd5052bbfd5bf1
4
+ data.tar.gz: ba9c3d6edaf8103e25fd20e116c6e7c920370380
5
5
  SHA512:
6
- metadata.gz: 71f9a2774ad3556b090813cec7c9c646e531a901cb1bb9fcd0f15f38bed465fd9f5cb719f65dfcf464c6c37518dee0b5b6f5a1bd0733cb5c5b41a978a24e37e1
7
- data.tar.gz: 863b64defc70b3ebc340164ff7cd510d0c26ec1bcbc0960211c34a3fcd33807b74f50b59e21c0b4c63d1c7bb1d226a974c0ab366e6ed4f3bae210ff2182b2458
6
+ metadata.gz: 40f40b883ba0075d027eaff996fc0be8618ec746af2f36fe43c921e43dad247e8837351aec4c8b5e60aad3eb45d3eec085f645b63cb35a36eb5c3039964816db
7
+ data.tar.gz: a3e93086f9dc6f6df8e312f13b9de35a7deee40fa201308c9124cc923b1ab13b56db770a3260949fd6f7ea8edfd2a9ba39670642ff5593e5eb421c2c1abf59aa
data/.rubocop.yml ADDED
@@ -0,0 +1 @@
1
+ inherit_from: .rubocop_todo.yml
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,447 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-01-23 20:53:15 +0100 using RuboCop version 0.36.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ Lint/DuplicateMethods:
11
+ Exclude:
12
+ - 'lib/landrush/resolver_config.rb'
13
+
14
+ # Offense count: 1
15
+ Lint/ParenthesesAsGroupedExpression:
16
+ Exclude:
17
+ - 'test/landrush/cap/linux/read_host_visible_ip_address_test.rb'
18
+
19
+ # Offense count: 1
20
+ # Cop supports --auto-correct.
21
+ # Configuration parameters: IgnoreEmptyBlocks.
22
+ Lint/UnusedBlockArgument:
23
+ Exclude:
24
+ - 'lib/landrush/action/teardown.rb'
25
+
26
+ # Offense count: 3
27
+ # Cop supports --auto-correct.
28
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
29
+ Lint/UnusedMethodArgument:
30
+ Exclude:
31
+ - 'lib/landrush/action/common.rb'
32
+ - 'lib/landrush/config.rb'
33
+ - 'test/support/fake_ui.rb'
34
+
35
+ # Offense count: 7
36
+ Metrics/AbcSize:
37
+ Max: 38
38
+
39
+ # Offense count: 1
40
+ Metrics/CyclomaticComplexity:
41
+ Max: 12
42
+
43
+ # Offense count: 52
44
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
45
+ # URISchemes: http, https
46
+ Metrics/LineLength:
47
+ Max: 157
48
+
49
+ # Offense count: 6
50
+ # Configuration parameters: CountComments.
51
+ Metrics/MethodLength:
52
+ Max: 29
53
+
54
+ # Offense count: 1
55
+ Metrics/PerceivedComplexity:
56
+ Max: 14
57
+
58
+ # Offense count: 1
59
+ # Cop supports --auto-correct.
60
+ Performance/RedundantBlockCall:
61
+ Exclude:
62
+ - 'test/test_helper.rb'
63
+
64
+ # Offense count: 1
65
+ # Cop supports --auto-correct.
66
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
67
+ # SupportedStyles: prefer_alias, prefer_alias_method
68
+ Style/Alias:
69
+ Exclude:
70
+ - 'test/test_helper.rb'
71
+
72
+ # Offense count: 1
73
+ # Cop supports --auto-correct.
74
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
75
+ # SupportedStyles: with_first_parameter, with_fixed_indentation
76
+ Style/AlignParameters:
77
+ Exclude:
78
+ - 'Gemfile'
79
+
80
+ # Offense count: 2
81
+ # Cop supports --auto-correct.
82
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
83
+ # SupportedStyles: always, conditionals
84
+ Style/AndOr:
85
+ Exclude:
86
+ - 'lib/landrush/action/common.rb'
87
+ - 'lib/landrush/action/redirect_dns.rb'
88
+
89
+ # Offense count: 2
90
+ # Cop supports --auto-correct.
91
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
92
+ # SupportedStyles: percent_q, bare_percent
93
+ Style/BarePercentLiterals:
94
+ Exclude:
95
+ - 'lib/landrush/cap/linux/add_iptables_rule.rb'
96
+ - 'lib/landrush/cap/linux/read_host_visible_ip_address.rb'
97
+
98
+ # Offense count: 9
99
+ # Cop supports --auto-correct.
100
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
101
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining
102
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
103
+ # FunctionalMethods: let, let!, subject, watch
104
+ # IgnoredMethods: lambda, proc, it
105
+ Style/BlockDelimiters:
106
+ Exclude:
107
+ - 'lib/landrush/action/common.rb'
108
+ - 'lib/landrush/cap/debian/install_iptables.rb'
109
+ - 'lib/landrush/cap/redhat/install_iptables.rb'
110
+ - 'lib/landrush/plugin.rb'
111
+ - 'test/landrush/cap/linux/read_host_visible_ip_address_test.rb'
112
+ - 'test/landrush/store_test.rb'
113
+
114
+ # Offense count: 1
115
+ # Cop supports --auto-correct.
116
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
117
+ # SupportedStyles: braces, no_braces, context_dependent
118
+ Style/BracesAroundHashParameters:
119
+ Exclude:
120
+ - 'lib/landrush/server.rb'
121
+
122
+ # Offense count: 8
123
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
124
+ # SupportedStyles: nested, compact
125
+ Style/ClassAndModuleChildren:
126
+ Exclude:
127
+ - 'test/support/clear_dependent_vms.rb'
128
+ - 'test/support/fake_resolver_config.rb'
129
+ - 'test/support/fake_working_dir.rb'
130
+ - 'test/support/test_server_daemon.rb'
131
+ - 'test/test_helper.rb'
132
+
133
+ # Offense count: 1
134
+ # Cop supports --auto-correct.
135
+ Style/ColonMethodCall:
136
+ Exclude:
137
+ - 'lib/landrush/server.rb'
138
+
139
+ # Offense count: 1
140
+ # Cop supports --auto-correct.
141
+ Style/DeprecatedHashMethods:
142
+ Exclude:
143
+ - 'lib/landrush/store.rb'
144
+
145
+ # Offense count: 22
146
+ Style/Documentation:
147
+ Enabled: false
148
+
149
+ # Offense count: 1
150
+ Style/DoubleNegation:
151
+ Exclude:
152
+ - 'lib/landrush/config.rb'
153
+
154
+ # Offense count: 1
155
+ # Cop supports --auto-correct.
156
+ Style/EmptyLines:
157
+ Exclude:
158
+ - 'test/landrush/resolver_config_test.rb'
159
+
160
+ # Offense count: 3
161
+ # Cop supports --auto-correct.
162
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
163
+ # SupportedStyles: empty_lines, no_empty_lines
164
+ Style/EmptyLinesAroundBlockBody:
165
+ Exclude:
166
+ - 'test/landrush/resolver_config_test.rb'
167
+ - 'test/landrush/server_test.rb'
168
+
169
+ # Offense count: 1
170
+ # Cop supports --auto-correct.
171
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
172
+ # SupportedStyles: empty_lines, no_empty_lines
173
+ Style/EmptyLinesAroundClassBody:
174
+ Exclude:
175
+ - 'lib/landrush/command.rb'
176
+
177
+ # Offense count: 2
178
+ # Cop supports --auto-correct.
179
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
180
+ # SupportedStyles: empty_lines, no_empty_lines
181
+ Style/EmptyLinesAroundModuleBody:
182
+ Exclude:
183
+ - 'test/landrush/cap/linux/read_host_visible_ip_address_test.rb'
184
+
185
+ # Offense count: 3
186
+ # Configuration parameters: MinBodyLength.
187
+ Style/GuardClause:
188
+ Exclude:
189
+ - 'lib/landrush/action/teardown.rb'
190
+ - 'test/support/fake_resolver_config.rb'
191
+ - 'test/support/test_server_daemon.rb'
192
+
193
+ # Offense count: 13
194
+ # Cop supports --auto-correct.
195
+ # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
196
+ # SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
197
+ Style/HashSyntax:
198
+ Enabled: false
199
+
200
+ # Offense count: 4
201
+ # Cop supports --auto-correct.
202
+ # Configuration parameters: MaxLineLength.
203
+ Style/IfUnlessModifier:
204
+ Exclude:
205
+ - 'lib/landrush/action/common.rb'
206
+ - 'lib/landrush/config.rb'
207
+ - 'test/support/fake_resolver_config.rb'
208
+ - 'test/support/test_server_daemon.rb'
209
+
210
+ # Offense count: 4
211
+ # Cop supports --auto-correct.
212
+ # Configuration parameters: SupportedStyles, IndentationWidth.
213
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
214
+ Style/IndentArray:
215
+ EnforcedStyle: consistent
216
+
217
+ # Offense count: 4
218
+ # Cop supports --auto-correct.
219
+ Style/Lambda:
220
+ Exclude:
221
+ - 'lib/landrush/plugin.rb'
222
+ - 'test/landrush/action/setup_test.rb'
223
+ - 'test/landrush/action/teardown_test.rb'
224
+
225
+ # Offense count: 5
226
+ # Cop supports --auto-correct.
227
+ Style/MutableConstant:
228
+ Exclude:
229
+ - 'issues/vbox/Vagrantfile'
230
+ - 'lib/landrush/action/common.rb'
231
+ - 'lib/landrush/command.rb'
232
+ - 'lib/landrush/config.rb'
233
+ - 'lib/landrush/version.rb'
234
+
235
+ # Offense count: 3
236
+ # Cop supports --auto-correct.
237
+ Style/NegatedIf:
238
+ Exclude:
239
+ - 'lib/landrush/action/setup.rb'
240
+
241
+ # Offense count: 1
242
+ # Cop supports --auto-correct.
243
+ # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
244
+ # SupportedStyles: skip_modifier_ifs, always
245
+ Style/Next:
246
+ Exclude:
247
+ - 'lib/landrush/action/setup.rb'
248
+
249
+ # Offense count: 1
250
+ # Cop supports --auto-correct.
251
+ Style/Not:
252
+ Exclude:
253
+ - 'lib/landrush/action/setup.rb'
254
+
255
+ # Offense count: 2
256
+ # Cop supports --auto-correct.
257
+ Style/NumericLiterals:
258
+ MinDigits: 6
259
+
260
+ # Offense count: 2
261
+ # Cop supports --auto-correct.
262
+ Style/ParallelAssignment:
263
+ Exclude:
264
+ - 'test/support/test_server_daemon.rb'
265
+
266
+ # Offense count: 4
267
+ # Cop supports --auto-correct.
268
+ # Configuration parameters: PreferredDelimiters.
269
+ Style/PercentLiteralDelimiters:
270
+ Exclude:
271
+ - 'landrush.gemspec'
272
+ - 'lib/landrush/cap/linux/redirect_dns.rb'
273
+ - 'test/landrush/action/setup_test.rb'
274
+ - 'test/landrush/store_test.rb'
275
+
276
+ # Offense count: 1
277
+ # Cop supports --auto-correct.
278
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
279
+ # SupportedStyles: lower_case_q, upper_case_q
280
+ Style/PercentQLiterals:
281
+ Exclude:
282
+ - 'lib/landrush/cap/linux/read_host_visible_ip_address.rb'
283
+
284
+ # Offense count: 13
285
+ # Cop supports --auto-correct.
286
+ Style/Proc:
287
+ Exclude:
288
+ - 'test/landrush/action/setup_test.rb'
289
+ - 'test/landrush/action/teardown_test.rb'
290
+
291
+ # Offense count: 2
292
+ # Cop supports --auto-correct.
293
+ Style/RedundantParentheses:
294
+ Exclude:
295
+ - 'lib/landrush/store.rb'
296
+ - 'test/landrush/cap/linux/read_host_visible_ip_address_test.rb'
297
+
298
+ # Offense count: 2
299
+ # Cop supports --auto-correct.
300
+ Style/RedundantSelf:
301
+ Exclude:
302
+ - 'lib/landrush/dependent_vms.rb'
303
+ - 'lib/landrush/server.rb'
304
+
305
+ # Offense count: 2
306
+ # Cop supports --auto-correct.
307
+ Style/RescueModifier:
308
+ Exclude:
309
+ - 'lib/landrush/server.rb'
310
+ - 'lib/landrush/store.rb'
311
+
312
+ # Offense count: 1
313
+ # Cop supports --auto-correct.
314
+ # Configuration parameters: AllowAsExpressionSeparator.
315
+ Style/Semicolon:
316
+ Exclude:
317
+ - 'lib/landrush/resolver_config.rb'
318
+
319
+ # Offense count: 4
320
+ # Cop supports --auto-correct.
321
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
322
+ # SupportedStyles: only_raise, only_fail, semantic
323
+ Style/SignalException:
324
+ Exclude:
325
+ - 'lib/landrush/action/common.rb'
326
+ - 'lib/landrush/cap/linux/read_host_visible_ip_address.rb'
327
+ - 'lib/landrush/command.rb'
328
+
329
+ # Offense count: 2
330
+ # Cop supports --auto-correct.
331
+ Style/SpaceAfterComma:
332
+ Exclude:
333
+ - 'lib/landrush/command.rb'
334
+ - 'test/test_helper.rb'
335
+
336
+ # Offense count: 1
337
+ # Cop supports --auto-correct.
338
+ Style/SpaceAfterMethodName:
339
+ Exclude:
340
+ - 'lib/landrush/server.rb'
341
+
342
+ # Offense count: 6
343
+ # Cop supports --auto-correct.
344
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
345
+ # SupportedStyles: space, no_space
346
+ Style/SpaceAroundEqualsInParameterDefault:
347
+ Enabled: false
348
+
349
+ # Offense count: 2
350
+ # Cop supports --auto-correct.
351
+ # Configuration parameters: AllowForAlignment.
352
+ Style/SpaceAroundOperators:
353
+ Exclude:
354
+ - 'test/landrush/server_test.rb'
355
+
356
+ # Offense count: 2
357
+ # Cop supports --auto-correct.
358
+ # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
359
+ # SupportedStyles: space, no_space
360
+ Style/SpaceInsideBlockBraces:
361
+ Enabled: false
362
+
363
+ # Offense count: 2
364
+ # Cop supports --auto-correct.
365
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
366
+ # SupportedStyles: space, no_space
367
+ Style/SpaceInsideHashLiteralBraces:
368
+ Enabled: false
369
+
370
+ # Offense count: 2
371
+ # Cop supports --auto-correct.
372
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
373
+ # SupportedStyles: use_perl_names, use_english_names
374
+ Style/SpecialGlobalVars:
375
+ Enabled: false
376
+
377
+ # Offense count: 61
378
+ # Cop supports --auto-correct.
379
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
380
+ # SupportedStyles: single_quotes, double_quotes
381
+ Style/StringLiterals:
382
+ Enabled: false
383
+
384
+ # Offense count: 1
385
+ # Cop supports --auto-correct.
386
+ # Configuration parameters: IgnoredMethods.
387
+ # IgnoredMethods: respond_to
388
+ Style/SymbolProc:
389
+ Exclude:
390
+ - 'lib/landrush/cap/linux/read_host_visible_ip_address.rb'
391
+
392
+ # Offense count: 4
393
+ # Cop supports --auto-correct.
394
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
395
+ # SupportedStyles: final_newline, final_blank_line
396
+ Style/TrailingBlankLines:
397
+ Exclude:
398
+ - 'lib/landrush/cap/linux/add_iptables_rule.rb'
399
+ - 'lib/landrush/cap/linux/redirect_dns.rb'
400
+ - 'test/landrush/action/teardown_test.rb'
401
+ - 'test/support/fake_working_dir.rb'
402
+
403
+ # Offense count: 1
404
+ # Cop supports --auto-correct.
405
+ # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
406
+ # SupportedStyles: comma, consistent_comma, no_comma
407
+ Style/TrailingCommaInArguments:
408
+ Exclude:
409
+ - 'test/landrush/cap/linux/redirect_dns_test.rb'
410
+
411
+ # Offense count: 3
412
+ # Cop supports --auto-correct.
413
+ # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
414
+ # SupportedStyles: comma, consistent_comma, no_comma
415
+ Style/TrailingCommaInLiteral:
416
+ Exclude:
417
+ - 'lib/landrush/action/common.rb'
418
+ - 'test/landrush/cap/linux/configured_dns_servers_test.rb'
419
+
420
+ # Offense count: 1
421
+ # Cop supports --auto-correct.
422
+ Style/TrailingWhitespace:
423
+ Exclude:
424
+ - 'examples/Vagrantfile'
425
+
426
+ # Offense count: 2
427
+ # Cop supports --auto-correct.
428
+ # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
429
+ # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
430
+ Style/TrivialAccessors:
431
+ Exclude:
432
+ - 'lib/landrush/config.rb'
433
+ - 'lib/landrush/server.rb'
434
+
435
+ # Offense count: 2
436
+ # Cop supports --auto-correct.
437
+ Style/UnneededInterpolation:
438
+ Exclude:
439
+ - 'lib/landrush/command.rb'
440
+
441
+ # Offense count: 3
442
+ # Cop supports --auto-correct.
443
+ Style/UnneededPercentQ:
444
+ Exclude:
445
+ - 'landrush.gemspec'
446
+ - 'lib/landrush/cap/linux/add_iptables_rule.rb'
447
+ - 'lib/landrush/cap/linux/read_host_visible_ip_address.rb'
data/.travis.yml CHANGED
@@ -1,8 +1,21 @@
1
1
  language: ruby
2
2
 
3
+ cache: bundler
4
+
3
5
  rvm:
4
6
  - 2.0.0
5
7
 
6
- before_install:
7
- - sudo apt-get install dnsutils
8
- - rvm @global do gem uninstall bundler -x && gem install bundler -v '~> 1.5.2' # For Vagrant 1.5
8
+ sudo: false
9
+
10
+ addons:
11
+ apt:
12
+ packages:
13
+ - dnsutils
14
+
15
+ env:
16
+ global:
17
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
18
+
19
+ notifications:
20
+ email:
21
+ on_success: never
data/CHANGELOG.md CHANGED
@@ -1,22 +1,17 @@
1
- ## [Unreleased][unreleased]
1
+ ## [0.19.0] - 2016-03-10
2
+ - Added: Support for libvirt provider (#138)
3
+ - Added: support for CNAME records (#99)
4
+ - Breaking: Changing default TLD from `vagrant.dev` to `vagrant.test` (#118)
2
5
 
3
6
  ## [0.18.0] - 2015-01-24
4
-
5
- ### Added
6
- - vagrant: support for `vagrant reload` (#101)
7
+ - Added: support for `vagrant reload` (#101)
7
8
 
8
9
  ## [0.17.0] - 2015-01-18
9
-
10
- ### Added
11
- - cli: `add` / `rm|del` subcommands (#96)
12
-
13
- ### Fixed
14
- - cli: default to showing help when no command is specified
10
+ - Added: cli `add` / `rm|del` subcommands (#96)
11
+ - Fixed: cli: default to showing help when no command is specified
15
12
 
16
13
  ## [0.16.0] - 2015-01-18
17
-
18
- ### Added
19
- - dns: support for IN::PTR records (#98)
14
+ - Added: Support for IN::PTR records (#98)
20
15
 
21
16
  [unreleased]: https://github.com/phinze/landrush/compare/v0.18.0...HEAD
22
17
  [0.18.0]: https://github.com/phinze/landrush/compare/v0.17.0...v0.18.0
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,53 @@
1
+ # Contributing to Landrush
2
+
3
+ The following is a set of guidelines for contributing to Landrush.
4
+ These are just guidelines, please use your best judgment and feel free
5
+ to propose changes to this document in a pull request.
6
+
7
+ At this point, this document is not complete, but as decisions are made
8
+ they will be added to this document.
9
+
10
+ ## Pull Requests
11
+
12
+ * All changes should be made by pull request (PR), even from maintainers.
13
+ * All changes should include documentation updates.
14
+ * Small changes need only 1 ACK. Larger changes need 2 ACKs from
15
+ maintainers before they will be merged. If the author of the PR is a
16
+ maintainer, the submission is considered 1 of the 2 ACKs. Therefore PRs
17
+ from maintainers only require one additional ACK. By "2 ACKs" we mean
18
+ that 2 maintainers must acknowledge that the change is a good one. The
19
+ 2nd person to ACK the PR should merge the PR with a comment including
20
+ their agreement. We default to moving forward and using revert if needed.
21
+
22
+ ## Merging PRs
23
+
24
+ 1. Merging committer should first merge the PR
25
+ 2. Merging committer should update the changelog in the unreleased
26
+ section. Using the github web UI is sufficient
27
+
28
+ ## Releasing
29
+
30
+ Prereqs:
31
+
32
+ * Push access to the `landrush` GitHub repository
33
+ * Rubygems owner of the `landrush` gem
34
+
35
+ Steps:
36
+
37
+ 1. Update `lib/version.rb` with version number.
38
+ 2. Update `CHANGELOG.md` header with version number and current date.
39
+ 3. Make release commit: `git add lib/version.rb CHANGELOG.md; git commit -m 'cut vX.Y.Z'`
40
+ 4. Make release tag: `git tag -m vX.Y.Z vX.Y.Z`
41
+ 5. Push release commit: `git push origin master`
42
+ 6. Build release: `rake build`
43
+ 7. Push released gem: `gem push pkg/landrush-X.Y.Z.gem`
44
+ 8. Update CHANGELOG to add an "Unreleased" section, commit as "clean up after vX.Y.Z".
45
+
46
+ ## Maintainers
47
+
48
+ * Reto Kaiser ([@njam](http://github.com/njam))
49
+ * Eric Sorenson ([@ahpook](http://github.com/ahpook))
50
+ * Josef Strzibny ([@strzibny](http://github.com/strzibny))
51
+ * Florian Holzhauer ([@fh](http://github.com/fh))
52
+ * Brian Exelbierd ([@bexelbie](http://github.com/bexelbie))
53
+ * Paul Hinze ([@phinze](http://github.com/phinze))
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  # Can't use `gemspec` to pull in dependencies, because the landrush gem needs
4
4
  # to be in the :plugins group for Vagrant to detect and load it in development
5
5
 
6
- gem 'rubydns', '0.9.4'
6
+ gem 'rubydns', '1.0.2'
7
7
  gem 'rexec'
8
8
  gem 'rake'
9
9
 
@@ -13,13 +13,15 @@ group :plugins do
13
13
  end
14
14
 
15
15
  group :test do
16
+ gem 'rubocop', '~> 0.38.0'
16
17
  end
17
18
 
18
19
  group :development do
19
20
  gem 'vagrant',
20
21
  :git => 'git://github.com/mitchellh/vagrant.git',
21
- :ref => 'v1.7.1'
22
+ :ref => 'v1.8.1'
22
23
 
23
24
  gem 'byebug'
24
25
  gem 'mocha'
26
+ gem 'minitest'
25
27
  end
data/NOTES.md ADDED
@@ -0,0 +1,28 @@
1
+ # Committer Meeting Notes
2
+
3
+ * 3 March 2016 @ 1700 UTC
4
+
5
+ Committers met and made some plans. Attendance: @phinze, @njam, @bexelbie (others regrets)
6
+
7
+ 1. PR Process
8
+
9
+ * Small issues need 1 ACK
10
+ * Larger issues need 2 ACKs
11
+ * Default towards action - and go with reverts as needed
12
+
13
+ 2. Issue Review: Reto will triage and label
14
+
15
+
16
+ 3. Release plans (see README.md)
17
+
18
+ 4. Additional Contributor to be invited (Hardy Ferentschik @hferentschik)
19
+
20
+ 5. Move landrush up into a Github Org - Paul will do this.
21
+
22
+ 6. Next meeting to be in about 3 weeks - bex to organize
23
+
24
+ Not landrush related, but Vagrant + Puppet libraries need some help with maintenance
25
+
26
+ * https://github.com/rodjek/librarian-puppet
27
+ * https://github.com/mhahn/vagrant-librarian-puppet
28
+ * Interested, reach out to Reto (@njam, reto@retokaiser.com)
data/README.md CHANGED
@@ -26,7 +26,7 @@ Bring up a machine.
26
26
 
27
27
  And you should be able to get your hostname from your host:
28
28
 
29
- $ dig -p 10053 @localhost myhost.vagrant.dev
29
+ $ dig -p 10053 @localhost myhost.vagrant.test
30
30
 
31
31
  If you shut down your guest, the entries associated with it will be removed.
32
32
 
@@ -52,9 +52,9 @@ This is great for overriding production services for nodes you might be testing
52
52
 
53
53
  ### Wildcard Subdomains
54
54
 
55
- For your convenience, any subdomain of a DNS entry known to landrush will resolve to the same IP address as the entry. For example: given `myhost.vagrant.dev -> 1.2.3.4`, both `foo.myhost.vagrant.dev` and `bar.myhost.vagrant.dev` will also resolve to `1.2.3.4`.
55
+ For your convenience, any subdomain of a DNS entry known to landrush will resolve to the same IP address as the entry. For example: given `myhost.vagrant.test -> 1.2.3.4`, both `foo.myhost.vagrant.test` and `bar.myhost.vagrant.test` will also resolve to `1.2.3.4`.
56
56
 
57
- If you would like to configure your guests to be accessible from the host as subdomains of something other than the default `vagrant.dev`, you can use the `config.landrush.tld` option in your Vagrantfile like so:
57
+ If you would like to configure your guests to be accessible from the host as subdomains of something other than the default `vagrant.test`, you can use the `config.landrush.tld` option in your Vagrantfile like so:
58
58
 
59
59
  config.landrush.tld = 'vm'
60
60
 
@@ -86,14 +86,17 @@ have DNS servers that you can easily set as upstreams in the daemon (e.g. DNS re
86
86
  ### Visibility on the Host
87
87
 
88
88
  If you're on an OS X host, we use a nice trick to unobtrusively add a secondary DNS server only for specific domains.
89
+ Landrush adds a file into `/etc/resolver` that points lookups for hostnames ending in your `config.landrush.tld` domain
90
+ name to its DNS server. (Check out `man 5 resolver` on your Mac OS X host for more information on this file's syntax.)
89
91
 
90
- Similar behavior can be achieved on Linux hosts with `dnsmasq`. You can integrate Landrush with dnsmasq on Ubuntu like so (tested on Ubuntu 13.10):
92
+ Though it's not automatically set up by landrush, similar behavior can be achieved on Linux hosts with `dnsmasq`. You
93
+ can integrate Landrush with dnsmasq on Ubuntu like so (tested on Ubuntu 13.10):
91
94
 
92
95
  sudo apt-get install -y resolvconf dnsmasq
93
- sudo sh -c 'echo "server=/vagrant.dev/127.0.0.1#10053" > /etc/dnsmasq.d/vagrant-landrush'
96
+ sudo sh -c 'echo "server=/vagrant.test/127.0.0.1#10053" > /etc/dnsmasq.d/vagrant-landrush'
94
97
  sudo service dnsmasq restart
95
98
 
96
- If you use a TLD other than the default `vagrant.dev`, replace the TLD in the above instructions accordingly. Please be aware that anything ending in '.local' as TLD will not work because the `avahi` daemon reserves this TLD for its own uses.
99
+ If you use a TLD other than the default `vagrant.test`, replace the TLD in the above instructions accordingly. Please be aware that anything ending in '.local' as TLD will not work because the `avahi` daemon reserves this TLD for its own uses.
97
100
 
98
101
  ### Visibility on other Devices (phone)
99
102
 
@@ -105,7 +108,50 @@ Please refer to [/doc/proxy-mobile](/doc/proxy-mobile) for instructions.
105
108
 
106
109
  Check out `vagrant landrush` for additional commands to monitor the DNS server daemon.
107
110
 
108
- ## Help Out!
111
+ ## RoadMap
109
112
 
110
- This project could use your feedback and help! Please don't hesitate to open issues or submit pull requests. NO HESITATION IS ALLOWED. NONE WHATSOEVER.
113
+ The committers met and have set a basic roadmap as of 3 March 2016:
111
114
 
115
+ 1. 0.19 will be released as soon as possible. The goal is to make newer
116
+ code commits available and document the release process.
117
+
118
+ 2. Release 0.20 will occur soon. We would like to try to land two PRs:
119
+
120
+ * PR #125 - Multiple TLDs
121
+ * PR #144 - Cucumber Acceptance Tests
122
+
123
+ The release goal is by 1 April 2016
124
+
125
+ 3. Release 0.90 (or 1.0) will occur afterward. Goals:
126
+
127
+ * PR #122 - Enhanced IP/NIC selection
128
+ * PR #154 Windows support for EventMachine/DNS
129
+ * We need your help, eventmachine has not proven to be very stable.
130
+ * Can we find an alternative to RubyDNS? Should we try something
131
+ in Go or another contained cross-platform binary?
132
+ * This would deal with the RubyDNS dependency tree and challenges
133
+ * PR #160 - Cygwin Fix
134
+
135
+ 4. With Release 0.90 or 1.0 or later
136
+
137
+ * PR #62 - Arbitrary record types
138
+
139
+ ## Development
140
+
141
+ Install dependencies:
142
+
143
+ bundle install
144
+
145
+ Run the test suite:
146
+
147
+ bundle exec rake
148
+
149
+ Run the vagrant binary with the landrush plugin loaded from your local source code:
150
+
151
+ bundle exec vagrant landrush <command>
152
+
153
+ ### Help Out!
154
+
155
+ This project could use your feedback and help! Please don't hesitate to open issues or submit pull requests. NO HESITATION IS ALLOWED. NONE WHATSOEVER. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
156
+
157
+ The Maintainers try to meet periodically. [Notes](NOTES.md) are available.
data/Rakefile CHANGED
@@ -1,14 +1,19 @@
1
1
  require 'bundler/gem_tasks'
2
-
3
2
  require 'rake/testtask'
3
+ require 'rubocop/rake_task'
4
4
 
5
5
  Rake::TestTask.new do |t|
6
- t.pattern = "test/**/*_test.rb"
6
+ t.pattern = 'test/**/*_test.rb'
7
7
  t.libs << 'test'
8
8
  end
9
9
 
10
- task :default => :test
10
+ task default: [
11
+ :rubocop,
12
+ :test
13
+ ]
11
14
 
12
15
  task :generate_diagrams do
13
- sh "cd doc; seqdiag --fontmap=support/seqdiag.fontmap -Tsvg vagrant_dns_without_landrush.diag"
16
+ sh 'cd doc; seqdiag --fontmap=support/seqdiag.fontmap -Tsvg vagrant_dns_without_landrush.diag'
14
17
  end
18
+
19
+ RuboCop::RakeTask.new
@@ -28,21 +28,23 @@ In its configuration file forward all queries to your local Landrush and disable
28
28
 
29
29
  After restarting bind you should be able to resolve your VM's entries on your local default DNS server (port 53):
30
30
 
31
- $ dig -p 53 @localhost myhost.vagrant.dev
31
+ $ dig -p 53 @localhost myhost.vagrant.test
32
32
 
33
33
  ## Configure DNS server on your mobile phone
34
34
  Set your bind server's IP address as the DNS server on your external device.
35
35
 
36
- How to set the DNS server on iOS:
36
+ **How to set the DNS server on iOS:**
37
37
 
38
38
  1. Open *Settings* > *Wi-Fi*
39
39
  2. Tap the *i*-icon next to your network
40
40
  3. Tap the *DNS*-row and edit the value
41
41
 
42
- How to set the DNS server on Android 4:
42
+ **How to set the DNS server on Android:**
43
43
 
44
44
  1. Open *Settings* > *Wi-Fi*
45
45
  2. Tap and hold your network, then chose *Modify network*
46
46
  3. Check *Show advanced options*
47
47
  4. Under *IP Settings* tap *DHCP / Static* and change the value to *Static*
48
48
  5. Change the *DNS 1* value and tap *Save*
49
+
50
+ Or use the [Dns Changer](https://play.google.com/store/apps/details?id=net.emrekoc.dnschanger) application.
data/examples/Vagrantfile CHANGED
@@ -1,4 +1,4 @@
1
- #
1
+ #
2
2
  # This serves as a simple example, and it's what I'm using for testing locally.
3
3
  #
4
4
  # If you're doing development and want to run this locally you can simply
@@ -13,7 +13,7 @@ Vagrant.configure("2") do |config|
13
13
 
14
14
  config.landrush.enabled = true
15
15
 
16
- config.vm.hostname = "myhost.vagrant.dev"
16
+ config.vm.hostname = "myhost.vagrant.test"
17
17
 
18
18
  config.landrush.host 'static1.example.com', '1.2.3.4'
19
19
  config.landrush.host 'static2.example.com', '2.3.4.5'
@@ -13,7 +13,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
13
13
  # Every Vagrant virtual environment requires a box to build off of.
14
14
  config.vm.box = 'precise64'
15
15
  config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
16
- config.vm.hostname = 'vbox.vagrant.dev'
16
+ config.vm.hostname = 'vbox.vagrant.test'
17
17
  config.landrush.enable
18
18
 
19
19
  # The url from where the 'config.vm.box' box will be fetched if it
data/landrush.gemspec CHANGED
@@ -28,6 +28,6 @@ Gem::Specification.new do |spec|
28
28
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
29
29
  spec.require_paths = ['lib']
30
30
 
31
- spec.add_dependency 'rubydns', '0.9.4'
31
+ spec.add_dependency 'rubydns', '1.0.2'
32
32
  spec.add_dependency 'rexec'
33
33
  end
@@ -3,6 +3,7 @@ module Landrush
3
3
  module Common
4
4
  SUPPORTED_PROVIDERS = {
5
5
  'VagrantPlugins::ProviderVirtualBox::Provider' => :virtualbox,
6
+ 'VagrantPlugins::ProviderLibvirt::Provider' => :libvirt,
6
7
  'HashiCorp::VagrantVMwarefusion::Provider' => :vmware_fusion,
7
8
  'VagrantPlugins::Parallels::Provider' => :parallels,
8
9
  'Landrush::FakeProvider' => :fake_provider,
@@ -28,6 +29,10 @@ module Landrush
28
29
  provider == :virtualbox
29
30
  end
30
31
 
32
+ def libvirt?
33
+ provider == :libvirt
34
+ end
35
+
31
36
  def vmware?
32
37
  provider == :vmware_fusion
33
38
  end
@@ -4,9 +4,12 @@ module Landrush
4
4
  include Common
5
5
 
6
6
  def call(env)
7
- handle_action_stack(env) do
8
- redirect_dns if enabled? and guest_redirect_dns?
9
- end
7
+ handle_action_stack(env) {}
8
+
9
+ # This is after the middleware stack returns, which, since we're right
10
+ # before the Network action, should mean that all interfaces are good
11
+ # to go.
12
+ redirect_dns if enabled? and guest_redirect_dns?
10
13
  end
11
14
 
12
15
  def redirect_dns
@@ -22,7 +25,7 @@ module Landrush
22
25
  case provider
23
26
  when :virtualbox then
24
27
  '10.0.2.2'
25
- when :vmware_fusion then
28
+ when :vmware_fusion, :libvirt then
26
29
  _gateway_for_ip(machine.guest.capability(:configured_dns_servers).first)
27
30
  when :parallels then
28
31
  machine.provider.capability(:host_address)
@@ -44,9 +44,17 @@ module Landrush
44
44
 
45
45
  def start_server
46
46
  return if Server.running?
47
-
48
- info 'starting dns server'
49
- Server.start
47
+ # We need to avoid forking with libvirt provider since the forked process
48
+ # would try to reuse the libvirt connection and fail.
49
+ if libvirt?
50
+ require 'open3'
51
+ Kernel.puts '[landrush] Starting landrush in background...'
52
+ _stdout, stderr, status = Open3.capture3('vagrant landrush start')
53
+ Kernel.puts stderr unless status
54
+ else
55
+ info 'starting dns server'
56
+ Server.start
57
+ end
50
58
  end
51
59
 
52
60
  def setup_static_dns
@@ -9,7 +9,7 @@ module Landrush
9
9
 
10
10
  DEFAULTS = {
11
11
  :enabled => false,
12
- :tld => 'vagrant.dev',
12
+ :tld => 'vagrant.test',
13
13
  :upstream_servers => [[:udp, '8.8.8.8', 53], [:tcp, '8.8.8.8', 53]],
14
14
  :host_ip_address => nil,
15
15
  :guest_redirect_dns => true
@@ -21,6 +21,11 @@ module Landrush
21
21
  hook.before(VagrantPlugins::ProviderVirtualBox::Action::Network, pre_boot_actions)
22
22
  hook.after(Vagrant::Action::Builtin::WaitForCommunicator, post_boot_actions)
23
23
 
24
+ if defined?(VagrantPlugins::ProviderLibvirt)
25
+ hook.after(VagrantPlugins::ProviderLibvirt::Action::CreateNetworks, pre_boot_actions)
26
+ hook.after(VagrantPlugins::ProviderLibvirt::Action::WaitTillUp, post_boot_actions)
27
+ end
28
+
24
29
  if defined?(HashiCorp::VagrantVMwarefusion)
25
30
  hook.before(HashiCorp::VagrantVMwarefusion::Action::Network, pre_boot_actions)
26
31
  hook.after(HashiCorp::VagrantVMwarefusion::Action::WaitForCommunicator, post_boot_actions)
@@ -37,13 +42,13 @@ module Landrush
37
42
  def self.pre_boot_actions
38
43
  Vagrant::Action::Builder.new.tap do |b|
39
44
  b.use Action::Setup
45
+ b.use Action::RedirectDns
40
46
  end
41
47
  end
42
48
 
43
49
  def self.post_boot_actions
44
50
  Vagrant::Action::Builder.new.tap do |b|
45
51
  b.use Action::InstallPrerequisites
46
- b.use Action::RedirectDns
47
52
  end
48
53
  end
49
54
 
@@ -47,6 +47,17 @@ module Landrush
47
47
  super
48
48
  end
49
49
 
50
+ def self.check_a_record (host, transaction)
51
+ value = Store.hosts.get(host)
52
+ if (IPAddr.new(value) rescue nil)
53
+ name = transaction.name =~ /#{host}/ ? transaction.name : host
54
+ transaction.respond!(value, {:ttl => 0, :name => name})
55
+ else
56
+ transaction.respond!(Name.create(value), resource_class: IN::CNAME, ttl: 0)
57
+ check_a_record(value, transaction)
58
+ end
59
+ end
60
+
50
61
  def self.run
51
62
  server = self
52
63
  RubyDNS::run_server(:listen => interfaces) do
@@ -55,7 +66,7 @@ module Landrush
55
66
  match(/.*/, IN::A) do |transaction|
56
67
  host = Store.hosts.find(transaction.name)
57
68
  if host
58
- transaction.respond!(Store.hosts.get(host), {:ttl => 0})
69
+ server.check_a_record(host, transaction)
59
70
  else
60
71
  transaction.passthrough!(server.upstream)
61
72
  end
@@ -44,18 +44,7 @@ module Landrush
44
44
  end
45
45
 
46
46
  def get(key)
47
- value = current_config[key]
48
- redirect = nil
49
- if value.is_a? String and ! (IPAddr.new(value) rescue nil)
50
- redirect = find(value) if not current_config[value]
51
- end
52
- if value
53
- if redirect
54
- get(redirect)
55
- else
56
- value
57
- end
58
- end
47
+ current_config[key]
59
48
  end
60
49
 
61
50
  def clear!
@@ -1,3 +1,3 @@
1
1
  module Landrush
2
- VERSION = "0.18.0"
2
+ VERSION = "0.19.0"
3
3
  end
@@ -25,7 +25,7 @@ module Landrush
25
25
 
26
26
  setup.call(env)
27
27
 
28
- DependentVMs.list.must_equal %w[somehost.vagrant.dev]
28
+ DependentVMs.list.must_equal %w[somehost.vagrant.test]
29
29
  end
30
30
 
31
31
  it "starts the landrush server if it's not already started" do
@@ -71,7 +71,7 @@ module Landrush
71
71
 
72
72
  setup.call(env)
73
73
 
74
- Store.hosts.get('somehost.vagrant.dev').must_equal '1.2.3.4'
74
+ Store.hosts.get('somehost.vagrant.test').must_equal '1.2.3.4'
75
75
  end
76
76
 
77
77
  it "does nothing if it is not enabled via config" do
@@ -81,7 +81,7 @@ module Landrush
81
81
 
82
82
  setup.call(env)
83
83
 
84
- Store.hosts.get('somehost.vagrant.dev').must_equal nil
84
+ Store.hosts.get('somehost.vagrant.test').must_equal nil
85
85
  end
86
86
  end
87
87
  end
@@ -20,10 +20,10 @@ module Landrush
20
20
  teardown = Teardown.new(app, nil)
21
21
  env = fake_environment
22
22
 
23
- Store.hosts.set('somehost.vagrant.dev', '1.2.3.4')
23
+ Store.hosts.set('somehost.vagrant.test', '1.2.3.4')
24
24
  teardown.call(env)
25
25
 
26
- Store.hosts.get('somehost.vagrant.dev').must_equal nil
26
+ Store.hosts.get('somehost.vagrant.test').must_equal nil
27
27
  end
28
28
 
29
29
  it "removes the machine as a dependent VM" do
@@ -31,7 +31,7 @@ module Landrush
31
31
  teardown = Teardown.new(app, nil)
32
32
  env = fake_environment
33
33
 
34
- DependentVMs.add('somehost.vagrant.dev')
34
+ DependentVMs.add('somehost.vagrant.test')
35
35
  teardown.call(env)
36
36
 
37
37
  DependentVMs.list.must_equal []
@@ -52,7 +52,7 @@ module Landrush
52
52
  app = Proc.new {}
53
53
  teardown = Teardown.new(app, nil)
54
54
  env = fake_environment
55
- DependentVMs.add('otherhost.vagrant.dev')
55
+ DependentVMs.add('otherhost.vagrant.test')
56
56
 
57
57
  Server.start
58
58
  teardown.call(env)
@@ -64,13 +64,13 @@ module Landrush
64
64
  app = Proc.new {}
65
65
  teardown = Teardown.new(app, nil)
66
66
  env = fake_environment
67
- DependentVMs.add('otherhost.vagrant.dev')
67
+ DependentVMs.add('otherhost.vagrant.test')
68
68
 
69
- fake_static_entry(env, 'static.vagrant.dev', '3.4.5.6')
69
+ fake_static_entry(env, 'static.vagrant.test', '3.4.5.6')
70
70
 
71
71
  teardown.call(env)
72
72
 
73
- Store.hosts.get('static.vagrant.dev').must_equal '3.4.5.6'
73
+ Store.hosts.get('static.vagrant.test').must_equal '3.4.5.6'
74
74
  end
75
75
 
76
76
  it "leaves the server alone if it's not running" do
@@ -86,7 +86,7 @@ module Landrush
86
86
  it "does nothing when landrush is disabled" do
87
87
  # somewhat unrealistic since this entry shouldn't be there if it was
88
88
  # disabled in the first place, but oh well
89
- Store.hosts.set('somehost.vagrant.dev', '1.2.3.4')
89
+ Store.hosts.set('somehost.vagrant.test', '1.2.3.4')
90
90
 
91
91
  app = Proc.new {}
92
92
  teardown = Teardown.new(app, nil)
@@ -96,7 +96,7 @@ module Landrush
96
96
 
97
97
  teardown.call(env)
98
98
 
99
- Store.hosts.get('somehost.vagrant.dev').must_equal '1.2.3.4'
99
+ Store.hosts.get('somehost.vagrant.test').must_equal '1.2.3.4'
100
100
  end
101
101
  end
102
102
  end
@@ -8,20 +8,20 @@ module Landrush
8
8
  end
9
9
 
10
10
  it "reports true once a machine has been added" do
11
- DependentVMs.add('recordme.example.dev')
11
+ DependentVMs.add('recordme.example.test')
12
12
  DependentVMs.any?.must_equal true
13
13
  end
14
14
 
15
15
  it "reports false if a machine has been added then removed" do
16
- DependentVMs.add('recordme.example.dev')
17
- DependentVMs.remove('recordme.example.dev')
16
+ DependentVMs.add('recordme.example.test')
17
+ DependentVMs.remove('recordme.example.test')
18
18
  DependentVMs.any?.must_equal false
19
19
  end
20
20
 
21
21
  it "reports true if not all machines have been removed" do
22
- DependentVMs.add('recordme.example.dev')
23
- DependentVMs.add('alsome.example.dev')
24
- DependentVMs.remove('recordme.example.dev')
22
+ DependentVMs.add('recordme.example.test')
23
+ DependentVMs.add('alsome.example.test')
24
+ DependentVMs.remove('recordme.example.test')
25
25
  DependentVMs.any?.must_equal true
26
26
  end
27
27
  end
@@ -35,7 +35,7 @@ module Landrush
35
35
  it 'responds properly to configured machine entries' do
36
36
  Server.start
37
37
 
38
- fake_host = 'boogers.vagrant.dev'
38
+ fake_host = 'boogers.vagrant.test'
39
39
  fake_ip = '99.98.97.96'
40
40
 
41
41
  Store.hosts.set(fake_host, fake_ip)
@@ -45,10 +45,24 @@ module Landrush
45
45
 
46
46
  end
47
47
 
48
+ it 'responds properly to configured cname entries' do
49
+ Server.start
50
+
51
+ fake_host = 'boogers.vagrant.test'
52
+ fake_cname = 'snot.vagrant.test'
53
+ fake_ip = '99.98.97.96'
54
+
55
+ Store.hosts.set(fake_host, fake_ip)
56
+ Store.hosts.set(fake_cname, fake_host)
57
+
58
+ query(fake_cname).must_equal fake_host+'.'
59
+
60
+ end
61
+
48
62
  it 'also resolves wildcard subdomains to a given machine' do
49
63
  Server.start
50
64
 
51
- fake_host = 'boogers.vagrant.dev'
65
+ fake_host = 'boogers.vagrant.test'
52
66
  fake_ip = '99.98.97.96'
53
67
 
54
68
  Store.hosts.set(fake_host, fake_ip)
@@ -54,24 +54,24 @@ module Landrush
54
54
 
55
55
  describe "find" do
56
56
  it "returns the key that matches the end of the search term" do
57
- @store.set('somehost.vagrant.dev', 'here')
57
+ @store.set('somehost.vagrant.test', 'here')
58
58
 
59
- @store.find('foo.somehost.vagrant.dev').must_equal 'somehost.vagrant.dev'
60
- @store.find('bar.somehost.vagrant.dev').must_equal 'somehost.vagrant.dev'
61
- @store.find('foo.otherhost.vagrant.dev').must_equal nil
62
- @store.find('host.vagrant.dev').must_equal nil
59
+ @store.find('foo.somehost.vagrant.test').must_equal 'somehost.vagrant.test'
60
+ @store.find('bar.somehost.vagrant.test').must_equal 'somehost.vagrant.test'
61
+ @store.find('foo.otherhost.vagrant.test').must_equal nil
62
+ @store.find('host.vagrant.test').must_equal nil
63
63
  end
64
64
 
65
65
  it "returns exact matches too" do
66
- @store.set('somehost.vagrant.dev', 'here')
67
- @store.find('somehost.vagrant.dev').must_equal 'somehost.vagrant.dev'
66
+ @store.set('somehost.vagrant.test', 'here')
67
+ @store.find('somehost.vagrant.test').must_equal 'somehost.vagrant.test'
68
68
  end
69
69
 
70
70
  it "returns for prefix searches as well" do
71
- @store.set('somehost.vagrant.dev', 'here')
71
+ @store.set('somehost.vagrant.test', 'here')
72
72
 
73
- @store.find('somehost').must_equal 'somehost.vagrant.dev'
74
- @store.find('somehost.vagrant').must_equal 'somehost.vagrant.dev'
73
+ @store.find('somehost').must_equal 'somehost.vagrant.test'
74
+ @store.find('somehost.vagrant').must_equal 'somehost.vagrant.test'
75
75
  @store.find('somehost.vagr').must_equal nil
76
76
  @store.find('someh').must_equal nil
77
77
  end
data/test/test_helper.rb CHANGED
@@ -97,7 +97,7 @@ def fake_machine(options={})
97
97
  )
98
98
 
99
99
  machine.config.landrush.enabled = options.fetch(:enabled, false)
100
- machine.config.vm.hostname = options.fetch(:hostname, 'somehost.vagrant.dev')
100
+ machine.config.vm.hostname = options.fetch(:hostname, 'somehost.vagrant.test')
101
101
 
102
102
  machine
103
103
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: landrush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Hinze
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-24 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubydns
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.4
19
+ version: 1.0.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.4
26
+ version: 1.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rexec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -55,10 +55,14 @@ extensions: []
55
55
  extra_rdoc_files: []
56
56
  files:
57
57
  - ".gitignore"
58
+ - ".rubocop.yml"
59
+ - ".rubocop_todo.yml"
58
60
  - ".travis.yml"
59
61
  - CHANGELOG.md
62
+ - CONTRIBUTING.md
60
63
  - Gemfile
61
64
  - LICENSE.txt
65
+ - NOTES.md
62
66
  - README.md
63
67
  - Rakefile
64
68
  - doc/img/osx.png
@@ -130,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
134
  version: '0'
131
135
  requirements: []
132
136
  rubyforge_project:
133
- rubygems_version: 2.2.2
137
+ rubygems_version: 2.2.3
134
138
  signing_key:
135
139
  specification_version: 4
136
140
  summary: a vagrant plugin providing consistent DNS visible on host and guests